Need help with new building icon

Salmo

Chieftain
Joined
Oct 24, 2016
Messages
64
I have a new building that has the required tech's etc & shows up in game OK. Now I'm trying to alloctae a new icon for the building, but can't figure it out. Below is my modinfo & releven parts of the XML file . Help appreciated.

<?xml version="1.0" encoding="utf-8"?>
<Mod id="2d809ce4-3871-461f-8140-bc554ff080ba" version="1">
<Properties>
<Name>MyBuilding</Name>
<Description>Wooden stake wall around the city</Description>
<Teaser>My teaser here</Teaser>
<Authors>Salmo.</Authors>
</Properties>
<FrontEndActions>
<ImportFiles id="ImportArt">
<File>Art/ToT_BuildingAtlas_A_128.dds</File>
<File>Art/ToT_BuildingAtlas_A_256.dds</File>
<File>Art/ToT_BuildingAtlas_A_256_FOW.dds</File>
<File>Art/ToT_BuildingAtlas_A_32.dds</File>
<File>Art/ToT_BuildingAtlas_A_38.dds</File>
<File>Art/ToT_BuildingAtlas_A_50.dds</File>
<File>Art/ToT_BuildingAtlas_A_80.dds</File>
</ImportFiles>
</FrontEndActions>
<InGameActions>
<UpdateDatabase id="Gameplay">
<File>NewBuilding_Gameplay.xml</File>
</UpdateDatabase>
<UpdateIcons id="Icons">
<File>NewBuilding_Icons.xml</File>
</UpdateIcons>
<UpdateText id="Text">
<File>NewBuilding_Text.xml</File>
</UpdateText>
</InGameActions>
<Files>
<File>Art/ToT_BuildingAtlas_A_128.dds</File>
<File>Art/ToT_BuildingAtlas_A_256.dds</File>
<File>Art/ToT_BuildingAtlas_A_256_FOW.dds</File>
<File>Art/ToT_BuildingAtlas_A_32.dds</File>
<File>Art/ToT_BuildingAtlas_A_38.dds</File>
<File>Art/ToT_BuildingAtlas_A_50.dds</File>
<File>Art/ToT_BuildingAtlas_A_80.dds</File>
<File>MyBuilding_Gameplay.xml</File>
<File>MyBuilding_Icons.xml</File>
<File>MyBuilding_Text.xml</File>
</Files>
</Mod>

<?xml version="1.0" encoding="utf-8"?>
<GameInfo>
<IconTextureAtlases>
<Row Name="ICON_SA_ATLAS" IconSize="32" IconsPerRow="8" IconsPerColumn="8" Filename="ToT_BuildingAtlas_A_32.dds"/>
<Row Name="ICON_SA_ATLAS" IconSize="38" IconsPerRow="8" IconsPerColumn="8" Filename="ToT_BuildingAtlas_A_38.dds"/>
<Row Name="ICON_SA_ATLAS" IconSize="50" IconsPerRow="8" IconsPerColumn="8" Filename="ToT_BuildingAtlas_A_50.dds"/>
<Row Name="ICON_SA_ATLAS" IconSize="80" IconsPerRow="8" IconsPerColumn="8" Filename="ToT_BuildingAtlas_A_80.dds"/>
<Row Name="ICON_SA_ATLAS" IconSize="128" IconsPerRow="8" IconsPerColumn="8" Filename="ToT_BuildingAtlas_A_128.dds"/>
<Row Name="ICON_SA_ATLAS" IconSize="256" IconsPerRow="8" IconsPerColumn="8" Filename="ToT_BuildingAtlas_A_256.dds"/>
<Row Name="ICON_SA_ATLAS_FOW" IconSize="256" IconsPerRow="8" IconsPerColumn="8" Filename="ToT_BuildingAtlas_A_256_FOW.dds"/>
</IconTextureAtlases>

<IconDefinitions>
<Row Name="ICON_BUILDING_MYBUILDING"
Atlas="ICON_SA_ATLAS"
Index="16"/>
</IconDefinitions>
</GameInfo>
 
Yes MYBUILDING. So the ganmedata XML is ....

<?xml version="1.0" encoding="utf-8" ?>
<GameData>
<Types>
<Row Type="BUILDING_MYBUILDING" Kind="KIND_BUILDING" />
</Types>
<Buildings>
<Row
BuildingType="BUILDING_MYBUILDING"
Name="LOC_BUILDING_MYBUILDING_NAME"
PrereqTech="TECH_POTTERY"
PrereqDistrict="DISTRICT_CITY_CENTER"
Description="LOC_BUILDING_MYBUILDING_DESCRIPTION"
Housing="0"
Entertainment="0"
PurchaseYield="YIELD_GOLD"
Maintenance="1"
Cost="60"
AdvisorType="ADVISOR_GENERIC"
OuterDefenseHitPoints="10"
OuterDefenseStrength="1"
ObsoleteEra="NO_ERA" />
</GameData>
 
Yes MYBUILDING. So the GameData XML is ....

<?xml version="1.0" encoding="utf-8" ?>
<GameData>
<Types>
<Row Type="BUILDING_MYBUILDING" Kind="KIND_BUILDING" />
</Types>
<Buildings>
<Row
BuildingType="BUILDING_MYBUILDING"
Name="LOC_BUILDING_MYBUILDING_NAME"
PrereqTech="TECH_POTTERY"
PrereqDistrict="DISTRICT_CITY_CENTER"
Description="LOC_BUILDING_MYBUILDING_DESCRIPTION"
Housing="0"
Entertainment="0"
PurchaseYield="YIELD_GOLD"
Maintenance="1"
Cost="60"
AdvisorType="ADVISOR_GENERIC"
OuterDefenseHitPoints="10"
OuterDefenseStrength="1"
ObsoleteEra="NO_ERA" />
</GameData>
 
