PDA

View Full Version : Help editing


cbdude
October 30, 2005, 15:34
i have come to realize i have no idea how to edit anything with xml and python. i was hoping maybe some one could come up with an "editing for dummies" tutorial. just want to know how to do basic stuff, what folders to look in, what files to edit and what they mean in-game, examples of how to do some minor things. Help please.

matrix089
October 30, 2005, 16:39
Well the files you'll find in the assets folder (python,xml).

in the xml/buildings folder you take civ4buildingsinfos.xml and open it with an editor (for example the windows editor).

every building has the same structure. it begins with the name "BUILDINGCLASS_PALACE" for example.
Before that name there is following "BuildingInfo"
the end of this certain building is marked by "/BuildingInfo"

Within this "markers" the building has a certain structure:

i.e.:

- cost
- health
...

so for every building you'll find more or less the same lines of code.

you can reduce the cost from 60 to 50 or give a factory a health value of "+1" instead of "-1".

to know exactly what line stands for what information you have to compare the different buildings.

------------

that is a very short intro. you have to start do small things. but make backups of the xml-files before you change them!

cbdude
October 31, 2005, 05:40
this is from the xml file bonousinfo i'm not sure what most of it means. could you give me an idea what lines mean what and what effects they have in the game.

<BonusInfo>
<Type>BONUS_SILK</Type>
<Description>TXT_KEY_BONUS_SILK</Description>
<Civilopedia>TXT_KEY_BONUS_SILK_PEDIA</Civilopedia>
<BonusClassType>BONUSCLASS_GENERAL</BonusClassType>
<ArtDefineTag>ART_DEF_BONUS_SILK</ArtDefineTag>
<TechReveal>NONE</TechReveal>
<TechCityTrade>TECH_CALENDAR</TechCityTrade>
<TechObsolete>NONE</TechObsolete>
- <YieldChanges>
<iYieldChange>0</iYieldChange>
<iYieldChange>0</iYieldChange>
<iYieldChange>1</iYieldChange>
</YieldChanges>
<iAITradeModifier>0</iAITradeModifier>
<iHealth>0</iHealth>
<iHappiness>1</iHappiness>
<iPlacementOrder>5</iPlacementOrder>
<iConstAppearance>50</iConstAppearance>
<iMinAreaSize>3</iMinAreaSize>
<iMinLatitude>0</iMinLatitude>
<iMaxLatitude>90</iMaxLatitude>
- <Rands>
<iRandApp1>25</iRandApp1>
<iRandApp2>25</iRandApp2>
<iRandApp3>0</iRandApp3>
<iRandApp4>0</iRandApp4>
</Rands>
<iPlayer>100</iPlayer>
<iTilesPer>0</iTilesPer>
<iMinLandPercent>0</iMinLandPercent>
<iUnique>0</iUnique>
<iGroupRange>1</iGroupRange>
<iGroupRand>50</iGroupRand>
<bArea>1</bArea>
<bHills>0</bHills>
<bFlatlands>1</bFlatlands>
<bNoRiverSide>0</bNoRiverSide>
<bNormalize>1</bNormalize>
<TerrainBooleans />
- <FeatureBooleans>
- <FeatureBoolean>
<FeatureType>FEATURE_FOREST</FeatureType>
<bFeature>1</bFeature>
</FeatureBoolean>
</FeatureBooleans>
- <FeatureTerrainBooleans>
- <FeatureTerrainBoolean>
<TerrainType>TERRAIN_GRASS</TerrainType>
<bFeatureTerrain>1</bFeatureTerrain>
</FeatureTerrainBoolean>
- <FeatureTerrainBoolean>
<TerrainType>TERRAIN_PLAINS</TerrainType>
<bFeatureTerrain>1</bFeatureTerrain>
</FeatureTerrainBoolean>
</FeatureTerrainBooleans>
<bUseLSystem>1</bUseLSystem>
</BonusInfo>
- <BonusInfo>

cbdude
October 31, 2005, 05:41
umm that didnt turn out right let me try again.



