[Request]Reduce RNG influence

General feedback and discussion of the game.

Moderator: Forum Moderators

User avatar
Zarel
Posts: 700
Joined: July 15th, 2009, 8:24 am
Location: Minnesota, USA
Contact:

Re: [Request]Reduce RNG influence

Post by Zarel »

Death wrote:Go take a look at Tactics Arena (it's free). It uses a 'karma' system different than the ones described here, but the basic goal is the same: avoiding localized 'luck spikes'.
http://www.tacticsarena.com/guide/rules.php

I did. It doesn't say anything about that. Can you be more specific?
Proud creator of the :whistle: smiley | I prefer the CC-0 license.
User avatar
Death
Posts: 85
Joined: April 15th, 2008, 3:34 am

Re: [Request]Reduce RNG influence

Post by Death »

Yeah actually, did some digging and found this old post from the game's creator about the random mechanics, after a game revision:

http://flashgamer.blogspot.com/2006/03/ ... ystem.html


The easiest way to see how it works is to just play the game (no download necessary. it's flash)
User avatar
Zarel
Posts: 700
Joined: July 15th, 2009, 8:24 am
Location: Minnesota, USA
Contact:

Re: [Request]Reduce RNG influence

Post by Zarel »

Well, then. The system is poorly documented, and the game is probably fairly obscure. I guess when I said "no games", I mean "no major games". There's no accounting for lack of game design talent in obscure game developers.
Proud creator of the :whistle: smiley | I prefer the CC-0 license.
User avatar
Death
Posts: 85
Joined: April 15th, 2008, 3:34 am

Re: [Request]Reduce RNG influence

Post by Death »

Oh, I see. You haven't heard of it = game is probably fairly obscure = not major.


Someone asked for a working example, I gave it. You're welcome.
User avatar
Zarel
Posts: 700
Joined: July 15th, 2009, 8:24 am
Location: Minnesota, USA
Contact:

Re: [Request]Reduce RNG influence

Post by Zarel »

Yeah, you're right. It's a valid example.

My point still stands that it doesn't happen with games major enough for Wikipedia articles. :P

Plus, TAO implements the karma system at least a bit simpler than some of the proposals I'm seeing here.
Proud creator of the :whistle: smiley | I prefer the CC-0 license.
Yogibear
Retired Developer
Posts: 1086
Joined: September 16th, 2005, 5:44 am
Location: Hamburg, Germany

Re: [Request]Reduce RNG influence

Post by Yogibear »

Ok, here we go for a first try:

https://sourceforge.net/projects/wesnot ... p/download

This implements:
- The old mp lobby
- RNG-reduction with Sauron's mod

Keep a few things in mind:

1.
It's a binary and it's only for windows. If there is someone willing to build a mac (or any other) binary please contact me :wink: . The source code is checked into SVN and available for everyone.

2.
It's not a full wesnoth download, instead it consists of 3 files. You can extract them into your standard 1.8 wesnoth directory. The only thing that changes is a small section of the credits dedicated to wesnoth experimental. It also provides an executable (wesnoth-xp.exe) additionally to your normal wesnoth.exe. That way you can be sure not to lose anything.

3.
RNG reduction is set within the preferences "general" tab. There you choose the algorithm and its parameters. For campaigns, you can also choose to set RNG parameters at the beginning of every scenario, but throughout a scenario RNG settings must not change.
The multiplayer create-game dialog also has a button for RNG settings right below the era.

4.
Wesnoth XP is completely compatible with mainline if you choose so. You can log onto the mainline mp server, observe, play or host normal games with other mainline wesnoth clients. Just make sure you set the RNG settings to mainline if you host a game and want mainline clients to take part (there are no checks for XP version clients for other RNG algorithms atm). If the host does not send RNG algorithm information, wesnoth XP will default to mainline RNG, so there should be no problems observing or joining other "mainline" games, no matter what algorithm is set in the preferences.

5.
Sauron's RNG algorithm has two parameters. The first one sets the split-ratio in percent of the damage, that is what amount is determined and what is subject to the RNG. The number denotes the determined part. Note that the algorithm also takes into account the defense modifier, so if you set the split to 60% determination and you do 10 damage per strike against 50% defense, you will have 10 * 0.5 (defense) * 0.6 (split) = 3 damage minimum per strike, even if you miss.
The other parameter controls, how many dice rolls are done to determine if a strike is a hit or miss (mainline has this set to 1). This is needed for the RNG-part of the damage as well as determining if slow, poison, petrify apply or not.

Have fun :) .


Edit: For those interested in coding their own RNG algorithm, have a look at this: http://wiki.wesnoth.org/WesnothExperime ... eAlgorithm
Smart persons learn out of their mistakes, wise persons learn out of others mistakes!
User avatar
StevenAus
Posts: 84
Joined: December 18th, 2009, 12:15 am
Location: Perth, Australia
Contact:

Re: [Request]Reduce RNG influence

Post by StevenAus »

What do you think are good values (for the Damage split ratio % and RNG Smoothing) to start from?

And I take it that magical attacks and defensive attacks (essentially makes terrain defence function as 30% for all units always) and marksmen attacks (essentially makes terrain defence be at most 40% but only when the marksmen unit is attacking, as long as the unit being attacked doesn't have a lower terrain defense for the terrain they're standing on). Since the Damage Calculation options are based on Sauron's mod, I take it that magical and marksmen effects are already factored in? :)

I look forward to trying out the options starting with your recommended starting values! =)

