modding-guide

Inheritance

Templates/BaseAssetGUID and properties.xml, written by Serp

In properties-toolones.xml we can find all allowed properties, entries and values for xml.
When you create your own asset, you will always either use a “Template” for it or a BaseAssetGUID. They both basically work the same way. They define default properties,entries and values for your asset. Everything you you do not define yourself in your asset, will be “inherited” from them. And if something is not defined in them, the default value will be taken from porperties.xml (same default values can also be found in properties-toolone.xml). And if a value has even no default defined in there, it will default to 0 / empty list as far as I know.

Using BaseAssetGUID instead of Template basically does the same like using a template, but the first inheritance takes place from the GUID you define as BaseAssetGUID. This is very useful if you want to create basically a copy of another asset or a copy with just a few values being different. Then you use the original as BaseAssetGUID and only mention the values you want to be different. The rest will be automatically inherited from the BaseAsset. When using BaseAssetGUID you have to make sure to enter your Asset BELOW the GUID you use as BaseAssetGUID. This is best done by using in your ModOp AddNextSibling with the GUID you want to use as BaseAssetGUID.

SkinVariations is a “list”, called “Vector” in properties-toolone.xml. It can contain multiple entries, usually seperated with <Item> entries. Inheritance of these lists works a little bit different. Lists are only fully inherited if you do not fill it with any entry in your Asset. In our example above we filled this list with 1 new entry. That means the the complete list got overwritten by our asset and not a single Item/FileName entry from anything else (neither BaseAssetGUID nor template nor properties.xml) will be used. If you would leave it out instead, then it will inherit. If you write instead, you will again overwrite the complete list in this case with an empty list.
What to do now if we want to inherit eg. the first and 3rd entry from the list from the BaseAsset?

See also the german explanation from Taube back in 2020 here if you want: https://maug-projekt.com/forum/index.php?thread/715-vererbung-von-vectorelements/