Limit to # of Bonuses in TGA GameFont & SDK

Afforess

The White Wizard
Joined
Jul 31, 2007
Messages
12,239
Location
Austin, Texas
I'm curious, where is the limit to the number of bonuses that can be in the game defined in the game (In the SDK, I hope)? Some RoM modmoder's are having issues with any number of bonuses past 64, despite having WoC's expanded TGA gamefont.
 
Some FF modders have trouble past 73 or 74... Using WoC too. Apparently, nothing found yet about why it bugs or how to fix this...
 
Well, I'm rather glad I'm not the only one with this issue...

In FF and RifE, the limit is 73 resources. Any number past that absolutely destroys the character Icons.

In Wild Mana, the limit appears to be 72.... and now in RoM it's 64?

Hopefully a careful comparison of the relevant code can help nail down what's causing the difference, and help remove it.
 
Hopefully a careful comparison of the relevant code can help nail down what's causing the difference, and help remove it.

I'm not even sure where the code for it is. I tried tracking down the Button Index in the SDK, but just got dead ends...
 
Same. I've attempted to find it, but I've been working on getting a patch out at the same time... Will devote more time to it soon.

I've actually tried expanding the Character line in the file, and duplicating it below, as it appeared to be dropping a line when reading the file.... Didn't work. Still went to the same icons, even though they were now on the one line. :confused:

Edit: Any chance you could link to the posts that brought up the issue?
 
Same. I've attempted to find it, but I've been working on getting a patch out at the same time... Will devote more time to it soon.

I've actually tried expanding the Character line in the file, and duplicating it below, as it appeared to be dropping a line when reading the file.... Didn't work. Still went to the same icons, even though they were now on the one line. :confused:

Edit: Any chance you could link to the posts that brought up the issue?

Sure... RoM has 63 bonuses, but when a modmoder added 2 more, all hell broke loose.
 
Okay, makes me fairly sure it's the exact same issue I'm having. RifE (Formerly FFPlus) had 71 resources (22 of which are mana...). I started adding a few (Apples, lemons, salt, Ironwood, Hemlock, etc) and was fine for the first two... As soon as I added a third, to bring the total to 74, the character icons swapped. Which two didn't matter in the least, you can even clone an existing resource and simply rename it, and have the same issue. That's how I tested FF and Wild Mana actually.
 
Okay, makes me fairly sure it's the exact same issue I'm having. RifE (Formerly FFPlus) had 71 resources (22 of which are mana...). I started adding a few (Apples, lemons, salt, Ironwood, Hemlock, etc) and was fine for the first two... As soon as I added a third, to bring the total to 74, the character icons swapped. Which two didn't matter in the least, you can even clone an existing resource and simply rename it, and have the same issue. That's how I tested FF and Wild Mana actually.

Yep, exactly the same thing. If you remove honey, and add pottery, no problems. Add honey, remove pottery, no problems. Add both, and your gamefont's is screwed.
 
So what does Wild Mana have 1 more of than FF, and 8 more of than RoM? I would guess religions off the top of my head, though I don't remember hearing that Sephi added religions to his mod, and it is unlikely he added corporations, though possible, if his font is the "universal" one that Opera slapped together, as that would have Mechanarium. Almost no chance it is the extra icons, as I doubt anyone has more than I do on that end.
 
So what does Wild Mana have 1 more of than FF, and 8 more of than RoM? I would guess religions off the top of my head, though I don't remember hearing that Sephi added religions to his mod, and it is unlikely he added corporations, though possible, if his font is the "universal" one that Opera slapped together, as that would have Mechanarium. Almost no chance it is the extra icons, as I doubt anyone has more than I do on that end.

RoM has only 11 religions, 4 above the BTS standard... No extra corps ... Not much else in the way of gamefonts that I can think of off the top of my head.
 
So what does Wild Mana have 1 more of than FF, and 8 more of than RoM? I would guess religions off the top of my head, though I don't remember hearing that Sephi added religions to his mod, and it is unlikely he added corporations, though possible, if his font is the "universal" one that Opera slapped together, as that would have Mechanarium. Almost no chance it is the extra icons, as I doubt anyone has more than I do on that end.

I think you mean 1 less of than FF?

Sephi is using the 'universal' one... May not have the Machinarum icons (Can't remember if Opera added those), but FF doesn't either and FF/RifE have the issue at the same point.

As for number of characters... I actually have 3 more in RifE than in FF, to display LeaderStatus in the scoreboard. Even with that, same issue occurs with the same icons in the same place. I don't know that this issue is caused by the fonts file itself... I'm thinking it's more the code that reads it.
 
No, I'm afraid not. It's rather annoying, since RoM's hit it's bonus cap. I think it'd be interesting to see if there is some corporation or religion cap that no one has hit yet...
 
Well, does anyone know where in the SDK the game reads the game fonts? I've never looked.
 
I'm curious, where is the limit to the number of bonuses that can be in the game defined in the game (In the SDK, I hope)? Some RoM modmoder's are having issues with any number of bonuses past 64, despite having WoC's expanded TGA gamefont.

actually the reason for these issues is because using WoC's expanded TGA gamefont. The function

void CvGameTextMgr::assignFontIds(int iFirstSymbolCode, int iPadAmount)

definetly needs some changes so that it works without issues. The quick and dirty fix is to hardcode in the position of the Symbols (because the calculation of it gets wrong when getNumBonuses is large). What exact value to use depends on your tga file.

This here should work for all FFH modmods using Operas TGA file.

Code:
// TEMPFIX Sephi
	iCurSymbolID=8825;
// TEMPFIX Sephi

before (in CvGameTextMgr::assignFontIds)
Code:
	// set extra symbols
	for (int i=0; i < MAX_NUM_SYMBOLS; i++)
	{
		gDLL->setSymbolID(i, iCurSymbolID);
		++iCurSymbolID;
	}
 
How did you figure out that ID? If our gamefont's are different, (I suppose they are), what did you use to figure that out?
 
How did you figure out that ID? If our gamefont's are different, (I suppose they are), what did you use to figure that out?

if you use a debug dll, you can put a breakpoint into the loop and then mouseover the variable to display the current value. Else you could log it into a textfile.

The value you need is iCurSymbolID the first time the loop is run.
 
Top Bottom