NoLuckEra
Moderators: Forum Moderators, Developers
Re: NoLuckEra
I do not understand these threats to lock this thread. Can we not have an open and free, but civil, discussion of the No Luck Era? I wish to discuss the good and bad aspects of this varianthow it changes balance, strategy, and general game play. Why cannot someone say that they like it better without someone seeing it as a threat? I like the random version! I have just begun trying the deterministic variant, which I may or may not like better. With all due respect, why do we need censorship?
As some have mentioned (I forget who, so forgive me for not crediting them), the units that rely on high dodging may suffer the most in this variant. Does anyone have any ideas in this regard? BTW, I like Mabuse's decision to leave specials (such as slow and poison) random.
As some have mentioned (I forget who, so forgive me for not crediting them), the units that rely on high dodging may suffer the most in this variant. Does anyone have any ideas in this regard? BTW, I like Mabuse's decision to leave specials (such as slow and poison) random.
 Pentarctagon
 Forum Administrator
 Posts: 4060
 Joined: March 22nd, 2009, 10:50 pm
 Location: Earth (occasionally)
Re: NoLuckEra
Aidoneus, using language like "feel threatened" and "vociferous minority" is basically inviting people to argue with you.
edit: Also, I will be deleting any posts that continue to try and bring this up again, since the entire discussion is both pointless and completely offtopic. I am sorry if anyone thinks that this is "censorship". If there is anything anyone feels that they absolutely must say, then say it via PMs.
edit: Also, I will be deleting any posts that continue to try and bring this up again, since the entire discussion is both pointless and completely offtopic. I am sorry if anyone thinks that this is "censorship". If there is anything anyone feels that they absolutely must say, then say it via PMs.
99 little bugs in the code, 99 little bugs
take one down, patch it around
2,147,483,648 little bugs in the code
take one down, patch it around
2,147,483,648 little bugs in the code
Re: NoLuckEra
Hello Mabuse,
thanks for this addon. I was looking forward to an easy way to play nonrandom Wesnoth for a long time.
But i think the damage calculations implemented are not correct.
The first instance, where i recognized something was off, was when i attacked with a strong Dwarfish Fighter (8blade damage) from 30% terrain, another strong Dwarfish Fighter on a 60%terrain. I expected the damage these two guys do to each other to have a ratio of (10060)/(10030)=4/7=0.57. But the damages they did to each other were 5 and 2, therefore a ratio of 2/5=0.4.
A dwarf on 60% terrain should receive from 8blade damage on average (normal Wesnoth) 8*0.8*0.4=2.56~3 damage.
A dwarf on 30% terrain should receive from 8blade damage on average (normal Wesnoth) 8*0.8*0.7=4.48~4 damage.
Including you 0.05 damage increase, you implemented in your addon, the results should be 8*0.8*0.45=2.88~3 and 8*0.8*0.75=4.8~5. But the results from the damage calculation in Wesnoth are 2 and 5, and not 3 and 5.
I did some similar tests with Drakes vs. an Elvish Fighter, which are also way off.
The calculations are:
Expected average damage per strike normal wesnoth  Total average damager whole attack
Expected aver. dam per strike including 0.05 modifier  Results of NoluckMod
Clasher attacks Elvish Fighter standing on 40% terrain with 6 Pierce at nighttime
6*0.6*0.75 =2.7  2.7*4=10.8
6*0.65*0.75=2.9  2*4=8
Glider attacks Elvish Fighter standing on 40% terrain with 6 Impact at nighttime
6*0.6*0.75 =2.7  2.7*2=5.4
6*0.65*0.75=2.9  2*2=4
Saurian Mage attacks Elvish Fighter standing on 40% terrain with 5 coldmagic at dawn
5*0.7 =3.5  3.5*3=10.5
5*0.75=3.75  3*3=9
Elvish Fighter attacks Saurian Mage standing on 40% terrain with 3 pierce (Saurian 20% resistant)
3*0.6*0.8 = 1.44  1.44*3=4.32
3*0.65*0.8= 1.56 1*3=3 (Dextrous Fighter does 2*3=6)
These are the cases, which have obvious rounding errors and are not calculated right.
But even if this problem is fixed, the noluck mode has the problem that it changes balance of the game in non obvious ways. Dixie commented already that the flavour between dodgers vs resisters is lost, but it goes further. Units which are daytime dependent and have a rather low attack (which is susceptible to rounding errors), like the human fencer, become even more prone to the day night cycle (which is sometimes extended into dusk and dawn).
thanks for this addon. I was looking forward to an easy way to play nonrandom Wesnoth for a long time.
But i think the damage calculations implemented are not correct.
The first instance, where i recognized something was off, was when i attacked with a strong Dwarfish Fighter (8blade damage) from 30% terrain, another strong Dwarfish Fighter on a 60%terrain. I expected the damage these two guys do to each other to have a ratio of (10060)/(10030)=4/7=0.57. But the damages they did to each other were 5 and 2, therefore a ratio of 2/5=0.4.
A dwarf on 60% terrain should receive from 8blade damage on average (normal Wesnoth) 8*0.8*0.4=2.56~3 damage.
A dwarf on 30% terrain should receive from 8blade damage on average (normal Wesnoth) 8*0.8*0.7=4.48~4 damage.
Including you 0.05 damage increase, you implemented in your addon, the results should be 8*0.8*0.45=2.88~3 and 8*0.8*0.75=4.8~5. But the results from the damage calculation in Wesnoth are 2 and 5, and not 3 and 5.
I did some similar tests with Drakes vs. an Elvish Fighter, which are also way off.
The calculations are:
Expected average damage per strike normal wesnoth  Total average damager whole attack
Expected aver. dam per strike including 0.05 modifier  Results of NoluckMod
Clasher attacks Elvish Fighter standing on 40% terrain with 6 Pierce at nighttime
6*0.6*0.75 =2.7  2.7*4=10.8
6*0.65*0.75=2.9  2*4=8
Glider attacks Elvish Fighter standing on 40% terrain with 6 Impact at nighttime
6*0.6*0.75 =2.7  2.7*2=5.4
6*0.65*0.75=2.9  2*2=4
Saurian Mage attacks Elvish Fighter standing on 40% terrain with 5 coldmagic at dawn
5*0.7 =3.5  3.5*3=10.5
5*0.75=3.75  3*3=9
Elvish Fighter attacks Saurian Mage standing on 40% terrain with 3 pierce (Saurian 20% resistant)
3*0.6*0.8 = 1.44  1.44*3=4.32
3*0.65*0.8= 1.56 1*3=3 (Dextrous Fighter does 2*3=6)
These are the cases, which have obvious rounding errors and are not calculated right.
But even if this problem is fixed, the noluck mode has the problem that it changes balance of the game in non obvious ways. Dixie commented already that the flavour between dodgers vs resisters is lost, but it goes further. Units which are daytime dependent and have a rather low attack (which is susceptible to rounding errors), like the human fencer, become even more prone to the day night cycle (which is sometimes extended into dusk and dawn).
Re: NoLuckEra
well ant. you are absolutely right.
the rounding is a (big) problem.
i can explain the results you get mathwise.
the way the rounding goes (seem to go) is like this:
1)
damage * terrain factor = result1
result1 gets always rounded down.
2)
AFTER result1 is rounded down other factors apply.
this result is then rounded correctly
example calcs:

dwarf 8 blade versus dwarf on hill (60% def)
8 damage * 0.45 = 3.6
(gets rounded to 3. for whatever reason. maybe that result gets always floored, since its an integer)
3 * 0.8 = 2.4 (rounded down 2  this last calc seem to round correctly)
so by rounding down twice you get your 2 result.
the other example calc is:
8 blade dwarf versus dwarf on flat (30% def)
8 damage * 0.75 = 6
6 * 0.8 = 4.8
(rounded up 5  the last calc seem to round correctly)
more examples:

clasher vs. elvish fighter 6 pierce, 40% def
6* 0.65 = 3.9 (rounded down 3)
3* 0.75 = 2.225 (rounded down 2)

this one is interesting, but also right:
Elvish Fighter attacks Saurian Mage standing on 40% terrain with 3 pierce (Saurian 20% resistant)
3* 0.65 = 1.95 (rounded down 1)
1* 0.8 = 0.8 (always min of 1)
if dextrous:
4* 0.65 = 2.6 (rounded down 2)
2* 0.8 = 1.6 (rounded up 2)

all other calcs will get the same outcome.
the formula as it seems to work parctically is:
1st step)
first the result from the damagespecial multiplier(terrain modificator) gets calculated and always floored.
2nd step)
then other multipliers (daytime, leadership, resistances) get calculated and the result is rounded correctly.
feel free to check whatever calculation you find. it seems to work like this.

the only CORRECT solution could be to make a normal terrain modifier (for 30% def terrain its 0.7  and not .075 as it is currently)
and add after the first calc is done (but before rounding) 0.5 to the result, so that it rounds correctly.
then let all other factors apply.
however, this is not possible. since you cannot influence the calculation when running.
(i think  maybe an wml expert can say more about this)
in my mod i currently add 0.05 to the first factor and hope that it balances a little bit the down rounding.
the rounding is a (big) problem.
i can explain the results you get mathwise.
the way the rounding goes (seem to go) is like this:
1)
damage * terrain factor = result1
result1 gets always rounded down.
2)
AFTER result1 is rounded down other factors apply.
this result is then rounded correctly
example calcs:

