Modding out Technologies

Akaizhar

Chieftain
Joined
Jun 15, 2007
Messages
19
I want to mod out Gunpowder and all of its incidental down the line techs. How do I do this? I'm semi-familiar with the XML but I don't understand how to do it without getting multitudes of errors down the line.

Anyone have any advice?

Moderator Action: Moved to C&C. The_J
 
Or even better, is it possible to edit the amount of technology points needed to discover something?
 
Or even better, is it possible to edit the amount of technology points needed to discover something?

<Technologies>
<Update>
<Set Cost="x"/>
<Where Type="TECH_???"/>
</Update>
</Technologies>

Find original costs at:

C: -> Program Files -> Steam -> SteamApps -> common -> sid meier's civilization iv -> Assets -> Gameplay -> XML -> Technologies -> Civ5Technologies.xml

I want to mod out Gunpowder and all of its incidental down the line techs. How do I do this? I'm semi-familiar with the XML but I don't understand how to do it without getting multitudes of errors down the line.

The following code will disable Gunpowder, Chemistry, Fertilizer, Rifling, and Metallurgy. It sets Dynamite to require steel. Since Chemistry is not researchable, I also changed Military Science to only have one prereq. Because it has two, I had to delete its entry entirely and then reassign it to Economics only.

<Technologies>
<Update>
<Where Type="TECH_GUNPOWDER"/>
<Set Disable="1"/>
</Update>
<Update>
<Where Type="TECH_CHEMISTRY"/>
<Set Disable="1"/>
</Update>
<Update>
<Where Type="TECH_METALLURGY"/>
<Set Disable="1"/>
</Update>
<Update>
<Where Type="TECH_RIFLING"/>
<Set Disable="1"/>
</Update>
<Update>
<Where Type="TECH_FERTILIZER"/>
<Set Disable="1"/>
</Update>
</Technologies>
<Technology_PrereqTechs>
<Update>
<Set PrereqTech="TECH_STEEL"/>
<Where TechType="TECH_DYNAMITE"/>
</Update>
<!-- Removes the Prereqs for Military Science, as we need to remove a branch -->
<Delete TechType="TECH_MILITARY_SCIENCE"/>
<Row>
<TechType>TECH_MILITARY_SCIENCE</TechType>
<PrereqTech>TECH_ECONOMICS</PrereqTech>
</Row>
</Technology_PrereqTechs>
 
Thank you so so much!
 
Yep that didn't actually work. It wont change the cost for some reason. this is the set up I have it on right now

<GameData>
<Technologies>
<Update>
<Where Type="TECH_GUNPOWDER"/>
<Set Cost="4000"/>
</Update>
</Technologies>
</GameData>
 
Order of Set and Where is irrelevant. Did you make sure you've got your OnModActivated bit all set up properly?
 
On mod activated?
 
Yep tried both and neither changed the cost for gunpowder
 
Where's that guide?
 
Nevermind found it
 
Yep, still didn't work. Anyone wanna write me up another one? :p
 
Yep, still didn't work. Anyone wanna write me up another one? :p

Hm...it should've worked...let me check it over again.

It could be also:

1) There's a typo somewhere
2) One of the techs I referenced might have the wrong name.
3) Did you set an Action to reference the XML file?

UPDATE: I inputted the code into modbuddy and loaded it. It works fine for me. If you'd added anything extra, it's breaking the code. You may have a syntax error.

Either way the code's fine, something's wrong on your end.
 
its likely that that for whatever reason, its not recognizing your file. When you add files new files, first you need to have the folder selected where you want it to be.

For example, in my mod, I created a folder called "XML" where I put all my xml files and sub folders. When I made my NewGlobalDefines.xml, i had the XML folder selected, in mod buddy, then i go to the top menu, Project --> add new item, then i enter the name, fill in all the information, then when I linked it in the Actions tab, it reads XML/NewGlobalDefines.xml

if you do it exactly like that, you shouldn't have problems.
 
Yeah its weird, all i'm trying to do is change the cost of gunpowder from 680 to like 90000. or something crazy that noone will be able to research and i have it so it updates all of the correct files (or so i assume) and my code is right now as follows

<GameData>
<Technologies>
<Update>
<Set Cost="4000"/>
<Where Type="TECH_GUNPOWDER"/>
</Update>
</Technologies>
</GameData>

and my actions tab reads OnModActivated-UpdateDatabase-XML/Technologies/CIV5Technologies.xml

And for some reason I'm still getting nothing when I load the mod into a game, the points needed to research it don't change.
 
Is your file named CIV5Technologies.xml and located in a Technologies folder within an XML folder?

Furthermore, if you want to make it unresearchable, disabling it is a much faster way of doing so. And the AI will still probably try to research it due to flavors on it, so you severely gimp a terrible AI.
 
yea, someone needs to make a tutorial video to show exactly what I mean, its hard to demonstrate exactly how to do it with only words.

your code is correct.

i would cut/paste your file out of there, then actually delete it in the modbuddy screen, clean, rebuild, then redo the steps i posted above. basically try again. After you create your new file, just copy and paste your code from the old file into it.
 
Okay tried and still no go, any chance you can write and upload it to the mod browser and i'll see if i can grab it off of you?
 
Top Bottom