controls.xml has been renamed to templates.xml, and the root element has also changed from <controls> to <templates>. This change resolves the confusion between the XUi controller classes and the XML templates. The folder has also moved from XUi to XUi_InGame.
Key Changes
- Root element:
<controls>→<templates>(most important) - File name:
controls.xml→templates.xml - panel → rect:
<panel disableautobackground="true">within templates has become<rect>(e.g.active_buff_entry,players_header) - Removed templates:
debugslider,backpack_item_stack(merged intoitem_stack),prefab_folder_entry, and the olditem_stack/category_icon(due to redefinition) - New templates:
drag_item_stack,equipment_stack, the full set ofsign_*templates from the reworked sign editor, andspawn_block_selection_entry item_stacknow uses size expressions: fixed values likewidth="78"have become arithmetic expression bindings such ascell_size="[itemStack:width]"plus${3+cell_size}.globalopacity→globalopacitymod, and the durability display has been extended topermadurabilityand the like- Removal of
|oncefrom{value|once}, deletion of somewidth="100%", and removal ofcollider_scale
Impact on MODs
- Any xpath starting with
/controlswill now miss entirely at the root. Replace every leading/controlswith/templates(e.g./controls/recipe_entry/rect/label→/templates/recipe_entry/rect/label). - Patch placement also moves from
Config/XUi/controls.xmltoConfig/XUi_InGame/templates.xml. - Because the parent of
active_buff_entryand others changed frompaneltorect, any path that includespanelneeds rewriting. - Modifications that relied on the removed templates (
backpack_item_stack,debugslider) will need to be ported.
Reference: Diff Example
-<controls>
+<templates>
<active_buff_entry>
- <panel ... controller="ActiveBuffEntry" disableautobackground="true" ...>
+ <rect ... controller="ActiveBuffEntry" ...>
- <sprite depth="2" name="Icon" sprite="{bufficon|once}" .../>
+ <sprite depth="2" name="Icon" sprite="{bufficon}" .../>
- </panel>
+ </rect>
</active_buff_entry>
* Based on investigation immediately after applying the experimental build (equivalent to B252).
Related: List of MOD-making articles