Unit price balancing

Discussion of all aspects of multiplayer development: unit balancing, map development, server development, and so forth.

Moderator: Forum Moderators

Post Reply
AAAAAAA
Posts: 3
Joined: April 17th, 2021, 7:50 pm

Unit price balancing

Post by AAAAAAA »

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.
User avatar
Atreides
Posts: 344
Joined: March 30th, 2019, 10:38 pm
Location: A Nude Land

Re: Unit price balancing

Post by Atreides »

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.
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.
AAAAAAA
Posts: 3
Joined: April 17th, 2021, 7:50 pm

Re: Unit price balancing

Post by AAAAAAA »

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.
Cool! What's the formula?
User avatar
Atreides
Posts: 344
Joined: March 30th, 2019, 10:38 pm
Location: A Nude Land

Re: Unit price balancing

Post by Atreides »

AAAAAAA wrote: June 14th, 2021, 4:43 pm
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.
Cool! What's the formula?
Experience cost = Hitpoints divided by 2 + Movepoints + Biggest attack (i.e. 6 damage with 3 swings/strikes is 18).
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!
AAAAAAA
Posts: 3
Joined: April 17th, 2021, 7:50 pm

Re: Unit price balancing

Post by AAAAAAA »

Awesome, thank you so much!
shevegen
Posts: 351
Joined: June 3rd, 2004, 4:35 pm

Re: Unit price balancing

Post by shevegen »

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.
Post Reply