A Balancing Act

Discussion and development of scenarios and campaigns for the game.

Moderators: Forum Moderators, Developers

aelius
Posts: 497
Joined: August 30th, 2004, 8:07 pm
Location: Virginia, USA

A Balancing Act

Post by aelius » January 16th, 2005, 4:24 pm

I'm branching a new thread off my South Guard campaign thread to talk about some things that came up as I was balancing a couple of the scenarios. I'm going to respond to something that PDF wrote but that I think is a pretty common idea. I don't mean to single him out:
PDF wrote:Adding a difficulty level does not necessarily requires much balancing; you can, for example, just add or remove gold.
I'm going to argue that that is fundamentally a flawed way to balance campaigns, and should only be used in conjunction with other balancing methods.

1. Wesnoth scenarios as tactical problems
Each scenario in Wesnoth presents a tactical problem. The problem is generally phrased something like this: "Kill the enemy leader in so much time while keeping your leader alive." The most common variation is this: "Move your leader to this hex in so much time while keeping him alive." Of course, there are subtleties to these tactical problems. Because of the gold bonus you want to finish is less that the stated time. Because you can recall experienced and leveled units you want to have units that have gained experience not die. There may be other units that you must keep alive. There may be certain units you must kill. At its core, however, each scenario is a relatively simple tactical problem.

2. Factors that influence the difficulty of a tactical problem in Wesnoth
I am going to briefly list the factors (that I perceive) which affect the difficulty of a tactical problem in Wesnoth. This list is probably not exhaustive, so if there's something I've missed, post it and I'll add it to the list. They in no particular order:

a) Terrain
b) Player's starting gold
c) AI's starting gold
d) Player's recriutment list
e) AI's recriutment list
f) Player's recall list
g) Time limitations
h) Size of player's keep
i) Size of AI's keep
j) AI Parameters (more on this in a minute)
k) Distribution of villages

Note that the AI's starting gold is one factor among many.

3. Varying the difficulty of a tactical problem presented to the player in a scenario
Considering the above factors, it is easy (if time consuming for the designer) to present tactical problems of differing difficulty in a single scenario. For most of the above factors, I'll give and example and explain in a sentence how if affects the tactical problem:

a) If the map is predominantly a terrain that favors either the player's forces or the ai's forces, it will have a huge effect on the difficulty of the battle. For example, a player whose units are broadly loyalists will have a disasterous time trying to root Elves out of woods. The terrain is, however, generally fixed by the nature of the scenario (i.e. the designer can't really make a whole new map for each difficulty level). I would submit, however, that 80% of the actual fighting in a typical scenario occurs in less than 10% of the hexes. It is possible to change only one or two hexes and have a dramatic effect on the outcome of the battle if you can identify those "chokepoint" hexes.

b) If the player has a lot of gold he can make more tactical mistakes because he can recruit more troops to replace the ones he's lost. Additionally, quantity has a quality all of its own, so if the player's starting gold is much higher that the AI's starting gold he can employ a swarm of cheap units. Note that this does not simplify the tactical problem, it only allows more mistakes to be made.

c) If the AI's starting gold is much higher than the players, the player will be unable to make any tactical mistakes and still win the scenario. I'll talk more about this in a moment.

d) If the player can only recruit units that will be effective against the enemy's forces, then the tactical problem is simplified. If I can only recruit heavy infantry to face a force of skeleton archers, then I have a less difficult tactical decision to make than if I can recruit heavy infantry and spearmen. Especially if I don't know the game well.

e) Restricting the enemy to a certain class of units (i.e. melee-only, ranged-only, impact-attacks-only) can simplify the tactical problem immensely. Bowmen are very good against thugs and thieves. If the enemy can also recruit poachers and footpads, the tactical problem becomes more difficult.

g) Again, the time limit does not allow the player to make tactical mistakes, which does not alter the problem, but makes it harder.

j) The AI parameters are perhaps the best way to alter a tactical problem. http://wesnoth.slack.it/?AiWML is a particularly important read for a scenario designer. I'd draw attention to aggression and [target] in particular. attack_depth is also very nice. These parameters are especially important for building scenarios with tactical problems that are fundamentally different from the basic kill-his-leader ones.

k) Using the [terrain] WML tag you can easily alter the distribution of villages in a scenario. Move the distribution towards the player, and things get easier. Move it towards the enemy, and they get harder.

4. Why just changing the player's and ai's starting gold is a bad idea.
Giving the enemy more gold and the player less gold certainly does make a tactical problem harder. What it doesn't do at all is change the tactical problem. At a certain point being outnumbered and outgunned just outweighs all the other factors. The tactical problem becomes "how can I defeat a force several times larger than mine?" I would argue that this has several unintended consequences.

