Quick Modding Questions Thread

When you have the necessary tech and resources to build all the upgrades of the unit
 
Thank you for Eras.
1) I have problem with Future Era (last era). This Era start in last turn of time victory. Normal game speed 1001 turns, future era start in 1001 turn.

2)I have get permission from Valkrionn to make my Rise from Erebus version (some FFH2 version, if i correctly think). My problem is ESPIONAGE. They are remove Espionage from game :( you can see on Picture 1.

B5hZJ9t.png

Picture 1

On picture 2 you can see BTS. And i want to return this (Picture 2).

iOlKajX.png

Picture 2

3) I change this in "CIV4GameOptionInfos":
PHP:
		<GameOptionInfo>		<!-- No Espionage -->
			<Type>GAMEOPTION_NO_ESPIONAGE</Type>
			<Description>TXT_KEY_GAME_OPTION_NO_ESPIONAGE</Description>
			<Help>TXT_KEY_GAME_OPTION_NO_ESPIONAGE_HELP</Help>
			<bDefault>1</bDefault>
			<bVisible>0</bVisible>
		</GameOptionInfo>
PHP1 (this was default setting)

PHP:
		<GameOptionInfo>		<!-- No Espionage -->
			<Type>GAMEOPTION_NO_ESPIONAGE</Type>
			<Description>TXT_KEY_GAME_OPTION_NO_ESPIONAGE</Description>
			<Help>TXT_KEY_GAME_OPTION_NO_ESPIONAGE_HELP</Help>
			<bDefault>0</bDefault>
			<bVisible>1</bVisible>
		</GameOptionInfo>
PHP2 (my change)

Before this i am put new Eras and new techs and game worked fine, until i am not changed in PHP2. I am copied Espionage missions from BTS, because there was only one Espionage mission.

Espionage Mission:
Spoiler :
PHP:
		<EspionageMissionInfo>
			<Type>ESPIONAGEMISSION_SEE_DEMOGRAPHICS</Type>
			<Description>TXT_KEY_ESPIONAGE_CAN_SEE_DEMOGRAPHICS</Description>
			<iCost>30</iCost>
			<bIsPassive>1</bIsPassive>
			<bIsTwoPhases>0</bIsTwoPhases>
			<bTargetsCity>0</bTargetsCity>
			<bSelectPlot>0</bSelectPlot>
			<TechPrereq>NONE</TechPrereq>
			<iVisibilityLevel>0</iVisibilityLevel>
			<bInvestigateCity>0</bInvestigateCity>
			<bSeeDemographics>0</bSeeDemographics>
			<bNoActiveMissions>0</bNoActiveMissions>
			<bSeeResearch>0</bSeeResearch>
			<bDestroyImprovement>0</bDestroyImprovement>
			<iDifficultyMod>0</iDifficultyMod>
			<iDestroyBuildingCostFactor>0</iDestroyBuildingCostFactor>
			<iDestroyUnitCostFactor>0</iDestroyUnitCostFactor>
			<iDestroyProjectCostFactor>0</iDestroyProjectCostFactor>
			<iDestroyProductionCostFactor>0</iDestroyProductionCostFactor>
			<iBuyUnitCostFactor>0</iBuyUnitCostFactor>
			<iBuyCityCostFactor>0</iBuyCityCostFactor>
			<iStealTreasuryTypes>0</iStealTreasuryTypes>
			<iCityInsertCultureAmountFactor>0</iCityInsertCultureAmountFactor>
			<iCityInsertCultureCostFactor>0</iCityInsertCultureCostFactor>
			<iCityPoisonWaterCounter>0</iCityPoisonWaterCounter>
			<iCityUnhappinessCounter>0</iCityUnhappinessCounter>
			<iCityRevoltCounter>0</iCityRevoltCounter>
			<iBuyTechCostFactor>0</iBuyTechCostFactor>
			<iSwitchCivicCostFactor>0</iSwitchCivicCostFactor>
			<iSwitchReligionCostFactor>0</iSwitchReligionCostFactor>
			<iPlayerAnarchyCounter>0</iPlayerAnarchyCounter>
			<iCounterespionageNumTurns>0</iCounterespionageNumTurns>
			<iCounterespionageMod>0</iCounterespionageMod>
		</EspionageMissionInfo>

and i add spy and great spy in game. After all of this, game went to Havoc.

