Wesnoth 1.7.3 MOD: pick yourself random factor in game

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

Moderator: Forum Moderators

Sauron
Posts: 221
Joined: January 11th, 2006, 8:51 am
Location: Barad-Dur, Mordor
Contact:

Wesnoth 1.7.3 MOD: pick yourself random factor in game

Post by Sauron »


Project's homepage:
http://saurons-mod.zor.org/
Download mod for Wesnoth 1.7.3 at project's homepage (section Downloads).


_____________________________________________________________

02:15 08.26.2009
I have completed initial phase of restoration of my mod. It contains most of features it used to, except for extended stats.

Short about my mod's idea:
Why mod Wesnoth?

The mod was created in order to cope with excessive influence of the random number generator on the result of the game.

Modded game allows users to pick the amount of damage they intend to inflict for sure or change the distribution of damage (to make it more concentrated around Expected Value) thus making game more strategy-like rather than lottery-like.
More details can be found here: http://saurons-mod.zor.org/

Should you find the mod interesting upgrade for games features - and should you be willing to help me maintaining and developing the mod - please contact me via pm or at sauron.wesnoth@gmail.com. I no longer have time to rewrite mod for every version of wesnoth - and I think the mod should be developed/improved independently anyway.

_____________________________________________________________

16:38 06.09.2006
Serious bug detected: non-standard games run on different platfirms were running out of sync!!! the problem solved, see details here:
http://www.wesnoth.org/forum/viewtopic. ... 210#181210
_____________________________________________________________

15:35 01.09.2006
Small cosmetic changes to the sourcecode, damage modifications packed iinto function instead of code blocks.
_____________________________________________________________

12:35 28.08.2006
Several small bugfixes done. Please re-download source and executable.
In all tests I run so far the deviation from expected value was next to nothing (below 1%, reaching 2 to 4 HP out of over thousand!!!). The settings at which tests were run:
split of damage: 0% ,
normalize damage: 99.
Of course at split of damage: 0% and normalize damage = 1 you get still standard wesnoth 1.0.2!
more details: http://www.wesnoth.org/forum/viewtopic. ... 381#178381
___________________________________________________________

10:35 28.08.2006
Major update to version 1.0.5. Added new damage - smoothing formula. The new formula can be applied without split of damage - or with it (see attached source code for details).
more details: http://www.wesnoth.org/forum/viewtopic. ... 381#178381
_________________________________________________


21:37 24.08.2006
Source code fix
Corrected wesconfig.h, in some situations the compiler error might appear - "undefined identifier: SAURONS_MOD"
more details: http://www.wesnoth.org/forum/viewtopic. ... 520#177520

_________________________________________________

12:50 10.08.2006
The project's homepage totally re-written.
http://www.saurons-mod.zor.org

_________________________________________________
02:20 07.08.2006
Minor bug fix
Bug removed from extended stats - caused to count too few hits. Please download latest code / binaries.
Added additional stats column : Total

_________________________________________________
0:20 07.08.2006
Minor bug fix
Bug removed from extended stats - caused to count too many hits and less misses. Please download latest code / binaries.

_________________________________________________
Update: 06.08.2006

Update to version 1.0.4, see screens and update details here:
http://www.wesnoth.org/forum/viewtopic. ... 655#172655


_________________________________________________
Hi!
After 3-days long fight with the code of wesnoth I accomplished first release of my long-ago-planned mod. Mod's homepage: http://saurons-mod.zor.org/. You can download there the executable for windows AND sourcecode, if you wish to compile at *nix.

The mod was created in order to cope with excessive influence of the random number generator on the result of the game.
Modded game allows users to pick the amount of damage they intend to inflict for sure, thus making game more strategy-like rather than lottery-like. This mod is available on same conditions as Battle for Wesnoth: GNU General Public License V2 or later

The mod introduces a new feature - it allows to split damage between non-random and random-influenced part. The EXPECTED damage does not change, but the VARIATION is greatly dimimished. Now you can play fully wesnoth-style games or fully deterministic ones - and all in between!
I introduced a few new features to the gui, that fit well with the game you played so far.