First, it encourages save-loading. If you are so outnumbered that any mistake (or any bad luck) means that you lose the scenario, you will save load to get good luck.

Second, it overvalues higher level units. If you're outnumbered 8 to 1, an Elvish Champion for 20 gold may be your only chance. I suspect this is one of the reasons players are so keen to keep high level units around. One elvish champion can hold off 3 or 4 lower level units (which, currently, they may have to).

Third, it become boring and repetitive. At a certain point, it just isn't any fun anymore to be outnumbered and fighting for your life over and over again. The tactical problem doesn't change, it just keeps getting harder and harder, more and more frustrating.

So, let this be a call to scenario designers to incorporate variety in their tactical problems. Let it be a call for balancing to involve more than tweaking gold, because I think if scenario designers take the time to really craft varied tactical problems of varying difficulty then they will enjoy their scenarios all the more. I'm trying to do this with South Guard, and I'd love to help others do it with their campaigns.

Sorry for the tome of a post.

- b.

User avatar
turin
Lord of the East
Posts: 11662
Joined: January 11th, 2004, 7:17 pm
Location: Texas
Contact:

Post by turin » January 16th, 2005, 4:40 pm

I still haven't seen WHY it is a good idea to have a different tactical problem on different difficulty levels.... :?
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

aelius
Posts: 497
Joined: August 30th, 2004, 8:07 pm
Location: Virginia, USA

Post by aelius » January 16th, 2005, 5:09 pm

turin wrote:I still haven't seen WHY it is a good idea to have a different tactical problem on different difficulty levels.
I suppose I'm bringing together two different arguments. One is about scenarios, and the other about campaigns.

Each scenario should present one tactical problem (the same one on each difficulty level). The difficulty level of that particular tactical problem can be changed by altering any of the factors I mentioned, not just the enemy's starting gold.

Each campaign should present many different tactical problems. If the only method of scenario balancing used is to give the enemy a stupendous amount of gold, then the tactical problem of "how do I defeat an enemy who outnumbers me even more than last time" overshadows the other tactical problems presented in the campaign. I think this is largely at the root of the suggestions about "luck" and the concerns about save-loading.

- b.

Invisible Philosopher
Posts: 873
Joined: July 4th, 2004, 9:14 pm
Location: My imagination
Contact:

Post by Invisible Philosopher » January 16th, 2005, 5:34 pm

Wonderful! Thank you! Very good analysis.

One technique I use in my campaign is giving the player multiple choices of strategy that are about equivalent difficulty. One reason is so that the player doesn't have to know in advance which is the "correct" strategy. I don't know how, if at all, that would be related to this (so why am I mentioning it here? :? ).

Also filter by terrain would be *really* nice to control the AI, for example in an [avoid] tag.
Play a Silver Mage in the Wesvoid campaign.

aelius
Posts: 497
Joined: August 30th, 2004, 8:07 pm
Location: Virginia, USA

Post by aelius » January 16th, 2005, 5:46 pm

Invisible Philosopher wrote:One technique I use in my campaign is giving the player multiple choices of strategy that are about equivalent difficulty. One reason is so that the player doesn't have to know in advance which is the "correct" strategy. I don't know how, if at all, that would be related to this (so why am I mentioning it here? :? ).
At what level do you do this? In one scenario or between several? I've been trying to incorporate multiple, selectable, tactical problems but it's really hard. I think "Choice in the Fog" sort of does that, but it's a huge and unwieldy mess of WML.

[quote-"Invisible Philosopher"]Also filter by terrain would be *really* nice to control the AI, for example in an [avoid] tag.[/quote]

That would be my most sought after feature. Period. Would that I knew C++!

- b.

Invisible Philosopher
Posts: 873
Joined: July 4th, 2004, 9:14 pm
Location: My imagination
Contact:

Post by Invisible Philosopher » January 17th, 2005, 11:21 pm

aelius wrote:
Invisible Philosopher wrote:One technique I use in my campaign is giving the player multiple choices of strategy that are about equivalent difficulty. One reason is so that the player doesn't have to know in advance which is the "correct" strategy. I don't know how, if at all, that would be related to this (so why am I mentioning it here? :? ).
At what level do you do this? In one scenario or between several? I've been trying to incorporate multiple, selectable, tactical problems but it's really hard.
Well I really must get to distributing my campaign; it's about ready.

Anyway it's within one scenario. I don't have any split choices between going to different scenarios.

In the first scenario, there are two enemy Liches with different recruits. Kill one to win.

In the second, you basically have to go through some orcs to get to the other side of the map. But it's your choice which orcs you go through, and there are different plot/special event consequences for different choices that are hinted at in the beginning, but fairly balanced even if you don't know about them.

