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

Possible to overwrite ArtDefs?

Discussion in 'Mod Creation Help' started by ITcore, Feb 26, 2019.

  1. ITcore

    ITcore Warlord

    Joined:
    Dec 25, 2016
    Messages:
    248
    Gender:
    Male
    Location:
    127.0.0.1
    I want to overwrite the existing tint for the units but creating my own color section just adds it to the pool of colors the units end up picking from.
     
  2. Wolfdog

    Wolfdog Unit Butcher

    Joined:
    Jun 29, 2012
    Messages:
    659
    Location:
    Australia
  3. ITcore

    ITcore Warlord

    Joined:
    Dec 25, 2016
    Messages:
    248
    Gender:
    Male
    Location:
    127.0.0.1
    I saw the thread there. It's somewhat related but no real mention of overwriting existing artdef entries. Example here is trying to update Rome's unit tint (defined in base game Units.artdef) which has 3 entries, 2 purple and 1 yellow. I create my artdef and define 2 red and 1 yellow but the game doesn't overwrite it so the units can now randomly pick from purple, red, and yellow. But thank you for posting that.
     
  4. Deliverator

    Deliverator Graphical Hackificator

    Joined:
    Feb 12, 2008
    Messages:
    4,711
    Location:
    London, UK
    It's possible to overwrite artdef collections using m_ReplaceMergedCollectionElements = true, for example in raw XML:
    Code:
                <Element>
                    <m_Fields>
                        <m_Values/>
                    </m_Fields>
                    <m_ChildCollections>
                        <Element>
                            <m_CollectionName text="Colors"/>
                            <m_ReplaceMergedCollectionElements>true</m_ReplaceMergedCollectionElements>
                            <Element>
                                <m_Fields>
                                    <m_Values>
                                        <Element class="AssetObjects:RGBValue">
                                            <m_r>175.000000</m_r>
                                            <m_g>15.000000</m_g>
                                            <m_b>13.000000</m_b>
                                            <m_ParamName text="Color"/>
                                        </Element>
                                    </m_Values>
                                </m_Fields>
                                <m_ChildCollections/>
                                <m_Name text="Colors001"/>
                                <m_AppendMergedParameterCollections>false</m_AppendMergedParameterCollections>
                            </Element>
                        </Element>
                    </m_ChildCollections>
                    <m_Name text="Greek_Hoplite"/>
                    <m_AppendMergedParameterCollections>false</m_AppendMergedParameterCollections>
                </Element>
    
     

Share This Page