[RESOLVED] Rider of mounted unit not appearing in-game

maconnolly

Warlord
Joined
Jun 3, 2019
Messages
209
I wonder if anyone can find my mistake - as there no doubt is (at least) one.

I've been attempting to stitch together a new mounted unit, using existing assets from the Civiliazation VI Assets library.

I thought I understood how it worked - and have successfully applied the same logic to non-mounted units just fine (they appear as expected). I have read the Leugi guides and know that the rider needs to be created as a second Variation in UnitMemberTypes and that variation needs to be referenced as an Attachment. I thought I had it right, but clearly, my end-result means I've done something wrong.

The relevant extract from my Units.artdef is below:

Spoiler :
Code:
<Element>
                <m_Fields>
                    <m_Values>
                        <Element class="AssetObjects..ArtDefReferenceValue">
                            <m_ElementName text="Cavalry"/>
                            <m_RootCollectionName text="UnitMovementTypes"/>
                            <m_ArtDefPath text="Units.artdef"/>
                            <m_CollectionIsLocked>true</m_CollectionIsLocked>
                            <m_TemplateName text="Units"/>
                            <m_ParamName text="Movement"/>
                        </Element>
                        <Element class="AssetObjects..ArtDefReferenceValue">
                            <m_ElementName text="HorsemanCombat"/>
                            <m_RootCollectionName text="MemberCombat"/>
                            <m_ArtDefPath text="Units.artdef"/>
                            <m_CollectionIsLocked>true</m_CollectionIsLocked>
                            <m_TemplateName text="Units"/>
                            <m_ParamName text="Combat"/>
                        </Element>
                        <Element class="AssetObjects..ArtDefReferenceValue">
                            <m_ElementName text="MEAT"/>
                            <m_RootCollectionName text="MaterialTypes"/>
                            <m_ArtDefPath text="VFX.artdef"/>
                            <m_CollectionIsLocked>true</m_CollectionIsLocked>
                            <m_TemplateName text="VFX"/>
                            <m_ParamName text="VFXMaterialType"/>
                        </Element>
                        <Element class="AssetObjects..ArtDefReferenceValue">
                            <m_ElementName text="MEAT"/>
                            <m_RootCollectionName text="MaterialTypes"/>
                            <m_ArtDefPath text="VFX.artdef"/>
                            <m_CollectionIsLocked>true</m_CollectionIsLocked>
                            <m_TemplateName text="VFX"/>
                            <m_ParamName text="VFXWeaponImpact"/>
                        </Element>
                        <Element class="AssetObjects..FloatValue">
                            <m_fValue>0.000000</m_fValue>
                            <m_ParamName text="ImpactHeightOverride"/>
                        </Element>
                    </m_Values>
                </m_Fields>
                <m_ChildCollections>
                    <Element>
                        <m_CollectionName text="Cultures"/>
                        <m_ReplaceMergedCollectionElements>false</m_ReplaceMergedCollectionElements>
                        <Element>
                            <m_Fields>
                                <m_Values/>
                            </m_Fields>
                            <m_ChildCollections>
                                <Element>
                                    <m_CollectionName text="Variations"/>
                                    <m_ReplaceMergedCollectionElements>false</m_ReplaceMergedCollectionElements>
                                    <Element>
                                        <m_Fields>
                                            <m_Values>
                                                <Element class="AssetObjects..FloatValue">
                                                    <m_fValue>1.100000</m_fValue>
                                                    <m_ParamName text="Scale"/>
                                                </Element>
                                                <Element class="AssetObjects..BoolValue">
                                                    <m_bValue>false</m_bValue>
                                                    <m_ParamName text="IsAttachment"/>
                                                </Element>
                                            </m_Values>
                                        </m_Fields>
                                        <m_ChildCollections>
                                            <Element>
                                                <m_CollectionName text="Attachments"/>
                                                <m_ReplaceMergedCollectionElements>false</m_ReplaceMergedCollectionElements>
                                                <Element>
                                                    <m_Fields>
                                                        <m_Values>
                                                            <Element class="AssetObjects..StringValue">
                                                                <m_Value text="Root"/>
                                                                <m_ParamName text="Point"/>
                                                            </Element>
                                                            <Element class="AssetObjects..ArtDefReferenceValue">
                                                                <m_ElementName text="USE_CIV_COLOR"/>
                                                                <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="Bins"/>
                                                            <m_ReplaceMergedCollectionElements>false</m_ReplaceMergedCollectionElements>
                                                            <Element>
                                                                <m_Fields>
                                                                    <m_Values/>
                                                                </m_Fields>
                                                                <m_ChildCollections/>
                                                                <m_Name text="Armor_Horse/Knight"/>
                                                                <m_AppendMergedParameterCollections>false</m_AppendMergedParameterCollections>
                                                            </Element>
                                                        </Element>
                                                    </m_ChildCollections>
                                                    <m_Name text="Armor"/>
                                                    <m_AppendMergedParameterCollections>false</m_AppendMergedParameterCollections>
                                                </Element>
                                                <Element>
                                                    <m_Fields>
                                                        <m_Values>
                                                            <Element class="AssetObjects..StringValue">
                                                                <m_Value text="Root"/>
                                                                <m_ParamName text="Point"/>
                                                            </Element>
                                                            <Element class="AssetObjects..ArtDefReferenceValue">
                                                                <m_ElementName text="Horse_Default"/>
                                                                <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="Bins"/>
                                                            <m_ReplaceMergedCollectionElements>false</m_ReplaceMergedCollectionElements>
                                                            <Element>
                                                                <m_Fields>
                                                                    <m_Values/>
                                                                </m_Fields>
                                                                <m_ChildCollections/>
                                                                <m_Name text="Animals/Horse_Medium"/>
                                                                <m_AppendMergedParameterCollections>false</m_AppendMergedParameterCollections>
                                                            </Element>
                                                        </Element>
                                                    </m_ChildCollections>
                                                    <m_Name text="Body"/>
                                                    <m_AppendMergedParameterCollections>false</m_AppendMergedParameterCollections>
                                                </Element>
                                                <Element>
                                                    <m_Fields>
                                                        <m_Values>
                                                            <Element class="AssetObjects..StringValue">
                                                                <m_Value text="RiderAttach"/>
                                                                <m_ParamName text="Point"/>
                                                            </Element>
                                                            <Element class="AssetObjects..ArtDefReferenceValue">
                                                                <m_ElementName text=""/>
                                                                <m_RootCollectionName text="UnitTintTypes"/>
                                                                <m_ArtDefPath text=""/>
                                                                <m_CollectionIsLocked>true</m_CollectionIsLocked>
                                                                <m_TemplateName text=""/>
                                                                <m_ParamName text="Tint"/>
                                                            </Element>
                                                        </m_Values>
                                                    </m_Fields>
                                                    <m_ChildCollections>
                                                        <Element>
                                                            <m_CollectionName text="Bins"/>
                                                            <m_ReplaceMergedCollectionElements>false</m_ReplaceMergedCollectionElements>
                                                            <Element>
                                                                <m_Fields>
                                                                    <m_Values/>
                                                                </m_Fields>
                                                                <m_ChildCollections/>
                                                                <m_Name text="V:Rider"/>
                                                                <m_AppendMergedParameterCollections>false</m_AppendMergedParameterCollections>
                                                            </Element>
                                                        </Element>
                                                    </m_ChildCollections>
                                                    <m_Name text="Rider"/>
                                                    <m_AppendMergedParameterCollections>false</m_AppendMergedParameterCollections>
                                                </Element>
                                                <Element>
                                                    <m_Fields>
                                                        <m_Values>
                                                            <Element class="AssetObjects..StringValue">
                                                                <m_Value text="Root"/>
                                                                <m_ParamName text="Point"/>
                                                            </Element>
                                                            <Element class="AssetObjects..ArtDefReferenceValue">
                                                                <m_ElementName text="Horse_Secondary"/>
                                                                <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="Bins"/>
                                                            <m_ReplaceMergedCollectionElements>false</m_ReplaceMergedCollectionElements>
                                                            <Element>
                                                                <m_Fields>
                                                                    <m_Values/>
                                                                </m_Fields>
                                                                <m_ChildCollections/>
                                                                <m_Name text="Accessories_Horse/Tails"/>
                                                                <m_AppendMergedParameterCollections>false</m_AppendMergedParameterCollections>
                                                            </Element>
                                                        </Element>
                                                    </m_ChildCollections>
                                                    <m_Name text="Tail"/>
                                                    <m_AppendMergedParameterCollections>false</m_AppendMergedParameterCollections>
                                                </Element>
                                            </Element>
                                        </m_ChildCollections>
                                        <m_Name text="Horse"/>
                                        <m_AppendMergedParameterCollections>false</m_AppendMergedParameterCollections>
                                    </Element>
                                    <Element>
                                        <m_Fields>
                                            <m_Values>
                                                <Element class="AssetObjects..FloatValue">
                                                    <m_fValue>1.000000</m_fValue>
                                                    <m_ParamName text="Scale"/>
                                                </Element>
                                                <Element class="AssetObjects..BoolValue">
                                                    <m_bValue>true</m_bValue>
                                                    <m_ParamName text="IsAttachment"/>
                                                </Element>
                                            </m_Values>
                                        </m_Fields>
                                        <m_ChildCollections>
                                            <Element>
                                                <m_CollectionName text="Attachments"/>
                                                <m_ReplaceMergedCollectionElements>false</m_ReplaceMergedCollectionElements>
                                                <Element>
                                                    <m_Fields>
                                                        <m_Values>
                                                            <Element class="AssetObjects..StringValue">
                                                                <m_Value text="Root"/>
                                                                <m_ParamName text="Point"/>
                                                            </Element>
                                                            <Element class="AssetObjects..ArtDefReferenceValue">
                                                                <m_ElementName text="USE_CIV_COLOR"/>
                                                                <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="Bins"/>
                                                            <m_ReplaceMergedCollectionElements>false</m_ReplaceMergedCollectionElements>
                                                            <Element>
                                                                <m_Fields>
                                                                    <m_Values/>
                                                                </m_Fields>
                                                                <m_ChildCollections/>
                                                                <m_Name text="Armor/Knight"/>
                                                                <m_AppendMergedParameterCollections>false</m_AppendMergedParameterCollections>
                                                            </Element>
                                                        </Element>
                                                    </m_ChildCollections>
                                                    <m_Name text="Armor"/>
                                                    <m_AppendMergedParameterCollections>false</m_AppendMergedParameterCollections>
                                                </Element>
                                                <Element>
                                                    <m_Fields>
                                                        <m_Values>
                                                            <Element class="AssetObjects..StringValue">
                                                                <m_Value text="Hat"/>
                                                                <m_ParamName text="Point"/>
                                                            </Element>
                                                            <Element class="AssetObjects..ArtDefReferenceValue">
                                                                <m_ElementName text="USE_CIV_COLOR"/>
                                                                <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="Bins"/>
                                                            <m_ReplaceMergedCollectionElements>false</m_ReplaceMergedCollectionElements>
                                                            <Element>
                                                                <m_Fields>
                                                                    <m_Values/>
                                                                </m_Fields>
                                                                <m_ChildCollections/>
                                                                <m_Name text="Hats/Cavalry"/>
                                                                <m_AppendMergedParameterCollections>false</m_AppendMergedParameterCollections>
                                                            </Element>
                                                        </Element>
                                                    </m_ChildCollections>
                                                    <m_Name text="Hat"/>
                                                    <m_AppendMergedParameterCollections>false</m_AppendMergedParameterCollections>
                                                </Element>
                                                <Element>
                                                    <m_Fields>
                                                        <m_Values>
                                                            <Element class="AssetObjects..StringValue">
                                                                <m_Value text="WeaponSecondary"/>
                                                                <m_ParamName text="Point"/>
                                                            </Element>
                                                            <Element class="AssetObjects..ArtDefReferenceValue">
                                                                <m_ElementName text="USE_CIV_COLOR"/>
                                                                <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="Bins"/>
                                                            <m_ReplaceMergedCollectionElements>false</m_ReplaceMergedCollectionElements>
                                                            <Element>
                                                                <m_Fields>
                                                                    <m_Values/>
                                                                </m_Fields>
                                                                <m_ChildCollections/>
                                                                <m_Name text="Shields/Spearman"/>
                                                                <m_AppendMergedParameterCollections>false</m_AppendMergedParameterCollections>
                                                            </Element>
                                                        </Element>
                                                    </m_ChildCollections>
                                                    <m_Name text="Shield"/>
                                                    <m_AppendMergedParameterCollections>false</m_AppendMergedParameterCollections>
                                                </Element>
                                                <Element>
                                                    <m_Fields>
                                                        <m_Values>
                                                            <Element class="AssetObjects..StringValue">
                                                                <m_Value text="WeaponPrimary"/>
                                                                <m_ParamName text="Point"/>
                                                            </Element>
                                                            <Element class="AssetObjects..ArtDefReferenceValue">
                                                                <m_ElementName text=""/>
                                                                <m_RootCollectionName text="UnitTintTypes"/>
                                                                <m_ArtDefPath text=""/>
                                                                <m_CollectionIsLocked>true</m_CollectionIsLocked>
                                                                <m_TemplateName text=""/>
                                                                <m_ParamName text="Tint"/>
                                                            </Element>
                                                        </m_Values>
                                                    </m_Fields>
                                                    <m_ChildCollections>
                                                        <Element>
                                                            <m_CollectionName text="Bins"/>
                                                            <m_ReplaceMergedCollectionElements>false</m_ReplaceMergedCollectionElements>
                                                            <Element>
                                                                <m_Fields>
                                                                    <m_Values/>
                                                                </m_Fields>
                                                                <m_ChildCollections/>
                                                                <m_Name text="Swords/GreatGeneral_Classical"/>
                                                                <m_AppendMergedParameterCollections>false</m_AppendMergedParameterCollections>
                                                            </Element>
                                                        </Element>
                                                    </m_ChildCollections>
                                                    <m_Name text="Weapon"/>
                                                    <m_AppendMergedParameterCollections>false</m_AppendMergedParameterCollections>
                                                </Element>
                                            </Element>
                                        </m_ChildCollections>
                                        <m_Name text="Rider"/>
                                        <m_AppendMergedParameterCollections>false</m_AppendMergedParameterCollections>
                                    </Element>
                                </Element>
                            </m_ChildCollections>
                            <m_Name text="ED_NobleCavalry_Cultures"/>
                            <m_AppendMergedParameterCollections>false</m_AppendMergedParameterCollections>
                        </Element>
                    </Element>
                </m_ChildCollections>
                <m_Name text="ED_Units_NobleCavalry"/>
                <m_AppendMergedParameterCollections>false</m_AppendMergedParameterCollections>
            </Element>

