Migration Guide for 1.3.0
Chairloader 1.3.0 uses new XML Merging v3, which breaks compatibility with old mods. This article guides you how to upgrade your mod to XML Merging v3.
Common steps
- Remove all
ch:patch_mode
.
This mode is now the default. If you need the old behavior withoutch:patch_mode="true"
(replace the entire node), setch:action="replace"
. - Replace
ch:apply_if
withch:applyIf
.
Attribute was renamed for consistency. - Replace
ch:remove="true"
withch:action="delete"
.
ch:patch_mode
andch:remove
were combined intoch:action
.
Level steps
For each mission_mission0.xml
file:
- Make sure that every node in
<Objects>
(like<Entity>
,<Object>
,<Decal>
) hasEntityGuid
attribute. This attribute is generated for non-entities. See Chairloader's PreyFiles for reference. - Remove all
EntityId
attributes from<Entity>
. This ID is now auto-generated. Click here for details. - Replace all references of EntityID (e.g. in flowgraphs and entity links) with
$(EntityId:[guid])
. Click here for details.
For each level:
1. Delete serialize.xml
file. This file is now auto-generated. Set ch:serialize="true"
for entities that you want to serialize. Click here for details.
Special steps
Try to install and merge your mod. You might get a few more errors.
Error: Set ch:action="replaceChildren" to replace children but merge attributes
This node's children can't be patched. You must setch:action="replaceChildren"
so all of the node's children are replaced by your node's.Index attribute is missing for an array element
The node is now an array. Array node must specifych:index
attribute so the merger knows which node you want to mod. Find the index in in the file in Chairloader's PreyFiles.Read-only attribute ? was changed from '?' to '?'
Certain attributes (like internal names) are now read-only. Mods can't modify them on existing nodes. Revert the change in your mod or just remove the attribute.