I choose custom game i choose some era (not important which) when i click on end turn, my game screen become frozen. Sometimes i must wait more than 5-10 minute for end turn. If i choose great spy and choose start golden age i get Don't send error. Spy can't do any mission although i copied all missions from BTS. And i am not choose "NO ESPIONAGE". I change courthouse to get espionage points as in BTS, and i can see +2 ESP point in civilopedia.

What have I done? And how to return Espionage in game? PLEASE HELP ....
 
I'n not sure, but it could be that they removed the espionage from the dll :dunno:.
Check GameInfo\CommerceInfo.xml, if the espionage tags are still in that file.
If not, then it's probably out.

No, no, no :( I want back espionage in the game, that is terrible...

This is CIV4CommerceInfo:
Spoiler :
PHP:
<?xml version="1.0"?>
<!-- edited with XMLSPY v2004 rel. 2 U (http://www.xmlspy.com) by Jesse Smith (Firaxis Games) -->
<!-- Sid Meier's Civilization 4 -->
<!-- Copyright Firaxis Games 2005 -->
<!-- -->
<!-- Commerce Infos -->
<Civ4CommerceInfo xmlns="x-schema:CIV4GameInfoSchema.xml">
	<CommerceInfos>
		<CommerceInfo>
			<Type>COMMERCE_GOLD</Type>
			<Description>TXT_KEY_COMMERCE_GOLD</Description>
			<iInitialPercent>0</iInitialPercent>
			<iTradeModifier>0</iTradeModifier>
			<iInitialHappiness>0</iInitialHappiness>
			<iAIWeightPercent>100</iAIWeightPercent>
			<bFlexiblePercent>0</bFlexiblePercent>
			<Button>Art/Interface/Buttons/Process/ProcessWealth.dds</Button>
		</CommerceInfo>
		<CommerceInfo>
			<Type>COMMERCE_RESEARCH</Type>
			<Description>TXT_KEY_COMMERCE_RESEARCH</Description>
			<iInitialPercent>100</iInitialPercent>
			<iTradeModifier>0</iTradeModifier>
			<iInitialHappiness>0</iInitialHappiness>
			<iAIWeightPercent>125</iAIWeightPercent>
			<bFlexiblePercent>1</bFlexiblePercent>
			<Button>Art/Interface/Buttons/Process/ProcessResearch.dds</Button>
		</CommerceInfo>
		<CommerceInfo>
			<Type>COMMERCE_CULTURE</Type>
			<Description>TXT_KEY_COMMERCE_CULTURE</Description>
			<iInitialPercent>0</iInitialPercent>
			<iTradeModifier>0</iTradeModifier>
			<iInitialHappiness>10</iInitialHappiness>
			<iAIWeightPercent>25</iAIWeightPercent>
			<bFlexiblePercent>0</bFlexiblePercent>
			<Button>Art/Interface/Buttons/Process/ProcessCulture.dds</Button>
		</CommerceInfo>
		<CommerceInfo>
			<Type>COMMERCE_ESPIONAGE</Type>
			<Description>TXT_KEY_ESPIONAGE_CULTURE</Description>
			<iInitialPercent>0</iInitialPercent>
			<iTradeModifier>0</iTradeModifier>
			<iInitialHappiness>0</iInitialHappiness>
			<iAIWeightPercent>0</iAIWeightPercent>
			<bFlexiblePercent>0</bFlexiblePercent>
			<Button>Art/Interface/Buttons/Process/ProcessCulture.dds,Art/Interface/Buttons/Beyond the Sword_Atlas.dds,8,16</Button>
		</CommerceInfo>
	</CommerceInfos>
</Civ4CommerceInfo>

I see espionage in this file, but why espionage don't work? ...
What to do?
 
Hello,
I'm sorry if this is posted somewhere already, I've spent several hours now looking around and trying to figure it out.

I'm simply trying to change the research rate for a given game speed (like normal). I've done it by creating a separate mod before, but I would like to do it on an existing mod (so keeping all of the mods other features but changing this one thing in the XML). However, if I just go in and change it, I get all sorts of errors when I try to load the mod.

What am I missing?

And thanks. (first forum post ever)
 
Not sure, but bFlexiblePercent for espionage should be set to something higher than 0 (test 10, or so).

I'm not sure if I'll be able to answer the follow up, I think I need a break.

That's bad news..

I am change to this in CIV4CommerceInfo (as in BTS + new tag which is important here):
Spoiler :
PHP:
		<CommerceInfo>
			<Type>COMMERCE_ESPIONAGE</Type>
			<Description>TXT_KEY_ESPIONAGE_CULTURE</Description>
			<iInitialPercent>0</iInitialPercent>
			<iTradeModifier>0</iTradeModifier>
			<iInitialHappiness>0</iInitialHappiness>
			<iAIWeightPercent>25</iAIWeightPercent>
			<bFlexiblePercent>1</bFlexiblePercent>
			<Button>Art/Interface/Buttons/Process/ProcessCulture.dds,Art/Interface/Buttons/Beyond_the_Sword_Atlas.dds,8,16</Button>
		</CommerceInfo>

and turn's go normal without frozen screen, don't send error and etc. But look this new picture:

Jy5Q74J.jpg

Picture 1

Spy can't do any mission (Picture 1). I change courthouse to give +220 espionage points per turn, and spy can't do any espionage mission (i have all missions in CIV4EspionageMissionInfo).. Maybe because i haven't espionage screen.

iOlKajX.png

Picture 2

How to return this on picture 2? Which files i must change? I think that is Python files change..

Please help me..
 
I'd suspect now really that they removed it.
You should probably ask Valkrionn about it.

I'm simply trying to change the research rate for a given game speed (like normal). I've done it by creating a separate mod before, but I would like to do it on an existing mod (so keeping all of the mods other features but changing this one thing in the XML). However, if I just go in and change it, I get all sorts of errors when I try to load the mod.

What am I missing?

And thanks. (first forum post ever)

How exactly did you do it?
Normally you just have to copy over the GameInfo\GamespeedInfo.xml and change the values. Might be that you accidentially used the one from Vanilla or WL instead of BtS, that would certainly explain the problems.
 
I just edited the GameSpeedInfo.xml file that was inside the mod. Just changing one of the speed's iResearch values. And copy over it where?
 
@Zlatko - I think you will have many problems working with a FFH2 mod if you intend to change things very much from how they are in FFH2. There are things hardcoded in the DLL or python that you would have to remove or change to avoid errors. At least that is what I have seen from working on More Naval AI which is also a FFH2 mod.
 
@Zlatko - I think you will have many problems working with a FFH2 mod if you intend to change things very much from how they are in FFH2. There are things hardcoded in the DLL or python that you would have to remove or change to avoid errors. At least that is what I have seen from working on More Naval AI which is also a FFH2 mod.

I see, but i want only return espionage in game, I hope it's not supposed to be so hard.
 
Thank you for Eras.
1) I have problem with Future Era (last era). This Era start in last turn of time victory. Normal game speed 1001 turns, future era start in 1001 turn.

2)I have get permission from Valkrionn to make my Rise from Erebus version (some FFH2 version, if i correctly think). My problem is ESPIONAGE. They are remove Espionage from game :( you can see on Picture 1.

B5hZJ9t.png

Picture 1

On picture 2 you can see BTS. And i want to return this (Picture 2).

iOlKajX.png

Picture 2

3) I change this in "CIV4GameOptionInfos":
PHP:
		<GameOptionInfo>		<!-- No Espionage -->
			<Type>GAMEOPTION_NO_ESPIONAGE</Type>
			<Description>TXT_KEY_GAME_OPTION_NO_ESPIONAGE</Description>
			<Help>TXT_KEY_GAME_OPTION_NO_ESPIONAGE_HELP</Help>
			<bDefault>1</bDefault>
			<bVisible>0</bVisible>
		</GameOptionInfo>
