Invisible Unique Building?

Firebug

Not-so Great Engineer
Joined
Sep 25, 2014
Messages
1,271
Location
Clevedon, England
How do we setup Artdefs for unique buildings? i just want my University replace to stay looking like the University for now, since we don't fully have a grasp on custom models yet, but it's just invisible.
 
I have bad news and worse news for you I'm afraid.

The bad news is that I can find zero mods that can reuse existing art for anything 3D except units, so there's nobody's work to copy from.

The worse news is what that suggests. Given the ingenuity and determination of the modding community I think it's fair to say that if it could be done someone would have done it by now, so it probably can't be done, at least not yet.

However, if there's anyone out there who's managed to do this then I would also very much like to know how please.
 
The bad news is that I can find zero mods that can reuse existing art for anything 3D except units, so there's nobody's work to copy from.

I have make one with Improvement.
If is the same, that's in mod art probably or the .artdef But i don't have read this at this time. For building in district the artdef have a building art and buildingchains and i don't know if we do add your building in. Maybe if you look the artdef for church of norway or the arabic, that's can help you
 
You should be able to reuse existing Icons from in game without having to touch an ArtDef file. Below you can see I'm reusing the Bank and Factory Icons. Ignore the MaxWorldInstances etc - these are just making the buildings single build. There is also other code that prevents a city building both a normal Bank and a Bank of England. This sort of makes them mini Civ specific wonders.


Code:
<PlayerItems>
        <Row CivilizationType="CIVILIZATION_UK" LeaderType="LEADER_QUEENVICTORIA" Type="BUILDING_BANKOFENGLAND" Icon="ICON_BUILDING_BANK" Name="LOC_BUILDING_BANKOFENGLAND_NAME" Description="LOC_BUILDING_BANKOFENGLAND_DESCRIPTION" SortIndex="30"/>
        <Row CivilizationType="CIVILIZATION_UK" LeaderType="LEADER_QUEENVICTORIA" Type="BUILDING_UKMILL" Icon="ICON_BUILDING_FACTORY" Name="LOC_BUILDING_UKMILL_NAME" Description="LOC_BUILDING_UKMILL_DESCRIPTION" SortIndex="40"/>
    </PlayerItems>

Code:
<Buildings>
        <Row BuildingType="BUILDING_BANKOFENGLAND" Name="LOC_BUILDING_BANKOFENGLAND_NAME" Description="LOC_BUILDING_BANKOFENGLAND_DESCRIPTION" PrereqTech="TECH_BANKING" PrereqDistrict="DISTRICT_COMMERCIAL_HUB" PurchaseYield="YIELD_GOLD" Cost="265" AdvisorType="ADVISOR_GENERIC" CitizenSlots="1" MaxWorldInstances="1" TraitType="TRAIT_CIVILIZATION_BUILDING_BANKOFENGLAND"/>
        <Row BuildingType="BUILDING_UKMILL" Name="LOC_BUILDING_UKMILL_NAME" Description="LOC_BUILDING_UKMILL_DESCRIPTION" PrereqTech="TECH_MASS_PRODUCTION" PrereqDistrict="DISTRICT_INDUSTRIAL_ZONE" PurchaseYield="YIELD_GOLD" Cost="250" AdvisorType="ADVISOR_GENERIC" Maintenance="2" RegionalRange="6"
       MaxWorldInstances="1" RequiresRiver="true" TraitType="TRAIT_CIVILIZATION_BUILDING_UKMILL"/>
    </Buildings>
 
You should be able to reuse existing Icons from in game without having to touch an ArtDef file. Below you can see I'm reusing the Bank and Factory Icons. Ignore the MaxWorldInstances etc - these are just making the buildings single build. There is also other code that prevents a city building both a normal Bank and a Bank of England. This sort of makes them mini Civ specific wonders.

And when you build your bank, she Appear in-game ? on field .. ?
 
Sorry I misread your post. To get it to appear in game you would also need an ArtDef entry. In theory the following should still work after the Summer Patch.
You should be able to take the Element tag you need from the games Buildings.artdef file. Which is I believe
Code:
<Element>
                        <m_CollectionName text="StrategicView"/>
                        <m_ReplaceMergedCollectionElements>false</m_ReplaceMergedCollectionElements>
                        <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"/>
                            <m_AppendMergedParameterCollections>false</m_AppendMergedParameterCollections>
                        </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"/>
                            <m_AppendMergedParameterCollections>false</m_AppendMergedParameterCollections>
                        </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"/>
                            <m_AppendMergedParameterCollections>false</m_AppendMergedParameterCollections>
                        </Element>
                    </Element>
                </m_ChildCollections>
                <m_Name text="BUILDING_BANK"/>
                <m_AppendMergedParameterCollections>false</m_AppendMergedParameterCollections>
            </Element>

The BUILDING_BANK part at the bottom you replace with your named building and it will look the same. I've done this with Units but in theory it's exactly the same. You will need to copy the correct structure of the Buildings.artdef file though. The Element tag that you are copying is embedded a few layers in.
 
I'm currently looking at the landmarks.artdef which seems to include some building stuff. I'm hoping that's the solution, especially considering the mod.art.xml doesn't include anywhere to reference the building.artdef but it does the landmarks one.
 
