Modder's Guide to A New Dawn

FYI, BugUtil.getText only supports 1 argument. So it will work if you do this: BugUtil.getText("TXT_KEY_SOMETHING", iGold), but if you add a second argument, like this:
BugUtil.getText("TXT_KEY_SOMETHING", iGold, iSilver) it will not work. You need to use CyTranslator to get text for more than 1 argument.

Found this out the hard way myself. ;)
 
FYI, BugUtil.getText only supports 1 argument. So it will work if you do this: BugUtil.getText("TXT_KEY_SOMETHING", iGold), but if you add a second argument, like this:
BugUtil.getText("TXT_KEY_SOMETHING", iGold, iSilver) it will not work. You need to use CyTranslator to get text for more than 1 argument.

Found this out the hard way myself. ;)

The "doco" sugests that if I used BugUtil.getText("TXT_KEY_SOMETHING", (iGold, iSilver)) it should have worked. I have posted a question on the BUG thread anyway.

I will look at CyTranslator, thanks.
 
@Afforess, it turns out that it does work with multiple values but

The call should be
BugUtil.getText("TXT_KEY_SOMETHING", (iGold, iSilver))

and the value of TXT_KEY_SOMETHING is like "You get %d2 silver and %d1 gold."
 
Question. I'm trying to edit some options in CIV4CivilizationInfos.xml, but the file I find in this mod's Assets\XML\Civilizations folder is the same as the one from vanilla Civ4, no new civilizations or leaders from the expansion or from AND are defined there. Where is the file i should edit? I only want to change the USA Navy SEAL's unitclass from marine to modern marine, I already did it in UnitInfos.xml but I have to edit CivilizationInfos.xml too for the change to apply correctly.
 
Quick noob question here:

This is my first time modding civ and I'm working on a modmod to AND 1.75 that changes the civics to make them more unique and competitive. One thing I did was add communism back in (for insane dictators who like large armies and techs) but whenever I load the mod I get an error message saying:

Tag:TECH_GUILDS in InfoClass was incorrect Current XML file is xml\GameInfo\Civ4CivicInfos

The game then proceeds to load, and when I look at the civics screen while playing, the Communism civic is there as it should be, but the tech requirement (guilds in this case) is gone. I've tried changing the tech requirement, but it just does the same thing. Any ideas what causes this/how I can figure out how to fix this? I've attached the edited .xml files so people can check it out if they want. Just put the edited files in the proper folders, back up the original .xml's and remove the - M from the end.
 
I have een experimenting with religions going obsolete and realised that it was rediculous if the "Choose Religion" option was selected since I was basing it on when the religion would be founded. Anyway I added in the NotGameOption tag in the building infos file but it seems to have no effect.

have I made some dumb error? Have I found a bug in the latest dll? Or is this stuff not done in the dll?

Code:
<BuildingInfo>
	<BuildingClass>BUILDINGCLASS_DRUID_CATHEDRAL2</BuildingClass>
	<Type>BUILDING_DRUID_CATHEDRAL2</Type>
	<AndDependencyTypes>
             	<DependencyType>BUILDINGCLASS_DRUID_CATHEDRAL2</DependencyType>
             	<DependencyType>TECH_STEAM_POWER</DependencyType>
	</AndDependencyTypes>
	<NotGameOption>GAMEOPTION_PICK_RELIGION</NotGameOption>
	<ObsoleteTech>TECH_STEAM_POWER</ObsoleteTech>
</BuildingInfo>
 
I have een experimenting with religions going obsolete and realised that it was rediculous if the "Choose Religion" option was selected since I was basing it on when the religion would be founded. Anyway I added in the NotGameOption tag in the building infos file but it seems to have no effect.

have I made some dumb error? Have I found a bug in the latest dll? Or is this stuff not done in the dll?

