Help pages for units to include cost?

Discussion of all aspects of the game engine, including development of new and existing features.

Moderator: Forum Moderators

Post Reply
User avatar
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?

Post by irrevenant »

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
Last edited by irrevenant on March 22nd, 2006, 11:46 am, edited 1 time in total.
User avatar
Dragonking
Inactive Developer
Posts: 591
Joined: November 6th, 2004, 10:45 am
Location: Poland

Post by Dragonking »

I agree - it would be great help for new players, or players who don't remember ecactly every unit's cost.
This is a block of text that can be added to posts you make. There is a 255 character limit
User avatar
appleide
Posts: 1003
Joined: November 8th, 2003, 10:03 pm
Location: Sydney,OZ

Post by appleide »

me too.
Why did the fish laugh? Because the sea weed.
User avatar
Elvish_Pillager
Posts: 8137
Joined: May 28th, 2004, 10:21 am
Location: Everywhere you think, nowhere you can possibly imagine.
Contact:

Post by Elvish_Pillager »

Agreed.
It's all fun and games until someone loses a lawsuit. Oh, and by the way, sending me private messages won't work. :/ If you must contact me, there's an e-mail address listed on the website in my profile.
User avatar
Tomsik
Posts: 1401
Joined: February 7th, 2005, 7:04 am
Location: Poland

Post by Tomsik »

Yeah, its good idea, and i think it dont need much work to be implemented. *Looks at devs"
Prometheus
Posts: 117
Joined: March 15th, 2006, 10:50 am

Post by Prometheus »

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.

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.
User avatar
irrevenant
Moderator Emeritus
Posts: 3692
Joined: August 15th, 2005, 7:57 am
Location: I'm all around you.

Post by irrevenant »

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.
Well done!

IMO, that constitutes a code contribution, so I'm going to move this thread over there.
Post Reply