In the third scenario, you're trying to kill a Giant Spider hiding in a cave. Your choice whether you kill the batty necromancer first (it takes time, reducing your bonus, but helps in other ways).

Then there is a short "rush through the enemies to the finish" sort of scenario where you can get tough levelled units or more cannonfodder (maybe; I'm not as sure about this).

After that, there is a more artificial choice between different kinds of units you can get.
aelius wrote:I think "Choice in the Fog" sort of does that, but it's a huge and unwieldy mess of WML.
Unfortunately my campaign is "a huge and unwieldy mess of WML" too, but a lot of that is for special effects rather than tactical choices. I try to use macros to make it a little neater...
Play a Silver Mage in the Wesvoid campaign.

quartex
Inactive Developer
Posts: 2258
Joined: December 22nd, 2003, 4:17 am
Location: Boston, MA

Post by quartex » January 18th, 2005, 12:14 am

I look forward to seeing your campaign Invisible Philosopher.

I agree that there are more categories thatn just AI gold that effect how challenging a scenario is. I haven't seen a campaign where the map changes based on the difficulty. I'd prefer to see the AI play better in higher difficulties, rather than change the map to give it an advantage.

I respectfully disagree that all wesnoth scenarios are just tactics. I remember an old assassin (or was it knalgan?) campaign where the 3rd level was a RPG type level, where you explored a map, gained units and role-played a main character. My point is that with enough WML you could make a scenario to be very much like an RPG, with your main unit gaining extra perks as he kills enemies. Imagine a scenario with 4 heroes (probably level 3 units) stuck in the bottom of a cave complex, trying to escape.

One type of scenarios are like war games/simulations, you have these units, your opponent has other units and there are several ways you can defeat your opponents or reach an objective. I'm actually interested more in RPG-type scenarios, where the scenario objectives are fliud and often change mid-scenario, where the units you have and the enemies you face can change as well. Where you explore the map, as opposed to seeing everything from the start. Scenarios with lots of smaller enemies who pop up based on events can have a weaker AI, instead they depend more on balancing each encounter (how many enemy units appear, how powerful, etc.) becuase each encounter is resolved rather quickly. I think in terms of AI, it's easy to manage and do well with lots of small battles between player and AI, than it is to get the AI to manage a huge scenario-long battle with lots of units.

I think different types of scenarios require different emphasises on AI. The great thing about Wesnoth is that it supports many types of scenarios, that's why some people prefer scenarios where you can see the entire map from the start and play armchair general, and other people prefer shrouded/fogged maps where you have to explore like an adventurer. It's the diversity of scenarios that makes wesnoth great.

Anyway, thanks for the post on all the ways to change the difficulty of a scenarios besides just increasing gold. I agree that slogging through tons of enemy units get old sometimes, and being more imaginative when it comes to making scenarios more challenging is a sign of a great scenario designer. Your post is great food for thought for future developers.

aelius
Posts: 497
Joined: August 30th, 2004, 8:07 pm
Location: Virginia, USA

Post by aelius » January 18th, 2005, 1:20 am

quartex wrote:I haven't seen a campaign where the map changes based on the difficulty. I'd prefer to see the AI play better in higher difficulties, rather than change the map to give it an advantage.
So would I. More control over the AI would give a scenario designer another wrench in the toolbox to throw at the player. I've just begun playing with altering the map (mostly the size of the enemy keep) and I've found it can have a big influence on how the game goes.
quartex wrote:I respectfully disagree that all wesnoth scenarios are just tactics. ... My point is that with enough WML you could make a scenario to be very much like an RPG, with your main unit gaining extra perks as he kills enemies.
Point taken and conceded. I suppose that since I come from a wargame and not a role playing background I tend to neglect those aspects of Wesnoth (or at least think of them separately). The balancing problems for those scenarios are different because the player isn't recruiting armies to run around with.
quartex wrote:I think in terms of AI, it's easy to manage and do well with lots of small battles between player and AI, than it is to get the AI to manage a huge scenario-long battle with lots of units.
This certainly true. A lot of designing good scenarios, I think, is arranging them to present a series of smaller encounters that the AI can handle competently. It'd be nice to come up with a more advanced strategic AI, but that's a nightmare of a programming task.
quartex wrote:It's the diversity of scenarios that makes wesnoth great.
Amen. That's what I want to strive for and encourage.

- b.

Invisible Philosopher
Posts: 873
Joined: July 4th, 2004, 9:14 pm
Location: My imagination
Contact:

Post by Invisible Philosopher » January 18th, 2005, 8:29 pm

I can see that terrain is an important thing to vary, but I am unsure how I should do that in WML. [terrain] tags require looking up x and y, making it hard to understand and to change the map, and each one takes a little time. Using a different map initially is another possibility, but there would be lots of redundant information. I think that's the approach I'm going to take anyway, though, because it is much more convenient than checking the coordinates of each hex.
Play a Silver Mage in the Wesvoid campaign.

Darth Fool
Retired Developer
Posts: 2633
Joined: March 22nd, 2004, 11:22 pm
Location: An Earl's Roadstead

Post by Darth Fool » January 18th, 2005, 8:35 pm

Invisible Philosopher wrote:I can see that terrain is an important thing to vary, but I am unsure how I should do that in WML. [terrain] tags require looking up x and y, making it hard to understand and to change the map, and each one takes a little time. Using a different map initially is another possibility, but there would be lots of redundant information. I think that's the approach I'm going to take anyway, though, because it is much more convenient than checking the coordinates of each hex.

The easiest way to check the coordinates of each hex is to use wesnoth itself. Load up the scenario, mouse over the hexes you are interested in, and look in the upper right hand corner.

scott
Posts: 5242
Joined: May 12th, 2004, 12:35 am
Location: Alexandria, VA

Post by scott » January 18th, 2005, 9:11 pm

Invisible Philosopher wrote: Using a different map initially is another possibility, but there would be lots of redundant information.
The only way multiple maps is not the most efficient solution is in HD space, and we're talking about 4k
Hope springs eternal.
Wesnoth acronym guide.

Darth Fool
Retired Developer
Posts: 2633
Joined: March 22nd, 2004, 11:22 pm
Location: An Earl's Roadstead

Post by Darth Fool » January 18th, 2005, 9:40 pm

scott wrote:
Invisible Philosopher wrote: Using a different map initially is another possibility, but there would be lots of redundant information.
The only way multiple maps is not the most efficient solution is in HD space, and we're talking about 4k
well, it is not the most efficient if you decide that you want to change the map. Then you have to propogate those changes to your other maps....

aelius
Posts: 497
Joined: August 30th, 2004, 8:07 pm
Location: Virginia, USA

Post by aelius » January 18th, 2005, 10:19 pm

Invisible Philosopher wrote:I can see that terrain is an important thing to vary, but I am unsure how I should do that in WML. [terrain] tags require looking up x and y, making it hard to understand and to change the map, and each one takes a little time.
This is how I do it. I made a macro to change a terrain letter:

Code: Select all

#define SG_CHANGE_TERRAIN X Y LETTER
	[terrain]
		x={X}
		y={Y}
		letter={LETTER}
	[/terrain]
#enddef
I open the scenario in Wesnoth, and use the co-ordinate display in the top right corner to determine what I need to alter. I would say that the absolute most I've got in any one scenario is six tiles. The trick is to pick important tiles.

For example, if the player has lots of elvish units, placing (or removing) a small patch of woods between the enemy's keep and most of the villages can really alter the difficulty of a scenario, because the player can use that as a base of operations. If it's not there, the scenario is harder. For underground maps, you can carefully open and close passages with very fex hexes that can dramatically alter the routes people need to take.

Invisible Philosopher wrote:Using a different map initially is another possibility, but there would be lots of redundant information. I think that's the approach I'm going to take anyway, though, because it is much more convenient than checking the coordinates of each hex.
This is something I haven't done yet (I think it's too much work for too little story payoff), but I'd be interested in seeing how you approach it.

- b.

Invisible Philosopher
Posts: 873
Joined: July 4th, 2004, 9:14 pm
Location: My imagination
Contact:

Post by Invisible Philosopher » January 18th, 2005, 11:34 pm

aelius wrote:
Invisible Philosopher wrote:Using a different map initially is another possibility, but there would be lots of redundant information. I think that's the approach I'm going to take anyway, though, because it is much more convenient than checking the coordinates of each hex.
This is something I haven't done yet (I think it's too much work for too little story payoff), but I'd be interested in seeing how you approach it.

- b.
I didn't mean a whole different map, just making a different map file to contain the minor changes.

I know I can get the coordinates in Wesnoth, but it's still quite a bother to do so.
Play a Silver Mage in the Wesvoid campaign.

quartex
Inactive Developer
Posts: 2258
Joined: December 22nd, 2003, 4:17 am
Location: Boston, MA

Post by quartex » January 19th, 2005, 1:17 am

Nowdays I use Wesnoth in windowed mode to test scenarios, so I can easily jump back and forth to the scenario file, entering hex coordinates.

Having 3 copies of a map, one for each difficulty may be easier. Maps files don't take up much space, so it's not a big size issue. And since they're just text files they should be easy to duplicate.

Post Reply