NoLuckEra

Discussion of all aspects of multiplayer development: unit balancing, map development, server development, and so forth.

Moderator: Forum Moderators

Aidoneus
Posts: 33
Joined: July 24th, 2011, 2:06 pm

Re: NoLuckEra

Post by Aidoneus »

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 variant--how 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.
User avatar
Pentarctagon
Project Manager
Posts: 5564
Joined: March 22nd, 2009, 10:50 pm
Location: Earth (occasionally)

Re: NoLuckEra

Post by Pentarctagon »

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 off-topic. 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
Ant
Posts: 21
Joined: January 29th, 2010, 4:21 am

Re: NoLuckEra

Post by Ant »

Hello Mabuse,

thanks for this add-on. I was looking forward to an easy way to play non-random 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 (8-blade 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 (100-60)/(100-30)=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 8-blade damage on average (normal Wesnoth) 8*0.8*0.4=2.56~3 damage.
A dwarf on 30% terrain should receive from 8-blade damage on average (normal Wesnoth) 8*0.8*0.7=4.48~4 damage.

Including you 0.05 damage increase, you implemented in your add-on, 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 cold-magic 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 no-luck 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).
Mabuse
Posts: 2239
Joined: November 6th, 2007, 1:38 pm

Re: NoLuckEra

Post by Mabuse »

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 damage-special 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.
SlowThinker
Posts: 876
Joined: November 28th, 2008, 6:18 pm

Re: NoLuckEra

Post by SlowThinker »

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)
I work on Conquest Minus • I use DFoolWide, Retro Terrain Package and the add-on '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
Mabuse
Posts: 2239
Joined: November 6th, 2007, 1:38 pm

Re: NoLuckEra

Post by Mabuse »

SlowThinker wrote: Did you try both float? (2.0 in place of 2)
just a short explanation how no luck mode works:

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 damage-tag, is a float. (< 1, e.g. 0.55)

but it seems the system FLOORS the result from that damage-tag automatically.
(in any case the outcome of that damage-tag 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 "no-luck-mode" always an impact, since we the system can only operate with integers for damage in the end.

lets see a 5-3 attack against 50% def. 5*0.5*3=7.5 - so 7.5 is the mathematical average damage.
INGAME its either 2-3 or 3-3. 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.
Mabuse
Posts: 2239
Joined: November 6th, 2007, 1:38 pm

Re: NoLuckEra

Post by Mabuse »

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.
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.


IDEA:
------

currently i use 0.05 as a FLAT addition to the "base-factor" 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 base-damage 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 base-damage adjusted "rounding-buffers".

i think this can be done by also checking for the damage of the weapon and adding the correct balance-factor to get a better rounding effect.

this will overall fix the cases ANT mentioned in his first example - when a 8-3 blade dwarf makes 2-3 damage against a 60% def opponent. after implementing the new rounding-factors the dwarf would do 3-3
The best bet is your own, good Taste.
Ant
Posts: 21
Joined: January 29th, 2010, 4:21 am

Re: NoLuckEra

Post by Ant »

i think this can be done by also checking for the damage of the weapon and adding the correct balance-factor to get a better rounding effect.
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 strong-dwarf 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.

A rather simple solution to this would be to increase the hp and attacks of all units by a factor of 10. For the game-system it does not really matter if a dwarf has 38 hp and 7-3 attack or 380 hp and 70-3 attack, but the rounding errors from the no-luck 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.
Rya
Posts: 350
Joined: September 23rd, 2009, 9:01 am

Re: NoLuckEra

Post by Rya »

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".
MCP
Posts: 518
Joined: May 23rd, 2005, 5:23 pm
Location: California

Re: NoLuckEra

Post by MCP »

Seems like the *10 thing works well at first glance.

11-3 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...
Warfall
Posts: 126
Joined: March 28th, 2009, 5:55 pm

Re:

Post by Warfall »

-
Last edited by Warfall on July 6th, 2015, 2:35 pm, edited 2 times in total.
Mabuse
Posts: 2239
Joined: November 6th, 2007, 1:38 pm

Re: NoLuckEra

Post by Mabuse »

hey, sx already include a noluck mod
(tbh, the "noluck era" is a "derivate" from the noluck-mode included in my sx maps.)

the sx-no-luck mode is atm a bit out of date, but i dont plan to make more on this thingy then changing the damage-multipliers a bit (for sx it is no option to make slow and poison not luck dependent).
The best bet is your own, good Taste.
Warfall
Posts: 126
Joined: March 28th, 2009, 5:55 pm

Re:

Post by Warfall »

-
Last edited by Warfall on July 6th, 2015, 4:03 pm, edited 2 times in total.
SKAcz
Posts: 72
Joined: March 14th, 2005, 11:50 am
Location: Czech Republic
Contact:

Re: NoLuckEra

Post by SKAcz »

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/
rephikul
Posts: 1
Joined: August 6th, 2012, 5:39 pm

Re: NoLuckEra

Post by rephikul »

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:
:eng: 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.
:eng: 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. Curb-stomping skeletons with drakes at night was amazing.
Post Reply