[Help]Improvement modding help

Hey guys. I have a little problem here. I've decided to go on the path of modding and have a little problem. I've tried to create farm and this is xml code for it:

<?xml version="1.0" encoding="iso-8859-1"?>
<ImprovementTypes>

<ImprovementType InternalName="Raadush's Farm">
<DisplayName>Town Farm</DisplayName>
<Description>Generates 1 food for the kingdom</Description>

<!-- Improvement Data -->
<TileDesign>Raadush_Farm</TileDesign>
<ConstructionTileDesign>Raadush_Farm_Build</ConstructionTileDesign>
<SupportedTerrainType>Land</SupportedTerrainType>
<SupportedTerrainType>City</SupportedTerrainType>
<DrawnIcon>Gfx/TacticalIcons/Raadush_Farm.png</DrawnIcon>
<DrawnIconConstruction>Gfx/TacticalIcons/Raadush_Farm.png</DrawnIconConstruction>
<Thumbnail>Raadush_Farm.png</Thumbnail>
<ReqCityLevel>1</ReqCityLevel>
<!-- Medallion Data -->
<Medallions InternalName="">
<All>Raadush_Farm.png</All>
<Border_All>
</Border_All>
</Medallions>
<!-- Prerequisites -->
<RequiresCity>True</RequiresCity>
<RequiresResource>False</RequiresResource>
<!-- Cost -->
<LaborToBuild>3.0</LaborToBuild>
<!-- Building Production/Consumption. -->
<GameModifier>
<ModType>Resource</ModType>
<Attribute>Rations</Attribute>
<Value>1.0</Value>
</GameModifier>
<GameModifier>
<ModType>ConstructionResourceCost</ModType>
<Attribute>Gold</Attribute>
<Value>-25</Value>
</GameModifier>
<GameModifier>
<ModType>ConstructionResourceCost</ModType>
<Attribute>Materials</Attribute>
<Value>-5</Value>
</GameModifier>
<Prereq>
<Type>Allegiance</Type>
<Attribute>Kingdom</Attribute>
</Prereq>
<!-- AI Info -->
<AIData AIPersonality="AI_General">
<AITag>Study</AITag>
</AIData>
</ImprovementType>

</ImprovementTypes>

 

I've copied code from core Study and modified it. Everything works fine, when I start new game, build a city and look into the improvements, farm is there. Building costs are right, produces 1 food, all icons and medallions work fine but im unable to build it. When I click on other core improvements like workshop and so, green "squares" are displayed around my city and i can build on them. But when i select my farm, no green tiles are displayed and so i have nowhere to build my farm. Also other core improvements needs 1 build space, but my farm has 0 in that requirement. So can tell me what im doing wrong please?

2,831 views 4 replies
Reply #1 Top

Okay, problem solved. Problem was in files created with tile editor. I've created farm tile called Raadush_Farm.xml. Then deleted some structures, made building tile called Raadush_Farm_Build.xml. After that i wasnt able to load Raadush_Farm.xml anymore even if that file wasnt overwritten. So I created backup of Raadush_Farm.xml called Raa_Farm.xml and suddently it worked. But I have to had both Raadush_Farm.xml and Raa_Farm.xml on my disc to be able to load it. When i deleted one of them, Raadush_Farm was no longer available on the load screen. A bug maybe?

Reply #2 Top

Just to check (since you didn't explicitly state this): Did you actually create the Farm in the Tile Creator as well, and named it Raadush_Farm, as you indicated in the code?

Reply #3 Top

Glad you figured it out :)

Reply #4 Top

Malloreon yes I did, but when I deleted some objects, added some other and saved new tile as Raadush_Farm_Build, something went wrong and the game was for some reasons unable to load the previous file Raadush_Farm (no matter xml file was in my Documents as before) and so it was impossible to build it because it had no graphics to use (and so its space reauirement was really 0).

Im glad too, but i dont like the fact that i must have 2 same files (not the name) in my documents folder just for the game to be able to load it once ;)