Some basic questions on moding files

adlin5000

Chieftain
Joined
Sep 27, 2010
Messages
3
This is the first time I have tried to do a mod. Usually I just edit the files and call it done. But I seem to be having issues with the game not saving and crashing on me so I'm trying to do it the "correct" way. I got some of it down, just need a two questions answered.

First, I want to take out a line on a units info. Can I just do this:

Code:
    <Update>
        <Where Type="UNIT_JAPANESE_SAMURAI" />
	<Set ObsoleteTech="" />
    </Update>
Will that make the unit available till endgame?

Second how can I add a line to later in the file? As in adding another upgrade to a unit?

If this info is around here somewhere my bad, just call me an idiot and point me in the right direction. Thanks.
 
"none" (in capitals, this forum lowers all caps)

You create a second Update section with the data for the second edit.
 
Thanks.

Just to make sure I got it

Code:
<UPDATE>
     <CivilizationType>CIVILIZATION_JAPAN</CivilizationType>
     <TechType>TECH_EDUCATION</TechType>
</UPDATE>

Will add Education to Japan not replace Agriculture that it gets by default right?
 
No that's not going to work, but there must be a way because through world builder you can set what techs you start with. You can only have one value per field (ie: TechType).
 
Well I tried what I could and it does not seem to be working. Here is the CIV5Units.xml

Spoiler :
&#65279;<?xml version="1.0" encoding="utf-8"?>
<Game_Data>
<Units>
<Update>
<Where Type="UNIT_JAPANESE_SAMURAI" />
<Set PrereqTech="NONE" />
</Update>
<Update>
<Where Type="UNIT_JAPANESE_SAMURAI" />
<Set Combat="50" />
</Update>
<Update>
<Where Type="UNIT_JAPANESE_SAMURAI" />
<Set Moves="10" />
</Update>
<Update>
<Where Type="UNIT_JAPANESE_SAMURAI" />
<Set ObsoleteTech="NONE" />
</Update>
</Units>
<Unit_ResourceQuantityRequirements>
<Update>
<Where UnitType="UNIT_JAPANESE_SAMURAI" />
<Set ResourceType="NONE" />
</Update>
</Unit_ResourceQuantityRequirements>
</Game_Data>


and here is the modinfo

Spoiler :
&#65279;<?xml version="1.0" encoding="utf-8"?>

<Mod id="adlinxxx-5000-xxxx-xxxx-xxxxxxxxxxxx" version="2">

<Properties>

<Name>Super Samurai</Name>

<Stability>Beta</Stability>

<Description>Turns Samurai into Super Samurai</Description>

<Authors>Adlin5000</Authors>

<AffectsSavedGames>1</AffectsSavedGames>

<SupportsSinglePlayer>1</SupportsSinglePlayer>

<SupportsMultiplayer>1</SupportsMultiplayer>

<SupportsMac>1</SupportsMac>

<ReloadLandmarkSystem>1</ReloadLandmarkSystem>

<ReloadUnitSystem>1</ReloadUnitSystem>

</Properties>

<Dependencies />

<References />

<Blocks />

<Files>

<File md5="3d1b7eb06bb690778684888ad3bfde7b">XML/CIV5Units.xml</File>

</Files>

<Actions>

<OnModActivated>

<UpdateDatabase>CIV5Units.xml</UpdateDatabase>

</OnModActivated>

</Actions>

</Mod>


Can you tell me where I am going wrong? it installs just fine, but it does not seem to work. I started a new game and I should be able to make Samurai right from the start, but nothing. Also I'm assuming I don't have to start a new game each time I change it correct? I just saved a game at turn 1 and will load it each time.

Thanks again.

[EDIT]It looks like it does not like the tabs. Just pretend everything is tabbed out and looking nice.[/EDIT]
 
Top Bottom