Jump to content

miner not mining OOS


harrymcb

Recommended Posts

i have a miner that works when i'm in sector. out of sector it doesn't. here is a little troubleshooting i did with the scripts.

 

here is a portion of the server log. in color are points of interest

| Player logged in: shawn.m.greer, index: 1

2017-06-14 01-51-57| scheduled save for sector (-194:407), 0x584b0d0, entities: 1172

2017-06-14 01-51-57| saving sector (-194:407)

2017-06-14 01-51-57| player events roughly every 12.35 minutes

2017-06-14 01-51-57| Player shawn.m.greer moved to sector (-194:407) server time taken for change: 92ms

2017-06-14 01-51-58| sector (-194:407) saved to "C:\Users\shawn\AppData\Roaming\Avorion\galaxies\adventure\sectors\-194_407"

2017-06-14 01-51-58| scheduled save for sector (-194:407), 0x584b0d0, entities: 1172

2017-06-14 01-51-58| saving sector (-194:407)

2017-06-14 01-51-58| scheduled save for sector (-194:406), 0xe959840, entities: 1403

2017-06-14 01-51-58| mining

2017-06-14 01-51-59| sector (-194:407) saved to "C:\Users\shawn\AppData\Roaming\Avorion\galaxies\adventure\sectors\-194_407"

2017-06-14 01-51-59| saving sector (-194:406)

2017-06-14 01-52-00| sector (-194:406) saved to "C:\Users\shawn\AppData\Roaming\Avorion\galaxies\adventure\sectors\-194_406"

2017-06-14 01-52-48| Player shawn.m.greer moved to sector (-194:406)from (-194:407) server time taken for change: 92ms

2017-06-14 01-52-48| Warning, can't keep up, skipping 1 frames...

2017-06-14 01-52-48| scheduled save for sector (-194:406), 0xe959840, entities: 1406

2017-06-14 01-52-48| saving sector (-194:406)

2017-06-14 01-52-49| sector (-194:406) saved to "C:\Users\shawn\AppData\Roaming\Avorion\galaxies\adventure\sectors\-194_406"

2017-06-14 01-52-49| scheduled save for sector (-194:407), 0x584b0d0, entities: 1169

2017-06-14 01-52-49| saving sector (-194:407)

2017-06-14 01-52-50| sector (-194:407) saved to "C:\Users\shawn\AppData\Roaming\Avorion\galaxies\adventure\sectors\-194_407"

2017-06-14 01-52-51| scheduled save for sector (-193:405), 0x12c36830, entities: 1898

2017-06-14 01-52-51| saving sector (-193:405)

2017-06-14 01-52-51| mining

2017-06-14 01-52-52| mining

2017-06-14 01-52-52| sector (-193:405) saved to "C:\Users\shawn\AppData\Roaming\Avorion\galaxies\adventure\sectors\-193_405"

2017-06-14 01-53-52| mining

2017-06-14 01-54-14| Player shawn.m.greer moved to sector (-194:407)from (-194:406) server time taken for change: 71ms

2017-06-14 01-54-15| scheduled save for sector (-194:407), 0x584b0d0, entities: 1160

2017-06-14 01-54-15| saving sector (-194:407)

2017-06-14 01-54-16| sector (-194:407) saved to "C:\Users\shawn\AppData\Roaming\Avorion\galaxies\adventure\sectors\-194_407"

2017-06-14 01-54-16| scheduled save for sector (-194:406), 0xe959840, entities: 1403

2017-06-14 01-54-16| saving sector (-194:406)

2017-06-14 01-54-17| sector (-194:406) saved to "C:\Users\shawn\AppData\Roaming\Avorion\galaxies\adventure\sectors\-194_406"

2017-06-14 01-54-19| scheduled save for sector (-193:405), 0x12c36830, entities: 1898

2017-06-14 01-54-19| saving sector (-193:405)

2017-06-14 01-54-21| sector (-193:405) saved to "C:\Users\shawn\AppData\Roaming\Avorion\galaxies\adventure\sectors\-193_405"

2017-06-14 01-56-48| Player shawn.m.greer moved to sector (-194:406)from (-194:407) server time taken for change: 395ms

2017-06-14 01-56-48| scheduled save for sector (-194:406), 0xe959840, entities: 1402

2017-06-14 01-56-48| saving sector (-194:406)

2017-06-14 01-56-49| sector (-194:406) saved to "C:\Users\shawn\AppData\Roaming\Avorion\galaxies\adventure\sectors\-194_406"

2017-06-14 01-56-49| scheduled save for sector (-194:407), 0x584b0d0, entities: 1162

2017-06-14 01-56-49| saving sector (-194:407)

2017-06-14 01-56-50| sector (-194:407) saved to "C:\Users\shawn\AppData\Roaming\Avorion\galaxies\adventure\sectors\-194_407"

2017-06-14 01-56-50| scheduled save for sector (-193:405), 0x12c36830, entities: 1898

2017-06-14 01-56-51| saving sector (-193:405)

2017-06-14 01-56-51| mining

2017-06-14 01-56-52| sector (-193:405) saved to "C:\Users\shawn\AppData\Roaming\Avorion\galaxies\adventure\sectors\-193_405"

2017-06-14 01-57-06| mining

 

 

here is code i altered in the ai/mining.lua starting from line 117

    elseif valid(minedAsteroid) then
        -- if there is an asteroid to collect, attack it
        if ship.selectedObject == nil
            or ship.selectedObject.index ~= minedAsteroid.index
            or ai.state ~= AIState.Attack then
print("mining")
            ai:setAttack(minedAsteroid)
        end
    end

 

as you see i set the server to print "mining" when this runs. the mining vessel is in sector -194:406. you may notice that mining only prints when i am in that sector plus once on startup. i hope this helps you fix this

 

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...