So I’m familiar with the concepts of serialization, scriptable objects and XML. What I’m wondering is how some games I’ve played (with xml documents) allow whole new items (and other objects) to be created from the XML. Like, 7 days to die (unity engine), has XML like this:
<item id="7" name="clubIron">
<property name="Extends" value="clubMaster" />
<property name="Meshfile" value="Items/Weapons/Melee/Club/Club_Wood_RefinedPrefab" />
<property name="Material" value="metal" />
<property name="RepairTools" value="scrapIron" />
<property class="Action0">
<property name="Buff" value="criticalBlunt" />
<property name="Buff_chance" value=".2" />
</property>
<property class="Attributes">
<property name="EntityDamage" value="9,16" />
<property name="BlockDamage" value="3,13" />
<property name="DegradationMax" value="100,600" />
<property name="DamageBonus.head" value="4" />
</property>
<property name="CritChance" value=".2" />
<property name="Group" value="Ammo/Weapons" />
<property name="DescriptionKey" value="clubIronDesc"/>
</item>
Which you could change to make your own custom “club” item with item id=(something unused).
So I understand how to read in these values, but then that I have them, how do I “create” a new “prefab” (or whatever it is), so that this item can be instantiated into the game world?