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

[GS] Help with african unit for european civ

Discussion in 'Mod Creation Help' started by cuso210, Mar 3, 2020.

  1. cuso210

    cuso210 Warlord

    Joined:
    Apr 6, 2012
    Messages:
    107
    Hi! I've meaning to play with JFD's Belgium and everything seems to work fine, except the Unique Unit Leader, which doesn't have heads. I've already managed to make them appear, but the are all white and I can't seem to give them their correct ethnicity.

    The unit depends in a Unit.Artdef and Unit_Bins.Artdef files. In the first one, there is this custom reference (I don't know the technical names): "Heads/JFD_African_Nobeard_Head". When searching for it in the Bins file, i found this:
    Code:
    <m_ChildCollections>
                                    <Element>
                                        <m_CollectionName text="Cultures"/>
                                        <m_ReplaceMergedCollectionElements>false</m_ReplaceMergedCollectionElements>
                                        <Element>
                                            <m_Fields>
                                                <m_Values>
                                                    <Element class="AssetObjects..ArtDefReferenceValue">
                                                        <m_ElementName text="African"/>
                                                        <m_RootCollectionName text="UnitTintTypes"/>
                                                        <m_ArtDefPath text="Units.artdef"/>
                                                        <m_CollectionIsLocked>true</m_CollectionIsLocked>
                                                        <m_TemplateName text="Units"/>
                                                        <m_ParamName text="Tint"/>
                                                    </Element>
                                                </m_Values>
                                            </m_Fields>
                                            <m_ChildCollections>
                                                <Element>
                                                    <m_CollectionName text="Assets"/>
                                                    <m_ReplaceMergedCollectionElements>false</m_ReplaceMergedCollectionElements>
                                                    <Element>
                                                        <m_Fields>
                                                            <m_Values>
                                                                <Element class="AssetObjects..BLPEntryValue">
                                                                    <m_EntryName text="Male_African_HeadA"/>
                                                                    <m_XLPClass text="Unit"/>
                                                                    <m_XLPPath text="Units.xlp"/>
                                                                    <m_BLPPackage text="units/units"/>
                                                                    <m_LibraryName text="Unit"/>
                                                                    <m_ParamName text="Asset"/>
                                                                </Element>
                                                                <Element class="AssetObjects..FloatValue">
                                                                    <m_fValue>1.000000</m_fValue>
                                                                    <m_ParamName text="Scale"/>
                                                                </Element>
                                                            </m_Values>
                                                        </m_Fields>
                                                        <m_ChildCollections/>
                                                        <m_Name text="Male_African_HeadA"/>
                                                        <m_AppendMergedParameterCollections>false</m_AppendMergedParameterCollections>
                                                    </Element>
                                                    <Element>
                                                        <m_Fields>
                                                            <m_Values>
                                                                <Element class="AssetObjects..BLPEntryValue">
                                                                    <m_EntryName text="Male_African_HeadB"/>
                                                                    <m_XLPClass text="Unit"/>
                                                                    <m_XLPPath text="Units.xlp"/>
                                                                    <m_BLPPackage text="units/units"/>
                                                                    <m_LibraryName text="Unit"/>
                                                                    <m_ParamName text="Asset"/>
                                                                </Element>
                                                                <Element class="AssetObjects..FloatValue">
                                                                    <m_fValue>1.000000</m_fValue>
                                                                    <m_ParamName text="Scale"/>
                                                                </Element>
                                                            </m_Values>
                                                        </m_Fields>
                                                        <m_ChildCollections/>
                                                        <m_Name text="Male_African_HeadB"/>
                                                        <m_AppendMergedParameterCollections>false</m_AppendMergedParameterCollections>
                                                    </Element>
                                                    <Element>
                                                        <m_Fields>
                                                            <m_Values>
                                                                <Element class="AssetObjects..BLPEntryValue">
                                                                    <m_EntryName text="Male_African_HeadC"/>
                                                                    <m_XLPClass text="Unit"/>
                                                                    <m_XLPPath text="Units.xlp"/>
                                                                    <m_BLPPackage text="units/units"/>
                                                                    <m_LibraryName text="Unit"/>
                                                                    <m_ParamName text="Asset"/>
                                                                </Element>
                                                                <Element class="AssetObjects..FloatValue">
                                                                    <m_fValue>1.000000</m_fValue>
                                                                    <m_ParamName text="Scale"/>
                                                                </Element>
                                                            </m_Values>
                                                        </m_Fields>
                                                        <m_ChildCollections/>
                                                        <m_Name text="Male_African_HeadC"/>
                                                        <m_AppendMergedParameterCollections>false</m_AppendMergedParameterCollections>
                                                    </Element>
                                                    <Element>
                                                        <m_Fields>
                                                            <m_Values>
                                                                <Element class="AssetObjects..BLPEntryValue">
                                                                    <m_EntryName text="Male_African_HeadD"/>
                                                                    <m_XLPClass text="Unit"/>
                                                                    <m_XLPPath text="Units.xlp"/>
                                                                    <m_BLPPackage text="units/units"/>
                                                                    <m_LibraryName text="Unit"/>
                                                                    <m_ParamName text="Asset"/>
                                                                </Element>
                                                                <Element class="AssetObjects..FloatValue">
                                                                    <m_fValue>1.000000</m_fValue>
                                                                    <m_ParamName text="Scale"/>
                                                                </Element>
                                                            </m_Values>
                                                        </m_Fields>
                                                        <m_ChildCollections/>
                                                        <m_Name text="Male_African_HeadD"/>
                                                        <m_AppendMergedParameterCollections>false</m_AppendMergedParameterCollections>
                                                    </Element>
                                                </Element>
                                            </m_ChildCollections>
                                            <m_Name text="Any"/>
                                            <m_AppendMergedParameterCollections>false</m_AppendMergedParameterCollections>
                                        </Element>
                                    </Element>
                                </m_ChildCollections>
                                <m_Name text="JFD_African_Nobeard_Head"/>
                                <m_AppendMergedParameterCollections>false</m_AppendMergedParameterCollections>
    After searching in the base game Bins file, I changed it to this and managed to make the heads appear, but as european heads. Basically I just changed the entrynames from Male_African_HeadA (letter) to Male_African_Head_02 (number) and so on:
    Code:
    <m_ChildCollections>
                                    <Element>
                                        <m_CollectionName text="Cultures"/>
                                        <m_ReplaceMergedCollectionElements>false</m_ReplaceMergedCollectionElements>
                                        <Element>
                                            <m_Fields>
                                                <m_Values>
                                                    <Element class="AssetObjects..ArtDefReferenceValue">
                                                        <m_ElementName text="African"/>
                                                        <m_RootCollectionName text="UnitTintTypes"/>
                                                        <m_ArtDefPath text="Units.artdef"/>
                                                        <m_CollectionIsLocked>true</m_CollectionIsLocked>
                                                        <m_TemplateName text="Units"/>
                                                        <m_ParamName text="Tint"/>
                                                    </Element>
                                                </m_Values>
                                            </m_Fields>
                                            <m_ChildCollections>
                                                <Element>
                                                    <m_CollectionName text="Assets"/>
                                                    <m_ReplaceMergedCollectionElements>false</m_ReplaceMergedCollectionElements>
                                                    <Element>
                                                        <m_Fields>
                                                            <m_Values>
                                                                <Element class="AssetObjects..BLPEntryValue">
                                                                    <m_EntryName text="Male_African_Head_02"/>
                                                                    <m_XLPClass text="Unit"/>
                                                                    <m_XLPPath text="Units.xlp"/>
                                                                    <m_BLPPackage text="units/units"/>
                                                                    <m_LibraryName text="Unit"/>
                                                                    <m_ParamName text="Asset"/>
                                                                </Element>
                                                                <Element class="AssetObjects..FloatValue">
                                                                    <m_fValue>1.000000</m_fValue>
                                                                    <m_ParamName text="Scale"/>
                                                                </Element>
                                                            </m_Values>
                                                        </m_Fields>
                                                        <m_ChildCollections/>
                                                        <m_Name text="Male_African_HeadA"/>
                                                        <m_AppendMergedParameterCollections>false</m_AppendMergedParameterCollections>
                                                    </Element>
                                                    <Element>
                                                        <m_Fields>
                                                            <m_Values>
                                                                <Element class="AssetObjects..BLPEntryValue">
                                                                    <m_EntryName text="Male_African_Head_01"/>
                                                                    <m_XLPClass text="Unit"/>
                                                                    <m_XLPPath text="Units.xlp"/>
                                                                    <m_BLPPackage text="units/units"/>
                                                                    <m_LibraryName text="Unit"/>
                                                                    <m_ParamName text="Asset"/>
                                                                </Element>
                                                                <Element class="AssetObjects..FloatValue">
                                                                    <m_fValue>1.000000</m_fValue>
                                                                    <m_ParamName text="Scale"/>
                                                                </Element>
                                                            </m_Values>
                                                        </m_Fields>
                                                        <m_ChildCollections/>
                                                        <m_Name text="Male_African_HeadB"/>
                                                        <m_AppendMergedParameterCollections>false</m_AppendMergedParameterCollections>
                                                    </Element>
                                                    <Element>
                                                        <m_Fields>
                                                            <m_Values>
                                                                <Element class="AssetObjects..BLPEntryValue">
                                                                    <m_EntryName text="Male_African_Head_02"/>
                                                                    <m_XLPClass text="Unit"/>
                                                                    <m_XLPPath text="Units.xlp"/>
                                                                    <m_BLPPackage text="units/units"/>
                                                                    <m_LibraryName text="Unit"/>
                                                                    <m_ParamName text="Asset"/>
                                                                </Element>
                                                                <Element class="AssetObjects..FloatValue">
                                                                    <m_fValue>1.000000</m_fValue>
                                                                    <m_ParamName text="Scale"/>
                                                                </Element>
                                                            </m_Values>
                                                        </m_Fields>
                                                        <m_ChildCollections/>
                                                        <m_Name text="Male_African_HeadC"/>
                                                        <m_AppendMergedParameterCollections>false</m_AppendMergedParameterCollections>
                                                    </Element>
                                                    <Element>
                                                        <m_Fields>
                                                            <m_Values>
                                                                <Element class="AssetObjects..BLPEntryValue">
                                                                    <m_EntryName text="Male_African_Head_01"/>
                                                                    <m_XLPClass text="Unit"/>
                                                                    <m_XLPPath text="Units.xlp"/>
                                                                    <m_BLPPackage text="units/units"/>
                                                                    <m_LibraryName text="Unit"/>
                                                                    <m_ParamName text="Asset"/>
                                                                </Element>
                                                                <Element class="AssetObjects..FloatValue">
                                                                    <m_fValue>1.000000</m_fValue>
                                                                    <m_ParamName text="Scale"/>
                                                                </Element>
                                                            </m_Values>
                                                        </m_Fields>
                                                        <m_ChildCollections/>
                                                        <m_Name text="Male_African_HeadD"/>
                                                        <m_AppendMergedParameterCollections>false</m_AppendMergedParameterCollections>
                                                    </Element>
                                                </Element>
                                            </m_ChildCollections>
                                            <m_Name text="Any"/>
                                            <m_AppendMergedParameterCollections>false</m_AppendMergedParameterCollections>
                                        </Element>
                                    </Element>
                                </m_ChildCollections>
                                <m_Name text="JFD_African_Nobeard_Head"/>
                                <m_AppendMergedParameterCollections>false</m_AppendMergedParameterCollections>
    After that, I can't seem to give them their ethnicity back, even if I changes all the references to match the one in the base game Bin file. The heads all dissapear. I have tried changing the m_Name text to match the entryname, I tried usin Asset0001 and so on, but nothing seems to work. Could you please help me understand the code or point me to a mod that uses different ethnicities in their unis so I could see how to do it? Thanks in advance.

    Edit: The unit is also missing arms/limbs, Im guessing figure it out the heads issue would allow me to fix them too.
     
    Last edited: Mar 3, 2020
  2. OnlyHeStandsHere

    OnlyHeStandsHere Chieftain

    Joined:
    May 4, 2018
    Messages:
    46
    I'm not quite an expert on it, but you should be able to create a custom artdef using the Asset Editor in modbuddy. I think you should be able to set all the different attachments you want for the unit as long as you make sure to properly assign it to the right unit name (and I guess make sure you don't leave the duplicate hanging around). You might want to check out part one of this guide if that seems like something you want to do: https://forums.civfanatics.com/threads/art-assets-in-civilization-6-a-modding-guide.612050/ . Creating the artdef with the Asset Editor should let you avoid having to manually type all the code. Just know that the previewer in the Asset Editor is borked, so you won't be able to check what things look like ahead of time.
     
  3. Deliverator

    Deliverator Graphical Hackificator

    Joined:
    Feb 12, 2008
    Messages:
    4,683
    Location:
    London, UK
    In Gathering Storm SDK Assets update the human body assets (Head, Body, Hands, Arms, etc) were overhauled.

    This left two sets of body parts:
    1) The older parts generally ending in letters: Male_Caucasian_HeadA.ast
    2) The new parts generally ending in numberic digits e.g. Male_Cauc_Head_01.ast

    The older parts were left broken so that when they are opened in the Asset Previewer you get a big exclamation mark. This is because the Materials for these Assets no longer exist. (Although I did make a patch to recreate them here that requires you to cook the old body parts into .blp files.)

    The best way would just be to copy the Unit_Bins.artdef entries from the post-GS African body parts or pull in the new African heads entry into your Unit Member entry.
     

Share This Page