Improved Auto-Explore and Rest

A place to post your add ons and ideas for them

Moderator: Moderator

Message
Author
Dracos
Archmage
Posts: 405
Joined: Sun Jul 13, 2014 4:09 pm

Re: Improved Auto-Explore and Rest

#61 Post by Dracos »

Hmm, this guy:

Code: Select all

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.
ToME Tips - auto-generated spoilers for ToME. - someone else made. I find super awesome, so spreading as well.

St_ranger_er
Thalore
Posts: 172
Joined: Fri Jul 18, 2014 11:48 am

Re: Improved Auto-Explore and Rest

#62 Post by St_ranger_er »

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: Select all

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: Select all

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: Select all

self:attr("resting")
Also light and darkness resources recently have been redesigned, to not dacay over time.

Dracos
Archmage
Posts: 405
Joined: Sun Jul 13, 2014 4:09 pm

Re: Improved Auto-Explore and Rest

#63 Post by Dracos »

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.
ToME Tips - auto-generated spoilers for ToME. - someone else made. I find super awesome, so spreading as well.

St_ranger_er
Thalore
Posts: 172
Joined: Fri Jul 18, 2014 11:48 am

Re: Improved Auto-Explore and Rest

#64 Post by St_ranger_er »

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: Select all

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

Dracos
Archmage
Posts: 405
Joined: Sun Jul 13, 2014 4:09 pm

Re: Improved Auto-Explore and Rest

#65 Post by Dracos »

Anywhere you are finding those rares? Or just playing until one shows up?
ToME Tips - auto-generated spoilers for ToME. - someone else made. I find super awesome, so spreading as well.

St_ranger_er
Thalore
Posts: 172
Joined: Fri Jul 18, 2014 11:48 am

Re: Improved Auto-Explore and Rest

#66 Post by St_ranger_er »

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.

Dracos
Archmage
Posts: 405
Joined: Sun Jul 13, 2014 4:09 pm

Re: Improved Auto-Explore and Rest

#67 Post by Dracos »

Tried that, found a paradox mage...

http://forums.te4.org/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?
ToME Tips - auto-generated spoilers for ToME. - someone else made. I find super awesome, so spreading as well.

St_ranger_er
Thalore
Posts: 172
Joined: Fri Jul 18, 2014 11:48 am

Re: Improved Auto-Explore and Rest

#68 Post by St_ranger_er »

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.

Dracos
Archmage
Posts: 405
Joined: Sun Jul 13, 2014 4:09 pm

Re: Improved Auto-Explore and Rest

#69 Post by Dracos »

oh so does that mean just the steam fix is enough? I was hunting others since I thought there were more cases.
ToME Tips - auto-generated spoilers for ToME. - someone else made. I find super awesome, so spreading as well.

St_ranger_er
Thalore
Posts: 172
Joined: Fri Jul 18, 2014 11:48 am

Re: Improved Auto-Explore and Rest

#70 Post by St_ranger_er »

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

Dracos
Archmage
Posts: 405
Joined: Sun Jul 13, 2014 4:09 pm

Re: Improved Auto-Explore and Rest

#71 Post by Dracos »

Alright. Thanks for your help. I suppose I'll update with this and the paradox fix. Not sure still on the restart sustains fix.
ToME Tips - auto-generated spoilers for ToME. - someone else made. I find super awesome, so spreading as well.

Dracos
Archmage
Posts: 405
Joined: Sun Jul 13, 2014 4:09 pm

Re: Improved Auto-Explore and Rest

#72 Post by Dracos »

Updated.
ToME Tips - auto-generated spoilers for ToME. - someone else made. I find super awesome, so spreading as well.

St_ranger_er
Thalore
Posts: 172
Joined: Fri Jul 18, 2014 11:48 am

Re: Improved Auto-Explore and Rest

#73 Post by St_ranger_er »

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

Dracos
Archmage
Posts: 405
Joined: Sun Jul 13, 2014 4:09 pm

Re: Improved Auto-Explore and Rest

#74 Post by Dracos »

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

edit:
Pushed fix.
ToME Tips - auto-generated spoilers for ToME. - someone else made. I find super awesome, so spreading as well.

Dracos
Archmage
Posts: 405
Joined: Sun Jul 13, 2014 4:09 pm

Re: Improved Auto-Explore and Rest

#75 Post by Dracos »

Added compatibility for Restart Sustains (v2a and above)
ToME Tips - auto-generated spoilers for ToME. - someone else made. I find super awesome, so spreading as well.

Post Reply