Non-random Wesnoth : applying the mean effect

General feedback and discussion of the game.

Moderator: Forum Moderators

Post Reply
NovHak
Posts: 8
Joined: November 7th, 2017, 10:06 pm

Non-random Wesnoth : applying the mean effect

Post by NovHak »

First to make things clear, I love randomness, am very happy with how it's implemented in Wesnoth and would hate what I'm going to suggest.

I noticed some complains from people who hate randomness, sometimes using dubious arguments such as "randomness destroys competition".

These arguments don't really matter, since it's a matter of taste actually. However, saying that Wesnoth can't be conceived without randomness isn't completely true. In combat it could be possible to replace the hit/no hit randomness by applying the mean damage for each strike. So for example, a unit with a "4-5" weapon attacking a unit with 50% defense would inflict five 2 damage blows. The concept could likely be applied to more special attacks too. As an exemple the slow effect, instead of halving damage, could be modified by applying the defense coefficient to the damage reduction, i.e. if the attacked unit has 50% defense, damage reduction would be 50%*50%=25%. If the unit has 0% defense (yet to be seen :) ), damage reduction would be 100%*50%=50%.

Hence no more randomness, the "mean effect" would always be applied. Optional and not default of course, I personally would hate this !
User avatar
Poison
Posts: 171
Joined: August 13th, 2017, 4:54 pm

Re: Non-random Wesnoth : applying the mean effect

Post by Poison »

Already done by Dugi's no randomness mod.

https://r.wesnoth.org/t38945


Available at the 1.12 add-on server.
NovHak
Posts: 8
Joined: November 7th, 2017, 10:06 pm

Re: Non-random Wesnoth : applying the mean effect

Post by NovHak »

Oh OK, nice.

I suppose this closes the problem once and for all ! Well, at least as long as this mod maintains compatibility with the stable versions...
User avatar
Pentarctagon
Project Manager
Posts: 5496
Joined: March 22nd, 2009, 10:50 pm
Location: Earth (occasionally)

Re: Non-random Wesnoth : applying the mean effect

Post by Pentarctagon »

It's also worth pointing out that damage averaging does impact balance and how the game plays fairly significantly, so unless Wesnoth's randomness is the bane of your playing experience, I doubt it would be more enjoyable without also doing a lot of tweaking to individual units as well as weapon specials.
99 little bugs in the code, 99 little bugs
take one down, patch it around
-2,147,483,648 little bugs in the code
NovHak
Posts: 8
Joined: November 7th, 2017, 10:06 pm

Re: Non-random Wesnoth : applying the mean effect

Post by NovHak »

While I agree that it changes the gameplay significantly, I don't see how it could change balance... unless of course (I should have thought of that) average damage/effect is rounded to the nearest integer or up/down, since being up to half a point over or below average is huge.

Imho, there are two ways of solving this :
  1. Going floating point
  2. Keep integer values, but multiply everything by 100
I hate floating point values because they're often associated with rounding operations, which makes for fuzzy rules, so keeping integers seems better to me. However, afaik all modifiers in game can be expressed as an integer percentage (no thirds, sevenths or things like that), which I guess means no rounding operations would be involved and decimal values would always be exact (I only have a slight doubt since in binary positional notation, 20%=1/5 can't be written with a finite number of digits).

One classic example of fuzzy rules in games is units moving diagonally on a square grid. I've yet to meet a game developer who implemented a symbolic representation of movement points as a+b*sqrt(2) (which is perfectly doable btw). Instead, they all use floating point values... I remember in Heroes of Might and Magic III, depending on the path chosen for my hero I could go further or less far if I was moving in one go or in steps. One more reason to use a hex grid instead !
User avatar
Pentarctagon
Project Manager
Posts: 5496
Joined: March 22nd, 2009, 10:50 pm
Location: Earth (occasionally)

Re: Non-random Wesnoth : applying the mean effect

Post by Pentarctagon »

