[GS] Issues with artdefs

ChrisWJN

Chieftain
Joined
Mar 12, 2019
Messages
43
Location
Canada
So I'm trying to make this custom wonder's model in-game an exact copy of Machu Picchu, but it doesn't seem to be working. I think it's because the asset editor won't recognize things outside of the base game, since I can't select things and they don't show up in menus. Any help would be appreciated. These are my artdefs:
Code:
<?xml version="1.0" encoding="UTF-8" ?>
<AssetObjects..ArtDefSet>
    <m_Version>
        <major>1</major>
        <minor>0</minor>
        <build>0</build>
        <revision>0</revision>
    </m_Version>
    <m_TemplateName text="WonderMovie"/>
    <m_RootCollections>
        <Element>
            <m_CollectionName text="WonderMovie"/>
            <m_ReplaceMergedCollectionElements>false</m_ReplaceMergedCollectionElements>
            <Element>
                <m_Fields>
                    <m_Values>
                        <Element class="AssetObjects..BLPEntryValue">
                            <m_EntryName text="BUILDING_MACHU_PICHU"/>
                            <m_XLPClass text="WonderMovie"/>
                            <m_XLPPath text="WonderMovie.xlp"/>
                            <m_BLPPackage text="WonderMovie"/>
                            <m_LibraryName text="WonderMovie"/>
                            <m_ParamName text="Asset"/>
                        </Element>
                        <Element class="AssetObjects..RGBValue">
                            <m_r>255.000000</m_r>
                            <m_g>255.000000</m_g>
                            <m_b>255.000000</m_b>
                            <m_ParamName text="TintColor"/>
                        </Element>
                        <Element class="AssetObjects..ArtDefReferenceValue">
                            <m_ElementName text=""/>
                            <m_RootCollectionName text="FOVCurves"/>
                            <m_ArtDefPath text=""/>
                            <m_CollectionIsLocked>false</m_CollectionIsLocked>
                            <m_TemplateName text=""/>
                            <m_ParamName text="FOVCurve"/>
                        </Element>
                        <Element class="AssetObjects..ArtDefReferenceValue">
                            <m_ElementName text="DEFAULT"/>
                            <m_RootCollectionName text="TimeOfDayCurves"/>
                            <m_ArtDefPath text="WonderMovie.artdef"/>
                            <m_CollectionIsLocked>false</m_CollectionIsLocked>
                            <m_TemplateName text="WonderMovie"/>
                            <m_ParamName text="TimeOfDayCurve"/>
                        </Element>
                        <Element class="AssetObjects..ArtDefReferenceValue">
                            <m_ElementName text="WONDER_TOD"/>
                            <m_RootCollectionName text="TimeOfDay"/>
                            <m_ArtDefPath text="GameLighting.artdef"/>
                            <m_CollectionIsLocked>true</m_CollectionIsLocked>
                            <m_TemplateName text="TimeOfDay"/>
                            <m_ParamName text="TimeOfDayLighting"/>
                        </Element>
                        <Element class="AssetObjects..BoolValue">
                            <m_bValue>false</m_bValue>
                            <m_ParamName text="FlattensTerrain"/>
                        </Element>
                        <Element class="AssetObjects..BoolValue">
                            <m_bValue>false</m_bValue>
                            <m_ParamName text="bAlignWithCoast"/>
                        </Element>
                        <Element class="AssetObjects..BoolValue">
                            <m_bValue>false</m_bValue>
                            <m_ParamName text="bAlignWithRiver"/>
                        </Element>
                        <Element class="AssetObjects..IntValue">
                            <m_nValue>10</m_nValue>
                            <m_ParamName text="MinVisualProgress"/>
                        </Element>
                        <Element class="AssetObjects..IntValue">
                            <m_nValue>95</m_nValue>
                            <m_ParamName text="MaxVisualProgress"/>
                        </Element>
                        <Element class="AssetObjects..IntValue">
                            <m_nValue>25</m_nValue>
                            <m_ParamName text="UnitHiddenThreshold"/>
                        </Element>
                        <Element class="AssetObjects..ArtDefReferenceValue">
                            <m_ElementName text="DEFAULT"/>
                            <m_RootCollectionName text="TimeLapse"/>
                            <m_ArtDefPath text="WonderMovie.artdef"/>
                            <m_CollectionIsLocked>false</m_CollectionIsLocked>
                            <m_TemplateName text="WonderMovie"/>
                            <m_ParamName text="TimeLapse"/>
                        </Element>
                        <Element class="AssetObjects..StringValue">
                            <m_Value text="NONE"/>
                            <m_ParamName text="Alignment"/>
                        </Element>
                        <Element class="AssetObjects..BoolValue">
                            <m_bValue>true</m_bValue>
                            <m_ParamName text="FollowTerrainHeight"/>
                        </Element>
                    </m_Values>
                </m_Fields>
                <m_ChildCollections/>
                <m_Name text="CWJN_BUILDING_PANDORA"/>
                <m_AppendMergedParameterCollections>false</m_AppendMergedParameterCollections>
            </Element>
        </Element>
        <Element>
            <m_CollectionName text="FOVCurves"/>
            <m_ReplaceMergedCollectionElements>false</m_ReplaceMergedCollectionElements>
        </Element>
        <Element>
            <m_CollectionName text="TimeOfDayCurves"/>
            <m_ReplaceMergedCollectionElements>false</m_ReplaceMergedCollectionElements>
        </Element>
        <Element>
            <m_CollectionName text="TimeLapse"/>
            <m_ReplaceMergedCollectionElements>false</m_ReplaceMergedCollectionElements>
        </Element>
        <Element>
            <m_CollectionName text="Globals"/>
            <m_ReplaceMergedCollectionElements>false</m_ReplaceMergedCollectionElements>
        </Element>
    </m_RootCollections>