The game IS FULLY BACKWARD COMPATIBILE with version 1.0.2 IF non-random part of damage is set to 0.

For interested players - how mod counts dmg:

Code: Select all

damage_defender_takes=ceil((split_ratio* stats.chance_to_hit_defender*temp_stats_damage_defender_takes)/100.0)
							+floor(temp_results_hits* (1-split_ratio)*temp_stats_damage_defender_takes );
splt ratio == how much dmg will be dealt for sure
temp_results_hits == HIT OR MISSED?
stats.chance_to_hit_defender == 1- terrain defense
temp_stats_damage_defender_takes == amount of dmg to inflict, after all daytime/resistance/vulnerability/leaderships adjustments have been applied


NOTE: The above formula makes the damage inflicted/taken go ABOVE EV - it is a result of using CEIL function in non-random part of equation. In the split-damage-approach there are 2 alternatives:
1. swap ceil/floor functions - thus NOT GUARANTING ANY damage at low setting of split-ratio AND causing damage to go below EV
2. Rounding up/down to the closest integer AFTER summing up random and non random - also not-guaranting any damage, but in addition - in certain settings - disadvantaging one of the sides.
There is also THIRD way - completely change the distribution. Due to lack of time I will not be able to apply changes soon, should you have any suggestions referring to the 3rd way - please post below.

I think I could experiment with more damage formulas - just for taste of different users - I will add it to the mod if you supply not an idea, but a mathematical formula that takes 1 input number (4-digit, 0 to 9999 integer) maximum 2 non-correletad random input numbers (0 to 99 integers) to generate the damage (floats allowed, to apply must be rounded, floored or ceiled anyway)

We might also "bulk" all unit's attacks in 1 big - and make it hit or not ([ROTFL]) / just joking/ - to allow more complicated formulas (Chi-squared, normal, T-Student) BUT thus we risk situations that both units die in fight (I do not think single blow approach should allow the attacker to avoid defender's counterstrike)- this will force me to completely separate "1.0.2 compliant" code.[/url]
Attachments
setting to 0% the split ratio makes game STANDARD WESNOTH. Split ratio &amp;gt;0% allows ONLY PLAYERS with MOD to join. On joining STANDARD WESNOTH 1.0.2 GAME - split ratio is automatically set to 0%.<br />normalize damage allows to smoothen the random results by
setting to 0% the split ratio makes game STANDARD WESNOTH. Split ratio &gt;0% allows ONLY PLAYERS with MOD to join. On joining STANDARD WESNOTH 1.0.2 GAME - split ratio is automatically set to 0%.
normalize damage allows to smoothen the random results by
slider3.jpg (30.92 KiB) Viewed 14324 times
Last edited by Sauron on August 26th, 2009, 1:18 am, edited 48 times in total.
Sauron
Customize yourself random factor in game:
GET my mod [available as C++ sourcecode and compiled Windows executable] for wesnoth 1.6.4
at http://saurons-mod.zor.org/
Mod thread
http://www.wesnoth.org/forum/viewtopic.php?t=26803
scott
Posts: 5243
Joined: May 12th, 2004, 12:35 am
Location: San Pedro, CA

Post by scott »

Congratulations!
Hope springs eternal.
Wesnoth acronym guide.
User avatar
Sapient
Inactive Developer
Posts: 4453
Joined: November 26th, 2005, 7:41 am
Contact:

Post by Sapient »

Congrats. I'd be interested in reading the .diff / .patch file
http://www.wesnoth.org/wiki/User:Sapient... "Looks like your skills saved us again. Uh, well at least, they saved Soarin's apple pie."
Sauron
Posts: 221
Joined: January 11th, 2006, 8:51 am
Location: Barad-Dur, Mordor
Contact:

Post by Sauron »