Code:
<BuildingInfo>
	<BuildingClass>BUILDINGCLASS_DRUID_CATHEDRAL2</BuildingClass>
	<Type>BUILDING_DRUID_CATHEDRAL2</Type>
	<AndDependencyTypes>
             	<DependencyType>BUILDINGCLASS_DRUID_CATHEDRAL2</DependencyType>
             	<DependencyType>TECH_STEAM_POWER</DependencyType>
	</AndDependencyTypes>
	<NotGameOption>GAMEOPTION_PICK_RELIGION</NotGameOption>
	<ObsoleteTech>TECH_STEAM_POWER</ObsoleteTech>
</BuildingInfo>

Using the NotGameOption should work, and it should cause it to be unbuildable if Pick Religions is enabled.
 
Using the NotGameOption should work, and it should cause it to be unbuildable if Pick Religions is enabled.

It was not showing up in the pedia as not buildable but I did not try it in game yet.

That was not what I wanted anyway. ;) What I wanted was just the obsolete tech to not be in effect if Pick Religions was on. So I suppose what I was after was an anddependancy thing for XML and game options. And before you comment the current anddependancies will go once I move it from my alpha test.
 
The 2 game option tags have no pedia entries. HOWEVER, if you launch a game, those buildings won't even be in the pedia.
 
If your sevopedia python files are not up to date with RAND's, it could cause it.

That is probably it, I have been modding the main interface screen and avoiding updates. Probably time to "bite the bullet", but not now as the sun is shining and the wind chill factor is low so I am off for a walk.;)
 
That is probably it, I have been modding the main interface screen and avoiding updates. Probably time to "bite the bullet", but not now as the sun is shining and the wind chill factor is low so I am off for a walk.;)

With just the sevopedia stuff, you can probably just do a quick check with winmerge, I highly doubt there is anything big there.
 
With just the sevopedia stuff, you can probably just do a quick check with winmerge, I highly doubt there is anything big there.

With all the files in the contrib/sevopedia folder mine have Roamty's improvements, other than that they are the same. Perhaps I don't have the latest.

Edit: no I did not. d/l now. ;)
 
There is no code in the Python of the Sevopedia folder that has anything to do with game options. In fact, in beta 2, they are basically the same as in RoM 2.92.

This means that if you wanted to include Roamty's improved screens you could just pinch/recycle the ones from C2C. They do need a new text file to handle the new screen and extra bits on some screens. I can pack the bits all together if you like.

How can I get at the options from the BUG options screen in Python? In particular I am after the option that turns terrain damage on and off.

In the Python/Aforess folder there is a file ScreenResolutionSize.py. Do you have any idea why AND has while g_iYResolution = 720 C2C has g_iYResolution = 768?
 
There is no code in the Python of the Sevopedia folder that has anything to do with game options. In fact, in beta 2, they are basically the same as in RoM 2.92.

This means that if you wanted to include Roamty's improved screens you could just pinch/recycle the ones from C2C. They do need a new text file to handle the new screen and extra bits on some screens. I can pack the bits all together if you like.

How can I get at the options from the BUG options screen in Python? In particular I am after the option that turns terrain damage on and off.

In the Python/Aforess folder there is a file ScreenResolutionSize.py. Do you have any idea why AND has while g_iYResolution = 720 C2C has g_iYResolution = 768?

Could you just upload your python folder? My connection sucks ATM, so downloading 1GB is out of the question.

The ScreenResolution file reports the screen resolution to the DLL (used for the civic screen text formatting). The Screen Size was exposed to python from the engine, but not to the dll (why, don't ask me), so I created a workaround file to give the DLL the values from python, those values are just defaults.
 
Could you just upload your python folder? My connection sucks ATM, so downloading 1GB is out of the question.

The ScreenResolution file reports the screen resolution to the DLL (used for the civic screen text formatting). The Screen Size was exposed to python from the engine, but not to the dll (why, don't ask me), so I created a workaround file to give the DLL the values from python, those values are just defaults.

I assume you just mean the sevopedia folder contents.
 
Top Bottom