dwarf 8 blade versus dwarf on hill (60% def)
8 damage * 0.45 = 3.6
(gets rounded to 3. for whatever reason. maybe that result gets always floored, since its an integer)
3 * 0.8 = 2.4 (rounded down 2  this last calc seem to round correctly)
so by rounding down twice you get your 2 result.
the other example calc is:
8 blade dwarf versus dwarf on flat (30% def)
8 damage * 0.75 = 6
6 * 0.8 = 4.8
(rounded up 5  the last calc seem to round correctly)
more examples:

clasher vs. elvish fighter 6 pierce, 40% def
6* 0.65 = 3.9 (rounded down 3)
3* 0.75 = 2.225 (rounded down 2)

this one is interesting, but also right:
Elvish Fighter attacks Saurian Mage standing on 40% terrain with 3 pierce (Saurian 20% resistant)
3* 0.65 = 1.95 (rounded down 1)
1* 0.8 = 0.8 (always min of 1)
if dextrous:
4* 0.65 = 2.6 (rounded down 2)
2* 0.8 = 1.6 (rounded up 2)

all other calcs will get the same outcome.
the formula as it seems to work parctically is:
1st step)
first the result from the damagespecial multiplier(terrain modificator) gets calculated and always floored.
2nd step)
then other multipliers (daytime, leadership, resistances) get calculated and the result is rounded correctly.
feel free to check whatever calculation you find. it seems to work like this.

the only CORRECT solution could be to make a normal terrain modifier (for 30% def terrain its 0.7  and not .075 as it is currently)
and add after the first calc is done (but before rounding) 0.5 to the result, so that it rounds correctly.
then let all other factors apply.
however, this is not possible. since you cannot influence the calculation when running.
(i think  maybe an wml expert can say more about this)
in my mod i currently add 0.05 to the first factor and hope that it balances a little bit the down rounding.
The best bet is your own, good Taste.

 Posts: 876
 Joined: November 28th, 2008, 6:18 pm
Re: NoLuckEra
that is strange, if one operand is float then the result should be float too:
http://forums.wesnoth.org/viewtopic.php ... 43#p336743
Did you try both float? (2.0 in place of 2)
http://forums.wesnoth.org/viewtopic.php ... 43#p336743
Did you try both float? (2.0 in place of 2)
I work on Conquest Minus • I use DFoolWide, Retro Terrain Package and the addon 'High Contrast Water'
I moved to Nosebane's corner (Doc Paterson's signature); I am spending my time there, so PM me if I don't answer your post in forums
I moved to Nosebane's corner (Doc Paterson's signature); I am spending my time there, so PM me if I don't answer your post in forums
Re: NoLuckEra
just a short explanation how no luck mode works:SlowThinker wrote: Did you try both float? (2.0 in place of 2)
every weapon gets a special, that gives it 100% CTH ([chance_to_hit])
and a special that modifies its damage ([damage]), the terrain modifier.
the VALUE used in that damagetag, is a float. (< 1, e.g. 0.55)
but it seems the system FLOORS the result from that damagetag automatically.
(in any case the outcome of that damagetag is an integer, so wether its rounded up or down doesnt matter much, this "previous"rounding will always have a certain impact.)
on the other hand, rounding will have in "noluckmode" always an impact, since we the system can only operate with integers for damage in the end.
lets see a 53 attack against 50% def. 5*0.5*3=7.5  so 7.5 is the mathematical average damage.
INGAME its either 23 or 33. no matter what you finally try.
so the noluckdamage is either 6 or 9.
due to rounding losses its generally the lower value.
The best bet is your own, good Taste.
Re: NoLuckEra
however .... AFTER thinking a bit about it have to say that the 0.5 increasement to get a correct flooring is of course possible. it just means more work.Mabuse wrote:the only CORRECT solution could be to make a normal terrain modifier
and add after the first calc is done (but before rounding) 0.5 to the result, so that it rounds correctly.
however, this is not possible. since you cannot influence the calculation when running.
in my mod i currently add 0.05 to the first factor and hope that it balances a little bit the down rounding.
IDEA:

currently i use 0.05 as a FLAT addition to the "basefactor" to balance out the flooring.
if the base damage is 10, the 0.05 represents an addition of 0.5.
(so the flat system works 100% correctly if the basedamage is 10, since an additional 0.05 to the factor means a total increment of 0.5 (10*0.05))
for lower/higher damage values this 0.05 must be also higher/lower.
so the key here is to use basedamage adjusted "roundingbuffers".
i think this can be done by also checking for the damage of the weapon and adding the correct balancefactor to get a better rounding effect.
this will overall fix the cases ANT mentioned in his first example  when a 83 blade dwarf makes 23 damage against a 60% def opponent. after implementing the new roundingfactors the dwarf would do 33
The best bet is your own, good Taste.
Re: NoLuckEra
If you could implement that, that would be great. But it does not solve the rather broader rounding to the next integer issue. In the strongdwarf example a 3*3=9 attack is still about 15% off of the expected average value of 7.7 in standard Wesnoth. A 15% difference in attack power is still a rather significant balance change.i think this can be done by also checking for the damage of the weapon and adding the correct balancefactor to get a better rounding effect.
A rather simple solution to this would be to increase the hp and attacks of all units by a factor of 10. For the gamesystem it does not really matter if a dwarf has 38 hp and 73 attack or 380 hp and 703 attack, but the rounding errors from the noluck mod would be reduced to the 2% range, bringing the balance of the NoLuckMod much closer to standard Wesnoth. Of course slow, poison and so would have to be changed, but in the long run a NoLuckMod needs its own Definition of these ablities.
Re: NoLuckEra
Actually there doesn't need to be any rounding if you multiply all by 10, since all defenses are multiples of 0.1 in the first place.
Wesnoth
The developer says "no".
The developer says "no".
Re: NoLuckEra
Seems like the *10 thing works well at first glance.
113 blade versus 30% dodge and 60% resists:
11*(1  0.3) * (1  0.6) * 3 = 9.24 * 1 or 3.08 * 3
10*11*(1  0.3)*(1  0.6 * 3 = 92.4 * 1 or 30.8 * 3
I guess the worst case is a bias would be reduced to 0.05 damage by rounding up or down...
113 blade versus 30% dodge and 60% resists:
11*(1  0.3) * (1  0.6) * 3 = 9.24 * 1 or 3.08 * 3
10*11*(1  0.3)*(1  0.6 * 3 = 92.4 * 1 or 30.8 * 3
I guess the worst case is a bias would be reduced to 0.05 damage by rounding up or down...
Re: NoLuckEra
hey, sx already include a noluck mod
(tbh, the "noluck era" is a "derivate" from the noluckmode included in my sx maps.)
the sxnoluck mode is atm a bit out of date, but i dont plan to make more on this thingy then changing the damagemultipliers a bit (for sx it is no option to make slow and poison not luck dependent).
(tbh, the "noluck era" is a "derivate" from the noluckmode included in my sx maps.)
the sxnoluck mode is atm a bit out of date, but i dont plan to make more on this thingy then changing the damagemultipliers a bit (for sx it is no option to make slow and poison not luck dependent).
The best bet is your own, good Taste.
Re: NoLuckEra
I have to THANKS A LOT to Mabuse (and all his work is based on), We just played with chesssplayers last version of No Luck Era in 1.9.13 wesnoth, and it worked GREAT, simply one has to think where to move or attack and random was lie inh chess or due to fog of war etc, but no unexpected big random turbulences.
I plan test it much more, but already now was a big fun playing chess like game
We combined it with gold win (who has mosst gold after 20 rounds win, next order is based on gold also) on 20 moves playing 3 players each vs each and some neutral armies in, and was really cool!
If wish somebody join us, see http://strateg.ic.cz/Wesnoth/
I plan test it much more, but already now was a big fun playing chess like game
We combined it with gold win (who has mosst gold after 20 rounds win, next order is based on gold also) on 20 moves playing 3 players each vs each and some neutral armies in, and was really cool!
If wish somebody join us, see http://strateg.ic.cz/Wesnoth/
SKAcz
http://strateg.ic.cz/
http://strateg.ic.cz/
Re: NoLuckEra
Thank you for the mod. +0%/+0% statistics resulted in 0 losses again the computer. Thanks to this I will (probably) be able to persuade my friends into playing wesnoth.
Some pet peevees:
It seems to work with the latest wesnoth, v1.10.3. The addon list says the mod version is 1.10 but the version shown in this thread is 1.00. Please clearly indicate which version this mod can work for in the OP for any interested players.
Please provide and explain the exact formula used. I looked into NLera.cfg but my feeble mind cant fathom what's written there... I think it'll help interested players and testers, too.
Again, thank you for the mod. Curbstomping skeletons with drakes at night was amazing.
Some pet peevees:
It seems to work with the latest wesnoth, v1.10.3. The addon list says the mod version is 1.10 but the version shown in this thread is 1.00. Please clearly indicate which version this mod can work for in the OP for any interested players.
Please provide and explain the exact formula used. I looked into NLera.cfg but my feeble mind cant fathom what's written there... I think it'll help interested players and testers, too.
Again, thank you for the mod. Curbstomping skeletons with drakes at night was amazing.