No Randomness Mod Requested

General feedback and discussion of the game.

Moderator: Forum Moderators

DJHOLLISTERR
Posts: 15
Joined: May 28th, 2013, 7:30 pm

No Randomness Mod Requested

Post by DJHOLLISTERR »

Hi All,

I have a request for the modding community, which may or may not be possible.

I would like to have all the random "to hit" variables removed and replaced with pure averages (like a DPS or something). The Average damage would take into account the base damage of the weapon, modified by other variables such as leadership and the time of day, and then multiply that damage by the number of attacks, and then multiply by the hit percentage.

So, if I have a 10-4 attack with no other modifiers, and I am attacking an elf in the woods (70% defense), I would inflict exactly 12 points of damage to the elf. As opposed to the original method, which would result in 0 - 40.

Unfortunately, the extreme (at least IMHO) shifts in luck makes the game unplayable for me. I just got out of a game with a friend that had me missing 9 (out of 9) 70% attacks with mages and then him hitting 8 (out of 8 ) 40% attacks, which cost me a knight (and the game). This is uncommon, but the outcome of a game should never be jeopardized by something as crazy as this.

However, the real reason why I am requesting the change is because I want to enjoy TBFW, and the randomness takes all the fun out of it. I truly like every other aspect of TBFW, but the hit ratios just ruin the game for me. Even when I get the luck on my side I don't get a thrill because I know I was "lucky", and I prefer to win by cleverness and skill.

Anyhow, I'll take TBFW off my cpu for now and periodically check back to see if anyone is interested in the possibilities offered by my requested modification.

Thank You for Your Consideration,

-DJ
pika
Posts: 11
Joined: May 30th, 2013, 4:51 am

Re: No Randomness Mod Requested

Post by pika »

User avatar
pyrophorus
Posts: 513
Joined: December 1st, 2010, 12:54 pm

Re: No Randomness Mod Requested

Post by pyrophorus »

Hi !
Maybe you should download the "no luck era" (BfW1.10). I think it would fulfil your needs.

Friendly,
Campaign Return to Noelren *** HowTos: WML filtering, WML variables
Please help to to update the Guide to UMC Campaigns
User avatar
Crow_T
Posts: 851
Joined: February 24th, 2011, 4:20 am

Re: No Randomness Mod Requested

Post by Crow_T »

I'm curious as to how much hacking of the code would be needed to make such a mod, especially if one could utilize all current unit stats to keep the balance. Where in the source is the battle code?
User avatar
Unnheulu
Posts: 738
Joined: November 25th, 2007, 4:50 pm
Location: Cymru
Contact:

Re: No Randomness Mod Requested

Post by Unnheulu »

All I have to say is that is some seriously impressive luck, unless my maths is failing there was a one in hundred million chance of that so consider yourself lucky to even have witnessed it.
flixx
Inactive Developer
Posts: 3
Joined: April 11th, 2013, 6:24 pm

Re: No Randomness Mod Requested

Post by flixx »

