Discussion among members of the development team.

Moderators: Forum Moderators, Developers

Sapient
Inactive Developer
Posts: 4453
Joined: November 26th, 2005, 7:41 am
Contact:

Here's a possible idea for more in-game Statistics. The original idea came from eddieballgame in this thread (although I dislike his Performance Rating idea).

The equation would look something like:

Code: Select all

``````Advantage = Income Factor + Holdings + Other Advantage Factors
Income Factor = Net Income * INCOME_WEIGHT
Holdings = Gold + ALL( Unit Value )
Unit Value = MAX( price*(%hp), Next Level Value*(%exp) )
``````
Essentially, it would be the computer's idea of "Who's winning?"

It might be nice to display Ending Advantage if turns run out in MP.
http://www.wesnoth.org/wiki/User:Sapient... "Looks like your skills saved us again. Uh, well at least, they saved Soarin's apple pie."

Temuchin Khan
Posts: 1720
Joined: September 3rd, 2004, 6:35 pm
Location: Player 6 on the original Agaia map

Sapient wrote:Here's a possible idea for more in-game Statistics. The original idea came from eddieballgame in this thread (although I dislike his Performance Rating idea).

The equation would look something like:

Code: Select all

``````Advantage = Income Factor + Holdings + Other Advantage Factors
Income Factor = Net Income * INCOME_WEIGHT
Holdings = Gold + ALL( Unit Value )
Unit Value = MAX( price*(%hp), Next Level Value*(%exp) )
``````
Essentially, it would be the computer's idea of "Who's winning?"

It might be nice to display Ending Advantage if turns run out in MP.
I like this idea. It has always seemed a little odd to me that someone can be trampling his opponent's units in multiplayer, but still be counted a loser if time runs out.

AT
Posts: 476
Joined: May 6th, 2004, 9:44 pm

### Stats

I've always wanted a more comprehensive set of statistics to be generated (at least) after the game is over. I'll see if I can come up with something in a patch once I get back up to speed.
Gandalf-"I am a servant of the Secret Fire, wielder of the Flame of Anor. You cannot pass. The dark fire will not avail you, flame of Udun. Go back to the Shadow. You cannot pass!"
AT- "That sounds like more trouble than it's worth."

AI
Developer
Posts: 2394
Joined: January 31st, 2008, 8:38 pm

I have started implementing this feature. It can be found in trunk using the default era.

Income currently has a weight of 5 and unit value is simply the cost of the unit. A more complex (and configurable) unit worth formula can be found in the test scenario. (right click any unit)
The current formula there is:
(BASE + (hp/max_hp) * HEALTH_WEIGHT + (xp/max_xp) * XP_WEIGHT)
where the default values are 0.5, 0.5 and 2.

If anyone can come up with a better formula or better (default) weights, I'd love to hear it.

Sapient
Inactive Developer
Posts: 4453
Joined: November 26th, 2005, 7:41 am
Contact:

ummm... I like the formula that was proposed a lot better:

Code: Select all

``````Unit Value = MAX( price*(%hp), Next Level Value*(%exp) )
``````
(NextLevelValue would be the highest price from the available advanceto choices)
http://www.wesnoth.org/wiki/User:Sapient... "Looks like your skills saved us again. Uh, well at least, they saved Soarin's apple pie."

AI
Developer
Posts: 2394
Joined: January 31st, 2008, 8:38 pm

I considered that, but that would require accessing the cost of a unit type by its name. Not an easy task from WML. (I'm already abusing the fact that a [unit_type]'s variables are carried over into it's [unit] instances)

This would require something along the lines of:
-creating a unit of each type
-accessing its cost

AI
Developer
Posts: 2394
Joined: January 31st, 2008, 8:38 pm

I've moved the implementation to C++ and changed to your formula, the formula's innards are exposed in the test scenario.

The UI has also been polished (mostly Soliton), so I think it's about done.

Sapient
Inactive Developer
Posts: 4453
Joined: November 26th, 2005, 7:41 am
Contact: