Adding Symbols

Tholish

Emperor
Joined
Jul 5, 2002
Messages
1,344
Location
Japan
I am trying to make a mod that adds a new Yield called "Power" (internally called "Juice" to differentiate from Coal Plant type power). It is essentially a clone of Food (I couldn't have picked a harder Yield to clone). I'll have to add a whole new City Screen for the Machine population of the city which is fed and grown by power. Almost a duplication of everything related to cities and plots. And I've heard there's no support in the engine for more than three yields graphically, though I guess I'll cross that bridge when I come to by pythoning in some substitute.

Anyway, all this stuff I'm adding requires symbols, which are enumerated like this

Code:
[SPOILER]enum FontSymbols					// Exposed to Python
{
	// 'OTHER' symbols
	HAPPY_CHAR = 0,
	UNHAPPY_CHAR,
	HEALTHY_CHAR,
	UNHEALTHY_CHAR,
	BULLET_CHAR,
	STRENGTH_CHAR,
	MOVES_CHAR,
	RELIGION_CHAR,
	STAR_CHAR,
	SILVER_STAR_CHAR,
	TRADE_CHAR,
	DEFENSE_CHAR,
	GREAT_PEOPLE_CHAR,
	BAD_GOLD_CHAR,
	BAD_FOOD_CHAR,
	EATEN_FOOD_CHAR,
	GOLDEN_AGE_CHAR,
	ANGRY_POP_CHAR,
	OPEN_BORDERS_CHAR,
	DEFENSIVE_PACT_CHAR,
	MAP_CHAR,
	OCCUPATION_CHAR,
	POWER_CHAR,[/SPOILER]

which happens to be the exact same order as the bottom row of icons on the GameFont.tga. Mighty suspicious. So, does anyone know if I can just add an icon to the row and a line to the enumeration and get the new symbol to work (where called on, of course)?
 
Should work, since it starts with 0, and goes up. I hate the gamefonts though...
 
FfH has a whole second line that is a duplicate of the first, and Planetfall has a short line after the usual last one. Maybe there's a limit to that first line. I'll look in the code and see...

EDIT: yep, Planetfall just adds them. The second line of icons at the bottom corresponds to post "Power" icons in Enums.h. Thus, to answer my own question, yes.
 
I'm far from being a graphics expert but I recommend that you use care when editing the gamefont files. I'm pretty certain that they specifically designed to drive people insane. The alpha channel must not mess with the purple borders or the cyan dot located to the right side of each image. I also ran into other problems before giving up.
 
Top Bottom