Jump to content

AI Mining ships arent mining


Worthiestnobody

Recommended Posts

so this is beta branch so this is probably something i discovered or everyone has but ive sent a ship of mine to go mine minerals and after i order it after a few seconds of pressing the button it dissappears, i dont know if the ship continues to mine afterwards or if something stopped it but i thought id let people know, if anyone asks it has a full compliment of crew including a captain a mining system upgrade perm installed and mining lasers.

Link to comment
Share on other sites

  • 2 weeks later...

I too have this issue.  It also occurs with salvaging ships and carriers.  Seems to occur after having completed one full mine or salvage target.  A work around is with  Raw turrets to set a Mine/Refine loop.  Not sure if this operation fix required a specific mod as I do have mods which create new orders.

 

I have tested this issue without mods and can confirm it is not due to mods.

Link to comment
Share on other sites

I found the source of the problem.

 

For players: https://steamcommunity.com/sharedfiles/filedetails/?id=1868721180

 

For developers:

"data\scripts\entity\ai\mine.lua"

Replace "AIMine.canContinueMining()" function with this one:

function AIMine.canContinueMining() -- overridden
    -- prevent terminating script before it even started
    if not miningMaterial then return true end

    return valid(minedLoot) or valid(minedAsteroid) or not noAsteroidsLeft
end

 

Both orderchain.lua and mine.lua perform checks every second. There is a moment where a ship finished mining an asteroid and collected all loot, but didn't find the next asteroid yet. So the function returns "false" there and the orderchain stops the script.

"canContinueMining" should return false only if there are no asteroids left.

 

The same thing for salvaging:

function AISalvage.canContinueSalvaging() -- overridden
    -- prevent terminating script before it even started
    if not salvagingMaterial then return true end

    return valid(minedLoot) or valid(minedWreckage) or not noWreckagesLeft
end

Link to comment
Share on other sites

I've noticed an issue like this, but only when issuing the order from the map screen (if I directly target and communicate with the ship and give the order via this method, it seems to work/stick).  Although I thought in my case it extended to all orders via the map screen, but I may be mistaken.  May be a different issue, anyway, not sure.

Link to comment
Share on other sites

  • 3 weeks later...

Wish i could use your fix, but i still want ingame achievements to work. I can confirm miner stop mining when issued order from map. I then ordered it when in was in same sector and left alone for hour+, it filled its whole cargo hold then.

 

I suppose we can swap sectors from across galaxy now anyway when going in tiny ship. That way we can come in and make the manual order, and go back and continue what you were doing. It just means waiting 2 sector loading screens for a simple mine-command.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...