Help pages for units to include cost?
Moderator: Forum Moderators
- irrevenant
- Moderator Emeritus
- Posts: 3692
- Joined: August 15th, 2005, 7:57 am
- Location: I'm all around you.
Help pages for units to include cost?
It would be great if the unit pages in the help browser included the cost for recruiting the unit in gold. In multiplayer especially (where the sides are even) economic factors are important (eg. is it worth sacrificing my horseman to take out his mage?).
*EDIT* Prometheus has posted the code to do so a few messages down
*EDIT* Prometheus has posted the code to do so a few messages down
Last edited by irrevenant on March 22nd, 2006, 11:46 am, edited 1 time in total.
- Dragonking
- Inactive Developer
- Posts: 591
- Joined: November 6th, 2004, 10:45 am
- Location: Poland
- Elvish_Pillager
- Posts: 8137
- Joined: May 28th, 2004, 10:21 am
- Location: Everywhere you think, nowhere you can possibly imagine.
- Contact:
-
- Posts: 117
- Joined: March 15th, 2006, 10:50 am
It's a single line, in help.cpp
<< _("Moves: ") << type_.movement() << jump(30)
<< _("Cost: ") << type_.cost() << jump(30)
<< _("Alignment: ")
add the middle line. This works in 1.02, I would be very surprised if it doesn't work elsewhere.
edit: Just noticed, in 800x600 mode, this change causes some of the xp text for some units to wrap, it goes on too long. Changing the jump(30) to jump(20) seems to work for everything.
<< _("Moves: ") << type_.movement() << jump(30)
<< _("Cost: ") << type_.cost() << jump(30)
<< _("Alignment: ")
add the middle line. This works in 1.02, I would be very surprised if it doesn't work elsewhere.
edit: Just noticed, in 800x600 mode, this change causes some of the xp text for some units to wrap, it goes on too long. Changing the jump(30) to jump(20) seems to work for everything.
Code: Select all
ss << _("HP: ") << type_.hitpoints() << jump(20)
<< _("Moves: ") << type_.movement() << jump(20)
<< _("Cost: ") << type_.cost() << jump(20)
<< _("Alignment: ")
Last edited by Prometheus on March 25th, 2006, 1:47 am, edited 1 time in total.
- irrevenant
- Moderator Emeritus
- Posts: 3692
- Joined: August 15th, 2005, 7:57 am
- Location: I'm all around you.
Well done!Prometheus wrote:It's a single line, in help.cpp
<< _("Moves: ") << type_.movement() << jump(30)
<< _("Cost: ") << type_.cost() << jump(30)
<< _("Alignment: ")
add the middle line. This works in 1.02, I would be very surprised it doesn't work elsewhere.
This was from the BWH list, which seems to be a semi-approved feature request list.
IMO, that constitutes a code contribution, so I'm going to move this thread over there.
Want to post a Wesnoth idea? Great! Read these:
Frequently Posted Ideas Thread
Giving your idea the best chance of acceptance
Frequently Posted Ideas Thread
Giving your idea the best chance of acceptance