CCoderoute
Workflows

DayZ XML editor workflow: change loot safely

03
The scenario

Rebalance one item in your economy

You run a small DayZ private server and one item is too rare. The fix is a number in types.xml. Need help with modding and scripting your server? Start here, because the same 4 steps work for XML and for Enforce Script files.

01

Open the mission folder

Choose the folder that holds types.xml as Coderoute's working folder.

02

Describe the change

Write which item and which value should change, in plain words.

03

Review the diff

In Ask first mode, read the card before the edit is written.

04

Test your server

Run your XML check, restart a test copy, and look at the result.

What the entry looks like

types.xml
<type name="BakedBeansCan">
  <nominal>40</nominal>
  <lifetime>14400</lifetime>
  <restock>1800</restock>
  <min>20</min>
  <quantmin>-1</quantmin>
  <quantmax>-1</quantmax>
  <cost>100</cost>
  <flags count_in_cargo="0" count_in_hoarder="0"
         count_in_map="1" count_in_player="0"
         crafted="0" deloot="0"/>
  <category name="food"/>
  <usage name="Town"/>
</type>

One item in types.xml: nominal is how many the economy aims to keep, lifetime is how many seconds one lasts. The flags tag carries all six attributes, split over 3 lines here to fit the page.

Beginner-friendly walkthroughs

Edit types.xml on a DayZ private server

Open the mission folder in Coderoute and ask it to show how BakedBeansCan is configured. It uses grep to find the entry and read_file to display it, then explains each tag in plain words. Next, ask for nominal 60 instead of 40. In Ask first mode the change shows as a diff, and edit_file writes only that line after you accept. Your XML check command then runs in Shell. Finally, restart a test copy of your server and watch whether the item turns up more often. Keep a copy of the original file.

Plan a server with light mods

A server with light mods is easier to maintain than one with 30. Switch Coderoute to Plan only and ask for a list of what each mod needs: a key in the keys folder, a place in your launch script and, for new items, entries in types.xml. It reads the files with read_file and grep but changes nothing. Review the plan, switch to Ask first, and let it write one entry at a time. Test after every change, so a mistake is easy to find.

Coderoute for Windows

Try the workflow on your own files

Download Coderoute ↗