The result in-game, using the above, is that the horse part of the unit appears as normal, but there's nothing sitting on top. I assume the fault is somewhere in how the rider is referenced as an attachment.
 
It seems OK overall. Perhaps try replacing "ED_NobleCavalry_Cultures" with "Any" unless you have set up a unit culture with the former name.
 
Yep, just tried it. You, sir, are a star. Works a charm when the Culture names are set to 'Any'.

I don't really understand why it is only this specific scenario in which changing the Culture name in Asset Editor affects it, but I also don't care. Noted.
 
Yep, just tried it. You, sir, are a star. Works a charm when the Culture names are set to 'Any'.

I don't really understand why it is only this specific scenario in which changing the Culture name in Asset Editor affects it, but I also don't care. Noted.

The game uses "Any" for any Unit Culture that doesn't have a specific variant for that UnitMember. The legitimate values can use for the Culture are (1) "Any" to specify the default art for this Unit Member (2) A specified Unit Culture from Cultures.artdef e.g. "Asian" (3) The name of a Civ to override the Unit Culture for a particular Civ e.g. CIVILIZATION_GERMANY.
 
The game uses "Any" for any Unit Culture that doesn't have a specific variant for that UnitMember. The legitimate values can use for the Culture are (1) "Any" to specify the default art for this Unit Member (2) A specified Unit Culture from Cultures.artdef e.g. "Asian" (3) The name of a Civ to override the Unit Culture for a particular Civ e.g. CIVILIZATION_GERMANY.

OK, understood. But interesting nevertheless - because whilst that makes complete sense, what doesn't make sense to me is why I have been getting success for other units (non-mounted) that do not use one of those Culture names.

Indeed, in my Asset Editor, the default Cultures element that it creates uses the following naming convention: ModName_Units_Cultures (where 'ModName' is the mod's name). Perhaps that is another permitted name; but I'll definitely just revert to 'Any' as that is my requirement for now. The CIVILIZATION_NAME is good to know - I did notice that in some other instances - for future, as that is amongst my goals, too.
 
Top Bottom