Best regards,
Steven.
My Life Purpose Is To Teach The World To Fish For Life. I AM Steven Russell Lynch Abundance That I AM. Empowerment Is My Name And Fostering Self-Responsibility Is My Game.
Yogibear
Retired Developer
Posts: 1086
Joined: September 16th, 2005, 5:44 am
Location: Hamburg, Germany

Re: [Request]Reduce RNG influence

Post by Yogibear »

StevenAus wrote:What do you think are good values (for the Damage split ratio % and RNG Smoothing) to start from?
When i last tried the mod, 50% split ratio seemed quite reasonable, maybe 60%-75% if you want to be relatively safe from nasty RNG surprises. But 50% noticeably changes the "play feeling" already. Smoothing wasn't available back then i think so i can't tell from experience, but i wouldn't go beyond 3 (the higher the value, the closer it gets to being deterministic).

You can also experiment with using only one parameter. Smoothing alone might be an interesting alternative as well (that is the split ratio is set to zero).
Smart persons learn out of their mistakes, wise persons learn out of others mistakes!
User avatar
StevenAus
Posts: 84
Joined: December 18th, 2009, 12:15 am
Location: Perth, Australia
Contact:

Re: [Request]Reduce RNG influence

Post by StevenAus »

I think a very useful and important feature is this:

Be able to query an in-map save or replay and get it's Damage Calculation settings;

- So you would get "mainline" if the particular game/scenario is being played with mainline settings (this would also show up when loading up standard mainline 1.8 games/replays that were originally saved with the regular executable).

- Or if Sauron's mod options were on, you would find out that it is on and the settings that apply for this particular game/scenario (ie. Sauron's mod settings when this scenario was started, even if the settings would make it equivalent to mainline). This would be important for evaluating (and having a benchmark for comparing :P) replays with different mod settings.

Also, this is not quite so important as the ability to query the Damage Calculation settings, but would it be possible for replays that don't involve any reloads to be marked, and have an option (maybe just in wesnoth-xp, or maybe in mainline Wesnoth too) that confirms whether you're loading a save that is not the latest save of this particular scenario/game? =) Would something like this be feasible, or is there already a way to check whether a particular replay has had any reloads (and during a play through, that there won't be any reloads unless you specifically choose)? I would love an option like this (either existing or new) which makes sure a replay is one play through, for added kudos.

What do you think? :)

Best regards,
Steven.

PS: What are the Sauron's mod settings that would make the game equivalent to mainline settings - is it 0% and 1 dice roll per attack?
My Life Purpose Is To Teach The World To Fish For Life. I AM Steven Russell Lynch Abundance That I AM. Empowerment Is My Name And Fostering Self-Responsibility Is My Game.
Yogibear
Retired Developer
Posts: 1086
Joined: September 16th, 2005, 5:44 am
Location: Hamburg, Germany

Re: [Request]Reduce RNG influence

Post by Yogibear »

StevenAus wrote:I think a very useful and important feature is this:

Be able to query an in-map save or replay and get it's Damage Calculation settings;

- So you would get "mainline" if the particular game/scenario is being played with mainline settings (this would also show up when loading up standard mainline 1.8 games/replays that were originally saved with the regular executable).