</AssetObjects..ArtDefSet>

Code:
<?xml version="1.0" encoding="UTF-8" ?>
<AssetObjects..ArtDefSet>
    <m_Version>
        <major>1</major>
        <minor>0</minor>
        <build>0</build>
        <revision>0</revision>
    </m_Version>
    <m_TemplateName text="Buildings"/>
    <m_RootCollections>
        <Element>
            <m_CollectionName text="Building"/>
            <m_ReplaceMergedCollectionElements>false</m_ReplaceMergedCollectionElements>
            <Element>
                <m_Fields>
                    <m_Values>
                        <Element class="AssetObjects..BoolValue">
                            <m_bValue>false</m_bValue>
                            <m_ParamName text="IsWonderBuilding"/>
                        </Element>
                        <Element class="AssetObjects..BoolValue">
                            <m_bValue>false</m_bValue>
                            <m_ParamName text="UsesDistrictState"/>
                        </Element>
                        <Element class="AssetObjects..BoolValue">
                            <m_bValue>true</m_bValue>
                            <m_ParamName text="AffectsDistrictBuildingSet"/>
                        </Element>
                        <Element class="AssetObjects..StringValue">
                            <m_Value text="AVERAGE"/>
                            <m_ParamName text="TerrainFollowMode"/>
                        </Element>
                        <Element class="AssetObjects..StringValue">
                            <m_Value text="NONE"/>
                            <m_ParamName text="ProceduralPlacementMode"/>
                        </Element>
                        <Element class="AssetObjects..BoolValue">
                            <m_bValue>false</m_bValue>
                            <m_ParamName text="UsesDecalMaterialOverrides"/>
                        </Element>
                        <Element class="AssetObjects..StringValue">
                            <m_Value text=""/>
                            <m_ParamName text="AttachmentPointName"/>
                        </Element>
                    </m_Values>
                </m_Fields>
                <m_ChildCollections>
                    <Element>
                        <m_CollectionName text="Audio"/>
                        <m_ReplaceMergedCollectionElements>false</m_ReplaceMergedCollectionElements>
                    </Element>
                    <Element>
                        <m_CollectionName text="StrategicView"/>
                        <m_ReplaceMergedCollectionElements>false</m_ReplaceMergedCollectionElements>
                        <Element>
                            <m_Fields>
                                <m_Values>
                                    <Element class="AssetObjects..ArtDefReferenceValue">
                                        <m_ElementName text="MachuPicchu"/>
                                        <m_RootCollectionName text="Buildings"/>
                                        <m_ArtDefPath text="StrategicView.artdef"/>
                                        <m_CollectionIsLocked>true</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="StrategicView"/>
                            <m_AppendMergedParameterCollections>false</m_AppendMergedParameterCollections>
                        </Element>
                        <Element>
                            <m_Fields>
                                <m_Values>
                                    <Element class="AssetObjects..ArtDefReferenceValue">
                                        <m_ElementName text="MachuPicchu_Pillaged"/>
                                        <m_RootCollectionName text="Buildings"/>
                                        <m_ArtDefPath text="StrategicView.artdef"/>
                                        <m_CollectionIsLocked>true</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="StrategicView001"/>
                            <m_AppendMergedParameterCollections>false</m_AppendMergedParameterCollections>
                        </Element>
                        <Element>
                            <m_Fields>
                                <m_Values>
                                    <Element class="AssetObjects..ArtDefReferenceValue">
                                        <m_ElementName text="MachuPicchu_UnderConstruction"/>
                                        <m_RootCollectionName text="Buildings"/>
                                        <m_ArtDefPath text="StrategicView.artdef"/>
                                        <m_CollectionIsLocked>true</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_ChildCollections>
                <m_Name text="CWJN_BUILDING_PANDORA"/>
                <m_AppendMergedParameterCollections>false</m_AppendMergedParameterCollections>
            </Element>
        </Element>
        <Element>
            <m_CollectionName text="BuildStates"/>
            <m_ReplaceMergedCollectionElements>false</m_ReplaceMergedCollectionElements>
        </Element>
        <Element>
            <m_CollectionName text="BuildingChains"/>
            <m_ReplaceMergedCollectionElements>false</m_ReplaceMergedCollectionElements>
        </Element>
    </m_RootCollections>
