ToME: the Tales of Maj'Eyal

Everything about ToME
It is currently Fri Aug 07, 2020 9:33 am

All times are UTC




Post new topic Reply to topic  [ 7 posts ] 
Author Message
PostPosted: Sun Jul 12, 2020 6:32 pm 
Offline
Thalore

Joined: Wed Sep 28, 2016 8:07 pm
Posts: 127
The invulnerability from this doesn't seem to activate consistently. I assume it's tied to some sort of cooldown, but it's not clear if it's the same length as the cooldown of the sustain or something else, and nothing shows how many turns are left before it can activate again. Resting also doesn't seem to wait until it's available, multiple times I've rested to full only for it to not activate the next time I'm taken below 0 health.


Top
 Profile  
 
PostPosted: Sun Jul 12, 2020 9:13 pm 
Offline
Thalore

Joined: Wed Sep 28, 2016 8:07 pm
Posts: 127
Playing more and sometimes it doesn't activate even after a very long time since the last activation, I think something might be wrong with how it checks when you've crossed the threshold.


Top
 Profile  
 
PostPosted: Fri Jul 24, 2020 2:09 pm 
Offline
Master of Eyal

Joined: Wed Jul 24, 2002 9:26 pm
Posts: 10553
Location: Angolwen
Hum I cant seem to reproduce that :/

_________________
[tome] joylove: You can't just release an expansion like one would release a Kraken XD
--
[tome] phantomfrettchen: your ability not to tease anyone is simply stunning ;)


Top
 Profile  
 
PostPosted: Sat Jul 25, 2020 9:46 pm 
Offline
Thalore

Joined: Wed Sep 28, 2016 8:07 pm
Posts: 127
Tested this more and was able to reproduce it, attached the relevant part of the log. No idea what's causing it, it happened twice at the very end of this, once when going from positive to negative life, and once when going from negative to positive. I can dm the full log or save file if you need them.


Attachments:
te4_log 2.txt.7z [42.57 KiB]
Not downloaded yet
Top
 Profile  
 
PostPosted: Fri Jul 31, 2020 5:15 am 
Offline
Thalore

Joined: Wed Sep 28, 2016 8:07 pm
Posts: 127
Was able to recreate this again with a necromancer. This time I went below 1 life and back in a single turn because of the healing from across the veil + eternal night: across the veil only activated once (I guess it might be limited to 1 activation per turn?), and golden age of necromancy didn't activate at all. I've repeated this a few more times with different characters and got the same results. Sometimes even when I start a turn above 1 and end below 1 it doesn't activate (so it's not just going wrong by comparing life at the beginning of the turn to life at the end), but this isn't as consistent and I can't figure out the cause.

The only things I need to replicate this are: across the veil, blurred mortality, golden age of necromancy, and eternal night. I assume it can be replicated by other means as well; indirect healing (affinities, life drain, regen) is the main common denominator between all my tests.

Edit: the more I test this the more consistently it seems to happen, even when starting and ending on opposite sides of 1 life. This seems like a very cool talent, but it's basically unusable in its current state.

Edit 2: Glanced through the code and I don't see much reason why across the veil would activate and golden age wouldn't. It seems like atv's callbackonactbase must be checked before gaon's, so that by the time gaon's is checked, the player is back above 1 hp and game doesn't see that the player ever crossed the threshold. Just reordering the priority of these would help, but there must be more going on since it will sometimes not activate even in cases where this isn't what's happening (it's definitely happened a few time going from below 1 hp to above 1 hp)


Last edited by Pisastrish on Fri Jul 31, 2020 7:08 am, edited 1 time in total.

Top
 Profile  
 
PostPosted: Fri Jul 31, 2020 7:04 am 
Offline
Thalore

Joined: Wed Sep 28, 2016 8:07 pm
Posts: 127
Looking more through the code and I think this would be fixed (and would probably fix similar talents) by adding a new callback for whenever you change hp. It seems like it would just need to be called at the end of actbase in mod/class/actor, and the end of heal and takeHit in engine/interface/actorlife (if you can use callbacks in an engine file?). If I have time tomorrow I'll make an addon to test this


Top
 Profile  
 
PostPosted: Sat Aug 01, 2020 1:24 am 
Offline
Thalore

Joined: Wed Sep 28, 2016 8:07 pm
Posts: 127
Need to test more, but I think I fixed it! Added a callbackOnChangeLife that is checked in mod.class.Actor.actBase right before self:triggerHook{"Actor:actBase:Effects"}, as well as in engine.interface.ActorLife.heal and mod.class.interface.ActorLife.takeHit. Basically just compares life at the beginning of a function to life at the end, and if they're different, triggers the callback with the two values as arguments.

actBase is necessary because it seems to be the only place with accurate regen values. I placed it before the triggerHook and callbackOnActBase so life changes from those aren't counted twice.

engine.interface.ActorLife.takeHit (as opposed to mod.class.interface.ActorLife.takeHit) seems to be unused but I included a check there in case I'm wrong.

This should also fix similar problems with talents like contingency and vitality, which have occasionally not activated for me before.

Edit: Some of the implementation may be weird, I haven't worked with this sort of thing very much so I was being extra cautious

Edit 2: By “fix similar problems” I meant they would be fixed if the talents were modified to use this callback. This addon doesn’t affect them by itself, I only incorporated the callback into golden age and across the veil


Attachments:
tome-necrotest_1.7z [69.43 KiB]
Downloaded 2 times
Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 7 posts ] 

All times are UTC


Who is online

Users browsing this forum: Bing [Bot] and 6 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group