NovHak wrote:While I agree that it changes the gameplay significantly, I don't see how it could change balance... unless of course (I should have thought of that) average damage/effect is rounded to the nearest integer or up/down, since being up to half a point over or below average is huge.
For example, poisoning from the weapon special is now guaranteed. Firststrike means you're guaranteed to inflict damage first when attacked. Drains means guaranteed healing on each attack.

Or, imagine you have a Horseman who has a 60% chance of dealing 26-2 against an enemy unit with 17 hp. There is the chance you will kill the enemy unit without taking any damage. With averaging, you would be guaranteed to kill the enemy unit, but you'd need both attacks, which means the enemy would also be guaranteed to deal some damage in retaliation(assuming the enemy has a melee attack).

The order of hits and misses can play just as important a role as how much damage each strike does.
99 little bugs in the code, 99 little bugs
take one down, patch it around
-2,147,483,648 little bugs in the code
NovHak
Posts: 8
Joined: November 7th, 2017, 10:06 pm

Re: Non-random Wesnoth : applying the mean effect

Post by NovHak »

True, but considering that's expected in average, it doesn't change the balance. Though I agree it changes gameplay drastically, since it becomes possible to calculate what is going to happen exactly.

I don't know how that mod works, but poisoning should be reduced by the probability of the event so that in the long run it's the same, otherwise I would agree there's a big balance change. Drain being defined as half the damage doesn't need to be changed since it's guaranteed when damage is dealt, provided damage is reduced by the probability of course.
Velensk
Multiplayer Contributor
Posts: 4002
Joined: January 24th, 2007, 12:56 am

Re: Non-random Wesnoth : applying the mean effect

Post by Velensk »

If you think that removing the randomness does not affect the balance, you do not understand the game.

There are many things in the game whose strength is tempered by risk or somewhat weak but tempered by reliability. If you remove the risk, it fundamentally changes the balance of these capabilities. If you temper the strength majorly it fundamentally alters the dynamics of the unit.

Perhaps the best example is horsemen. In a mod where you cannot miss, a horsemen could reasonably expect to almost never suffer the penalty of the 'charge' ability, or to never suffer it in any situation where it stings. On the other hand, applying the average chance to hit changes the damage so significantly it affects the way the unit plays.
--You would be able to simply plan 'I attack the elf fighter in the open with a spearman and a cavalry and then I finish with the horseman and it -will not- take retaliation, therefore, if I position units on either side of it, it will have enough health that my opponent -cannot- kill it with any two units he can attack with it, which means that I -will- have the capability to instantly finish another unit next round.
--By contrast, currently, the loyalist player can say if I attack the elvish fighter with any one unit, I will most likely be able to finish it off in one hit from the horseman and probably won't suffer retaliation damage. However if things go wrong the consequences are... which can be mitigated by... (actually in the case of horsemen, it's pretty hard to mitigate luck not going your way which is part of the reason they aren't all that commonly seen).
>In one world, if you attack your target with two of your units you can reliably finish a target at 13 (or 15 depending on traits) hp with the guarantee to not suffer retaliation, in the other merely weakening your target with a single unit will likely bring the target to a range where you can take a probable gamble to kill it with no retaliation but you risk much. Those are two very different dynamics. That's only one use case, the differences grow when you consider other use cases. A strong horseman will 100% kill any non-resilient elvish archer in the open at day (assuming it's not at 5 or less hp) whereas, you'd actually be getting quite lucky to kill a full health archer with just a horseman normally. If you want, you could try to argue that although the two versions of the unit are different they are 'equally' powerful but I think you'll find that it simply isn't the case.

