[Help] Trying to write a script for universal harvesters.

The place to discuss scripting and game modifications for X4: Foundations.

Moderators: Moderators for English X Forum, Scripting / Modding Moderators

Post Reply
Magenta_Lord
Posts: 4
Joined: Sat, 20. May 23, 20:51

[Help] Trying to write a script for universal harvesters.

Post by Magenta_Lord » Sun, 21. May 23, 14:53

Hi, i have a trouble with universal miners logic. If i want to mine only solid resourses with loop order "Sector mining order" and only have miner drones, i need to buy gas drones too. Due to 138 message "No collector drones avaiable". With "Mining in range" single order all works fine.
So i tried to change resupply capital ships logic, by many ways (like add this.assignedcontrolled.cargo.capacity.universal to conditions or add warebasket check for solid or liquid resources). But nothing changed. So i need your help.

My mod
https://www.nexusmods.com/x4foundations/mods/1120
Last edited by Magenta_Lord on Sun, 21. May 23, 21:11, edited 4 times in total.

Halpog
Posts: 432
Joined: Sat, 13. Feb 21, 14:09
x4

Re: [Help] Trying to write a script for universal harvesters.

Post by Halpog » Sun, 21. May 23, 18:38

honestly ... nice u wanna try a mod and work on it. respect for that..
but .. dont bother yourself to figure out the AI in this game, and how it works..
not even the devs can explain it anymore...
there is so much basic stuff in case about AI missing in this game, that even trying to get such stuff running is a lost cause

the vest example how ****** up the AI is in this game are miners !!!!

u have a station with 50 miners assigned too ..guess what happens ...
they go out and mine based on buy orders...so it happens that 1 miner ends up with 60% ore and 30% ice and 10% silicone ......
and this counts for all miners ...
thats the AI ...

instead of being able to tell 10 miners to mine ore, 10 to mine ice, 10 to mine silicone ...
no we have to deal with this ****** AI behaviour...

for dapital ships its totaly the same ... u set a capital to guard a point and guess what ? 1 ships trys to flee.. and the capital follow it till the next sector ...
can also happen that your ship never comes back because its chasing the ship for years ...

Magenta_Lord
Posts: 4
Joined: Sat, 20. May 23, 20:51

Re: [Help] Trying to write a script for universal harvesters.

Post by Magenta_Lord » Sun, 21. May 23, 20:39

Halpog wrote:
Sun, 21. May 23, 18:38
but .. dont bother yourself to figure out the AI in this game, and how it works..
I wish to do it, but I can not. For me, this is already a kind of obsession.

Magenta_Lord
Posts: 4
Joined: Sat, 20. May 23, 20:51

Re: [Help] Trying to write a script for universal harvesters.

Post by Magenta_Lord » Sun, 21. May 23, 22:55

So i think only way - to set dependency between gas-solid miner ship type, desired resourse type in task and required to complete it drones check. But i don`t know how to do it.

Post Reply

Return to “X4: Foundations - Scripts and Modding”