Status duration reduction noticeably less than tooltip?

Everything about ToME 4.x.x. No spoilers, please

Moderator: Moderator

Post Reply
Message
Author
Verr
Posts: 3
Joined: Thu Jan 18, 2018 1:09 pm

Status duration reduction noticeably less than tooltip?

#1 Post by Verr »

This question doesn't feel particularly stupid (I hope!) or a bug so I'm asking it here. I've been messing around in dev mode with the duration reduction effects on negative status you get on things like time shield, the skeleton racial, OOP buffs and so forth.

The skeleton racial gives 44% reduction, and time shield gives 50%. When I use dev mode to apply a 9 turn freeze on myself, the following things happen:

0% reduction: 10 turn freeze. I'm not too bothered about this I'm just going to treat the 9 turn freeze as a 10 turn freeze for the next two steps
44% reduction: 7 turn freeze
50% and 44% reduction: 5 turn freeze

I should mention that on a 1000 turn freeze everything works as you'd expect, they stack multiplicatively to give (approximately) 280 turns. So, I assume this is from rounding up at points in the code or some weird effect that scales down reduction on already low durations.

For 44%: Obviously rounding up 10*0.56 gives 6 turns. In the weird event the 10 turn freeze is actually a rounded down 10.9 turn freeze and the code uses the original, then rounding up 10.9*0.56 would in fact give 7. I'm sure there are other scenarios where you could end up with 7 too.

For the 50%, 44%: I can't construct any sequence in my head of how this is getting to 5 turns, even with double rounding. The main reason i'm asking this question

I'm not at all code literate but i've tried my best to scour through it, I'm fairly sure it's this part: https://git.net-core.org/tome/t-engine4 ... .lua#L7314 and I can't figure it out.

It feels kinda terrible to have stacked 50%, 44% reductions and have the second...just do nothing. But more importantly, not understanding it will drive me crazy. Can anyone help explain this to me?

HousePet
Perspiring Physicist
Posts: 6215
Joined: Sun Sep 09, 2012 7:43 am

Re: Status duration reduction noticeably less than tooltip?

#2 Post by HousePet »

Something you might have missed is that all timed effects are applied with one extra turn of duration, that is then normally used instantly as the game moves forward a turn.
However, if you are applying an effect via the console, then time doesn't move.
That is why your 9 turn effect appears to apply a 10 turn duration.
My feedback meter decays into coding. Give me feedback and I make mods.

Verr
Posts: 3
Joined: Thu Jan 18, 2018 1:09 pm

Re: Status duration reduction noticeably less than tooltip?

#3 Post by Verr »

HousePet wrote:Something you might have missed is that all timed effects are applied with one extra turn of duration, that is then normally used instantly as the game moves forward a turn.
Ah, thank you! the 7 turns can now easily be found from ceiling(9*0.56)+1. Then,as the code applies the skeleton racial before other reduction effects, in the final case 9->6->(exactly 3). If you just account for a slight error on the final term, that 3 goes to 4 and adding +1 goes to 5. I'll take it! (amusingly, testing this exact same scenario on the same test character today is giving me 4 turns rather than 5, so there's that too)

Cheers, I appreciate it!

Post Reply