</AssetObjects..ArtDefSet>
 
You're on the right lines, Chris.

As a starting point, it sounds like you need to get your Asset Editor and/or project set up to recognise the expansion assets. There are two steps; you may need to do either one, or both.

Firstly, navigate to your \steamapps\common\Sid Meier's Civilization VI SDK Assets\ folder. You should see four .json files in there. Two of them will be named exp1-asset-deps.json and exp2-asset-deps.json, respectively. Rename these files to expansion1-asset-deps.json and expansion2-asset-deps.json respectively. Just rename the files - no need to open the files themselves or inspect the contents.

With that done, you are now ready to leverage access to these two pantries of expansion assets via Asset Editor.

However, in ModBuddy, on a per-project basis, you need to set your project up so that it knows which assets you want to have access to. This is done through your ModArt file (ProjectName.Art.xml). If you open that file up in ModBuddy and scroll right to the bottom, you should see </AssetObjects..GameArtSpecification> as the final line. Directly above that, you need to enter the following code:

Code:
<requiredGameArtIDs>
      <Element>
          <name text="Expansion1"/>
          <id text="7446c8fe-29eb-44f8-801f-098f681cc5c5"/>
      </Element>
      <Element>
          <name text="Expansion2"/>
          <id text="b1b63999-6b16-4dd2-a5b6-eb19794aa8ca"/>
      </Element>
  </requiredGameArtIDs>

If you already have some entries for <requiredGameArtIDs>, simply append the Expansion1 and Expansion2 entries accordingly. This is telling the Asset Editor which asset groups it should 'activate'. The default 'Civ6' asset group is always activated, hence we don't need to specify it here.

With that saved, you should be able to load up Asset Editor and find you can browse the Expansion1 and Expansion2 assets. You should also be able to reference them in ArtDef files successfully. Finally, when you build your mod, you should find that referenced 3D assets from expansions work because we're effectively saying "I want to use assets from these expansions". Without this <requiredGameArtIDs> entry, the Asset Editor - nor the game - knows that we want to access these assets.

Here's a code excerpt that shows how the <requiredGameArtIDs> fits with the rest of the ModArt file, just so you can see where it starts and ends:

Code:
</gameLibraries>
  <requiredGameArtIDs>
      <Element>
          <name text="Expansion1"/>
          <id text="7446c8fe-29eb-44f8-801f-098f681cc5c5"/>
      </Element>
      <Element>
          <name text="Expansion2"/>
          <id text="b1b63999-6b16-4dd2-a5b6-eb19794aa8ca"/>
      </Element>
  </requiredGameArtIDs>
</AssetObjects..GameArtSpecification>

Hope this helps.
 
Thanks for the help. I updated my ModArt and I can now use DLC assets. I'm still having 2 problems however. While strategic view shows the Machu Picchu art for the new wonder, the normal view has no model. Any chance you know which artdef affects the normal view? Currently, I have entries in Buildings.artdef and WorldMovie.artdef. Second problem is completely unrelated, but for some reason my civ's traits/uniques don't show on the loading/diplomacy screen? I've never had this issue with any other mod I've worked on. I assumed that it automatically shows whatever traits are registered to the civ/leader on those screens, but I guess not?
 
Any chance you know which artdef affects the normal view?

It's the WonderMovie.artdef that handles ensuring the 3D model displays on the 3D view. I created one, as chance would have it, only yesterday so can confirm that 100% of the responsibility for the 3D view lies within that ArtDef file.

I just had a quick look at your ArtDef. You have a typo in here:

Code:
<Element class="AssetObjects..BLPEntryValue">
                           <m_EntryName text="BUILDING_MACHU_PICHU"/>
                            <m_XLPClass text="WonderMovie"/>
                            <m_XLPPath text="WonderMovie.xlp"/>
                            <m_BLPPackage text="WonderMovie"/>
                            <m_LibraryName text="WonderMovie"/>
                            <m_ParamName text="Asset"/>
                        </Element>

The m_EntryName value should be: BUILDING_MACHU_PICCHU (with two Cs). That's what the game's XLP lists it as. Correct that and I suspect it'll work.
 
Back
Top Bottom