Sapient wrote:The main problem I see with sliding-scale variability is that it makes balancing the worth of attack specials more difficult. For example, an elvish sorceress has different odds of slowing her opponent versus a druid.(...)
I am familiars with the problem (see my post above) - I kept the standard wesnoth behaviour.
Sapient wrote:(BTW, wesnoth already is deterministic, the random factor is just hidden from the user)
Telling it to someone who coded wesnoth himself is unnecessary :). BTW - your cheater-detection system is pretty interesting - I were thinking that someone might write a cheat-mod , in which player sees future %100s and knows how to distribute hits and misses among units.
Last edited by Sauron on August 26th, 2009, 1:03 am, edited 1 time in total.
Sauron
Customize yourself random factor in game:
GET my mod [available as C++ sourcecode and compiled Windows executable] for wesnoth 1.6.4
at http://saurons-mod.zor.org/
Mod thread
http://www.wesnoth.org/forum/viewtopic.php?t=26803
User avatar
Sapient
Inactive Developer
Posts: 4453
Joined: November 26th, 2005, 7:41 am
Contact:

Post by Sapient »

Sauron wrote: BTW - your cheater-detection system is pretty interesting - I were thinking that someone might write a cheat-mod , in which player sees future %100s and knows how to distribute hits and misses among units.
In which case, the devs would place a high priority on implementing Wintersmith's randomization proposal.

My original complaint with difficulty balancing your system still stands: "certainty in pivotal situations is a valuable attribute to possess." The slow attack special was just the first example that came to my mind. I didn't realize you had resorted to a "lottery" solution. :P
http://www.wesnoth.org/wiki/User:Sapient... "Looks like your skills saved us again. Uh, well at least, they saved Soarin's apple pie."
Sauron
Posts: 221
Joined: January 11th, 2006, 8:51 am
Location: Barad-Dur, Mordor
Contact:

Post by Sauron »

Sapient wrote:My original complaint with difficulty balancing your system still stands: "certainty in pivotal situations is a valuable attribute to possess." The slow attack special was just the first example that came to my mind. I didn't realize you had resorted to a "lottery" solution. :P
I give no certainty and I am against fully deterministic game - the lottery solution was picked AS CLOSER TO EV than fully deterministic. I saw NO GOOD solution, so I kept original behaviour, which made special units NOT overpowered in special attack (direct damage is inflicted on my rules).
Sauron
Customize yourself random factor in game:
GET my mod [available as C++ sourcecode and compiled Windows executable] for wesnoth 1.6.4
at http://saurons-mod.zor.org/
Mod thread
http://www.wesnoth.org/forum/viewtopic.php?t=26803
User avatar
Mythological
Inactive Developer
Posts: 275
Joined: October 1st, 2005, 5:19 pm
Location: Nowhere

Post by Mythological »

Congats on completing your project, Sauron
I was wondering what are you gonna do next and I see you have desided to choose a different aproach than the one we tested last time. I hope we get to play sometimes ( althow I dont play 1.0.2 anymore, I will be there in the next days )
Anyway, you shouldnt be suprised that most of the regular players dislike your idea....the chance is part of the game, and taking chances is part of the fun - the skill and experience determines how well you determine which is a good chance to take and which one isnt
Theoretically, love is great
but it is a little bit different in practice.

Riblja Čorba - "I'll break your wings, aeroplane"
Never say never
Xan
Inactive Developer
Posts: 258
Joined: August 28th, 2005, 3:05 pm
Contact:

Post by Xan »

Look, this isn't a discussion about whether randomness is good or bad.
"It is time people learned about their failures and my successes."
scott
Posts: 5243
Joined: May 12th, 2004, 12:35 am
Location: San Pedro, CA

Post by scott »

Please use this thread to discuss what the mod does and how it does it. The official opinion on randomness is set, and Sauron has done what people are told to do in the case of an irreconcilable difference: he made his own fork of the game. Therefore, discussion as to whether the mod is necessary (the implicit conclusion of a discussion over how randomness fits into BFW and how good players view it) would be off-topic here.
Hope springs eternal.
Wesnoth acronym guide.
Noy
Inactive Developer
Posts: 1321
Joined: March 13th, 2005, 3:59 pm

