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

Referencing Art Asset

Discussion in 'Mod Creation Help' started by Social_Mech, Feb 20, 2021.

  1. Social_Mech

    Social_Mech Chieftain

    Joined:
    Feb 8, 2021
    Messages:
    28
    I'm trying to create alternate buildings for a district (the Chancery). For the time being, I just want the build to use existing assets in the game. As of now, I'm using the Chancery's existing icons, so they show up on the production selection layout and production queue just fine.
    Code:
    <GameInfo>
        <IconDefinitions>
            <Row Name="ICON_BUILDING_CHANCERY2" Atlas="ICON_ATLAS_ETHIOPIA_BUILDINGS" Index="2"/>
            <Row Name="ICON_BUILDING_CHANCERY2_FOW" Atlas="ICON_ATLAS_ETHIOPIA_BUILDINGS_FOW" Index="2"/>
        </IconDefinitions>
    </GameInfo>
    However, when I build the alternate building, it doesn't show up in the district.
    I've looked through every file in the Ethiopia DLC folder and I cannot seem to find that the existing Chancery building is tied to any other art.
    What do I need to do? Thank you
     
  2. raen

    raen Coat of Arms

    Joined:
    May 12, 2003
    Messages:
    2,436
    Location:
    Portugal
    You need to look in buildings.artdef (you may have to look into base game files instead of DLC ones), and you have to make a copy of the chancery and add it to your name: BUILDING_CHANCERY2.
     
  3. Social_Mech

    Social_Mech Chieftain

    Joined:
    Feb 8, 2021
    Messages:
    28
    Oh, I see. I saw those files but didn't realize I could just open them as though they were an .xml.
    I have never done anything with these files before so I did my best but it still doesn't work. The following is what I did:
    1) I took the code from the Buildings.artdef file in the Ethiopia ArtDefs directory. In there, I found what appears to be the Chancery information.
    2) I FIRST changed all six instances of Chancery to "Chancery2", but that was dumb because obviously the actual art assets the file is instructing the game to access aren't named Chancery2. The following is the code I'm using.
    Code:
    <AssetObjects..ArtDefSet>
        <m_Version>
            <major>4</major>
            <minor>0</minor>
            <build>492</build>
            <revision>752</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="Chancery"/>
                                            <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="Ethiopia_Buildings_StrategicView"/>
                                <m_AppendMergedParameterCollections>false</m_AppendMergedParameterCollections>
                            </Element>
                            <Element>
                                <m_Fields>
                                    <m_Values>
                                        <Element class="AssetObjects..ArtDefReferenceValue">
                                            <m_ElementName text="Chancery_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="Ethiopia_Buildings_StrategicView001"/>
                                <m_AppendMergedParameterCollections>false</m_AppendMergedParameterCollections>
                            </Element>
                            <Element>
                                <m_Fields>
                                    <m_Values>
                                        <Element class="AssetObjects..ArtDefReferenceValue">
                                            <m_ElementName text="Chancery_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="Ethiopia_Buildings_StrategicView002"/>
                                <m_AppendMergedParameterCollections>false</m_AppendMergedParameterCollections>
                            </Element>
                        </Element>
                    </m_ChildCollections>
                    <m_Name text="BUILDING_CHANCERY2"/>
                    <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_Fields>
                        <m_Values/>
                    </m_Fields>
                    <m_ChildCollections>
                        <Element>
                            <m_CollectionName text="Buildings (Level 2)"/>
                            <m_ReplaceMergedCollectionElements>false</m_ReplaceMergedCollectionElements>
                            <Element>
                                <m_Fields>
                                    <m_Values>
                                        <Element class="AssetObjects..ArtDefReferenceValue">
                                            <m_ElementName text="BUILDING_CHANCERY2"/>
                                            <m_RootCollectionName text="Building"/>
                                            <m_ArtDefPath text="Buildings.artdef"/>
                                            <m_CollectionIsLocked>true</m_CollectionIsLocked>
                                            <m_TemplateName text="Buildings"/>
                                            <m_ParamName text="Building"/>
                                        </Element>
                                    </m_Values>
                                </m_Fields>
                                <m_ChildCollections/>
                                <m_Name text="1Chancery2"/>
                                <m_AppendMergedParameterCollections>false</m_AppendMergedParameterCollections>
                            </Element>
                        </Element>
                        <Element>
                            <m_CollectionName text="Buildings (Level 3)"/>
                            <m_ReplaceMergedCollectionElements>false</m_ReplaceMergedCollectionElements>
                        </Element>
                    </m_ChildCollections>
                    <m_Name text="DiplomaticBuildings"/>
                    <m_AppendMergedParameterCollections>false</m_AppendMergedParameterCollections>
                </Element>
            </Element>
        </m_RootCollections>
    </AssetObjects..ArtDefSet>
    2.5) As you can see, I changed "<m_Name text="BUILDING_CHANCERY2"/>", "<m_ElementName text="BUILDING_CHANCERY2"/>", and "<m_Name text="1Chancery2"/>".
    3) I then created a new In-Game Action, set the type to "UpdateArt", and assigned my art .xml to the action.
    4) Started the game. No crashes. Tried to build the building, and nothing is there.
    5) I went into the game logs and found nothing in both the ArtDef log and the Database log regarding the Chancery (so it isn't detecting any errors?).

    EDIT: Just in case it is important, here is the code I have for the Chancery2:
    Code:
    <Types>
            <Row Type="BUILDING_CHANCERY2" Kind="KIND_BUILDING"/>
        </Types>
        <Buildings>
            <Row BuildingType="BUILDING_CHANCERY2" Name="LOC_BUILDING_CHANCERY2_NAME" Description="LOC_BUILDING_CHANCERY2_DESCRIPTION" PrereqCivic="CIVIC_DIPLOMATIC_SERVICE" PrereqDistrict="DISTRICT_DIPLOMATIC_QUARTER" PurchaseYield="YIELD_GOLD" Cost="290" AdvisorType="ADVISOR_GENERIC" Maintenance="2"/>
        </Buildings>
        <BuildingPrereqs>
            <Row Building="BUILDING_CHANCERY2" PrereqBuilding="BUILDING_CONSULATE"/>
        </BuildingPrereqs>
        <MutuallyExclusiveBuildings>
            <Row Building="BUILDING_CHANCERY" MutuallyExclusiveBuilding="BUILDING_CHANCERY2"/>
            <Row Building="BUILDING_CHANCERY2" MutuallyExclusiveBuilding="BUILDING_CHANCERY"/>
        </MutuallyExclusiveBuildings>
        <BuildingModifiers>
            <Row BuildingType="BUILDING_CHANCERY2" ModifierId="CHANCERY_INFLUENCEPOINTS"/>
            <Row BuildingType="BUILDING_CHANCERY2" ModifierId="SM_CHANCERY_FAVOR"/>
        </BuildingModifiers>
        <Building_CitizenYieldChanges>
            <Row BuildingType="BUILDING_CHANCERY2" YieldType="YIELD_CULTURE" YieldChange="1"/>
        </Building_CitizenYieldChanges>
    Note: Both Building Modifiers refer to other modifiers that I have verified work.
     
    Last edited: Feb 23, 2021
  4. raen

    raen Coat of Arms

    Joined:
    May 12, 2003
    Messages:
    2,436
    Location:
    Portugal
  5. Social_Mech

    Social_Mech Chieftain

    Joined:
    Feb 8, 2021
    Messages:
    28
    I am... very confused.
    I do not see a Cooker.log. When you say "project folder" do you mean in the mod folder? I'm not sure what directory you are referring to.
    I downloaded the Art Generator and put the directory of my Art.xml with all the above code (the directory with my .modinfo file) and nothing happened.
    When you say "accommodate your new buildings.artdef", do you not mean the artdef code that I posted above?
    Does my Art.xml need to be Art.artdef?
    I've been modding for a while but I've never messed with art before so I'm so lost. Sorry >.<
     
  6. raen

    raen Coat of Arms

    Joined:
    May 12, 2003
    Messages:
    2,436
    Location:
    Portugal
    Cooker.log appears in Modbuddy project folder if you assemble some art (after running build).

    Your mod art XML file that you added to "UpdateArt" type has to be changed since you added one new artdef for buildings. That tool adds it for you in mod art XML, if you have buildings.artdef inside a subfolder artdefs in modbuddy.
     
  7. Social_Mech

    Social_Mech Chieftain

    Joined:
    Feb 8, 2021
    Messages:
    28
    When I go into the "Fraxis ModBuddy" directory, along with its sub-directories, I do not see a cooker.log >.<
    I attached a zip file to this post.
    So are you saying I have to rename the Art.xml file to Art.artdef? When I ran the tool nothing happened.
    I apologize again. This is not intuitive to me. Sorry if I'm frustrating anyone.
     

    Attached Files:

  8. MoaiGangsta

    MoaiGangsta Chieftain

    Joined:
    Feb 27, 2021
    Messages:
    10
    Gender:
    Male
    The cooker log should appear once you have art assembled, then run build in ModBuddy.

    To use the ModArt tool linked above, I believe you need to have the buildings.artdef file in a subfolder, like Raen mentioned above. This is what it looks like in my project folder:
    upload_2021-3-1_17-46-21.png

    Artdef folder holds all my relevant artdef files (so in your case, I think this is where you'd need to put your buildings.artdef
    Core folder has all my xml files
    Textures has all my custom icons and leader art .dds and .tex files (You probably don't need this folder, since you aren't making a custom civ)
    XLPs has all my xlp files for my custom art (Again, you probably don't need this)

    You should probably add your folders (and the files in the folders) through ModBuddy itself, by Right-Clicking your project in the side pane and using Add>Folder or Add>Existing Item.
    Once you have a buildings.artdef file in that folder and run build, it should hopefully make a cooker log.
    After that, you should be able to point the ModArt tool to this project folder and it will generate your updated mod art file for you.

    (Disclaimer: I am very new to modding Civ 6 myself, so I don't know how accurate my explanation is; but this is what I did to make my stuff work. It could very well be different for you depending on how your files are set up.)
     
    raen and ShiroToraRyu like this.
  9. ShiroToraRyu

    ShiroToraRyu Hoping for Civ 7

    Joined:
    Apr 26, 2014
    Messages:
    414
    Gender:
    Male
    Location:
    Berlin, Germany
    I made some changes (artdef, art.xml), but the game throw me back to main menu when i start a game with that mod activated, and there are errors in the database.log, so it is impossible for me to test the changes ingame.
    But at least this could bring you closer to the solution, hopefully.
     

    Attached Files:

  10. Social_Mech

    Social_Mech Chieftain

    Joined:
    Feb 8, 2021
    Messages:
    28
    Okay. I created a folder in Modbuddy named "ArtDefs". When I do this and build the solution, everything is find, but the folder doesn't actually appear in the directory itself. When I run the Art Generator tool, nothing happens. THEN when I try to build the solution, Modbuddy kicks back an exception and deletes the enter ******* mod directory (this specific mod, not all mods). I have to delete the folder from Modbuddy and build the solution to make it come back.
    Shiro: I made the changes to the Art.xml you suggested and that makes sense to me (as it looks like the original art file that is generated when you start a new project). I think the reason it wasn't working is due to your use of "::" rather than ".." in the "<AssetObjects..GameArtSpecification>". At least, that is what Visual Studio was saying.
    I have attached the new .zip below, which changes the Art.xml to match what Shiro indicated, as well as creating a Buildings.xml (which will ultimately be the buildings.artdef).
     

    Attached Files:

    Last edited: Mar 3, 2021
  11. ShiroToraRyu

    ShiroToraRyu Hoping for Civ 7

    Joined:
    Apr 26, 2014
    Messages:
    414
    Gender:
    Male
    Location:
    Berlin, Germany
    Unfortunately the latest version you attached will never work ingame.

    "Art.xml" is not a valid name for that art file. It has to be the name of the mod plus that, just as it were in the version i uploaded before.

    "Buildings.xml" is also wrong here. It has to be "Buildings.artdef" in the "Artdefs" folder, also as it were in the version uploaded by me.

    The errors in database.log got to do with some things you have done in your Gameplay.xml, i think so. But here raen or LeeS would be more of a help.

    I would suggest that you dl the version i attached in my first post here again and start from there, trying to solve whatever causes the errors in the database.log

    here you should find your database.log: "....\Documents\My Games\Sid Meier's Civilization VI\Logs

    its very helpful to find mistakes. :)
     
  12. Social_Mech

    Social_Mech Chieftain

    Joined:
    Feb 8, 2021
    Messages:
    28
    I understand that those files won't work.
    As I said, the Building.xml is just a place to store the syntax. I do not expect it to work.
    The Art.xml file I am using is your Art.xml file (with the ".." change). Are you saying I shouldn't use it?
    Also, when I run the mod as-is, it works fine. Might be a mod clash on your end.
    As I mentioned before, I'm familiar with the database.log (and I see nothing on my end), I'm just not familiar with the cooker.log.
    The zip I posted is just to show what I have at the moment, even though I know it isn't how it should look.
    Modbuddy isn't letting me get away with running the Art Generator (even though it is doing nothing). That is my problem.

    EDIT: One other thing. I know that tone of voice is invisible via this style of communication. I want to make it clear that I'm not being aggressive at all xD Reading it again makes me feel like it could be interpreted that way.
     
    Last edited: Mar 3, 2021
  13. ShiroToraRyu

    ShiroToraRyu Hoping for Civ 7

    Joined:
    Apr 26, 2014
    Messages:
    414
    Gender:
    Male
    Location:
    Berlin, Germany
    Ah ok.

    Your Art file does not have the correct name (filename) by now. If you give it the name „Art.xml“ then this will not work.

    No one is aggressive here and no one „sounds“ aggressive here :)
     
  14. Social_Mech

    Social_Mech Chieftain

    Joined:
    Feb 8, 2021
    Messages:
    28
    So what do I change the file name to? Isn't it the "buildings" file that needs to be changed? But if I change it, doesn't it need to be in an ArtDef directory? If I do that, Modbuddy throws an exception...
     
  15. ShiroToraRyu

    ShiroToraRyu Hoping for Civ 7

    Joined:
    Apr 26, 2014
    Messages:
    414
    Gender:
    Male
    Location:
    Berlin, Germany
    For both the „buildings“ file and the „art“ file you find the correct names in the version i uploaded before. In this version those things were correct and ModBuddy can build the mod without any error. It is like i said, use my uploaded version as a base and then fix the errors in gameplay.xml if you also have some of them
     
  16. Social_Mech

    Social_Mech Chieftain

    Joined:
    Feb 8, 2021
    Messages:
    28
    The Art.xml and Building file I am using are the ones you uploaded. I already changed the syntax in those files. Even after making the changes though, the Art Generator isn't working.
    There isn't anything wrong with the Gameplay.xml. It runs fine for me.
    I'm at the point where I'll just give up on this. It isn't working for me.
     
  17. ShiroToraRyu

    ShiroToraRyu Hoping for Civ 7

    Joined:
    Apr 26, 2014
    Messages:
    414
    Gender:
    Male
    Location:
    Berlin, Germany
    In the files i uploaded i already used the Art Generator, the changes are the result of that generator.

    So what exactly happens when you just use my uploaded version as it is, build the mod in ModBuddy and then test the mod ingame?

    You really want to give up on this?
     
  18. Social_Mech

    Social_Mech Chieftain

    Joined:
    Feb 8, 2021
    Messages:
    28
    Oh, I did not realize your .zip was post-generator. That wasn't clear to me. My bad.
    I'll give it a shot.

    Just tried to build the solution with your file and it throws an exception.
    It then deletes all the files that I originally had in the other directory (which was very weird) but also means I have to recreate the mod entirely (though I can copy/paste from this one).

    I don't WANT to quit but it isn't working and there doesn't seem to be a solution because nothing people are suggesting to me is working =/
    Of course I'm not suggesting that it is their fault, but I don't know what else to do.

    The image I've attached is the exception being thrown. I don't know what it means.
     

    Attached Files:

  19. ShiroToraRyu

    ShiroToraRyu Hoping for Civ 7

    Joined:
    Apr 26, 2014
    Messages:
    414
    Gender:
    Male
    Location:
    Berlin, Germany
    That is strange, cause i can build this mod without any errors in ModBuddy, no exceptions at all. Only ingame the problems are going to start.

    Maybe your configuration (paths) are not correct in ModBuddy, but i do not really know what this exception means.

    Maybe you are right, and it would be the better suggestion, that you first follow a tutorial about the art stuff and then come back to this mod, trying it again
     
  20. Social_Mech

    Social_Mech Chieftain

    Joined:
    Feb 8, 2021
    Messages:
    28
    Sounds good. Thanks for the help. I'm grateful.
     

Share This Page