Deterministic Mode (split from FPI)

Brainstorm ideas of possible additions to the game. Read this before posting!

Moderator: Forum Moderators

Forum rules
Before posting a new idea, you must read the following:
Post Reply
muxec
Posts: 119
Joined: September 21st, 2004, 5:02 pm

Post by muxec »

* There should be a 'deterministic', 'non random' mode which one can play in
Background: some people, apparently frustrated at losing their units in random battles, feel that there should be a non-random way of playing the game.
Result: the developers feel that randomness is a large part of the game, and that taking the randomness out of the game would be somewhat akin to taking the randomness out of most card games.
In acton.cpp we call evalute_battle_stats and then

Code: Select all

	const int ran_num = get_random();
	bool hits = (ran_num%100) < stats.chance_to_hit_defender;


//and so on...
It's not that hard to put a switcher at new game window just like switcher that changes amount of gold per vilage or turns or fog of war. Instead of quoted code we can just put an if operator that switches between two ways.

The function that evaluate_battle_stats() is used for both actual combat and attack description window so if we want our units to take damage always but in random amount we must add to this function a new BOOL flag: whether we want to get an attack value or damage dealt.

This aproach keeps the default combat system intact but if one wants to change it he does not need to recompile the whole program.

I quote again
the developers feel that randomness is a large part of the game, and that taking the randomness out of the game would be somewhat akin to taking the randomness out of most card games.
The game by default remains the same. You can even post a warning that you do not suggest changing randomness. You must give freedom...!

If you disagree I'll post a modded action.cpp somewhere :) I think that it's allowed by license.
Shade
Posts: 1111
Joined: April 18th, 2004, 11:17 pm

Yes, go for it

Post by Shade »

Yes, go for it. Post a deterministic patch someplace public, by all means. Just don't try to get volunteers to write your game for you. And if you took the next 50 people that wanted a deterministic mode with you, I think most people would sing songs of praise to you :)
Note to forum users: You are in a maze of twisty little passages
muxec
Posts: 119
Joined: September 21st, 2004, 5:02 pm

Post by muxec »

It's not about how cool am I. Do not try to insult me. I'm stupid and developers age genious, it's OK if you want so. But we do noy need to create 25 products, creating a customizable product is possible, all in one. I do not suggest removal of the existing system.
Shade
Posts: 1111
Joined: April 18th, 2004, 11:17 pm

Post by Shade »

muxec wrote:It's not about how cool am I. Do not try to insult me. I'm stupid and developers age genious, it's OK if you want so. But we do noy need to create 25 products, creating a customizable product is possible, all in one. I do not suggest removal of the existing system.
It's not about trying to insult you. This is not 'freeware' (I believe you called it that someplace). Freeware is a closed product that tries to earn it's authors revenue as a loss leader, through advertising, through <insert shady means here>. This is free software. The free is as in freedom, and you are granted a lot of rights.

But, at the end of the day you are not a customer, you are a user. There is a difference. At it's heart the is Dave's game. There should be little surprise that the 'other' people around here happen to like Dave's game. While we hardly agree on much of anything else-- most of us rather like what Wesnoth is, at its core. The developers are scratching their own personal 'itch'-- They are the only 'customers'.

While happy users is not a bad thing, trying to get volunteers to code a feature that you want, that has been often stated as not part of the vision of what Wesnoth is, would be a difficult job. Like hearding cats in fact...

This feature has been requested in the past (Which is probably why I sounded irritated when dealing with you). There are a fair number of people who would like such a patch, and anybody who wants to (and can) is free to make the patch. . . Is encouraged to make the patch. . .

PS- The devs aren't geniouses-- this game is the product of a lot of hard work. . .
Last edited by Shade on September 21st, 2004, 11:02 pm, edited 1 time in total.
Note to forum users: You are in a maze of twisty little passages
muxec
Posts: 119
Joined: September 21st, 2004, 5:02 pm

Post by muxec »

most of us rather like what Wesnoth is, at its core
I do not want to corrupt the core, i want it to be flexible...

I'll rewrite some functions in actions.php . I did not say that it's other's job to make it customizable, I'm ready for effort. Sadly I can't compile it my VC++ does not recognize it as a project says dsp and dsw files are corrupt.
Dave
Founding Developer
Posts: 7071
Joined: August 17th, 2003, 5:07 am
Location: Seattle
Contact:

Post by Dave »

