## Unit price balancing

**Moderator:** Forum Moderators

### Unit price balancing

Hey everyone, I'm not sure if this is the right forum for this question, but it seems closest. Hopefully I'm in the right place?

Anyway, I've been working on making a few new units for a campaign, and I was wondering if there are any guidelines for pricing units based on their abilities and general power level, or if I should just make it up and test until I get it right, or what? I'm very new to Wesnoth in general and WML in particular, I'm afraid, so this question might be a bit more stupid than I intended. If I need to supply more information about the units in question, let me know and I'll post the code.

Anyway, I've been working on making a few new units for a campaign, and I was wondering if there are any guidelines for pricing units based on their abilities and general power level, or if I should just make it up and test until I get it right, or what? I'm very new to Wesnoth in general and WML in particular, I'm afraid, so this question might be a bit more stupid than I intended. If I need to supply more information about the units in question, let me know and I'll post the code.

### Re: Unit price balancing

I made a formula for the cost. It's crude but it seems to sort of work. I came up with it by assuming cost was relative to 3 main factors. HP, Moves and Maximum Damage from attacks. I weighted them until they roughly seemed to correspond to some mainline units. Later on I added multipliers for weapon specials and abilities.AAAAAAA wrote: ↑June 13th, 2021, 8:45 pm Hey everyone, I'm not sure if this is the right forum for this question, but it seems closest. Hopefully I'm in the right place?

Anyway, I've been working on making a few new units for a campaign, and I was wondering if there are any guidelines for pricing units based on their abilities and general power level, or if I should just make it up and test until I get it right, or what? I'm very new to Wesnoth in general and WML in particular, I'm afraid, so this question might be a bit more stupid than I intended. If I need to supply more information about the units in question, let me know and I'll post the code.

The formula is actually for the XP needed which I then divide by a constant to get the cost.

### Re: Unit price balancing

Cool! What's the formula?Atreides wrote: ↑June 13th, 2021, 11:31 pm I made a formula for the cost. It's crude but it seems to sort of work. I came up with it by assuming cost was relative to 3 main factors. HP, Moves and Maximum Damage from attacks. I weighted them until they roughly seemed to correspond to some mainline units. Later on I added multipliers for weapon specials and abilities.

The formula is actually for the XP needed which I then divide by a constant to get the cost.

### Re: Unit price balancing

Experience cost = Hitpoints divided by 2 + Movepoints + Biggest attack (i.e. 6 damage with 3 swings/strikes is 18).AAAAAAA wrote: ↑June 14th, 2021, 4:43 pmCool! What's the formula?Atreides wrote: ↑June 13th, 2021, 11:31 pm I made a formula for the cost. It's crude but it seems to sort of work. I came up with it by assuming cost was relative to 3 main factors. HP, Moves and Maximum Damage from attacks. I weighted them until they roughly seemed to correspond to some mainline units. Later on I added multipliers for weapon specials and abilities.

The formula is actually for the XP needed which I then divide by a constant to get the cost.

Cost = 1/3 Exp. Cost

Like I said crude but it's a starting point and possibly better than picking numbers at random.

Important note: It does not work for all mainline units such as the orcish grunt. That unit is intentionally cheap. In fact the formula fails for the whole northeners faction as the Assassin and Wolf Rider are purposely extra expensive. Well It might work for the Archer alone... So beware!

### Re: Unit price balancing

Awesome, thank you so much!

### Re: Unit price balancing

I think this is always tricky. For example, just taking the elves ... I find the female shaman too expensive early on,

though slow effect is nice. As she levels up, she becomes really epic and important.

Elven fighters are good fodder units; elven scouts are a bit crappy but fast, so they are useful for seizing villages.

Elven archers, in particular rangers, I prefer the most, so the gold investment here is totally obliterating the

other unit's costs IMO. That's just one comment, I am sure you can find this for other units too. Some units

seem too cheap compared to others. It's hard to balance properly though.

Often I try to get a mix of fodder expendable units, and units that are important such as say 3 archers,

then one shaman, or 2 archers, 2 fighters instead.

If the formula approach does not work, I'd go with a cheap cost first, then testing this in gameplay to

see how that fares against some AI. Is it possible to do ad-hoc scenarios against the computer? Would be fun

to use it for balancing.

though slow effect is nice. As she levels up, she becomes really epic and important.

Elven fighters are good fodder units; elven scouts are a bit crappy but fast, so they are useful for seizing villages.

Elven archers, in particular rangers, I prefer the most, so the gold investment here is totally obliterating the

other unit's costs IMO. That's just one comment, I am sure you can find this for other units too. Some units

seem too cheap compared to others. It's hard to balance properly though.

Often I try to get a mix of fodder expendable units, and units that are important such as say 3 archers,

then one shaman, or 2 archers, 2 fighters instead.

If the formula approach does not work, I'd go with a cheap cost first, then testing this in gameplay to

see how that fares against some AI. Is it possible to do ad-hoc scenarios against the computer? Would be fun

to use it for balancing.