I do this <ImportFiles id="ImportArt"> under <InGameActions> rather than <FrontEndActions>. If you aren't trying to make the building a unique replacement for anything you won't need it to show in the "Front End" (ie, game set-up menus) anyway.

If you are trying to make the building have a 3d in-game model that shows on the game map, then things get a lot more complicated.
 
Thanks LeeS, but that didn;t seem to work.

<?xml version="1.0" encoding="utf-8"?>
<Mod id="2d809ce4-3871-461f-8140-bc554ff080ba" version="1">
<Properties>
<Name>Palisade Walls</Name>
<Description>Wooden stake wall around the city</Description>
<Teaser>Wooden stake wall around the city</Teaser>
<Authors>Salmo.</Authors>
</Properties>
<FrontEndActions />
<InGameActions>
<UpdateDatabase id="Gameplay">
<File>NewBuilding_Gameplay.xml</File>
</UpdateDatabase>
<UpdateIcons id="Icons">
<File>NewBuilding_Icons.xml</File>
</UpdateIcons>
<UpdateText id="Text">
<File>NewBuilding_Text.xml</File>
</UpdateText>
<ImportFiles id="NewAction">
<File>Art/ToT_BuildingAtlas_A_128.dds</File>
<File>Art/ToT_BuildingAtlas_A_256.dds</File>
<File>Art/ToT_BuildingAtlas_A_256_FOW.dds</File>
<File>Art/ToT_BuildingAtlas_A_32.dds</File>
<File>Art/ToT_BuildingAtlas_A_38.dds</File>
<File>Art/ToT_BuildingAtlas_A_50.dds</File>
<File>Art/ToT_BuildingAtlas_A_80.dds</File>
</ImportFiles>
</InGameActions>
<Files>
<File>Art/ToT_BuildingAtlas_A_128.dds</File>
<File>Art/ToT_BuildingAtlas_A_256.dds</File>
<File>Art/ToT_BuildingAtlas_A_256_FOW.dds</File>
<File>Art/ToT_BuildingAtlas_A_32.dds</File>
<File>Art/ToT_BuildingAtlas_A_38.dds</File>
<File>Art/ToT_BuildingAtlas_A_50.dds</File>
<File>Art/ToT_BuildingAtlas_A_80.dds</File>
<File>PalisadeWalls_Gameplay.xml</File>
<File>PalisadeWalls_Icons.xml</File>
<File>PalisadeWalls_Text.xml</File>
</Files>
</Mod>
 
zip and attach the actual mod to a forum post, or upload to dropbox, etc, and link where the mod can be downloaded. Zip what is in the game's MODS folder rather than what is in the FiraxisModBuddy location (boilerplate instructions):

Add Your Mod to A Forum Post (Civ6):
  1. It's better to just take the mod from the game's MODS folder, zip it, and attach the result directly to a post. It is far easier to look at your actual code and the actual structure of the mod as it is being seen by the game than any attempt to determine what you are doing wrong by analyzing descriptions of the problem, or out-of-context snippets of the code.
  2. Very often what a new modder thinks the problem is and what the problem actually is are two different things. Having the actual mod as you are currently trying to use it allows us to look for the actual problem, and if all else fails to simply drop the mis-behaving mod into our MODS folder and run the mod to see what the game tells us.
  3. Zip the version of the mod the game is actually trying to use, which will be found as a sub-folder in ~\Documents\My Games\Sid Meier's Civilization VI\Mods. Zip the whole sub-folder for your mod.
  4. To attach the zip to a forum post, look for a button called Upload A File when composing your thread reply: this button opens a browse menu where you can select the zipped folder to attach directly to a forum post.
  5. If the zipped folder is too large for the forum to accept then upload the zipped mod to a file-sharing site such as dropbox and provide a link where the mod can be downloaded.
    • Mediafire is not really a very good choice any more because they have become rife with spam and malware, as well as attempts to get you to download unwanted and uneeded kludge by confusing the layout of the download pages. You'll note for example that Mediafire links are no longer allowed on Steam, whereas CFC (this site) and dropbox links are still allowed.
 
Problem is in your modinfo file:
Code:
    <UpdateDatabase id="Gameplay">
      <File>NewBuilding_Gameplay.xml</File>
    </UpdateDatabase>
    <UpdateIcons id="Icons">
      <File>NewBuilding_Icons.xml</File>
    </UpdateIcons>
    <UpdateText id="Text">
      <File>NewBuilding_Text.xml</File>
    </UpdateText>
Whereas you have these files listed as legitimate files for the mod:
Code:
  <Files>
    <File>Art/ToT_BuildingAtlas_A_128.dds</File>
    <File>Art/ToT_BuildingAtlas_A_256.dds</File>
    <File>Art/ToT_BuildingAtlas_A_256_FOW.dds</File>
    <File>Art/ToT_BuildingAtlas_A_32.dds</File>
    <File>Art/ToT_BuildingAtlas_A_38.dds</File>
    <File>Art/ToT_BuildingAtlas_A_50.dds</File>
    <File>Art/ToT_BuildingAtlas_A_80.dds</File>
    <File>PalisadeWalls_Gameplay.xml</File>
    <File>PalisadeWalls_Icons.xml</File>
    <File>PalisadeWalls_Text.xml</File>
  </Files>
You might also have errors making the dds files, but until you fix the name mis-match in your modinfo file there is no way you will ever be able to tell.
 
That did the trick. I appreciate your assistance LeeS. Seems that modbuddy does not automatically rename the default building names in the In-Game action boxes when you rename the files in the solution explorer pane.
 
Back
Top Bottom