muxec wrote:You must give freedom...!
We do give freedom. You have the freedom to modify the game however you want.

However I and the other Wesnoth developers have freedom too. We use that freedom to develop the kind of game we want: a game that doesn't have rules we don't like, and a game that doesn't have an insane number of configuration options.
muxec wrote: If you disagree I'll post a modded action.cpp somewhere :) I think that it's allowed by license.
Please do. That would be an excellent way of exercising the freedom that the license we use for the game affords you.

David
“At Gambling, the deadly sin is to mistake bad play for bad luck.” -- Ian Fleming
muxec
Posts: 119
Joined: September 21st, 2004, 5:02 pm

Post by muxec »

If so ask those who really want determenism. Please do not close this thread.

What do you preffer as distribution way? Possible options are:
1) Just moded functions from actions.cpp so you can compile it by your own. Can be aplied on later patches
2) Executables for win and maybe linux.
3) Only windows with moded functions moved to dlls

Possible determenistic changes are.
1) The number of damage unit inflicts in the whole combat is nAttacks*Damage*TerainBonus. These numbers are distributed randomly between 5 attacks. Relativly hard to code, but possible to implement. Requires adding 2 new functions.
Example: Elvish avenger sword attack against hills (50% to hit) gives 20 damage randomly distributed between 4 rounds.
2)AT the beginning we calculate meandamage=Damage*Terrain. Than we apply random +1 or -1 modifiers (meandamage/3) times.
Example: Elvish avenger sword attacks 50% defence enemy in hills. He has 4 hits each with mean of 5. He makes 4 attack that inflict from 3 to 7 damage. If he attacks somebody on water (80% to hit) he has attacks that inflict 4-12, meanof 8.
3)ALways inflict mean damage. Easiest to code, just several more lines of code in actions.cpp

If you are interested please post here
User avatar
Elvish_Pillager
Posts: 8137
Joined: May 28th, 2004, 10:21 am
Location: Everywhere you think, nowhere you can possibly imagine.
Contact:

Post by Elvish_Pillager »

muxec wrote:)ALways inflict mean damage. Easiest to code, just several more lines of code in actions.cpp
How do you plan on inflicting 27.25 damage?
It's all fun and games until someone loses a lawsuit. Oh, and by the way, sending me private messages won't work. :/ If you must contact me, there's an e-mail address listed on the website in my profile.
muxec
Posts: 119
Joined: September 21st, 2004, 5:02 pm

Post by muxec »

Elvish Pillager wrote:
muxec wrote:)ALways inflict mean damage. Easiest to code, just several more lines of code in actions.cpp
How do you plan on inflicting 27.25 damage?
2 options.

a) Round it to 27
b) 3/4 probablity for 27 and 1/4 for 28.
Le Gnome
Posts: 22
Joined: August 24th, 2004, 2:40 pm
Location: Lyon, France

Post by Le Gnome »

muxec wrote:
Elvish Pillager wrote: How do you plan on inflicting 27.25 damage?
2 options.

a) Round it to 27
b) 3/4 probablity for 27 and 1/4 for 28.
Solution b doesn't look very deterministic for me. :wink:
muxec
Posts: 119
Joined: September 21st, 2004, 5:02 pm

Post by muxec »

That's why I dislike (b).

But even b is much more determenistic than original chance to hit
Edd
Posts: 19
Joined: August 24th, 2004, 9:52 am

Post by Edd »

Ok, suppose that muxec will do this mod for deterministic combat.
My question will be: should wesnoth's web resources (space, links and so one) be use for this mods?
The gpl license will let muxec modify the program, but it will take the core team blessing for the modification to be make known to the simple users (not those that can make their own version of wesnoth)
User avatar
turin
Lord of the East
Posts: 11662
Joined: January 11th, 2004, 7:17 pm
Location: Texas
Contact:

Post by turin »

Edd wrote:Ok, suppose that muxec will do this mod for deterministic combat.
My question will be: should wesnoth's web resources (space, links and so one) be use for this mods?
The gpl license will let muxec modify the program, but it will take the core team blessing for the modification to be make known to the simple users (not those that can make their own version of wesnoth)
no, probably not... since it is a mod, not the game itself, he should start his own site and maybe put a link to it in his signature.
For I am Turin Turambar - Master of Doom, by doom mastered. On permanent Wesbreak. Will not respond to private messages. Sorry!
And I hate stupid people.
The World of Orbivm
Post Reply