I'd like to throw another approach in for discussion:
One could modify the way the randomness works.
Right now it is decided for every single attack if the unit hits or not with a probability p. So if an unit has two attacks and p = 50%. When the unit misses the first hit the probability remains the same for the second hit. (This is http://en.wikipedia.org/wiki/Binomial_distribution).

What if p would be modified for each attack depending on how often the unit has hit in the past?
For example if the unit misses the first attack the next attack could have p = 75%. Or if the first attack succeeded p = 25% for the second attack.

This would mean that the gameplay would still feel random. But it would lead to fewer depressing situations where a unit with chance to hit = 70% fails 4 attacks.
And if the math is done right then there isn't any rebalancing needed.

The "memory" how often a attack succeeded could even be persistent over turns so it would work with a Dwarvish Thunderer who has only one shot per turn.
The "downside" with this persistence over turns would be that it would change the way I'd send units into combat. For example if a Dwarvish Thunderer had a hit the last 3 turns I'd know that the chances to hit for the next turn are rather low.

I don't know if this is a good idea or it was discussed before. But anyway I wanted to share it :)

flix
alluton
Posts: 420
Joined: June 26th, 2010, 6:49 pm
Location: Finland

Re: No Randomness Mod Requested

Post by alluton »

I'm pretty sure hit-rates are hard coded. So can add-ons even affect hit-rates like you described?
"This game cured me of my real life addiction."
-Flameslash
AI
Developer
Posts: 2394
Joined: January 31st, 2008, 8:38 pm

Re: No Randomness Mod Requested

Post by AI »

The "deck of cards" approach has been discussed before. I don't remember if anyone actually implemented it in some mod though.
User avatar
Crow_T
Posts: 851
Joined: February 24th, 2011, 4:20 am

Re: No Randomness Mod Requested

Post by Crow_T »

For example if a Dwarvish Thunderer had a hit the last 3 turns I'd know that the chances to hit for the next turn are rather low.
It'd be best if the probability calculations were set to default after each turn. Then you could rename your thunderer to Mr. Boomstick.
pika
Posts: 11
Joined: May 30th, 2013, 4:51 am

Re: No Randomness Mod Requested

Post by pika »

I think it's maybe more reasonable to work in a siege system like that used in certain hex-based strategy games, where surrounding an enemy grants bonuses to attack, whether it's additional damage or accuracy. In this case, say an extra 5% accuracy for every unit that surrounds the enemy would be pretty neat too.
roidanton
Posts: 90
Joined: September 7th, 2012, 10:41 pm

Re: No Randomness Mod Requested

Post by roidanton »

Well, first of all, I'm strictly against this because that's what makes Wesnoth fun to play for me. I don't want to play chess - I want something that's realistic and resembles real-life situations.

When you command an army, you have a responsibility for your units - and you know that there are risks. You recruit and train your troops, and when you send them to battle, you know that some of them may not return.

Another important point is, many people play this for fun, not to always make perfect decisions or maximize our chance of winning. Variance means that those with lesser skills can occasionally win against better players. And skill is relative here - if you play a game when you're tired after a tough 12-hour work day, you're playing much worse than if you just woke up fully relaxed during your vacations.

Without variance, the better player always wins. Just like chess - you don't play against someone who's even just a little bit better (except as a learning experience) because you know that you'll lose. But if you always have to be totally focused and concentrated to play some game, wouldn't it be a much better choice to play something like poker, backgammon or chess to win money? Or do extra hours at work. Sitting in front of a computer for several hours while being highly focused and using your brain to the maximum - that's what many people do for a living and why would you choose to play a "game" if you could also just stay at work an extra hour and earn some money.

A game is something where you can relax, have fun, drink a few beers while playing - and still have a chance of winning.

And this doesn't mean that you don't have to worry about strategy. For instance, it's a lot of fun for me to jump into some game against people who're way better than me, then try to play as good as I can and learn as much as I can - without the frustrating experience of always losing.
flixx wrote:I'd like to throw another approach in for discussion:
One could modify the way the randomness works.
Right now it is decided for every single attack if the unit hits or not with a probability p. So if an unit has two attacks and p = 50%. When the unit misses the first hit the probability remains the same for the second hit. (This is http://en.wikipedia.org/wiki/Binomial_distribution).

What if p would be modified for each attack depending on how often the unit has hit in the past?
For example if the unit misses the first attack the next attack could have p = 75%. Or if the first attack succeeded p = 25% for the second attack.

This would mean that the gameplay would still feel random. But it would lead to fewer depressing situations where a unit with chance to hit = 70% fails 4 attacks.
And if the math is done right then there isn't any rebalancing needed.
You need to be very, very careful with that - and this change is certainly not EV-neutral.
flixx wrote:The "memory" how often a attack succeeded could even be persistent over turns so it would work with a Dwarvish Thunderer who has only one shot per turn.
The "downside" with this persistence over turns would be that it would change the way I'd send units into combat. For example if a Dwarvish Thunderer had a hit the last 3 turns I'd know that the chances to hit for the next turn are rather low.
Exactly.

Another important point that many people miss is that this is just one way people perceive Variance.

For instance in poker, there's variance in hands and variance in ranges. Variance in hands basically means if you have pocket aces (best possible hand) and your opponent a weaker hand, then you have roughly an 80% chance to win - and if you lose 3 times in a row than people scream omg I'm so unlucky. Variance in ranges means if you have pocket kings (2nd best hand) and run into aces, then you got your money in bad with only 20% chance to win - but in there are like a million worse hands that he could have possibly had, so you're actually quite unlucky to run into the top of his range. And there's also "variance in opponents" (though nobody really speaks of this) - some days, you're lucky and get mostly very weak opponents (that you win against) - on other days, you're mostly up against much better opponents (that you lose against).

Observing one facade of variance never tells you the full story ...

For instance in Wesnoth, you could host an Isar's Cross and see your first 4 attacks all miss - but you're in fact very lucky because the traits of your units (strong, resiliant, etc.) are perfect for you, you have a super strong ally and you're up against two noobs.
User avatar
Dugi
Posts: 4960
Joined: July 22nd, 2010, 10:29 am
Location: Carpathian Mountains
Contact:

Re: No Randomness Mod Requested

Post by Dugi »

No randomness mod released, exactly in the way you asked for. It is on the add-ons' server (therefore, no changes to the core files, no matter how impossible it is claimed to be). Works in singleplayer, multiplayer, pretty much everywhere, easy to control, you can activate or deactivate it at any time.
DJHOLLISTERR
Posts: 15
Joined: May 28th, 2013, 7:30 pm

Re: No Randomness Mod Requested

Post by DJHOLLISTERR »

Dugi wrote:No randomness mod released, exactly in the way you asked for. It is on the add-ons' server (therefore, no changes to the core files, no matter how impossible it is claimed to be). Works in singleplayer, multiplayer, pretty much everywhere, easy to control, you can activate or deactivate it at any time.
Thank you.

I also want to think the rest of the individuals that expressed an interest in solving this issue. The eagerness and creativity of this community in addressing issues, even marginal ones, is commendable.

I agree fully that my desire to eliminate randomness was purely a matter of personal taste. Obviously, not a very popular idea; Nevertheless, I feel that this mod will help the Wesnoth community grow by appealing to (marginally) larger audience.

I just wish SEGA, SONY, MICROSOFT, and the other mega-corporations had as good customer service as this modding community provides for free.

In any event, thanks again to everyone on this thread for their ideas and efforts on tackling my dilemma.

Sincerely,

DJ
DJHOLLISTERR
Posts: 15
Joined: May 28th, 2013, 7:30 pm

Re: No Randomness Mod Requested

Post by DJHOLLISTERR »

Well, I tried the Add-On, but it produced a bunch of errors. However, it seemed to work okay cosmetically, and I definitely like where it was going. The LUA errors filling my screen made it impractical in its current form.

That is... unless the errors don't really affect gameplay and the error reports on the screen can be turned off.

Attaching the stderr.txt file, and will provide a save game with the errors if desired.

Thanks,

-DJ

[/color][/b]
pyrophorus wrote:Hi !
Maybe you should download the "no luck era" (BfW1.10). I think it would fulfil your needs.

Friendly,
Thank you for the suggestion. I did download the Era by Mabuse.

However, I am a little confused with it. The units still appear to hit/miss (though several units hit 100% of the time), and the damage of the attacks appears different. Is there a thread that follows this add-on so I can puzzle out what changes were made?

Deterministic results are what I seek, but one must know what factors come into play in order to benefit.

Thanks!

-DJ
Attachments
stderr.txt
(28.03 KiB) Downloaded 141 times
Last edited by 8680 on June 7th, 2013, 6:39 pm, edited 1 time in total.
Reason: Merged double post [Posting Guidelines §1f].
User avatar
Dugi
Posts: 4960
Joined: July 22nd, 2010, 10:29 am
Location: Carpathian Mountains
Contact:

Re: No Randomness Mod Requested

Post by Dugi »

Man, can you please track the regularity of this problem and try to learn the conditions that cause it? Because when I tried it, it seemed to run without problems.
Post Reply