<Type>BONUS_SILK</Type>
<Description>TXT_KEY_BONUS_SILK</Description>
<Civilopedia>TXT_KEY_BONUS_SILK_PEDIA</Civilopedia>
<BonusClassType>BONUSCLASS_GENERAL</BonusClassType>
<ArtDefineTag>ART_DEF_BONUS_SILK</ArtDefineTag>
<TechReveal>NONE</TechReveal>
<TechCityTrade>TECH_CALENDAR</TechCityTrade>
<TechObsolete>NONE</TechObsolete>
- <YieldChanges>
<iYieldChange>0</iYieldChange>
<iYieldChange>0</iYieldChange>
<iYieldChange>1</iYieldChange>
</YieldChanges>
<iAITradeModifier>0</iAITradeModifier>
<iHealth>0</iHealth>
<iHappiness>1</iHappiness>
<iPlacementOrder>5</iPlacementOrder>
<iConstAppearance>50</iConstAppearance>
<iMinAreaSize>3</iMinAreaSize>
<iMinLatitude>0</iMinLatitude>
<iMaxLatitude>90</iMaxLatitude>
- <Rands>
<iRandApp1>25</iRandApp1>
<iRandApp2>25</iRandApp2>
<iRandApp3>0</iRandApp3>
<iRandApp4>0</iRandApp4>
</Rands>
<iPlayer>100</iPlayer>
<iTilesPer>0</iTilesPer>
<iMinLandPercent>0</iMinLandPercent>
<iUnique>0</iUnique>
<iGroupRange>1</iGroupRange>
<iGroupRand>50</iGroupRand>
<bArea>1</bArea>
<bHills>0</bHills>
<bFlatlands>1</bFlatlands>
<bNoRiverSide>0</bNoRiverSide>
<bNormalize>1</bNormalize>
<TerrainBooleans />
- <FeatureBooleans>
- <FeatureBoolean>
<FeatureType>FEATURE_FOREST</FeatureType>
<bFeature>1</bFeature>
</FeatureBoolean>
</FeatureBooleans>
- <FeatureTerrainBooleans>
- <FeatureTerrainBoolean>
<TerrainType>TERRAIN_GRASS</TerrainType>
<bFeatureTerrain>1</bFeatureTerrain>
</FeatureTerrainBoolean>
- <FeatureTerrainBoolean>
<TerrainType>TERRAIN_PLAINS</TerrainType>
<bFeatureTerrain>1</bFeatureTerrain>
</FeatureTerrainBoolean>
</FeatureTerrainBooleans>
<bUseLSystem>1</bUseLSystem>
</BonusInfo>
- <BonusInfo>

cbdude
October 31, 2005, 05:45
cant seem to get it to post right

matrix089
October 31, 2005, 12:26
Well thats because you cant show this here <> (http://).

Sorry I don't understand every line of it. But you can start when you take your handbook and compare the attributes. Walls for example increase your defense with 50%, you'll find this value in the line "idefense".

another thing is health. you'll find health, area health and global health. health is for this city where you build the building. area health increases, decreases health on the whole continent, global health in every city you have.

It'll cost you a little bit of time, but the best is you try it on your own. start with thins you know. A lot of stuff you'll learn from the posts in this subforum.

Wish you fun! :)

Jon Shafer
October 31, 2005, 21:15
I posted a quick guide on how to add civs in the following thread. It's a good way to get started. The best way to learn things is hands-on and by asking questions with specific things. As they say, Rome was not built in a day!

http://www.apolyton.net/forums/showthread.php?s=&threadid=141588

Locutus
October 31, 2005, 21:24
If you want to post XML code here, run the code through a text editor first and replace all '<' and '>' with '&lt;' and '&gt;', or post the relevant code as attachment. But it's kind of hard to explain for a huge file what every single setting means (Isak is working documentation for this though, please give him a few days). As Trip says, please ask specific questions on what specific tags do or how to accomplish specific tasks.

Edit: I'm looking into a way to make posting of XML code in this forum easier in the future. Not making any promises though and it may take a while.