- Or if Sauron's mod options were on, you would find out that it is on and the settings that apply for this particular game/scenario (ie. Sauron's mod settings when this scenario was started, even if the settings would make it equivalent to mainline). This would be important for evaluating (and having a benchmark for comparing :P) replays with different mod settings.
I am not sure if you are thinking of an ingame visual display of these informations. That is indeed not possible at the moment. But you can of course open the savegame and view the information there (search for "[damage_calculation]").
StevenAus wrote:Also, this is not quite so important as the ability to query the Damage Calculation settings, but would it be possible for replays that don't involve any reloads to be marked, and have an option (maybe just in wesnoth-xp, or maybe in mainline Wesnoth too) that confirms whether you're loading a save that is not the latest save of this particular scenario/game? =) Would something like this be feasible, or is there already a way to check whether a particular replay has had any reloads (and during a play through, that there won't be any reloads unless you specifically choose)? I would love an option like this (either existing or new) which makes sure a replay is one play through, for added kudos.
Not sure if i understood that right. A replay does not contain information about reloads. It consists of a starting state (complete gamestate at the beginning of the scenario) and a protocol of the actions done. It is always complete, with or without reloads. I can't think of a way to detect if a savegame was reloaded or not, actually. Is there any additional motivation for you to ask this apart from replays?
StevenAus wrote:PS: What are the Sauron's mod settings that would make the game equivalent to mainline settings - is it 0% and 1 dice roll per attack?
Exactly, that should be the settings for mainline.
Smart persons learn out of their mistakes, wise persons learn out of others mistakes!
User avatar
StevenAus
Posts: 84
Joined: December 18th, 2009, 12:15 am
Location: Perth, Australia
Contact:

Re: [Request]Reduce RNG influence

Post by StevenAus »

Attached: starting saves for Valley of Death middle difficulty and first save for starting HttT on Expert difficulty.
From looking at the [damage_calculation] part of the saves, it looks like when Sauron's mod options are turned on in Preferences/General/Choose damage calculation (so far I've tried 2 and 3 dice rolls per attack in smoothing), the XP 1 game is still using mainline settings. This would explain why the XP 1 Wesnoth executable is still acting like mainline even when Sauron's mod is meant to be on and non-mainline options are set.
Yogibear wrote:I am not sure if you are thinking of an ingame visual display of these informations. That is indeed not possible at the moment. But you can of course open the savegame and view the information there (search for "[damage_calculation]").
That would be very useful though, so hopefully some time in the future. :) However is the reason it's not in because it would make in incompatible with mainline?

Btw: is the Wesnoth save format resistant to manual editing? :)
Not sure if i understood that right. A replay does not contain information about reloads. It consists of a starting state (complete gamestate at the beginning of the scenario) and a protocol of the actions done. It is always complete, with or without reloads. I can't think of a way to detect if a savegame was reloaded or not, actually. Is there any additional motivation for you to ask this apart from replays?
Well, the Hall of Fame (HoF) Civilization 4 mod allows the game to detect reloads, so it is definitely possible to do in turn-based games. Could Wesnoth at some stage gain that capability? :)

Best regards,
Steven.
My Life Purpose Is To Teach The World To Fish For Life. I AM Steven Russell Lynch Abundance That I AM. Empowerment Is My Name And Fostering Self-Responsibility Is My Game.
User avatar
Gambit
Loose Screw
Posts: 3266
Joined: August 13th, 2008, 3:00 pm
Location: Dynamica
Contact:

Re: [Request]Reduce RNG influence

Post by Gambit »

StevenAus wrote: Btw: is the Wesnoth save format resistant to manual editing? :)
They're compressed by default. You can uncompress them, or set it in preferences so that it doesn't automatically compress them. Either way, once you're in, it's all Save WML.
Yogibear
Retired Developer
Posts: 1086
Joined: September 16th, 2005, 5:44 am
Location: Hamburg, Germany

Re: [Request]Reduce RNG influence

Post by Yogibear »

As Steven correctly found out, there was still a bug left with detecting the right version (and therefore falling back to mainline if appropriate). Here is the fixed binary:
https://sourceforge.net/projects/wesnot ... p/download

Also, in contrast to what i wrote earlier, you need to make sure to have mainline rng on when you join a game of a "normal" mainline host. I will see if i can fix that, too.
Smart persons learn out of their mistakes, wise persons learn out of others mistakes!
User avatar
StevenAus
Posts: 84
Joined: December 18th, 2009, 12:15 am
Location: Perth, Australia
Contact:

Re: [Request]Reduce RNG influence

Post by StevenAus »

What is happening now - an existing campaign game with mainline settings needs to be loaded (without "Ask for every campaign scenario" on) before you start setting new RNG settings, as otherwise it will always crash. The "Ask" option is triggering *every* time you load a save, even ones in the middle of the map, however even if it is in the between scenarios campaign map, changing the settings does not set them in the newly started scenario - it only uses the options there before (so if you change from 2 to 3 smoothing does not affect it for the newly started scenario). The save that automatically happens between scenarios (ie. the new scenario in the campaign has not been loaded yet) is the only place where the game should ask what options you want to use, not after scenario has loaded or in-scenario saves.

Also check out the following two replays - see how many times the mages are missing their 70% hit chance attacks, and especially how if you are attacked the first time by an enemy the enemy often gets all four hits in (40% defence).

Best regards,
Steven.
Attachments
LowProbabilityReplays.7z
(73.58 KiB) Downloaded 230 times
My Life Purpose Is To Teach The World To Fish For Life. I AM Steven Russell Lynch Abundance That I AM. Empowerment Is My Name And Fostering Self-Responsibility Is My Game.
Jovycos
Posts: 59
Joined: October 12th, 2007, 4:15 pm
Location: Germany

Re: [Request]Reduce RNG influence

Post by Jovycos »

What would be about a game-mode-selection in the start-new-game-dialog? There would be simply a small number of different implementations for the Battles in C++, maybe the standard-way, multiplied stuff, another special function where you can adjust the variance, and the base-damage+random-damage stuff.
Full of Nerdiness...
Post Reply