Pick the amount of random you accept

Discussion of all aspects of the game engine, including development of new and existing features.

Moderators: Forum Moderators, Developers

zol
Posts: 161
Joined: July 12th, 2006, 4:31 am

Post by zol »

What is this `number/number` notation? Acheived/Expected damage?

Warning: Random thought. Read at own risk.
Combat as usual, but deviation from EV compensated elsewhere, e.g. gold (to use the standard answer-to-everything variable).
finite, infinite, definite

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

Post by Sauron »

Sapient wrote:
Becephalus wrote: Myth and I have been talking about how 1v1s between us are basically pointless as whoever the RNG favors wins for example. Its too bad cause myth and I should have fun in 1v1s you would think, but it basically is just sit there and grind until the RNG gives someone a huge break.
Have you tried playing on larger maps?
Hmm, seldom do I have time to play large maps - but imho the game should be scallable to small maps. It is just a big flaw it is not. I fear expelling malcontents to large maps is not a solution at all.

I am going to rewrite the mod in floating point HP & DMG to stick to EV, but it will only prove poor balancement of factions - which I elswere said- non-deterministic mode would be excellent for testing faction balancement. I wonder if the mod will require some faction re-balancement (fortunately I have already written a tool for rewriting all unit data in all eras for the purposes of my eras for 1.0.2 and 1.1.*/1.2 ) Bad thing is I will have to use the net communications interface you have written - thus to send unit data I will need to look deeper into the numeric data extracting code.

I am not sure if I will have time to mod wesnoth 1.2 alone. If the dark side of power gathers enough coders we might however try it next vacations or in small lots immediately after 1.2 is issued. I am getting bored with this game at 100% random. So far I played only 1 game in 50% random mode with a good player. The game is then greatly changed, still - the usage of floating points would correct a huge part of problems my mod faces ATM (the problem is the dmg must be rounded up - thus some units grow in power in some situations).
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

Günther
Posts: 11
Joined: December 27th, 2005, 8:31 pm

Post by Günther »

How about this: Simply increase the number of attacks and decrease the damage per hit. That way, the probability of those cases where a unit always misses or always hits can be significantly reduced

I'm attaching a patch which lets one test the effect. For a real implementation, a smaller factor should probably be used, and some rebalancing of units with slow or poison would have to be done. And of course it shouldn't be an engine but a data files change.

I think this could be a real compromise: No controversial changes to the random number generation or complication of the rules, but a noticeable reduction of the importance of luck.
Attachments
doubled.txt
Proof of concept hack (wtf is .diff or .patch not allowed?!)
(599 Bytes) Downloaded 230 times

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

Post by Sauron »

