Modders Guide to Civilization V

I dont want the Harbor to increase naval production by 25% so I used the <Update> tag within Building.xml but it dont work, where have I gone wrong.

<Update>
<BuildingType>BUILDING_HARBOR</BuildingType>
<DomainType>DOMAIN_SEA</DomainType>
<Modifier>0</Modifier>

</Update>

Regards

Riker13
 
I dont want the Harbor to increase naval production by 25% so I used the <Update> tag within Building.xml but it dont work, where have I gone wrong.

<Update>
<BuildingType>BUILDING_HARBOR</BuildingType>
<DomainType>DOMAIN_SEA</DomainType>
<Modifier>0</Modifier>

</Update>

Regards

Riker13

You used update incorrectly. Honestly, so did I the first time I tried to use it. :lol:

Proper format for what you want:
Code:
<Update>
    <Set Modifier="0" />
    <Where BuildingType="BUILDING_HARBOR" DomainType="DOMAIN_SEA" />
</Update>

You can switch the order of the Where and Set lines, as well, so the following is just as good:
Code:
<Update>
    <Where BuildingType="BUILDING_HARBOR" DomainType="DOMAIN_SEA" />
     <Set Modifier="0" />
</Update>
 
You used update incorrectly. Honestly, so did I the first time I tried to use it. :lol:

Proper format for what you want:
Code:
<Update>
    <Set Modifier="0" />
    <Where BuildingType="BUILDING_HARBOR" DomainType="DOMAIN_SEA" />
</Update>

You can switch the order of the Where and Set lines, as well, so the following is just as good:
Code:
<Update>
    <Where BuildingType="BUILDING_HARBOR" DomainType="DOMAIN_SEA" />
     <Set Modifier="0" />
</Update>

Valkrionn, Thanks so much for the help, you are a Lifesaver.

All the best.

Riker13 :crazyeye:
 
I have had trouble getting my mods to load. It would seem that any changes I make after the first build are not recognized in Game until I rename the Mod. WTH? It's bad enough that I have to copy the mod over to the game directory manually.

In case anyone else is having this problem, I did indeed solve it.

Within ModBuddy, Tools --> Options --> Civilization V --> General,

There are paths for "Custom Civilization 5 path" and "Custom Civilization 5 User path." A checkmark allows you to change them.

Modbuddy had "intelligently" detected by %user%\Documents\Civ V\ directory for the Custom Civilization 5 User path, which is a directory I made to save guides, animation files... you know, downloads.

At any rate, the correct path is (Win 7) %user%\Documents\My Games\Sid Meier's Civilization 5\ Once I corrected the directory, of course the mods are now automatically loading.

Thanks for the input to help me compare to your experience!

Now all I need is to get my mods working... I can't seem to get GoldMaintenance changes on buildings to stick.

-NerdChieftain
 
*Edit Sorted, problem was: <Where BuildingType="BUILDING, should have been <Where Type="BUILDING

I want to change the TECH for Military bases from the TELEGRAPH to REPLACEABLE PARTS I thought the code below would have done it but alas it did not.

Any help please.

<Update>
<Set PrereqTech="TECH_REPLACEABLE_PARTS" />
<Where BuildingType="BUILDING_MILITARY_BASE"/>
</Update>


Regards
Riker13 :crazyeye:
 
I'm having trouble updating a Tech in ModBuddy:

This is an example code I'm using:

Code:
<GameData>
	<Technologies>
		<Update>
			<Set GridX="0" />
			<Set GridY="0" />
			<Where Type="TECH_TRAPPING" />
		</Update>
	</Technologies>
 </GameData>

But when I fire up the mod, Trapping is still in it's vanilla spot. These are the Actions tab as well:

Code:
OnModActivated     UpdateDatabase     XML/Technologies/CIV5Technologies.xml



What am I doing wrong? :confused::confused:
 
I would like the fishing boats to add more food instead of gold, would you say that the code below is correct?

<GameData>
<Improvement_ResourceType_Yields>

<Update>
<Set ImprovementType="IMPROVEMENT_FISHING_BOATS"/>
<ResourceType>RESOURCE_FISH</ResourceType>
<YieldType>YIELD_FOOD</YieldType>
<Yield>2</Yield>
</Update>
</Improvement_ResourceType_Yields>
</GameData>


Regards
Riker13 :crazyeye:
 
Has anyone messed around with completely redoing the Civics/Social Policies?

I am trying to figure out how to "delete" the entire listing of Social Policies so that I can replace them with different policies that I am currently working on. Every time I try to delete a policy, it causes problems with the game, even if I try to replace it with an identically named policy.

Currently, I am doing a very crude work around where I have about 4-8 updates per policy to:
1. Undo its normal effect
2. Add the new effect
3. Change all of the text
4. Change prereq policies
5. Change positioning of the icon.

But I do not want to do this with all 10 branches...