The other reason why the balance change is significant has less to do with individual units dynamics as matchup dynamics. The ability to attack in some matches is somewhat based on the fact that one side can make an assault that although not 'most likely' to succeed, is likely enough that it's frequently worth trying and the cost of doing so isn't instantly game losing but the results of success can instantly put the momentum of battle in your favor. Northerners have this in spades (how often could you break a village if you can get 3/6 hits from 3 grunts for instance) but there are plenty of other match-up where this applies. There's actually a minor level of inevitability to it as so long as the aggressive side can keep themselves in a position where they can keep trying that assault, eventually it will succeed even if the 'average' case is that it's unlikely. If you ever make it so that it's outright impossible for such a gamble to pay off, you strongly affect the balance of that match-up. On the flip side, making it so that such an assault will be guaranteed to succeed causes an entirely different balance issue (though at least that balance mess is more likely to be dynamic).
--As another side note: You'll be amazed how influential traits are in such an environment. I think we can all agree that there's an issue where a certain rush will -always- work against a certain race or where late game one race simply cannot effectively attack another but I'm not sure that it could be said that it'd be better for that same rush to -always- succeed, unless the drake clasher recruited on that side happened to be resilient (which is a 50% coin flip) in which case it will inevitably fail so the attacker probably doesn't commit to it.
"There are two kinds of old men in the world. The kind who didn't go to war and who say that they should have lived fast died young and left a handsome corpse and the old men who did go to war and who say that there is no such thing as a handsome corpse."
User avatar
pauxlo
Posts: 1047
Joined: September 19th, 2006, 8:54 pm

Re: Non-random Wesnoth : applying the mean effect

Post by pauxlo »

Another (somewhat artificial) example:

Imagine having a goblin spearman (18 HP) on a village (i.e. 60% defense) and a dwarf thunderer attacking him (using the 18×1 thunderstick). Assume the goblin's player just wants to hold the village, so doesn't attack back.

With standard Wesnoth, the thunderer either hits (and kills) the spearman (40% chance), or the spearman survives with no damage (60% chance).
Repeat this e.g. 5 turns, the goblin is dead with probability 92%.

With mean damage, the thunderer always deals 7 damage points, which are then healed back by the village.
Repeat this e.g. 5 turns (or how long you want), the goblin is alive (and even healthy) with probability 100%.

So mean damage is (at least in this example) much worse for the thunderer.
Daravel
Posts: 310
Joined: August 30th, 2008, 10:39 pm
Location: England

Re: Non-random Wesnoth : applying the mean effect

Post by Daravel »

From a SP point of view, the luck element doesn't really matter. It is a preference choice and would be an enormous amount of work to rebalance for 'average' damage and entirely not worth it. Especially as people would then complain about the deterministic nature of the game and ability to 'game' your way to victory with minimal challenge.

From a MP point of view, it can completely destroy any element of competitiveness. Not that this is an objective for Wesnoth at all (though, with the steam release, you may find it cropping up as an issue), but there can be no serious competitive play. This is one example, but I have had others: my friend and I recently reinstalled the game and had a 1v1, within 3 turns of us engaging in combat, his damage dealt was +100 and my damage dealt was -30. That is a ruinous disadvantage that rendered any strategy pointless. One example, sure. But that swing of luck can take place in much smaller amounts and be as equally decisive.

As a casual MP game (which I'm sure most people play it as), it is possibly little more than an annoyance.

At this stage, you'd only look to put meaningful effort into altering the luck mechanic if you wanted to promote a competitive Wesnoth scene. It will be interesting how Steam users approach the game, if they come in expecting a competitive tactical TBS, they may be disappointed.
User avatar
Pentarctagon
Project Manager
Posts: 5496
Joined: March 22nd, 2009, 10:50 pm
Location: Earth (occasionally)

Re: Non-random Wesnoth : applying the mean effect

Post by Pentarctagon »

As far as a competitive scene goes, there has never been much, if any, support for competitive play from the Wesnoth project itself, which is why the ladder is unofficial. That is not likely to change any time soon, either. Beyond any sorts of issues you could raise with the RNG though, the fact also is that certain forms of cheating are incredibly easy in MP, and you pretty much just have to hope/assume your opponent won't use any of them.
99 little bugs in the code, 99 little bugs
take one down, patch it around
-2,147,483,648 little bugs in the code
Post Reply