Few Questions

Justinian519

Chieftain
Joined
Apr 8, 2006
Messages
97
I had a few questions for the scenario that I have been working on and if someone could answer them that would be great.

1. How do you cap the tech tree?

2. How do you make the game end on a certain date (say 1193-1400AD)?

3. How do you remove the wonders prior to the starting date of the scenario?

4. How do you make events so that one nation declares war on another at a certain date?

5 How do you increase the cost to make settlers?

Here is the thread to my East Asia 1193AD scenario if you would like to see it. This is also the scenario I am referring to.
http://forums.civfanatics.com/showthread.php?t=173737
 
Justinian519 said:
...1. How do you cap the tech tree?...

if you mean stopping certain techs to be researched...

I believe if you go to the CIV4TechInfos.xml there is a tag line that says something like

<bDisable>0</bDisable>

in each tech info

that makes that tech unresearchable

0 = NO 1 = YES

I believe you have to change each TECH that you want unresearchable to the value 1 in that tag line

this will prevent certain techs to be researched, thus "capping" your tech tree

***Make sure you copy the original Tech XML File and place it in your mod... then edit the copy!

Justinian519 said:
2. How do you make the game end on a certain date (say 1193-1400AD)?...


I believe some of this can be done in the CIV4GameSpeedInfo.xml

I think you can set the year where you end....

for example
<GameTurnInfo>
<iYearIncrement>20</iYearIncrement>
<iTurnsPerIncrement>25</iTurnsPerIncrement>
</GameTurnInfo>
<GameTurnInfo>
<iYearIncrement>10</iYearIncrement>
<iTurnsPerIncrement>50</iTurnsPerIncrement>
</GameTurnInfo>

the first part 20 years x 25 turns = 500 years

the second part 10 years x 50 turns = 500 years

therefore you can set up increments to your desire
at the end all years x turns = end of your game time period

for example if you look at the GAMESPEED_NORMAL tag lines (data) in the CIV4GameSpeedInfo.xml you will see after multiplying all the years by turns... then adding all the increments you will get to 2050 AD
(REMEMBER the game starts at 4000 BC so make appropriate adjustments)

If you change the (years x turns) increments (or removing some increments)
to equal the year you want to end on (1400 AD)

I am not sure how to get it to start at 1193 AD (since default is 4000 BC) however you can check/ask other modders and their scenarios to see how they did it....

or you could just make one increment that adds to the year you want...

Im not sure but it would look something like this:

<GameTurnInfo>
<iYearIncrement>5193</iYearIncrement>
<iTurnsPerIncrement>1</iTurnsPerIncrement>
</GameTurnInfo>


which means after the 1st turn it would pass 5193 years
(5193 - 4000 (BC) = 1193 AD)

Im not sure ... but as long as my math is ok... I think that should work :crazyeye:

then add more increment taglines to define how the rest of your turns/years will add up to get to your 1400AD time line...

(Check the vanilla versions in this file for examples and reference)

Justinian519 said:
3. How do you remove the wonders prior to the starting date of the scenario?...

not sure exactly what you mean here..

but if you go to CIV4BuildingInfos.XML file and search for the wonder... you can define what TECH is required to create that wonder...

for example:


<BuildingClass>BUILDINGCLASS_STATUE_OF_LIBERTY</BuildingClass>
<Type>BUILDING_STATUE_OF_LIBERTY</Type>
...
...
...
<PrereqTech>TECH_DEMOCRACY</PrereqTech>

this says that you need the TECH_DEMOCRACY to build the Statue of Liberty

lets say you wanted to change this to Code of Laws Tech

then change it to TECH_CODE_OF_LAWS

of course if you dont want to have this wonder at all...

then you need to edit a COPY of this file (and place in the correct mod folder)

CIV4BuildingClassInfos.xml file

search that file for (for example purposes) Statue of Liberty

and you find this:
<BuildingClassInfo>
<Type>BUILDINGCLASS_STATUE_OF_LIBERTY</Type>
<Description>TXT_KEY_BUILDING_STATUE_OF_LIBERTY</Description>
<iMaxGlobalInstances>1</iMaxGlobalInstances>
<iMaxTeamInstances>-1</iMaxTeamInstances>
<iMaxPlayerInstances>-1</iMaxPlayerInstances>
<iExtraPlayerInstances>0</iExtraPlayerInstances>
<bNoLimit>0</bNoLimit>
<DefaultBuilding>BUILDING_STATUE_OF_LIBERTY</DefaultBuilding>
<VictoryThresholds/>
</BuildingClassInfo>

change all values to 0 where no one can make this wonder



Justinian519 said:
4. How do you make events so that one nation declares war on another at a certain date?...

sorry not sure about this :blush: hopefully someone else can help you

Justinian519 said:
5 How do you increase the cost to make settlers?...


go to the

CIV4UnitInfos.xml File

open it and look for "unit_settler"

find the tagline that says:

<iCost>100</iCost>

and change that amount to amount of production cost (hammers) you want it to be...


NOTE: PLEASE COPY ALL ORIGINAL FILES BEFORE EDITING THEM

Make sure you make the correct Folder Paths in your Mod folder and add those XML files to the corresponding folders (it wont work right if you dont!)


there might be easier ways to solve your problems... Im just giving the ways I would do it....

Also... it may take some trial and error to get it right! :mischief:

Hope this helps!:)
 
thanks officer reene. With question #3 I meant is there a way to remove certain wonders from being built.
 
change the cost of the wonder to -1
 
I open up the XML files but it won't let me edit them. Also do I only need to include the XML files that I made changes to?
 
open the XML files with notepad. The default is internet explorer and that stops you editing them,
 
Justinian519 said:
I open up the XML files but it won't let me edit them.


there a free editing program called notepad+

it makes xml files appear in color (easier on the eyes)

plus has some other features that are helpful

if you go to the control tab... it also has a rudimentary xml tag checker that lets you know if there is a mismatched tagline (common modder mistake :mischief: )


go here to get it:

http://notepad-plus.sourceforge.net/

if the the link doesnt work....let me know ...I think there are other d/l sites to get it...

Justinian519 said:
Also do I only need to include the XML files that I made changes to?


yep you only need to put the XML files that you edited in your mod folder...

the other ones that you dont change get loaded up normally (even if you load a mod folder) ;)


of course there is that custom assets folder which overrides your regular assets folder... but I dont use that since it's simplier to put all the stuff in your mod folder

NOTE when I say your mod folder I mean the name of the mod you are making...

not the MODS folder where you put your custom mod in :goodjob:


hope that helps :)
 
Justinian519 said:
...2. How do you make the game end on a certain date (say 1193-1400AD)?...


I figured how to do the start date...

there is a line in the GlobalDefines.XML File:


<Define>
<DefineName>START_YEAR</DefineName>
<iDefineIntVal>-4000</iDefineIntVal>
</Define>


you need to put that in the GlobalDefinesALT.XML (make sure to copy it first to your mod folder)


then change -4000

to 1193

and that will start your 1st turn at 1193 AD

hope that helps ;)
 
As far as editing XML files goes, I use a program called XMLSpy. The handiest feature is that it alerts you to XML errors when you save the document.
 
Top Bottom