Golden Age of Necromancy [1.7 b1]

Where bugs go to lie down and rest

Moderator: Moderator

Post Reply
Message
Author
Pisastrish
Thalore
Posts: 157
Joined: Wed Sep 28, 2016 8:07 pm

Golden Age of Necromancy [1.7 b1]

#1 Post by Pisastrish »

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.

Pisastrish
Thalore
Posts: 157
Joined: Wed Sep 28, 2016 8:07 pm

Re: Golden Age of Necromancy [1.7 b1]

#2 Post by Pisastrish »

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.

darkgod
Master of Eyal
Posts: 10750
Joined: Wed Jul 24, 2002 9:26 pm
Location: Angolwen
Contact:

Re: Golden Age of Necromancy [1.7 b1]

#3 Post by darkgod »

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

Pisastrish
Thalore
Posts: 157
Joined: Wed Sep 28, 2016 8:07 pm

Re: Golden Age of Necromancy [1.7 b1]

#4 Post by Pisastrish »

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) Downloaded 61 times

Pisastrish
Thalore
Posts: 157
Joined: Wed Sep 28, 2016 8:07 pm

Re: Golden Age of Necromancy [1.7 b1]

#5 Post by Pisastrish »

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.

Pisastrish
Thalore
Posts: 157
Joined: Wed Sep 28, 2016 8:07 pm

Re: Golden Age of Necromancy [1.7 b1]

#6 Post by Pisastrish »

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

Pisastrish
Thalore
Posts: 157
Joined: Wed Sep 28, 2016 8:07 pm

Re: Golden Age of Necromancy [1.7 b1]

#7 Post by Pisastrish »

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 64 times

Post Reply