did uou have see the dlc modinfo dep .. Where the polish building artdef can be refere ?? sory that's just a suggestion, i don't know exactly if is thats ... maybe in citybuilding ...
maybe try
Spoiler ModArt sug :

Code:
...
        <Element>
            <consumerName text="StrategicView_Sprite"/>
            <relativeArtDefPaths>
                <Element text="Buildings.artdef"/>
                <Element text="StrategicView.artdef"/>
            </relativeArtDefPaths>
            <libraryDependencies>
                <Element text="StrategicView_Sprite"/>
                <Element text="StrategicView_DirectedAsset"/>
            </libraryDependencies>
            <loadsLibraries>true</loadsLibraries>
        </Element>
...
...
        <Element>
            <consumerName text="WorldView_Translate"/>
            <relativeArtDefPaths>
                <Element text="Buildings.artdef"/>
                <Element text="StrategicView.artdef"/>
            </relativeArtDefPaths>
            <libraryDependencies/>
            <loadsLibraries>false</loadsLibraries>
        </Element>
        <Element>
            <consumerName text="StrategicView_Translate"/>
            <relativeArtDefPaths>
                <Element text="Buildings.artdef"/>
                <Element text="StrategicView.artdef"/>
            </relativeArtDefPaths>
            <libraryDependencies/>
            <loadsLibraries>false</loadsLibraries>
        </Element>
...
 
Strategic View is for Strategic View, i can't see how that at all helps with the 3D model problem.
 
You should be able to copy the university elements from buildings.artdef found in pantry/artdefs folder.
Then rename BUILDING_UNIVERSITY to your building name.
There is a buildings.artdef in Poland DLC if you wan't to look at for reference.
 
I FIGURED IT OUT!

The way it's done is with both the buildingart.def and the landmarks.artdef.
This quick tutorial isn't going to be the best but the best way to learn is to load up the .artdefs from the pantry into asseteditor and just compare what you need to type in your own.

  • Create a buildings.artdef for your mod. You need to add a new element under both the buildings and the building chains tabs.
  • When you create the new element under Building, name it the same as you do in your files. For example i did BUILDING_FB_ROYAL_ACADEMY.
  • You don't need to worry about the audio section of your building but the Strategic View part is where you enter in the name of the icon you want your building to use while in Strategic View. I was making a University replacement so i copied that one. (The best way to know what you need to type in here is to load the buildings.artdef from the pantry into asseteditor and take a look at Firaxis' stuff)
  • You're already done with the Building section, so move onto BuildingChains. Here is where you need to make sure your building is linked to particular type of building. Again, take a look at the building.artdef from the pantry and copy the layout you need. I added my building to the ScienceBuildings element, and since it was a University replacement i added it to Buildings (Level 2).
  • Now it's time for the Landmarks.artdef, this is a bit more complex but you'll need to add an element for the district that your building is going to be put inside and then make the basevariants, the buildingvariants and the buildingsets. Again, look at the landmarks.artdef from the pantry and take a look at how firaxis did it.
  • You only need to reference the landmark.artdef once in your mod.art.xml for this to work, you don't need to reference the building.artdef at all.
 
I FIGURED IT OUT!

The way it's done is with both the buildingart.def and the landmarks.artdef.
This quick tutorial isn't going to be the best but the best way to learn is to load up the .artdefs from the pantry into asseteditor and just compare what you need to type in your own.
  • Create a buildings.artdef for your mod. You need to add a new element under both the buildings and the building chains tabs.
  • When you create the new element under Building, name it the same as you do in your files. For example i did BUILDING_FB_ROYAL_ACADEMY.
  • You don't need to worry about the audio section of your building but the Strategic View part is where you enter in the name of the icon you want your building to use while in Strategic View. I was making a University replacement so i copied that one. (The best way to know what you need to type in here is to load the buildings.artdef from the pantry into asseteditor and take a look at Firaxis' stuff)
  • You're already done with the Building section, so move onto BuildingChains. Here is where you need to make sure your building is linked to particular type of building. Again, take a look at the building.artdef from the pantry and copy the layout you need. I added my building to the ScienceBuildings element, and since it was a University replacement i added it to Buildings (Level 2).
  • Now it's time for the Landmarks.artdef, this is a bit more complex but you'll need to add an element for the district that your building is going to be put inside and then make the basevariants, the buildingvariants and the buildingsets. Again, look at the landmarks.artdef from the pantry and take a look at how firaxis did it.
  • You only need to reference the landmark.artdef once in your mod.art.xml for this to work, you don't need to reference the building.artdef at all.

Very interesting. This would be quite helpful if I could get my ModBuddy to actually create a .dep file for me to play with.
 
Mod.Art.xml is how you populate the .dep file, which is made when you build.

Have a Mod.Art.xml file. Input the information there (to my best knowledge). Clicked build, says "success". No *.dep file.
 
In your project properties you have to add "(Mod Art Dependency File)", one of the options, in two places, both of type UpdateArt, one under FrontEnd Actions and the other under In-Game Actions.

Done that. Still no *.dep after Building. I basically followed the steps outlined here.

P.S. If you also add "Mod.Art.xml" to the project properties that might cause problems. The builder doesn't like duplication.

Didn't do that, so no problem there. Only added (Mod Art Dependency File).
 
Back
Top Bottom