Improved Effectiveness of Saves

All development conversation and discussion takes place here

Moderator: Moderator

Post Reply
Message
Author
Hachem_Muche
Uruivellas
Posts: 744
Joined: Thu Nov 18, 2010 6:42 pm

Improved Effectiveness of Saves

#1 Post by Hachem_Muche »

For most negative status effects in the game, the chance for an effect to affect the target is determined by a save versus power check, where, if the save succeeds, the effect is avoided. There is also a small chance for the effect to land with a reduced duration on a failed save. There have been some complaints about saves not being very useful for reducing the duration of debuffs on the player. This is justified, since the code that controls it results in most saves (when less than the power applied) having NO EFFECT at all on the duration of the debuff:

Code: Select all

	local percentage = 1 - ((save - p.apply_power)/20)
Where percentage is the fractional duration of the effect (from Actor.lua:_M:on_set_temporary_effect)

So as a player progresses further in the game and starts encountering higher level enemies (with greater spell, mind, and attack power) the ability of saving throws to diminish the duration of negative status effects decreases. In many cases having a save of either 1 or of 30 makes no difference and it's better game play to just ignore saving throws all together and invest in other ways to deal with debuffs, like immunities.

In order to make saving throws more useful for everyone, even when they are not stacked. I have changed the formula for the duration to:

Code: Select all

	savex = rng.normalFloat((100-savechance)*2,50) -- fraction duration, normal distribution weighted to be small at even odds
	percentage = util.bound(savex/100,0,2)
Where savechance is the (percentage) chance to save otherwise determined.

This formula gives a random duration decrease based on the chance to save - the higher the chance to save the more the duration is decreased. This has the effect of increasing the effectiveness of saves at almost all levels, particularly when the saves are relatively low. The results are plotted below:
SaveDurations.jpg
SaveDurations.jpg (33.07 KiB) Viewed 5224 times
"Base" is the average duration based on the all or nothing save chance. "Failed Save" is the percent of maximum duration of an effect that lands (on a failed save). "Overall" takes both the chance to avoid the effect entirely and the reduced duration if the effect lands into account to give an expected (average) duration. The expected duration on a failed save ranges from ~80% for near 0% save chance to ~20% for near 100% save chance. The nature of the normal distribution makes any duration (within bounds) possible, however, all save bonuses have a positive beneficial effect, statistically speaking.

Edit: Here is an addon that let's you switch back and forth between the regular saves and this new method on the fly from the in game menu. (it also includes options for hit functions and evasion). See http://forums.te4.org/viewtopic.php?f=36&t=35229 and http://forums.te4.org/viewtopic.php?f=39&t=35361.

Edit2: I've uploaded a validation friendly version at http://te4.org/games/addons/tome/altern ... anics-tome
Attachments
tome-GameMech.zip
(19.74 KiB) Downloaded 283 times
Last edited by Hachem_Muche on Thu Feb 07, 2013 11:57 pm, edited 2 times in total.
Author of the Infinite 500 and PlenumTooltip addons, and the joys of Scaling in ToME.

tiger_eye
Perspiring Physicist
Posts: 889
Joined: Thu Feb 17, 2011 5:20 am

Re: Improved Effectiveness of Saves

#2 Post by tiger_eye »

This adds an extra layer of complexity to a system that, while not simple, is composed of simple rules with simple math. I think the extra layer of complexity here could be made much, much more simple (and intuitive) and have much the same impact.

So, here is my suggestion:

* Reduce the duration of the effect by a random amount between 0 and savechance.

For example, when power and save are equal, there is a 50% chance to completely save against the effect. If the effect is applied, then the duration will be reduced by a random amount between 0% and 50%.
darkgod wrote:OMFG tiger eye you are my hero!

Hachem_Muche
Uruivellas
Posts: 744
Joined: Thu Nov 18, 2010 6:42 pm

Re: Improved Effectiveness of Saves

#3 Post by Hachem_Muche »

So, here is my suggestion:

* Reduce the duration of the effect by a random amount between 0 and savechance.
This is viable as well, it would make lower level saves less effective and less random than what I've proposed. I think more randomness is more interesting, however.

To change the randomness of the formula I've proposed, change the 2nd parameter (50) in:

Code: Select all

   savex = rng.normalFloat((100-savechance)*2,50) -- fraction duration, normal distribution weighted to be small at even odds
   percentage = util.bound(savex/100,0,2)
to a smaller (less random) or larger (more random) number.
Last edited by Hachem_Muche on Fri Feb 08, 2013 4:34 am, edited 1 time in total.
Author of the Infinite 500 and PlenumTooltip addons, and the joys of Scaling in ToME.

tiger_eye
Perspiring Physicist
Posts: 889
Joined: Thu Feb 17, 2011 5:20 am

Re: Improved Effectiveness of Saves

#4 Post by tiger_eye »

Okay, a couple simple plots to help visualize what's going on.

This first plot shows the percent duration reduction based on percent chance to save for a few different methods:
Dark Red is the baseline, no duration reductions at all.
Green is what the game currently does.
Blue is if the duration reduction is the same as the chance to save.
Orange is the average duration reduction if it were reduced by a random amount between 0 and chance to save.
duration_reduction.png
duration_reduction.png (54.63 KiB) Viewed 5175 times
Now, if we do what Hachem_Muche did above and take into account the chance to save against the effect (so duration would be zero), the average expected duration is:
expected_duration.png
expected_duration.png (62.75 KiB) Viewed 5175 times
darkgod wrote:OMFG tiger eye you are my hero!

Post Reply