Post by Noy »

(I moved my comments to the other thread... the change of venue occurred while I was writing).

I should apologize and say that I'd like to thank you for the effort you have put in.... I welcome your addition (even if I don't agree with the reasoning behind it).
User avatar
Sapient
Inactive Developer
Posts: 4453
Joined: November 26th, 2005, 7:41 am
Contact:

Post by Sapient »

Xan wrote:Look, this isn't a discussion about whether randomness is good or bad.
I'm not saying randomness is good or bad, but that variable randomness causes unit balancing difficulties. These difficulties can be worked around by changing the mechanics of the attack specials. For example, a "less luck" version of slow would cause a variable-percent reduction in damage (instead of a flat 50%).
http://www.wesnoth.org/wiki/User:Sapient... "Looks like your skills saved us again. Uh, well at least, they saved Soarin's apple pie."
Xan
Inactive Developer
Posts: 258
Joined: August 28th, 2005, 3:05 pm
Contact:

Post by Xan »

Sapient wrote:
Xan wrote:Look, this isn't a discussion about whether randomness is good or bad.
I'm not saying randomness is good or bad, but that variable randomness causes unit balancing difficulties. These difficulties can be worked around by changing the mechanics of the attack specials. For example, a "less luck" version of slow would cause a variable-percent reduction in damage (instead of a flat 50%).
Yeah, I was talking about all the posts that were split.
"It is time people learned about their failures and my successes."
Sauron
Posts: 221
Joined: January 11th, 2006, 8:51 am
Location: Barad-Dur, Mordor
Contact:

Post by Sauron »

Sapient wrote:For example, a "less luck" version of slow would cause a variable-percent reduction in damage (instead of a flat 50%).
in 1.0.2 it reduces attacks' amount by 1 (unless 1 left or already slowed) - and applying this approach leads to "only a bit poisoned", "only a bit turned to stone" and so on - it is really hard to substitute random in events with discrete effects.
I sticked to wesnoth approach also in order to reduce amount of coding (my vacation is over tomorrow, so the time was of essence). It also means no serious changes to the mod till another vacation which will not come soon :(.
Sauron
Customize yourself random factor in game:
GET my mod [available as C++ sourcecode and compiled Windows executable] for wesnoth 1.6.4
at http://saurons-mod.zor.org/
Mod thread
http://www.wesnoth.org/forum/viewtopic.php?t=26803
User avatar
Sapient
Inactive Developer
Posts: 4453
Joined: November 26th, 2005, 7:41 am
Contact:

Post by Sapient »

Sauron wrote:
Sapient wrote:For example, a "less luck" version of slow would cause a variable-percent reduction in damage (instead of a flat 50%).
in 1.0.2 it reduces attacks' amount by 1 (unless 1 left or already slowed) - and applying this approach leads to "only a bit poisoned", "only a bit turned to stone" and so on - it is really hard to substitute random in events with discrete effects.
I sticked to wesnoth approach also in order to reduce amount of coding (my vacation is over tomorrow, so the time was of essence). It also means no serious changes to the mod till another vacation which will not come soon :(.
Being "only a bit poisoned" makes sense to me. I wouldn't worry about stoned either, because it is an instant-death effect that has no place in the Default Era.
http://www.wesnoth.org/wiki/User:Sapient... "Looks like your skills saved us again. Uh, well at least, they saved Soarin's apple pie."
User avatar
zookeeper
WML Wizard
Posts: 9742
Joined: September 11th, 2004, 10:40 pm
Location: Finland

Post by zookeeper »

I must say that I think it's great that someone actually implements some of the more controversial ideas that have gotten debated to death without anyone actually doing anything.

I might not play it myself for lack of interest (or then again, I might), but anyone who bothers to actually write a mod like this deserves at least some credit (hey, when is the last time someone implemented a major change/alternative to the game like this?).
Locked