Reusing building artdefs?

thecrazyscot

Spiffy
Joined
Dec 27, 2012
Messages
2,460
Has anyone had any luck adding in a new building which uses existing artdefs?

For example, if I wanted to add in a new Mint building as an alternative to the Bank but have it's map model be the same, what would I do?

I've tried playing around with Buildings.artdef without any luck. I copied the Bank entries and just replaced BUILDING_BANK with BUILDING_MINT.

I tried playing around with Landmarks.artdef but there are so many different entries for Bank in there that I'm not really sure what to do. My edits just end up turning the entire map black. :(

It seems to me that you need to define the new building in Buildings.artdef and then add in new building sets in Landmarks.artdef (example below) as well as a new HeroBuildingTag.
Code:
<Element>
                            <m_Fields>
                                <m_Values>
                                    <Element class="AssetObjects::CollectionValue">
                                        <m_eObjectType>INVALID</m_eObjectType>
                                        <m_eValueType>ARTDEF_REF</m_eValueType>
                                        <m_Values>
                                            <Element class="AssetObjects::ArtDefReferenceValue">
                                                <m_ElementName text="BUILDING_MARKET"/>
                                                <m_RootCollectionName text="HeroBuildingTags"/>
                                                <m_ArtDefPath text="Landmarks.artdef"/>
                                                <m_CollectionIsLocked>true</m_CollectionIsLocked>
                                                <m_TemplateName text=""/>
                                                <m_ParamName text="Set"/>
                                            </Element>
                                            <Element class="AssetObjects::ArtDefReferenceValue">
                                                <m_ElementName text="BUILDING_BANK"/>
                                                <m_RootCollectionName text="HeroBuildingTags"/>
                                                <m_ArtDefPath text="Landmarks.artdef"/>
                                                <m_CollectionIsLocked>true</m_CollectionIsLocked>
                                                <m_TemplateName text=""/>
                                                <m_ParamName text="Set_1"/>
                                            </Element>
                                            <Element class="AssetObjects::ArtDefReferenceValue">
                                                <m_ElementName text="BUILDING_STOCK_EXCHANGE"/>
                                                <m_RootCollectionName text="HeroBuildingTags"/>
                                                <m_ArtDefPath text="Landmarks.artdef"/>
                                                <m_CollectionIsLocked>true</m_CollectionIsLocked>
                                                <m_TemplateName text=""/>
                                                <m_ParamName text="Set_2"/>
                                            </Element>
                                        </m_Values>
                                        <m_ParamName text="Set"/>
                                    </Element>
                                </m_Values>
                            </m_Fields>
                            <m_ChildCollections/>
                            <m_Name text="MARKET, BANK, STOCK_EXCHANGE"/>
                        </Element>
If I'm simply wanting to duplicate a building's artdefs, are all those necessary?

Any help would be appreciated.
 
