This is a mod that when installed in addons can be accessed from the in-game right click menu. It affects the battle damage system in that damage is no longer simply a full on hit or a miss- it uses a bell curve to determine the probability of how much damage will be inflicted based on 2 things,* the chance to hit and the damage. If the chance to hit is 30% and a unit does 10 damage, expect the damage per hit to be 3, more than likely 2-4, and occasionally higher or lower. If the CTH is 50%, expect the damage to be 5, more likely 4-6, and again occasionally higher or lower. The spirit of randomness is kept in that there is no real guarantee of the damage numbers, but instead they are biased toward a particular result.

Poison and slow use the stock RNG system to determine if they take effect- a poison dart can do damage but may not inflict poison unless it counts as a hit in Wesnoth's usual battle system, same goes for slow.

*there is also a calculation to give a bonus/penalty when attacking a unit of a different level- If a L2 unit attacks a L1 unit they get +1 damage. A L3 attacking a L1 gets +2, and the opposite is true, the L1 gets -2. This can be disabled by commenting out line 233 of damage_distribution_mod.lua like so (I consider this to be experimental still in terms of gameplay):

There is another adjustment available as well- in the first line of the damage_distribution_mod.lua there is a "steepness" value- this can be changed to affect the shape of the bell curve that determines the damage value percentages. A lower number makes it steeper (less random), a higher number makes it flatter (more random).

What is the gameplay like?

In my experience, because of the amount of actual hitting happening, I find myself save loading much less. I've been playing through TROW on normal and have been on the high end of turns to get through scenarios (the PRNG mod is so aggressive I'd get through scenarios pretty quickly). You still get misses and the big hits, and it seems more "realistic" in that not every blow is a perfectly solid one. Is the original balance preserved? Probably not, but I found this system to be pretty fun anyway.

Does the battle preview "Damage calculation" dialog know about your system, and can calculate the right information?

No, it's not that "deep" code-wise, I'm not sure you'd be able to to that with lua as opposed to a C code patch Looking at it in game it looks like it is totally fried I don't use that feature because IMO those numbers are irrelevant- the RNG will do what the RNG wants. Unless you are going to do several takes at one attack then those numbers will start to make sense.Edit:Also I imagine since this system has so many combinations of outcomes the current code doesn't handle it well.

optimother wrote:Crow_T, congrats you finally got your idea working I played couple of games, damages seem to be quite close to estimations.

Thanks for trying this out Yes I've been playing on a slower speed and sort of keeping track mentally of the damage that happens, it seems a good balance of expected/random enough to keep it interesting.

Hmmm, do you mean they never take effect? It's set up to utilize the stock Wesnoth RNG to determine if the actual effect of poison/slow takes place while using the mod for actual damage, the idea being that poison/slow wouldn't be a guaranteed effect.

One thing I've noticed happening on occasion is that if a unit misses the first hit they will miss all the rest, have you noticed that at all? Generally I see it with thugs and their higher levels, probably because there are 4 swings.

Thanks for directing me here, I like that system ^^ makes it more realistic, that is for sure. Though, the -1 -2 damage on level-difference is worrying me because of Lvl5 Lvl6 and Lvl7 units in some campaigns. My lvl 1 units would get a -6 damage penelity, combine it with the unit having good resistance against the attack, and the damage will result in 0 (or maybe 1 if there is a minimum damage thingy going on). A lvl1 physical damage unit against a lvl 3 ghost seems also to have an not so nice gap.

I do GPE(Genuine Playing Experience), Screenshot-reinforced and detailed Bug-Reports for Campaigns. If you want me to check yours, be it Pre-Alpha, Alpha, Beta or finished, let me know. Since I don't know anything about coding, I'll be unable to tell you why something bad happens though. PM me.

I have made an update to the biased random damage mod. It fixes the multiplayer desynch issue (uses the WML random number generator instead of the lua one as before, because the WML one is synched and the lua one isn't). I have also added support for most custom weapon specials (so simpler things like set chance to hit to 80 when defending or increase chance to hit by 20 should work, but stuff like decrease the opponent's chance to hit by 20 if he's an orc standing in swamp will not).

I'm playing on 1.12.6, and I've been noticing a quirk of the system which is a bit bothersome. It seems that retaliation damage is only calculated once; that is, if a unit is attacked, they will strike back for the same amount of damage with each of their retaliation attacks. This adds a bit of swingy randomness to combat which isn't present in vanilla BfW, because an unusually high or low roll has its effects multiplied over however many retaliation attacks the defending unit has. Overall this mod is great - I, too, am much less prone to impulsive save-loading with it active, and I like how it makes combat outcomes more granular than vanilla where e.g. an attacking spearman would always deal 7, 14, or 21 damage - but the one-shared-result retaliation attack thing has stuck out every now and then and I wanted to bring it to the add-on devs' attention and/or hear from them on it.

It also sorta seems like the system favors numerous smaller attacks over fewer large attacks, but I haven't done any detailed tracking of that so it may just be me seeing a pattern where there isn't one.