Area Effects Scale Modifier Applied Linearly

Preview of Unreleased Content and Users Work
Post Reply
PaulStretch
Posts: 112
Joined: 27 Jun 2021, 16:10
Has thanked: 45 times
Been thanked: 13 times

Area Effects Scale Modifier Applied Linearly

Post by PaulStretch »

I guess this is just a PSA. So I tested a maxHP area effect modifier to see if the scale modifier is applied exponentially or linearly when duplicated.

Exponential:___________________________ Linear:________________________________

HP*(Scale^intances) = NEWHP_____or______HP+(((Scale*HP)-HP)*intances) = NEWHP

It's applied linearly. So 30Hp being affected by MAXHP with scale=1.1 5 times = 45 instead of 48. Don't know if this helps anyone, but I'm keeping this in mind for the whole resources population management system I'm trying to implement. It would be strange if say the the first 5 infantry you build reduces food gather income more than the next 20 combined.

User avatar
Dr.MonaLisa
High Representative
Posts: 8697
Joined: 17 Jun 2010, 11:21
Location: Poland
Has thanked: 49 times
Been thanked: 108 times

Re: Area Effects Scale Modifier Applied Linearly

Post by Dr.MonaLisa »

Please keep in mind that everything should be tested on the medium game pace. Other game paces have different modifiers.

I'm trying to understand this formula, but what if there are different scales in multiple effects?
Best regards,
Dr.MonaLisa
Ministry of Game Affairs
Department of Control and Complains
PaulStretch
Posts: 112
Joined: 27 Jun 2021, 16:10
Has thanked: 45 times
Been thanked: 13 times

Re: Area Effects Scale Modifier Applied Linearly

Post by PaulStretch »

Basically in exponential, the formula the bonus is always applied to the new Hp, where as with linear, the formula is always applied to the original value of the HP. The formulas I made assumed the scale values are all the same, but when there are different being applied, each scale modifier gets plugged into its own formula, added together, then that answer is added to the original HP.
User avatar
Dr.MonaLisa
High Representative
Posts: 8697
Joined: 17 Jun 2010, 11:21
Location: Poland
Has thanked: 49 times
Been thanked: 108 times

Re: Area Effects Scale Modifier Applied Linearly

Post by Dr.MonaLisa »

Yes. Effects are added like effect-on-effect. Original HP doesn't matter at all during calculation of new effects.
Best regards,
Dr.MonaLisa
Ministry of Game Affairs
Department of Control and Complains
Post Reply

Return to “Spotlight”