1. We have added a Gift Upgrades feature that allows you to gift an account upgrade to another member, just in time for the holiday season. You can see the gift option when going to the Account Upgrades screen, or on any user profile screen.
    Dismiss Notice

[Almost solved] Make a building appear in district - ALMOST WORKS, but it sinks into the ground

Discussion in 'Mod Creation Help' started by Deon, Nov 27, 2017.

  1. Deon

    Deon Lt. of Mordor

    Joined:
    Jan 13, 2008
    Messages:
    2,954
    Location:
    St.Petersburg, Russian Federation
    Hello dear friends.

    I tried to browse old threads and review online examples of mods, but I really struggle to make Modbuddy create my mod in a way I want it:
    - I made a replacement for Art Museum, Concert Hall.
    - All ingame parameters and icon work fine.

    However I seem to be unable to reference it properly to display the art of the BUILDING_MUSEUM_ART, so it currently is invisible.

    I have uploaded the mod to the workshop with a notice to those who dislike invisible buildings:
    http://steamcommunity.com/sharedfiles/filedetails/?id=1214326139

    I would love to figure out how to do it properly.

    Here's what I tried:

    1) Used default Mod.Art.xml which came with "New building" basic project.
    2) Created Buildings.artdef in the default project folder.
    3) In Project settings added FrontEnd Actions and In-Game Actions with type UpdateArt and file (Mod Art Dependency File).
    4) Cut out everything from default Buildings.artdef besides the BUILDING_MUSEUM_ART entry, and renamed it to BUILDING_CONCERT_HALL.

    Besides following what seems to be a correct order, .dep file is not generated and my building is still invisible.
    I was sitting up to 6 AM trying to make it work and I am ready to give up...
    It is a bit weird that it is easier for me to make my own game in Unity 5 than to figure out this :D.

    But I don't want to give up, because I want to return to my Model making and create models for CIV6.

    If anyone can assist me, I would be glad!
     
  2. Deon

    Deon Lt. of Mordor

    Joined:
    Jan 13, 2008
    Messages:
    2,954
    Location:
    St.Petersburg, Russian Federation
    Okay, I think I ALMOST did it right.
    I also needed three more things:
    1) To create Landmarks.artdef with all combinations of Amphitheater, Concert Hall and Broadcast Tower/Film Studio
    + Fill it with a LOT of tedious copypasting from existing Landmarks.artdef for THEATER district, replacing BUILDING_MUSEUM_ARTIFACT with BUILDING_CONCERNT_HALL, as well as MUSEUM_NAT in case of combinations in the district.
    + Do not forget Acropolis
    2) To add both buildings.artdef and landmarks.artdef to the project.
    3) To modify Mod.art.xml and mention artdefs there properly.

    Now the building appears in game! Hurray! But it sinks into the ground (screenshot attached)...

    I am almost there guys :). Can someone advise me on which parameter reflects the "height" of the model above the ground? Did I miss something again?
     

    Attached Files:

  3. Magil

    Magil Monarch

    Joined:
    Sep 26, 2010
    Messages:
    1,606
    I'm also having this issue when trying to update my old mod to the new patch. I'll keep hacking away at it and see if I can figure anything out.
     
  4. Deliverator

    Deliverator Graphical Hackificator

    Joined:
    Feb 12, 2008
    Messages:
    4,049
    Location:
    London, UK
    Perhaps just adjust the Z-axis coordinates of your attachment point? Not sure.
     
  5. kingchris20

    kingchris20 Wisdom Seeker

    Joined:
    Jul 30, 2012
    Messages:
    1,331
    Location:
    Resident of Heaven; Currently in the Waiting Room
    Did you ever find a solution for this?

    I am trying to do the same thing with a barracks replacement, but it is sunken into the ground. and I cannot find in Buildings.artdef nor Landmarks.artdef anywhere that references a Z-axis coordinate.
     
  6. Deon

    Deon Lt. of Mordor

    Joined:
    Jan 13, 2008
    Messages:
    2,954
    Location:
    St.Petersburg, Russian Federation
    Unfortunately not.

    @Deliverator Thank you for trying to help, but I don't see anything like what you mentioned in the defines above. To be precize, I am not making a new model, I am reusing existing ones and simply create a rule to place the building in the district.

    I wonder if the modding is that dead at this point, that such a trivial thing as adding a building model for districts is now unknown to community... Which is sad and kind of turns off the desire to mod.
     
  7. Deliverator

    Deliverator Graphical Hackificator

    Joined:
    Feb 12, 2008
    Messages:
    4,049
    Location:
    London, UK
    I understand that. I believe it is possible to edit the position of the Attachment Points to do what you want but I have done it myself.

    It's not that it's unknown to the community it's just that the most active and knowledgeable members of the modding community have effectively left Civfanatics for Discord.

    If you look at this Mayan District from the recent Maya mod you can see that modders are adding new buildings and combining existing assets into new ones.

    The Artdefines in general are quite complex and not the most accessible part of Civ 6 modding. Units are much easier than Buildings and Districts which are particularly complicated.
     
  8. Magil

    Magil Monarch

    Joined:
    Sep 26, 2010
    Messages:
    1,606
    What I found out in regards to buildings sinking into the ground was in creating artdef files using the Firaxis mod tools was inserting duplicate lines into some of the BuildingSet entires in Landmarks.artdef and I had to go into the file and manually delete them. Take this for example:

    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_MZ_OBELISK"/>
                                                   <m_RootCollectionName text="Building"/>
                                                   <m_ArtDefPath text="Buildings.artdef"/>
                                                   <m_CollectionIsLocked>true</m_CollectionIsLocked>
                                                   <m_TemplateName text="Buildings"/>
                                                   <m_ParamName text="Set001"/>
                                               </Element>
                                               <Element class="AssetObjects..ArtDefReferenceValue">
                                                   <m_ElementName text="BUILDING_TEMPLE"/>
                                                   <m_RootCollectionName text="Building"/>
                                                   <m_ArtDefPath text="Buildings.artdef"/>
                                                   <m_CollectionIsLocked>true</m_CollectionIsLocked>
                                                   <m_TemplateName text="Buildings"/>
                                                   <m_ParamName text="Set002"/>
                                               </Element>
                                               <Element class="AssetObjects..ArtDefReferenceValue">
                                                   <m_ElementName text="BUILDING_CATHEDRAL"/>
                                                   <m_RootCollectionName text="Building"/>
                                                   <m_ArtDefPath text="Buildings.artdef"/>
                                                   <m_CollectionIsLocked>true</m_CollectionIsLocked>
                                                   <m_TemplateName text="Buildings"/>
                                                   <m_ParamName text="Set003"/>
                                               </Element>
                                           </m_Values>
                                           <m_ParamName text="Set"/>
                                       </Element>
                                   </m_Values>
                               </m_Fields>
                               <m_ChildCollections/>
                               <m_Name text="MZ_OBELISK, TEMPLE, CATHEDRAL"/>
                               <m_AppendMergedParameterCollections>false</m_AppendMergedParameterCollections>
                           </Element>
    Imagine it had a duplicate entry of

    Code:
                                               <Element class="AssetObjects..ArtDefReferenceValue">
                                                   <m_ElementName text="BUILDING_TEMPLE"/>
                                                   <m_RootCollectionName text="Building"/>
                                                   <m_ArtDefPath text="Buildings.artdef"/>
                                                   <m_CollectionIsLocked>true</m_CollectionIsLocked>
                                                   <m_TemplateName text="Buildings"/>
                                                   <m_ParamName text="Set002"/>
                                               </Element>
    Going into the files and removing them fixed things. Or, deleting the BuildingSet and starting fresh.
     
  9. FurionHuang

    FurionHuang Chieftain

    Joined:
    Apr 27, 2017
    Messages:
    157
    Gender:
    Male
    Hey, I'm having the same issue updating my old Mod but only found my UB is sunken in the ground. Tried your way re-entered the BuildingSet entries but no luck... Any other possible solutions?
     
  10. FurionHuang

    FurionHuang Chieftain

    Joined:
    Apr 27, 2017
    Messages:
    157
    Gender:
    Male
    Hey Guys,

    I think I found the reason. It's because a few versions ago, the "buildingVariants" entry was written this way:
    Code:
                                         <Element class="AssetObjects:ArtDefReferenceValue">
                                            <m_ElementName text="BUILDING_XXXXX"/>
                                            <m_RootCollectionName text="HeroBuildingTags"/>
                                            <m_ArtDefPath text="Landmarks.artdef"/>
                                            <m_CollectionIsLocked>true</m_CollectionIsLocked>
                                            <m_TemplateName text="Landmarks"/>
                                            <m_ParamName text="Tag_HeroBuilding"/>
                                        </Element>
    But then now it's working this way:
    Code:
                                         <Element class="AssetObjects..ArtDefReferenceValue">
                                            <m_ElementName text="BUILDING_XXXXX"/>
                                            <m_RootCollectionName text="Building"/>
                                            <m_ArtDefPath text="Buildings.artdef"/>
                                            <m_CollectionIsLocked>true</m_CollectionIsLocked>
                                            <m_TemplateName text="Buildings"/>
                                            <m_ParamName text="Tag_HeroBuilding"/>
                                        </Element>
    AssetEditor will not change this when opening an old Artdef files until you actually change (or delete and re-create) buildingVariants entries. So either you copy paste the new format, or re-create buildingVariants entries with latest AE should solve the problem.
    @Magil @Deliverator FYI.
     

Share This Page