ToME: the Tales of Maj'Eyal
http://forums.te4.org/

Improved Auto-Explore and Rest
http://forums.te4.org/viewtopic.php?f=50&t=44401
Page 5 of 6

Author:  Dracos [ Thu Jul 06, 2017 6:36 am ]
Post subject:  Re: Improved Auto-Explore and Rest

Hmm, this guy:

Code:
if not res_def.invert_values and not res_def.switch_direction then

is basically modifying a chunk that's exactly as current tome 1.5.5. Is it really screwing up there and not in default game? That section is basically left to let it go through the default rest behavior after the mod's optimizations to certain behaviors. Just trying to see it, and a bit unfamiliar with switch_direction.

I would've expected any equilbrium or vim issues to be in my modifications...and maybe they are, in as much as the older handling lines aren't really needed anymore.

Author:  St_ranger_er [ Thu Jul 06, 2017 9:40 am ]
Post subject:  Re: Improved Auto-Explore and Rest

Ive tested it as original tome chunk and as one in addon folder. With steam fix, there are cases when endless loop still appear, but if added swich_direction check, then it's gone. In default game possessors rest works fine.

For how i found it: write this
Code:
game.log("message")

in several places, and watch, where it cannot bypass check, to exit the loop.

I think, there are one more suspicious place to look at in Actor.lua:
Code:
if not game.zone.wilderness and not self:attr("confused") and not self:attr("terrified") and not self:attr("resting") then self:automaticTalents() end

particularly that
Code:
self:attr("resting")


Also light and darkness resources recently have been redesigned, to not dacay over time.

Author:  Dracos [ Thu Jul 06, 2017 2:09 pm ]
Post subject:  Re: Improved Auto-Explore and Rest

Hmmm.

Do you have an easy test case you are using? Admittingly my biggest 'ugh' is not being really sure how to test this one.

Author:  St_ranger_er [ Thu Jul 06, 2017 5:12 pm ]
Post subject:  Re: Improved Auto-Explore and Rest

I don't. The way I use is run the game with mod, do stuff and see what happened. If only i knew a better way to do testing...

Anyway, here is a test case scenario:
0. Do stuff with addon (add a log messages in code/edit code).
1. Enable Ashes/EoR/Possessor/Your addon/Addon dev tool.
2. create a new game(i'm going in infinity dungeon on insane) as possessor.
3. Set up character (allocate enough to possess).
4. Possess a summoner/doombringer/mindslayer/... another chass you want to test (rare+).
5. Hop in form of possessed creature.
6. Out of combat try to rest.
7. See the result (messages in chat from step 0).

8. if addon doesn't work as intended, go to step 0.

For example my messasges in superloaded Player.lua
Code:
...      
        game.log("after steam")
--      game.log("self.equilibrium_regen < 0 = " .. self.equilibrium_regen)
--      game.log("self:getEquilibrium()" .. self:getEquilibrium())
--      game.log("self:getMinEquilibrium()" .. self:getMinEquilibrium())
      if self:getEquilibrium() > self:getMinEquilibrium() and self.equilibrium_regen < 0 then
--      game.log("equilibrium check true")
         if config.settings.marson.rest_equilibrium == "Enabled" and improveEquilRestRate() then
            config.settings.marson.checkCooldowns = true
         end
...

similar for other resources.

Author:  Dracos [ Sun Jul 09, 2017 2:34 pm ]
Post subject:  Re: Improved Auto-Explore and Rest

Anywhere you are finding those rares? Or just playing until one shows up?

Author:  St_ranger_er [ Sun Jul 09, 2017 5:16 pm ]
Post subject:  Re: Improved Auto-Explore and Rest

They start shows up from 2nd floor in infinite dungeon on insane. Mouse hover in dev mode on rare+ to check which class they have. Reveal map and change zone shortcuts from dev menu helps too.

Author:  Dracos [ Wed Jul 12, 2017 8:01 am ]
Post subject:  Re: Improved Auto-Explore and Rest

Tried that, found a paradox mage...

viewtopic.php?f=42&t=48111

Didn't get any infinite loop though with that, but I could see that being a rather long wait (with godmode, that's 38 turns, so dunno if it's hundreds of turns if it happens normally). Locally have just disabled spacetime tuning during rest if possessing, which eliminates the stall. Will keep going later to try to find a vim type. Waiting to hear how it's supposed to work.

Equilibrium is giving me no problem. So life, mana, psi, equilibrium, and steam have been tested (do have your steam fix in). Think that's just vim left? Maybe hate?

Author:  St_ranger_er [ Wed Jul 12, 2017 9:42 am ]
Post subject:  Re: Improved Auto-Explore and Rest

Yes, vim/hate(especially doomed) monsters also grants steam regen.

I have to say, that without EoR addon next classes:
-wyrmic/summoner/oozemancer,
-sun pala/anori,
-cursed/doomed(cursed not always),
-doombringer/demonologist/corruptor/reaver,
-mindslayer/solipsist,
-kinda temp warden/paradox mage(can't set spacetime pref. paradox, but they often have negative paradox regen per turn).
are fine with current addon version on possessors.

But they causes endless rest with EoR.

Author:  Dracos [ Wed Jul 12, 2017 3:03 pm ]
Post subject:  Re: Improved Auto-Explore and Rest

oh so does that mean just the steam fix is enough? I was hunting others since I thought there were more cases.

Author:  St_ranger_er [ Wed Jul 12, 2017 4:37 pm ]
Post subject:  Re: Improved Auto-Explore and Rest

I think so, because I've checked it now one more time and can't reproduce any endless loops, even without "swich direction" part.

Author:  Dracos [ Thu Jul 13, 2017 4:22 am ]
Post subject:  Re: Improved Auto-Explore and Rest

Alright. Thanks for your help. I suppose I'll update with this and the paradox fix. Not sure still on the restart sustains fix.

Author:  Dracos [ Thu Jul 13, 2017 5:08 am ]
Post subject:  Re: Improved Auto-Explore and Rest

Updated.

Author:  St_ranger_er [ Thu Jul 13, 2017 10:07 am ]
Post subject:  Re: Improved Auto-Explore and Rest

Awesome, well done!

Don't played long with new version, but notice cosmetic issue: 2 lines constantly appears in log while resting (probably debug ones).

Author:  Dracos [ Thu Jul 13, 2017 3:50 pm ]
Post subject:  Re: Improved Auto-Explore and Rest

Oh bah, yeah, should've removed those. Thanks for the poke.

edit:
Pushed fix.

Author:  Dracos [ Wed Aug 02, 2017 3:13 am ]
Post subject:  Re: Improved Auto-Explore and Rest

Added compatibility for Restart Sustains (v2a and above)

Page 5 of 6 All times are UTC
Powered by phpBB® Forum Software © phpBB Group
https://www.phpbb.com/