Grain of luck

Brainstorm ideas of possible additions to the game. Read this before posting!

Moderator: Forum Moderators

Forum rules
Before posting a new idea, you must read the following:
Post Reply
emdot
Posts: 66
Joined: October 12th, 2004, 4:01 pm
Location: pl
Contact:

Grain of luck

Post by emdot »

Grain of luck

There are many discussions about luck in Wesnoth. IMO problem lies not
in luck itself but in its grain. When unit have 3 attacks and 30% chance
to hit (CTH) it is very probable it will not hit. It is very painful with
3 units in the same situation and none of these units hit the same unit.

How to make this grain smaller?

Multiple HP and number of attacks by 2.
With 6 attacks and 30% CTH, real chance to hit is much bigger. With doubled HP
it won't be very painful for defender.

I have played few fast multiplayer battles and it fixes two problems:
- perception of almighty luck
- standard deviation is smaller

You can test it for yourself.
Go to the directory with units configuration files and:

Code: Select all

vim *.cfg
:argdo g/hitpoints=/s/=\(\d*\)/\='='.submatch(1)*2/
:argdo g/number=/s/=\(\d*\)/\='='.submatch(1)*2/
:wa | qa
There is something left out of this way: healing and regeneration.
These two things should be also increased factor of two (in code?).

Two real problems are created:
It can slow down play - at the start Elvish Archer has 8 range attacks.
Adaptation of custom units for campaigns.
Glowing Fish
Posts: 855
Joined: October 3rd, 2004, 4:52 am
Location: Portland, OR
Contact:

Post by Glowing Fish »

Very probable not to hit?

A unit with 30% defense will still probably get hit It has a 70% chance of evading each hit. It has (7^3)/(10^3) chance of not getting hit, or aproximately 35% chance of evading all hits.
Quensul
Art Contributor
Posts: 303
Joined: January 2nd, 2005, 1:06 am
Location: Pittsburgh, PA

Post by Quensul »

Glowing Fish wrote:Very probable not to hit?

A unit with 30% defense will still probably get hit It has a 70% chance of evading each hit. It has (7^3)/(10^3) chance of not getting hit, or aproximately 35% chance of evading all hits.
I'm not sure I agree with emdot that we'd be better off with this change, but I believe the point was that with more rounds of combat, but half as much effective damage per round, the chance of doing some damage is greater, without changing the expected amount of damage (while decreasing user frustration). (For argument's sake, let's say we double the number of attacks and halve the damage they do, ignoring rounding problems.)

Current: 3 attacks, 30% CTH, 6 damage per hit
Chance of not landing any hits: .7^3 = 34%
Expected damage: (6 * .3) * 3 = 5.4

emdot: 6 attacks, 30% CTH, 3 damage per hit
Chance of not landing any hits: .7^6 = 12%
Expected damage: (3 * .3) * 6 = 5.4

While this would help avoid the frustration of missing with all attacks, I'd be inclined to believe the additional time taken to perform all these attacks outweighs the benefits. The only other way of achieving this would be to allow "partial" hits. For instance, something like:

CTH/2 chance of full damage
CTH/2 chance of half damage
CTH chance of quarter damage

Modified CTH: 3 attacks, 30% base CTH, 6 damage per hit
Chance of not landing any hits: .4^3 = 6%
Expected damage: (6*.15 + 3 * .15 + 1.5 * .3) * 3 = 5.4

However, this violates KISS and integer math so horribly I would be astonished if any devs ever even thought about including it. :-)
Author of Wercator
User avatar
Simons Mith
Posts: 821
Joined: January 27th, 2005, 10:46 pm
Location: Twickenham
Contact:

Post by Simons Mith »

quensul: No, the proposal is to double all units' hit points, and doubling healing, and doubling the number of attacks while keeping the damage of each attack the same. That wouldn't cause any rounding errors. It would be an excellent alternative to having a full-blown deterministic mode, and might even be simpler to code. The slow down of the doubled number of attacks wouldn't bother me too much, because at least there's something going on. Mass movement of units is much more dull by comparison. If this was available as an option, I think I'd adopt it.
Quensul
Art Contributor
Posts: 303
Joined: January 2nd, 2005, 1:06 am
Location: Pittsburgh, PA

Post by Quensul »

Simons Mith wrote:quensul: No, the proposal is to double all units' hit points, and doubling healing, and doubling the number of attacks while keeping the damage of each attack the same. That wouldn't cause any rounding errors.
Yup, I know; sorry that wasn't clear - I was halving the amount of damage so you could directly compare the expected damage between the current and proposed systems; I (incorrectly :-)) thought it would be clearer. The bit about rounding errors was in reference to the partial hits business. There are clearly no math problems with emdot's proposal, and since it just consists of modifying unit stats, it would be easy to implement (no coding). IMHO, doubling the time taken to resolve combat would be pretty annoying, but that's just me. :-)

Edit: my bad, healing and regeneration would likely require coding. Silly me.
Author of Wercator
ott
Inactive Developer
Posts: 838
Joined: September 28th, 2004, 10:20 am

Post by ott »

Please see topic 3960 and topics linked therein for extensive discussion of the distribution of damage values.

Summary: Wesnoth has chunky damage distribution. This is part of the game's design.

If you want less chunky damage, design some custom units and use them in a campaign. You don't need anyone's permission to experiment with custom units and campaigns -- see the Under the Burning Suns campaign for some very highly non-standard units, times of day and other interesting tweaks, all through WML. If your custom units become popular, then there may be grounds for discussing this again.
MadMax
Posts: 1792
Joined: June 6th, 2004, 3:29 pm
Location: Weldyn, Wesnoth

Post by MadMax »

healing and regeneration can be changed in game.cfg, although I don't think poison can.
"ILLEGITIMIS NON CARBORUNDUM"

Father of Flight to Freedom
http://www.wesnoth.org/wiki/FlightToFreedom
Post Reply