Günther wrote:How about this: Simply increase the number of attacks and decrease the damage per hit. That way, the probability of those cases where a unit always misses or always hits can be significantly reduced
The idea is very old. I were first to implement it (changing all units' stats) and not satisfied at all, see the link below
http://www.wesnoth.org/forum/viewtopic.php?t=10632
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

kshinji
Posts: 649
Joined: December 21st, 2005, 7:24 pm
Location: Gdansk, Poland

Post by kshinji »

If you mean playing on larger boards, do you mean adding all units some movement? Or just having more units? What about zZoC?

Now if you dont really want to find a way that unit would be able to ZoC larger area, try to find that way just as an exercise. Im really curious what ideas you could come up with. I have no at the timne writing this post.
User:Kshinji
Probably there's no point for me posting here, but i'll raise my PC to 1337 before leaving again ;P -- just kidding.

Günther
Posts: 11
Joined: December 27th, 2005, 8:31 pm

Post by Günther »

Sauron wrote:
Günther wrote:How about this: Simply increase the number of attacks and decrease the damage per hit.
The idea is very old. I were first to implement it (changing all units' stats) and not satisfied at all, see the link below
http://www.wesnoth.org/forum/viewtopic.php?t=10632
Yes, it's so obvious that it has to be old. But the implementation in that topic is more radical than my suggestion. Giving every attack 4 damage probably has no chance to ever be accepted. But a slight change like dividing damage and multiplying number of hits by 1.5 could have a chance of going in, fixing the problem for those of us who think that Wesnoth has just a little too much randomness.

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

Post by Sauron »

Günther wrote: like dividing damage and multiplying number of hits by 1.5 could have a chance of going in, fixing the problem for those of us who think that Wesnoth has just a little too much randomness.
I would go as far as multiplying number of attacks by 10 and scalling all up to this. But it is not needed even to show this to players: I might do it internally and later on I would divide inflicted by 10 (or even make 100 attacks and divide result by 100) and apply - thus reaching better concentration around EV :). The Bernoulli's distribution (/ Binomial) converges pretty fast to normal at increased number of rolls.

Mabye I will apply it, since it does not look hard at all...
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

kshinji
Posts: 649
Joined: December 21st, 2005, 7:24 pm
Location: Gdansk, Poland

Post by kshinji »

Then blows will only mean that the one who have more, deals part of damage later, but have higher advantage of strong or dextrous.

Ity will ruin a part of gameplay, like fe. when one have horseman 1p, and enemu leader got 20hp, and you can kill him with first blow if you are lucky.
User:Kshinji
Probably there's no point for me posting here, but i'll raise my PC to 1337 before leaving again ;P -- just kidding.

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

Post by Sauron »

kshinji wrote:Then blows will only mean that the one who have more, deals part of damage later, but have higher advantage of strong or dextrous.

Ity will ruin a part of gameplay, like fe. when one have horseman 1p, and enemu leader got 20hp, and you can kill him with first blow if you are lucky.
You did not get it - I am going to replace damage inflicted pre hit with an average dereived from the series of attacks I pick. And rounding the result to closest integer afterwards.
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

kshinji
Posts: 649
Joined: December 21st, 2005, 7:24 pm
Location: Gdansk, Poland

Post by kshinji »

I DID get it. Not 100%, youre right. Still it will change gameplay a bit.

I was thinking that blow damage should be a bit random, fe. 2x 3-4 instead of 2-3.
User:Kshinji
Probably there's no point for me posting here, but i'll raise my PC to 1337 before leaving again ;P -- just kidding.

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

Post by Sauron »

kshinji wrote:I was thinking that blow damage should be a bit random, fe. 2x 3-4 instead of 2-3.
You still do not get it - the whole thing is the damage WILL be random. Sure it will change gampelay - but it is exactly what I intend to do.
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

kshinji
Posts: 649
Joined: December 21st, 2005, 7:24 pm
Location: Gdansk, Poland

Post by kshinji »

I think you, dont get it.

I said i was thinking damage of single blow should be random. But it wasnt about your idea. It was separate idea. Damn, how people sometime...


And your idea will not only solve the thing of getting no damage. It will change several other things. One would have to leanr tactics from the beginning wiht it.

For example elusive unit could get not elusive and instead just get more HP. Aad whenever it gets healed, ity should be healed more. And there would be no difference.

Youre idea will ruing all these small tricks, or how to call them.
User:Kshinji
Probably there's no point for me posting here, but i'll raise my PC to 1337 before leaving again ;P -- just kidding.

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

Post by Sauron »

kshinji wrote:I think you, dont get it.
I said i was thinking damage of single blow should be random. But it wasnt about your idea. It was separate idea. Damn, how people sometime...
And your idea will not only solve the thing of getting no damage. It will change several other things. One would have to leanr tactics from the beginning wiht it.
For example elusive unit could get not elusive and instead just get more HP. Aad whenever it gets healed, ity should be healed more. And there would be no difference.
Youre idea will ruing all these small tricks, or how to call them.
Hmmm, you still do not get it.
Analyse the code below before you post again:

Code: Select all

void adjustDamage(	bool &hits, 
					bool &temp_results_hits, 
					int &ran_num,
					const float&split_ratio,
					const int &stats_chance_to_hit_target,
					int &stats_damage_target_takes,
					const int & temp_stats_damage_target_takes,
					const float &smooth_distribution)
{
	float temp_smooth_distribution_damage=0;
	int  temp_smooth_distribution_hits=0;

	if(split_ratio)
	{
		stats_damage_target_takes=ceil((split_ratio* stats_chance_to_hit_target*temp_stats_damage_target_takes)/100.0);
		if (hits)
		{
				temp_smooth_distribution_damage+=(1-split_ratio)*temp_stats_damage_target_takes;
				temp_smooth_distribution_hits++;
		}
		for(int i=1;i<smooth_distribution;i++)
		{
			add_random_separator();
			ran_num = get_random();

			hits = (ran_num%100) < stats_chance_to_hit_target;
			if (hits)
			{
				temp_smooth_distribution_damage+=(1-split_ratio)*temp_stats_damage_target_takes;
				temp_smooth_distribution_hits++;
			}
		}

		stats_damage_target_takes+=floor(	temp_smooth_distribution_damage/(float)smooth_distribution);
		temp_results_hits=((temp_smooth_distribution_hits/(float)smooth_distribution)>=(stats_chance_to_hit_target/100.0));
		hits=1;
	}
	else if(smooth_distribution>1)
	{
		if (hits)
		{
				temp_smooth_distribution_damage+=temp_stats_damage_target_takes;
				temp_smooth_distribution_hits++;
		}
		for(int i=1;i<smooth_distribution;i++)
		{
			add_random_separator();
			ran_num = get_random();

			hits = (ran_num%100) < stats_chance_to_hit_target;
			if (hits)
			{
				temp_smooth_distribution_damage+=temp_stats_damage_target_takes;
				temp_smooth_distribution_hits++;
			}

		}
		stats_damage_target_takes=round__(	temp_smooth_distribution_damage/(float)smooth_distribution);
		temp_results_hits=((temp_smooth_distribution_hits/(float)smooth_distribution)>=(stats_chance_to_hit_target/100.0));
		hits=1;

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

Post Reply