This code duplicates the Market, Bank and Stock Exchange. I use it for other buildings in a new district. It goes in a new xml withe the files accosiation changed to .artdef (Although I forgot to change the extention first time round and it still worked as .xml):
Code:
<?xml version="1.0" encoding="UTF-8" ?>
<AssetObjects::ArtDefSet>
   <m_Version>
       <major>3</major>
       <minor>0</minor>
       <build>220</build>
       <revision>998</revision>
   </m_Version>
   <m_TemplateName text="Buildings"/>
   <m_RootCollections>
       <Element>
           <m_CollectionName text="Building"/>
           <Element>
               <m_Fields>
                   <m_Values>
                       <Element class="AssetObjects::BoolValue">
                           <m_bValue>false</m_bValue>
                           <m_ParamName text="CanAffectDistrict"/>
                       </Element>
                       <Element class="AssetObjects::BoolValue">
                           <m_bValue>false</m_bValue>
                           <m_ParamName text="IsAffectedByDistrict"/>
                       </Element>
                   </m_Values>
               </m_Fields>
               <m_ChildCollections>
                   <Element>
                       <m_CollectionName text="Audio"/>
                   </Element>
                   <Element>
                       <m_CollectionName text="StrategicView"/>
                       <Element>
                           <m_Fields>
                               <m_Values>
                                   <Element class="AssetObjects::ArtDefReferenceValue">
                                       <m_ElementName text="Market"/>
                                       <m_RootCollectionName text="Buildings"/>
                                       <m_ArtDefPath text="StrategicView.artdef"/>
                                       <m_CollectionIsLocked>false</m_CollectionIsLocked>
                                       <m_TemplateName text="StrategicView"/>
                                       <m_ParamName text="XrefName"/>
                                   </Element>
                                   <Element class="AssetObjects::ArtDefReferenceValue">
                                       <m_ElementName text="Completed"/>
                                       <m_RootCollectionName text="BuildStates"/>
                                       <m_ArtDefPath text="Buildings.artdef"/>
                                       <m_CollectionIsLocked>true</m_CollectionIsLocked>
                                       <m_TemplateName text="Buildings"/>
                                       <m_ParamName text="State"/>
                                   </Element>
                               </m_Values>
                           </m_Fields>
                           <m_ChildCollections/>
                           <m_Name text="StrategicView001"/>
                       </Element>
                       <Element>
                           <m_Fields>
                               <m_Values>
                                   <Element class="AssetObjects::ArtDefReferenceValue">
                                       <m_ElementName text="Market_Pillaged"/>
                                       <m_RootCollectionName text="Buildings"/>
                                       <m_ArtDefPath text="StrategicView.artdef"/>
                                       <m_CollectionIsLocked>false</m_CollectionIsLocked>
                                       <m_TemplateName text="StrategicView"/>
                                       <m_ParamName text="XrefName"/>
                                   </Element>
                                   <Element class="AssetObjects::ArtDefReferenceValue">
                                       <m_ElementName text="Pillaged"/>
                                       <m_RootCollectionName text="BuildStates"/>
                                       <m_ArtDefPath text="Buildings.artdef"/>
                                       <m_CollectionIsLocked>true</m_CollectionIsLocked>
                                       <m_TemplateName text="Buildings"/>
                                       <m_ParamName text="State"/>
                                   </Element>
                               </m_Values>
                           </m_Fields>
                           <m_ChildCollections/>
                           <m_Name text="StrategicView002"/>
                       </Element>
                       <Element>
                           <m_Fields>
                               <m_Values>
                                   <Element class="AssetObjects::ArtDefReferenceValue">
                                       <m_ElementName text="Market_UnderConstruction"/>
                                       <m_RootCollectionName text="Buildings"/>
                                       <m_ArtDefPath text="StrategicView.artdef"/>
                                       <m_CollectionIsLocked>false</m_CollectionIsLocked>
                                       <m_TemplateName text="StrategicView"/>
                                       <m_ParamName text="XrefName"/>
                                   </Element>
                                   <Element class="AssetObjects::ArtDefReferenceValue">
                                       <m_ElementName text="UnderConstruction"/>
                                       <m_RootCollectionName text="BuildStates"/>
                                       <m_ArtDefPath text="Buildings.artdef"/>
                                       <m_CollectionIsLocked>true</m_CollectionIsLocked>
                                       <m_TemplateName text="Buildings"/>
                                       <m_ParamName text="State"/>
                                   </Element>
                               </m_Values>
                           </m_Fields>
                           <m_ChildCollections/>
                           <m_Name text="StrategicView003"/>
                       </Element>
                   </Element>
               </m_ChildCollections>
               <m_Name text="BUILDING_HERBALIST"/>
           </Element>
           <Element>
               <m_Fields>
                   <m_Values>
                       <Element class="AssetObjects::BoolValue">
                           <m_bValue>false</m_bValue>
                           <m_ParamName text="CanAffectDistrict"/>
                       </Element>
                       <Element class="AssetObjects::BoolValue">
                           <m_bValue>false</m_bValue>
                           <m_ParamName text="IsAffectedByDistrict"/>
                       </Element>
                   </m_Values>
               </m_Fields>
               <m_ChildCollections>
                   <Element>
                       <m_CollectionName text="Audio"/>
                   </Element>
                   <Element>
                       <m_CollectionName text="StrategicView"/>
                       <Element>
                           <m_Fields>
                               <m_Values>
                                   <Element class="AssetObjects::ArtDefReferenceValue">
                                       <m_ElementName text="Bank"/>
                                       <m_RootCollectionName text="Buildings"/>
                                       <m_ArtDefPath text="StrategicView.artdef"/>
                                       <m_CollectionIsLocked>false</m_CollectionIsLocked>
                                       <m_TemplateName text="StrategicView"/>
                                       <m_ParamName text="XrefName"/>
                                   </Element>
                                   <Element class="AssetObjects::ArtDefReferenceValue">
                                       <m_ElementName text="Completed"/>
                                       <m_RootCollectionName text="BuildStates"/>
                                       <m_ArtDefPath text="Buildings.artdef"/>
                                       <m_CollectionIsLocked>true</m_CollectionIsLocked>
                                       <m_TemplateName text="Buildings"/>
                                       <m_ParamName text="State"/>
                                   </Element>
                               </m_Values>
                           </m_Fields>
                           <m_ChildCollections/>
                           <m_Name text="StrategicView001"/>
                       </Element>
                       <Element>
                           <m_Fields>
                               <m_Values>
                                   <Element class="AssetObjects::ArtDefReferenceValue">
                                       <m_ElementName text="Bank_UnderConstruction"/>
                                       <m_RootCollectionName text="Buildings"/>
                                       <m_ArtDefPath text="StrategicView.artdef"/>
                                       <m_CollectionIsLocked>false</m_CollectionIsLocked>
                                       <m_TemplateName text="StrategicView"/>
                                       <m_ParamName text="XrefName"/>
                                   </Element>
                                   <Element class="AssetObjects::ArtDefReferenceValue">
                                       <m_ElementName text="UnderConstruction"/>
                                       <m_RootCollectionName text="BuildStates"/>
                                       <m_ArtDefPath text="Buildings.artdef"/>
                                       <m_CollectionIsLocked>true</m_CollectionIsLocked>
                                       <m_TemplateName text="Buildings"/>
                                       <m_ParamName text="State"/>
                                   </Element>
                               </m_Values>
                           </m_Fields>
                           <m_ChildCollections/>
                           <m_Name text="StrategicView002"/>
                       </Element>
                       <Element>
                           <m_Fields>
                               <m_Values>
                                   <Element class="AssetObjects::ArtDefReferenceValue">
                                       <m_ElementName text="Bank_Pillaged"/>
                                       <m_RootCollectionName text="Buildings"/>
                                       <m_ArtDefPath text="StrategicView.artdef"/>
                                       <m_CollectionIsLocked>false</m_CollectionIsLocked>
                                       <m_TemplateName text="StrategicView"/>
                                       <m_ParamName text="XrefName"/>
                                   </Element>
                                   <Element class="AssetObjects::ArtDefReferenceValue">
                                       <m_ElementName text="Pillaged"/>
                                       <m_RootCollectionName text="BuildStates"/>
                                       <m_ArtDefPath text="Buildings.artdef"/>
                                       <m_CollectionIsLocked>true</m_CollectionIsLocked>
                                       <m_TemplateName text="Buildings"/>
                                       <m_ParamName text="State"/>
                                   </Element>
                               </m_Values>
                           </m_Fields>
                           <m_ChildCollections/>
                           <m_Name text="StrategicView003"/>
                       </Element>
                   </Element>
               </m_ChildCollections>
               <m_Name text="BUILDING_TAILOR"/>
           </Element>
           <Element>
               <m_Fields>
                   <m_Values>
                       <Element class="AssetObjects::BoolValue">
                           <m_bValue>false</m_bValue>
                           <m_ParamName text="CanAffectDistrict"/>
                       </Element>
                       <Element class="AssetObjects::BoolValue">
                           <m_bValue>false</m_bValue>
                           <m_ParamName text="IsAffectedByDistrict"/>
                       </Element>
                   </m_Values>
               </m_Fields>
               <m_ChildCollections>
                   <Element>
                       <m_CollectionName text="Audio"/>
                   </Element>
                   <Element>
                       <m_CollectionName text="StrategicView"/>
                       <Element>
                           <m_Fields>
                               <m_Values>
                                   <Element class="AssetObjects::ArtDefReferenceValue">
                                       <m_ElementName text="StockExchange"/>
                                       <m_RootCollectionName text="Buildings"/>
                                       <m_ArtDefPath text="StrategicView.artdef"/>
                                       <m_CollectionIsLocked>false</m_CollectionIsLocked>
                                       <m_TemplateName text="StrategicView"/>
                                       <m_ParamName text="XrefName"/>
                                   </Element>
                                   <Element class="AssetObjects::ArtDefReferenceValue">
                                       <m_ElementName text="Completed"/>
                                       <m_RootCollectionName text="BuildStates"/>
                                       <m_ArtDefPath text="Buildings.artdef"/>
                                       <m_CollectionIsLocked>true</m_CollectionIsLocked>
                                       <m_TemplateName text="Buildings"/>
                                       <m_ParamName text="State"/>
                                   </Element>
                               </m_Values>
                           </m_Fields>
                           <m_ChildCollections/>
                           <m_Name text="StrategicView001"/>
                       </Element>
                       <Element>
                           <m_Fields>
                               <m_Values>
                                   <Element class="AssetObjects::ArtDefReferenceValue">
                                       <m_ElementName text="StockExchange_Pillaged"/>
                                       <m_RootCollectionName text="Buildings"/>
                                       <m_ArtDefPath text="StrategicView.artdef"/>
                                       <m_CollectionIsLocked>false</m_CollectionIsLocked>
                                       <m_TemplateName text="StrategicView"/>
                                       <m_ParamName text="XrefName"/>
                                   </Element>
                                   <Element class="AssetObjects::ArtDefReferenceValue">
                                       <m_ElementName text="Pillaged"/>
                                       <m_RootCollectionName text="BuildStates"/>
                                       <m_ArtDefPath text="Buildings.artdef"/>
                                       <m_CollectionIsLocked>true</m_CollectionIsLocked>
                                       <m_TemplateName text="Buildings"/>
                                       <m_ParamName text="State"/>
                                   </Element>
                               </m_Values>
                           </m_Fields>
                           <m_ChildCollections/>
                           <m_Name text="StrategicView002"/>
                       </Element>
                       <Element>
                           <m_Fields>
                               <m_Values>
                                   <Element class="AssetObjects::ArtDefReferenceValue">
                                       <m_ElementName text="StockExchange_UnderConstruction"/>
                                       <m_RootCollectionName text="Buildings"/>
                                       <m_ArtDefPath text="StrategicView.artdef"/>
                                       <m_CollectionIsLocked>false</m_CollectionIsLocked>
                                       <m_TemplateName text="StrategicView"/>
                                       <m_ParamName text="XrefName"/>
                                   </Element>
                                   <Element class="AssetObjects::ArtDefReferenceValue">
                                       <m_ElementName text="UnderConstruction"/>
                                       <m_RootCollectionName text="BuildStates"/>
                                       <m_ArtDefPath text="Buildings.artdef"/>
                                       <m_CollectionIsLocked>true</m_CollectionIsLocked>
                                       <m_TemplateName text="Buildings"/>
                                       <m_ParamName text="State"/>
                                   </Element>
                               </m_Values>
                           </m_Fields>
                           <m_ChildCollections/>
                           <m_Name text="StrategicView003"/>
                       </Element>
                   </Element>
               </m_ChildCollections>
               <m_Name text="BUILDING_PUB"/>
           </Element>
       </Element>
       <Element>
           <m_CollectionName text="BuildingChains"/>
           <Element>
               <m_Fields>
                   <m_Values>
                       <Element class="AssetObjects::CollectionValue">
                           <m_eObjectType>INVALID</m_eObjectType>
                           <m_eValueType>ARTDEF_REF</m_eValueType>
                           <m_Values>
                               <Element class="AssetObjects::ArtDefReferenceValue">
                                   <m_ElementName text="DISTRICT_SHOPPING_COMPLEX"/>
                                   <m_RootCollectionName text="District"/>
                                   <m_ArtDefPath text="Districts.artdef"/>
                                   <m_CollectionIsLocked>true</m_CollectionIsLocked>
                                   <m_TemplateName text="Districts"/>
                                   <m_ParamName text="Districts001"/>
                               </Element>
                               <Element class="AssetObjects::ArtDefReferenceValue">
                                   <m_ElementName text="DISTRICT_SOUQ"/>
                                   <m_RootCollectionName text="District"/>
                                   <m_ArtDefPath text="Districts.artdef"/>
                                   <m_CollectionIsLocked>true</m_CollectionIsLocked>
                                   <m_TemplateName text="Districts"/>
                                   <m_ParamName text="Districts002"/>
                               </Element>
                           </m_Values>
                           <m_ParamName text="Districts"/>
                       </Element>
                       <Element class="AssetObjects::CollectionValue">
                           <m_eObjectType>INVALID</m_eObjectType>
                           <m_eValueType>ARTDEF_REF</m_eValueType>
                           <m_Values>
                               <Element class="AssetObjects::ArtDefReferenceValue">
                                   <m_ElementName text="BUILDING_HERBALIST"/>
                                   <m_RootCollectionName text="Building"/>
                                   <m_ArtDefPath text="Buildings.artdef"/>
                                   <m_CollectionIsLocked>true</m_CollectionIsLocked>
                                   <m_TemplateName text="Buildings"/>
                                   <m_ParamName text="Buildings (Level 1)001"/>
                               </Element>
                           </m_Values>
                           <m_ParamName text="Buildings (Level 1)"/>
                       </Element>
                       <Element class="AssetObjects::CollectionValue">
                           <m_eObjectType>INVALID</m_eObjectType>
                           <m_eValueType>ARTDEF_REF</m_eValueType>
                           <m_Values>
                               <Element class="AssetObjects::ArtDefReferenceValue">
                                   <m_ElementName text="BUILDING_TAILOR"/>
                                   <m_RootCollectionName text="Building"/>
                                   <m_ArtDefPath text="Buildings.artdef"/>
                                   <m_CollectionIsLocked>true</m_CollectionIsLocked>
                                   <m_TemplateName text="Buildings"/>
                                   <m_ParamName text="Buildings (Level 2)001"/>
                               </Element>
                           </m_Values>
                           <m_ParamName text="Buildings (Level 2)"/>
                       </Element>
                       <Element class="AssetObjects::CollectionValue">
                           <m_eObjectType>INVALID</m_eObjectType>
                           <m_eValueType>ARTDEF_REF</m_eValueType>
                           <m_Values>
                               <Element class="AssetObjects::ArtDefReferenceValue">
                                   <m_ElementName text="BUILDING_PUB"/>
                                   <m_RootCollectionName text="Building"/>
                                   <m_ArtDefPath text="Buildings.artdef"/>
                                   <m_CollectionIsLocked>true</m_CollectionIsLocked>
                                   <m_TemplateName text="Buildings"/>
                                   <m_ParamName text="Buildings (Level 3)001"/>
                               </Element>
                           </m_Values>
                           <m_ParamName text="Buildings (Level 3)"/>
                       </Element>
                   </m_Values>
               </m_Fields>
               <m_ChildCollections/>
               <m_Name text="MerchantBuildings"/>
           </Element>
       </Element>
   </m_RootCollections>
</AssetObjects::ArtDefSet>
Then you need to eidt the Civ6.dep file, I included a copy of the file for you to have a look at, search for Buildings_HS.
 

Attachments

  • Civ6.rar
    2.7 KB · Views: 38
You only need to add to landmarks if you want it to show up in a district. You can not mix and match buildings unless they are the EXACT same size. The Plot size in the district is pre set. And Yes it is all required. See file included. (Had to do 2 posts due to character limit lol)
 

Attachments

  • ArtDefs.rar
    2.5 KB · Views: 41
Top Bottom