Showing "Advantage" In-Game/End-Game
Moderator: Forum Moderators
Showing "Advantage" In-Game/End-Game
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:
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.
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) )
Other Advantage Factors = {undefined}
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: 1800
- Joined: September 3rd, 2004, 6:35 pm
- Location: Player 6 on the original Agaia map
Re: Showing "Advantage" In-Game/End-Game
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.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:
Essentially, it would be the computer's idea of "Who's winning?"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) ) Other Advantage Factors = {undefined}
It might be nice to display Ending Advantage if turns run out in MP.
Check out my new book!
https://www.amazon.com/dp/1956715029/re ... oks&sr=1-1
https://www.amazon.com/dp/1956715029/re ... oks&sr=1-1
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."
AT- "That sounds like more trouble than it's worth."
Re: Showing "Advantage" In-Game/End-Game
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.
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.
Re: Showing "Advantage" In-Game/End-Game
ummm... I like the formula that was proposed a lot better:
(NextLevelValue would be the highest price from the available advanceto choices)
Code: Select all
Unit Value = MAX( price*(%hp), Next Level Value*(%exp) )
http://www.wesnoth.org/wiki/User:Sapient... "Looks like your skills saved us again. Uh, well at least, they saved Soarin's apple pie."
Re: Showing "Advantage" In-Game/End-Game
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:
-parsing advances_to
-creating a unit of each type
-accessing its cost
This would require something along the lines of:
-parsing advances_to
-creating a unit of each type
-accessing its cost
Re: Showing "Advantage" In-Game/End-Game
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.
The UI has also been polished (mostly Soliton), so I think it's about done.
Re: Showing "Advantage" In-Game/End-Game
Very Nice!AI wrote: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.
thanks
http://www.wesnoth.org/wiki/User:Sapient... "Looks like your skills saved us again. Uh, well at least, they saved Soarin's apple pie."