ToME: the Tales of Maj'Eyal

Everything about ToME
It is currently Fri Dec 13, 2019 3:43 am

All times are UTC




Post new topic Reply to topic  [ 4 posts ] 
Author Message
PostPosted: Thu Feb 07, 2013 8:58 pm 
Offline
Uruivellas

Joined: Thu Nov 18, 2010 6:42 pm
Posts: 744
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:
   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:
   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:
Attachment:
SaveDurations.jpg
SaveDurations.jpg [ 33.07 KiB | Viewed 3620 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 viewtopic.php?f=36&t=35229 and 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 132 times

_________________
Author of the Infinite 500 and PlenumTooltip addons, and the joys of Scaling in ToME.


Last edited by Hachem_Muche on Thu Feb 07, 2013 11:57 pm, edited 2 times in total.
Top
 Profile  
 
PostPosted: Thu Feb 07, 2013 10:17 pm 
Offline
Perspiring Physicist

Joined: Thu Feb 17, 2011 5:20 am
Posts: 889
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!


Top
 Profile  
 
PostPosted: Thu Feb 07, 2013 10:39 pm 
Offline
Uruivellas

Joined: Thu Nov 18, 2010 6:42 pm
Posts: 744
Quote:
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:
   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.

_________________
Author of the Infinite 500 and PlenumTooltip addons, and the joys of Scaling in ToME.


Last edited by Hachem_Muche on Fri Feb 08, 2013 4:34 am, edited 1 time in total.

Top
 Profile  
 
PostPosted: Fri Feb 08, 2013 3:34 am 
Offline
Perspiring Physicist

Joined: Thu Feb 17, 2011 5:20 am
Posts: 889
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.
Attachment:
duration_reduction.png
duration_reduction.png [ 54.63 KiB | Viewed 3571 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:
Attachment:
expected_duration.png
expected_duration.png [ 62.75 KiB | Viewed 3571 times ]

_________________
darkgod wrote:
OMFG tiger eye you are my hero!


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 

All times are UTC


Who is online

Users browsing this forum: Bing [Bot] and 2 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