Any assistance would be appreciated. I have been asking around, but it does not seem like there has been much work on this yet (outside of tweaks to existing structure).

thanks,
-Zen Blade
 
I'm having trouble updating a Tech in ModBuddy:

This is an example code I'm using:

Code:
<GameData>
	<Technologies>
		<Update>
			<Set GridX="0" />
			<Set GridY="0" />
			<Where Type="TECH_TRAPPING" />
		</Update>
	</Technologies>
 </GameData>

But when I fire up the mod, Trapping is still in it's vanilla spot. These are the Actions tab as well:

Code:
OnModActivated     UpdateDatabase     XML/Technologies/CIV5Technologies.xml



What am I doing wrong? :confused::confused:

As far as I know, you can only have one line of set/where. So it should be like this:

Code:
<GameData>
	<Technologies>
		<Update>
			<Set GridX="0" GridY="0" />
			<Where Type="TECH_TRAPPING" />
		</Update>
	</Technologies>
 </GameData>



That did the trick... THANKS! :goodjob:
 
Ok, I got one more question... how do you delete a Prereqtech for a Technology?

This is the code I'm using, but it isn't working:

Code:
<GameData>
          <Technology_PrereqTechs>
		<Update>
			<Delete PrereqTech="TECH_THE_WHEEL"/>
			<Where TechType="TECH_MATHEMATICS"/>
		</Update>
          </Technology_PrereqTechs>
</GameData>


What am I doing wrong here?
 
You might try setting PrereqTech="NONE" (or maybe even "NULL"), rather than deleting it. Could work...
 
Am I missing something or can we not actually mod the City State stuff beyond trivial things like name changes or switching them from one of the pre-defined types (cultural, etc) to another? But I can't find somewhere to actually mod what the city states do?
 
Ok, I got one more question... how do you delete a Prereqtech for a Technology?

This is the code I'm using, but it isn't working:

Code:
<GameData>
          <Technology_PrereqTechs>
		<Update>
			<Delete PrereqTech="TECH_THE_WHEEL"/>
			<Where TechType="TECH_MATHEMATICS"/>
		</Update>
          </Technology_PrereqTechs>
</GameData>


What am I doing wrong here?

I managed a "purge all" XML file. http://forums.civfanatics.com/showpost.php?p=9835818&postcount=34

There are lots of examples in it. So it looks like Supercheese is right :goodjob:
 
Thanks a lot for the good guide !

I'm still at a loss with something aswell: Custom Promotions.

I've made a custom scout that's supposed to have increased defense in jungles.
The unit works, but they never get my custom promotion when i build them.

Can somebody help ? I've listed the Promotion's XML entries below. :(

Spoiler :

CIV5UnitPromotions.xml:
<UnitPromotions>
<Row>
<Type>PROMOTION_STALKER</Type>
<Description>TXT_KEY_PROMOTION_STALKER</Description>
<Help>TXT_KEY_PROMOTION_STALKER</Help>
<Sound>AS2D_IF_LEVELUP</Sound>
<PortraitIndex>59</PortraitIndex>
<IconAtlas>ABILITY_ATLAS</IconAtlas>
<PediaType>PEDIA_ATTRIBUTES</PediaType>
<PediaEntry>TXT_KEY_PEDIA_PROMOTION_STALKER</PediaEntry>
</Row>
</UnitPromotions>

<UnitPromotions_Features>
<Row>
<PromotionType>PROMOTION_STALKER</PromotionType>
<FeatureType>FEATURE_JUNGLE</FeatureType>
<Defense>100</Defense>
</Row>
</UnitPromotions_Features>

CIV5Units.xml:
<Unit_FreePromotions>
<Row>
<UnitType>UNIT_STALKER</UnitType>
<PromotionType>PROMOTION_STALKER</PromotionType>
</Row>
<Row>
<UnitType>UNIT_STALKER</UnitType>
<PromotionType>PROMOTION_IGNORE_TERRAIN_COST</PromotionType>
</Row>
</Unit_FreePromotions>
 
Question: How do I load the ModBuddy? The modder's guide simply says to the "Load the Modbuddy (the civ 5 SDK).
 
Load Steam, Library > Tools, download the Civ5 SDK. Enable Tuner and logging in the config and enable debug in usersettings INI. Load Tuner prior to loading Civ and you should see output under the Lua Console tab. If not, you may need to change your firewall settings. Then you're ready to mod! :)
 
That did the trick... THANKS! :goodjob:

I find for updates and deletes it really is easier to just use SQL. I believe the following will also work.

UPDATE Technologies SET 'GridX' = 0 WHERE Type = 'TECH_TRAPPING';
UPDATE Technologies SET 'GridY' = 0 WHERE Type = 'TECH_TRAPPING';
 
When I recompile, there is no need to copy the new version anywhere. It automatically gets put into the Mod folder when compiled.

Actually, I have the same issue. I have to manually copy it. Didn't realize this wasn't true for everyone.
 
Back
Top Bottom