PHP1 (this was default setting)

PHP:
		<GameOptionInfo>		<!-- No Espionage -->
			<Type>GAMEOPTION_NO_ESPIONAGE</Type>
			<Description>TXT_KEY_GAME_OPTION_NO_ESPIONAGE</Description>
			<Help>TXT_KEY_GAME_OPTION_NO_ESPIONAGE_HELP</Help>
			<bDefault>0</bDefault>
			<bVisible>1</bVisible>
		</GameOptionInfo>
PHP2 (my change)

Before this i am put new Eras and new techs and game worked fine, until i am not changed in PHP2. I am copied Espionage missions from BTS, because there was only one Espionage mission.

Espionage Mission:
Spoiler :
PHP:
		<EspionageMissionInfo>
			<Type>ESPIONAGEMISSION_SEE_DEMOGRAPHICS</Type>
			<Description>TXT_KEY_ESPIONAGE_CAN_SEE_DEMOGRAPHICS</Description>
			<iCost>30</iCost>
			<bIsPassive>1</bIsPassive>
			<bIsTwoPhases>0</bIsTwoPhases>
			<bTargetsCity>0</bTargetsCity>
			<bSelectPlot>0</bSelectPlot>
			<TechPrereq>NONE</TechPrereq>
			<iVisibilityLevel>0</iVisibilityLevel>
			<bInvestigateCity>0</bInvestigateCity>
			<bSeeDemographics>0</bSeeDemographics>
			<bNoActiveMissions>0</bNoActiveMissions>
			<bSeeResearch>0</bSeeResearch>
			<bDestroyImprovement>0</bDestroyImprovement>
			<iDifficultyMod>0</iDifficultyMod>
			<iDestroyBuildingCostFactor>0</iDestroyBuildingCostFactor>
			<iDestroyUnitCostFactor>0</iDestroyUnitCostFactor>
			<iDestroyProjectCostFactor>0</iDestroyProjectCostFactor>
			<iDestroyProductionCostFactor>0</iDestroyProductionCostFactor>
			<iBuyUnitCostFactor>0</iBuyUnitCostFactor>
			<iBuyCityCostFactor>0</iBuyCityCostFactor>
			<iStealTreasuryTypes>0</iStealTreasuryTypes>
			<iCityInsertCultureAmountFactor>0</iCityInsertCultureAmountFactor>
			<iCityInsertCultureCostFactor>0</iCityInsertCultureCostFactor>
			<iCityPoisonWaterCounter>0</iCityPoisonWaterCounter>
			<iCityUnhappinessCounter>0</iCityUnhappinessCounter>
			<iCityRevoltCounter>0</iCityRevoltCounter>
			<iBuyTechCostFactor>0</iBuyTechCostFactor>
			<iSwitchCivicCostFactor>0</iSwitchCivicCostFactor>
			<iSwitchReligionCostFactor>0</iSwitchReligionCostFactor>
			<iPlayerAnarchyCounter>0</iPlayerAnarchyCounter>
			<iCounterespionageNumTurns>0</iCounterespionageNumTurns>
			<iCounterespionageMod>0</iCounterespionageMod>
		</EspionageMissionInfo>

