hmm I haven't really tested this yet but I think I might have a way that works...
have a stat called "status resistance" that goes from 0 to 100, then a hidden stat "status resist multiplier" thats always set to equal 1, minus "status resistance"/100. AKA an affix of add stat, using "status resistance" and a multiplier of (-0.01), with the default value of "status resist mult" being 1.
So now I have a derived stat that I can used to multiply by things to get a new magnitude, so 47 status resistance should decrease the magnitude of statuses by 47%, and our "status resistance multiplier" stat will be equal to 0.53, perfect.
But I still have the problem that most effects/affixes seem to use the stats to affect the chance of success, and I'm trying to really reduce chance based stuff in general because its not great for balance/consistency/predictability.
So instead of using the "stun" or "silence" effects directly, we're going to add a triggerable or a passive skill to the base monster and player files, that ensures that the unit is STUNNED and SILENCED or whatever (100% chance, like 0.01 duration or something? or no duration?) with a statwatcher that checks a new set of custom stats, counter_stun, counter_silence, counter_charm, etc. They all default to zero, and decrease by say 1 or 10 a second or something (if 10 I could probably use INTS, otherwise might need to use floats...). The passive skill/triggerable of all units STUNS as long as this counter stat is greater than zero.
So now, say I wanna give my monster a skill that stuns the player for 1.5 seconds, instead of using the stun effect directly, we use ADD STAT to ad 1.5 or 15 or whatever scale we want to use to the "counter_stun" stat of their target (I guess use TRANSFER? Will this work?) . Ideally, sincethe target has that passive skill, they should be stunned while their stat "conuter_stun" is greater than zero and remain so until it ticks down to zero. We can then use the STAT SOURCE TYPE of the target, and use the STAT "status resistance multiplier" to multiply the 1.5 added to the counter (FALSE on StatModifierIsBonus) so if they have 47% status resistance, (status resistance multiplier is 0.53, thus 0.53*1.5 = 0.795) they should be stunned for 0.795 seconds.
IF this works, which idk I need to throw all that pasta into GUTS, the downside is that tooltips aren't going to be automatically generated. I.e. normally its going to generate "100% chance to stun target for 2 seconds", but now since the skill is just using ADD STAT all that tooltip stuff will have to be written specifically for that skill.
IDK if this is gonna work, but I hope so because its making me think about implementing a poise system for interrupts/stuns a la dark souls instead of the chance based things. Is there any parts of this that wont work/aka I'm assuming the engine works a certain way that it actually doesn't?