Resource modding

Okay so I'm at my wit's end and the search function isn't working for some reason, so please forgive if this has already been answered somewhere.

Right now I'm working on a sort of mini-mod, but I've run into a problem. I'm trying to create a building that will allow Kingdoms to construct their own Warg Kennels. I've already done the necessary Build and Complete tiles, I've added everything that should be needed into KingdomUnlimitedImprovements.xml, even going so far as to just copy and paste the Kennel improvement data from the Empire improvements xml. It doesn't work. It should, as far as I know, but it doesn't. Seems like the game is just spiting me for having the gall to change it.

My questions are as follows...

1: Is what I am trying to do even possible? Is there something preventing this kind of modification from working? I can't imagine what I'm trying to do is any different than having Empires and Kingdoms build different structures on any other resource.

2: I put the building tiles in Mods\Data\English\Core Tiles and the KingdomUnlimitedblahblah.xml into Mods\Data\English\Core Improvements just as they are located in the game directory. Is this wrong or even necessary?

3: The Wargs resource always display the text "Can't build: Building on this resource requires the technology "", which we don't currently have" even after I have researched Mounted Warfare. I suspect this means the problem may stem from not having the necessary "permission" from a tech to build on the tile. After an extensive search I still can't find where this might be fixed though. Thoughts?

3,245 views 4 replies
Reply #1 Top

What the .xml  file is called doesn't matter at all. It's the code inside that matters. You also didn't need to add it to an existing file if you didn't want to, you could put it in a new one named whatever. You don't have to put it into subfolders it works if you just drop the mod itself into the \mods folder.

C:\Users\default.default-PC\Documents\My Games\Elemental\Mods. Put the tiles in the tile subfolder etc.

As for it not working, make sure the internal name is different then the one for the actual warg kennel. Also get rid of this if it's still there:

    <Prereq>
      <Type>Tech</Type>
      <Attribute>Whatever_Amarian</Attribute>
      <Value>0</Value>
    </Prereq>

 

Try posting your code if you want more help.

 

Reply #2 Top

Here is the complete entry. I did not rename the InternalName. If I change that, do I have add a new Internal Name entry for the new structure in some other file? If not, then what is the purpose of the InternalName parameter?

<!-- ************ -->
<!-- ** Kennel ** -->
<!-- ************ -->
<ImprovementType InternalName="E_Kennel">
   <!-- Improvement Data -->
   <DisplayName>Kennel</DisplayName>
   <Description>Kennels can be built on Wild Wargs to provide 1 Warg every 4 seasons.</Description>
   <TileDesign>K_Kennel__01</TileDesign>
   <ConstructionTileDesign>K_Kennel_Build_01</ConstructionTileDesign>
   <SupportedTerrainType>Land</SupportedTerrainType>
   <SupportedTerrainType>City</SupportedTerrainType>
   <DrawnIcon>Gfx/TacticalIcons/E_Kennel1.png</DrawnIcon>
   <DrawnIconConstruction>Gfx/TacticalIcons/E_Kennel1_C.png</DrawnIconConstruction>
   <Thumbnail>Gfx/Medallions/F_Kennel_02_Thumb.png</Thumbnail>
<Medallions InternalName="">
<All>Gfx/Medallions/F_Kennel_02_Thumb.png</All>
<Border_All></Border_All>
</Medallions>

<!-- Prerequisites -->
   <RequiresCity>False</RequiresCity>
   <RequiresResource>True</RequiresResource>
   <SupportedResourceType>Wargs</SupportedResourceType>

<Prereq>
    <Type>Allegiance</Type>
    <Attribute>Kingdom</Attribute>
</Prereq>

<!-- Cost -->
   <LaborToBuild>1.0</LaborToBuild>

<GameModifier>
   <ModType>ConstructionResourceCost</ModType>
   <Attribute>Gold</Attribute>
   <Value>-50</Value>
   <PerTurn>0</PerTurn>
</GameModifier>

<!-- Production -->
<GameModifier>
   <ModType>Resource</ModType>
   <Attribute>Wargs</Attribute>
   <Value>0.25</Value>
   <PerTurn>1</PerTurn>
</GameModifier>

<GameModifier>
   <ModType>City</ModType>
   <Attribute>Unlock</Attribute>
   <Provides>Mounted Units</Provides>
   </GameModifier>

<!-- Base Improvement Modifiers -->
   <AIData AIPersonality="AI_General">
   <AITag>War</AITag>
   </AIData>
   </ImprovementType>

Reply #3 Top

Its basically just identifies the code. If you have two sections of code with the same internal name then it will not work right because one will partially override the other. This is your problem your code isn't making a new improvement it's overwriting parts of the old kennel. I think it will work if you change the internal name. I would suggest "K_Kennel" for Kingdom Kennel instead of E for Empire.

Reply #4 Top

Yup. That seems to have finally done it. Thanks a bunch and a banana!

I have a new problem now, though. The custom tile design isn't always showing up. Some games it will work perfectly, then I'll try another and I basically get an invisible building. It still works; I can select it, I get a steady influx of Wargs, and I can build units with them, but the tile itself looks totally empty.

Advice?