and i add spy and great spy in game. After all of this, game went to Havoc.

I choose custom game i choose some era (not important which) when i click on end turn, my game screen become frozen. Sometimes i must wait more than 5-10 minute for end turn. If i choose great spy and choose start golden age i get Don't send error. Spy can't do any mission although i copied all missions from BTS. And i am not choose "NO ESPIONAGE". I change courthouse to get espionage points as in BTS, and i can see +2 ESP point in civilopedia.

What have I done? And how to return Espionage in game? PLEASE HELP ....

No, no, no :( I want back espionage in the game, that is terrible...

This is CIV4CommerceInfo:
Spoiler :
PHP:
<?xml version="1.0"?>
<!-- edited with XMLSPY v2004 rel. 2 U (http://www.xmlspy.com) by Jesse Smith (Firaxis Games) -->
<!-- Sid Meier's Civilization 4 -->
<!-- Copyright Firaxis Games 2005 -->
<!-- -->
<!-- Commerce Infos -->
<Civ4CommerceInfo xmlns="x-schema:CIV4GameInfoSchema.xml">
	<CommerceInfos>
		<CommerceInfo>
			<Type>COMMERCE_GOLD</Type>
			<Description>TXT_KEY_COMMERCE_GOLD</Description>
			<iInitialPercent>0</iInitialPercent>
			<iTradeModifier>0</iTradeModifier>
			<iInitialHappiness>0</iInitialHappiness>
			<iAIWeightPercent>100</iAIWeightPercent>
			<bFlexiblePercent>0</bFlexiblePercent>
			<Button>Art/Interface/Buttons/Process/ProcessWealth.dds</Button>
		</CommerceInfo>
		<CommerceInfo>
			<Type>COMMERCE_RESEARCH</Type>
			<Description>TXT_KEY_COMMERCE_RESEARCH</Description>
			<iInitialPercent>100</iInitialPercent>
			<iTradeModifier>0</iTradeModifier>
			<iInitialHappiness>0</iInitialHappiness>
			<iAIWeightPercent>125</iAIWeightPercent>
			<bFlexiblePercent>1</bFlexiblePercent>
			<Button>Art/Interface/Buttons/Process/ProcessResearch.dds</Button>
		</CommerceInfo>
		<CommerceInfo>
			<Type>COMMERCE_CULTURE</Type>
			<Description>TXT_KEY_COMMERCE_CULTURE</Description>
			<iInitialPercent>0</iInitialPercent>
			<iTradeModifier>0</iTradeModifier>
			<iInitialHappiness>10</iInitialHappiness>
			<iAIWeightPercent>25</iAIWeightPercent>
			<bFlexiblePercent>0</bFlexiblePercent>
			<Button>Art/Interface/Buttons/Process/ProcessCulture.dds</Button>
		</CommerceInfo>
		<CommerceInfo>
			<Type>COMMERCE_ESPIONAGE</Type>
			<Description>TXT_KEY_ESPIONAGE_CULTURE</Description>
			<iInitialPercent>0</iInitialPercent>
			<iTradeModifier>0</iTradeModifier>
			<iInitialHappiness>0</iInitialHappiness>
			<iAIWeightPercent>0</iAIWeightPercent>
			<bFlexiblePercent>0</bFlexiblePercent>
			<Button>Art/Interface/Buttons/Process/ProcessCulture.dds,Art/Interface/Buttons/Beyond the Sword_Atlas.dds,8,16</Button>
		</CommerceInfo>
	</CommerceInfos>
</Civ4CommerceInfo>

I see espionage in this file, but why espionage don't work? ...
What to do?

That's bad news..

I am change to this in CIV4CommerceInfo (as in BTS + new tag which is important here):
Spoiler :
PHP:
		<CommerceInfo>
			<Type>COMMERCE_ESPIONAGE</Type>
			<Description>TXT_KEY_ESPIONAGE_CULTURE</Description>
			<iInitialPercent>0</iInitialPercent>
			<iTradeModifier>0</iTradeModifier>
			<iInitialHappiness>0</iInitialHappiness>
			<iAIWeightPercent>25</iAIWeightPercent>
			<bFlexiblePercent>1</bFlexiblePercent>
			<Button>Art/Interface/Buttons/Process/ProcessCulture.dds,Art/Interface/Buttons/Beyond_the_Sword_Atlas.dds,8,16</Button>
		</CommerceInfo>

and turn's go normal without frozen screen, don't send error and etc. But look this new picture:

Jy5Q74J.jpg

Picture 1

Spy can't do any mission (Picture 1). I change courthouse to give +220 espionage points per turn, and spy can't do any espionage mission (i have all missions in CIV4EspionageMissionInfo).. Maybe because i haven't espionage screen.

iOlKajX.png

Picture 2

How to return this on picture 2? Which files i must change? I think that is Python files change..

Please help me..

I see, but i want only return espionage in game, I hope it's not supposed to be so hard.

Espionage was removed in FfH's DLL, and we never reimplemented it (had some plans, for an eventual redesign, but it was extremely low on the priority list). Unfortunately, this means that while using either an FfH or RifE base you will be unable to implement espionage without modifying the DLL.

That said, DLL editing isn't really that hard, and IIRC blocking espionage wasn't a difficult thing; just a few edits. Our source code is just as open source as the rest of the mod, so you're free to edit it.
 
You can do it in Python. All unit spawning in the regular Final Frontier was done in Python. Of course, this meant that it was entirely in Python in the onBeginGameTurn event handler - all DLL based spawning was deactivated by setting the bNoBarbUnits tag to 1 for every era in CIV4EraInfos.xml. (Final Frontier Plus does it in the DLL again, but it has been modified to use some new tags in the unit info that control when a unit can be spawned - min and max eras.)

That is only one way to switch the spawning over to the Python. There is also a callback that could have been used, createBarbarianUnits. Called every turn, if this returns True the DLL does not do any spawn check of its own that turn since the callback said it handled it.

As you noted, you can do some fiddling in other places if you do not want to completely replace the spawn code with Python. The method you suggest, of just killing the unit if it is too strong for the time period, would work but it would have the side effect of reducing the spawns in the early game (you'd have to replace them with a suitably weak animal, rather than just kill it, to get the same number spawning).

Some mods other than FFP have also added adjustments for spawning. If you are basing your mod off another mod, you should check to see it it has made any changes. For example, Caveman 2 Cosmos has completely revamped the spawning of animals (and Neanderthals, it could probably be used for other things too) and has a CIV4SpawnInfos.xml file with entires where you can specify what spawns when and where - it has min and max dates, maximum allowed local and area density, allowed positions (latitude and longitude ranges), what type of terrain and/or features are required, and such. I'm pretty sure that some of the Fall from Heaven 2 mod-mods have added controls to the spawning too - I think Master of Mana, at least, has stronger things spawn farther from civilizations so that the deeper you are into the wilderness the worse things get for your explorer.
 
Back
Top Bottom