phungus420
Deity
- Joined
- Mar 1, 2003
- Messages
- 6,296
I'm going through and exposing all the civic revolutions information. For the most part it's been pretty easy, and once I get it done I will upload all of it here for you guys to incorporate into the RevDCM base mod. I've ran into a snag I need help with. The tag:
fRevIdxNationalityMod is giving me bizzare results. My code in CvGameTextMgr.cpp looks like so:
And in the XML text I have this:
Now so far this system has worked well for the integer values, but I suppose the code is tripping out on the float, but I don't know why, or how to fix it (originally I had multiplied it by 100, but removed that just to see what in the devil values I'd get just from the variable itself). Anyway it returns bizzare stuff like 105,982,435% (not exactly what it gives but you get the point). So how do I fix this?
fRevIdxNationalityMod is giving me bizzare results. My code in CvGameTextMgr.cpp looks like so:
Code:
// Revolution Nationality City Modifier
if (0 != GC.getCivicInfo(eCivic).getRevIdxNationalityMod())
{
szHelpText.append(NEWLINE);
szHelpText.append(gDLL->getText("TXT_KEY_CIVIC_REV_NATIONALITY", GC.getCivicInfo(eCivic).getRevIdxNationalityMod()));
}
Code:
<Tag>TXT_KEY_CIVIC_REV_NATIONALITY</Tag>
<English>[ICON_BULLET]%D1% To Nationality Based Revolution Penalties</English>
Now so far this system has worked well for the integer values, but I suppose the code is tripping out on the float, but I don't know why, or how to fix it (originally I had multiplied it by 100, but removed that just to see what in the devil values I'd get just from the variable itself). Anyway it returns bizzare stuff like 105,982,435% (not exactly what it gives but you get the point). So how do I fix this?