oops, didn't reply to all.
---------- Forwarded message ----------
From: John McNabb <[EMAIL PROTECTED]>
Date: Apr 11, 2006 5:57 PM
Subject: Re: [Wesnoth-dev] Simplifying damage calcs
To: Richard Kettering <[EMAIL PROTECTED]>


On 4/11/06, Richard Kettering <[EMAIL PROTECTED]> wrote:
> >> Computing exact numbers isn't realistic anyways - traits and most
> >> important resistance of certain units already create to much
> >> variations.
> >
> > In MP games I do compute them by hand.
> > Laurent Birtz
>
>
> I don't want to be a part of this discussion, but this is a really
> dangerous mentality to adopt - the point is that you don't have to,
> and forcing the algorithm to adopt a certain level of simplicity to
> keep that the case is an unnecessary limitation thrown at the coders.

Well, to be fair, an algorithem that is easier to calculate in your
head is easier to code and maintain, so it might be an unrealistic
limitation on unit designers, but not on the coders.

It seems to me that a simple way for calculating damage is a good
thing.  We want to allow a certain amount of freedom for the
unit/specials developer, but I don't think that we want to let the
complexity grow out of control.  We also want results to be reasonable
gameplay wise, in otherwords bonuses should not stack to become
gigantic, and maluses should not too rapidly diminish the damage.
Above all KISS still needs to hold.

As such I would suggest the following system:
(Base_damage * (1+ sum of multiplicative bonuses) * (product of
multiplicative maluses) ) + bonus additive damage - malus subtractive
damage.

Where bonus is anything that increases the damage and a malus is
anything that decreases it.  Resistance would be the classic malus.
This would remove the special cases for backstab and charge, which I
think is quite reasonable.  Strength would always add 1 point of
damage effectively ignoring resistances, backstab, charge, leadership,
and any other effects.

This system can be described in English as follows: "Effects that
enhance the damage of a unit by some percentage are combined by
summing their bonuses whereas effects that reduce damage by a
percentage, such as resistance, are combined by multiplying their
effects.  Effects that modify the damage by a fixed number of points
are applied after all other effects and thus are not modifed by other
effects."

I believe that this simple set of rules would be an improvement on the
current situation and I would support making this change in the code.
I would not support making all %bonuses strictly multiplicative nor
adding all maluses togeather, since that leads to exagerated effects.
This does mean that bonuses and maluses are not treated equivalently,
eg, a single +25% bonus is not balanced by a -25% malus but rather by
a single 20% malus, but two 20%maluses are more powerful than two 25%
bonuses.

Some examples (1.0+.25)*.8=1.0  (1.0+.25+.25)*.8*.8=.96

If this is not acceptable the only other solution that I would
consider KISS enough to accept would
be to push the additive parts around, either before the multiplicative
maluses or before all boni,mali:

(Base_damage * (1+ sum of multiplicative bonuses)   + bonus additive
damage - malus subtractive damage) * (product of multiplicative
maluses).

or

(Base_damage + bonus additive damage - malus subtractive damage) * (1+
sum of multiplicative bonuses)  * (product of multiplicative maluses).

Of these two I think that the latter is marginally easier to explain
and is therefore generally superior.

Darth Fool

_______________________________________________
Wesnoth-dev mailing list
[email protected]
https://mail.gna.org/listinfo/wesnoth-dev

Reply via email to