To make a new or fixed race without editing the core files (dd_races.user or whatever), you need to make a new file, name it something understandable and give it the right ending. I use the format Type.Name.user, but you can obviously use any system you prefer. So for a race that I make up, I would call it Race.RaceTheDMMadeUp.user so that when I sort the files I can find all of the races easily, then find the specific race I need to muck about with.

When HeroLab starts up the data set, it looks in the folder that it has been told all of the data files are in. You can find this folder by opening the system in HeroLab, then going to Tools > Explore Folders > Game System Data Folder. This is where you will save your user files.

All Race (and any other file) documents need to start with this code:

<?xml version="1.0" encoding="ISO-8859-1"?>
<document signature="Hero Lab Data">

The first line tells HL that the file is formated as an XML v1 document using a specific basic character set. This can be a problem if you code in another program that supports a regional character set like the French version or another language with funny letters. I guess a good rule of thumb is to just not be French, or just be sure you only use standard english letters, numbers, and punctuation.

The second line tells HL that this document has data for it, and it should add everything inside to data set running.

XML is easiest if you keep its heirarchical/tree structure in mind. Almost everything needs to be closed. The XML version line, is complete, and doesn't need a close tag. The <document ...> element, however, needs an end:

</document>

This will go at the bottom of the file. As soon as HL reads this tag, it knows it has reached the end of the information, and it closes the file. If you only have one <thing> in the file, it will have the </document> tag right after it. If you have a couple <thing>s in your file, such as if you are makeing a race with all of the racial powers included in the one file, the </document> will go after the final <thing>.

Throughout the file you can create comments. Comments are as follows:

<!-- This is the format for a blocked comment.
It starts with the Less-than symbol, has an exclaimation point, then two dashes.
It will continue to be a comment until you include the end comment tag, which
can happen as soon as within the same line, or way at the end of multiple lines of text.
This is a good way to add a comment in the middle of some code, to give a lot of notes
about what is going on, or to temporarily remove some actual code from being run
without deleting the code from the document.

The end code is two dashes and a greater-than symbol.-->

XML doesn't have a single line comment. If you want to comment out an entire line, just put the start comment tag at the beginning of it, and the end comment tag at the end.

HeroLab has its own comment code. If you will be editing your files inside and outside of HL, you may want to avoid the XML code, as it seems that HL strips those out when it edits a file. The HL code for comment is:

<comment> </comment>

The upside to the HL comment is that within the HL code editor, there is a comment field, and this will appear in that box. You seem to be limited to one of these per <thing>, so use it wisely. I don't believe it has a specific spot in the <thing> where it has to be, but I think it may have to be outside everything except for the <thing>. IE, don't put it inside the <thing> start line, or within a <bootstrap>, etc.

Basic.user is a template file with just the start and end code for a valid HL data file (with a comment in the middle). If you place that file in the game system data folder, HL will load it when it loads all of the other files, and put all of the data inside it into the character generation database (which is nothing). It will not throw an error, because it is a valid (if pointless) file. You can right click it, then "View Note As > View Note in File Explorer" to open the folder with this code file.