Tags:
<Personality>
Inside: Top level of matrix.xml

<Tables>
Inside: Top level of tables.xml

<Trait Name="" Die="" Num="" Bonus="" Min="" Max="" Absolute="" Choose="">
Inside: <Personality>
Name: String, required
Die: Integer, required
Num: Integer, required
Bonus: Integer, required
Min: Integer, required
Max: Integer, required
Absolute: Boolean, required
Choose: Integer, optional

<Declare>
Inside: <Personality>


<Detail Type="" Value="" Chance="" InfoConvert="">
Inside: <Trait>
Type: String, required
Value: String, required
Chance: Integer, optional
InfoConvert: Boolean, optional

<Table Type="" Value="" Usage=""> (Note, behaves exactly like a detail in most respects, but can be called by a <TableCheck> from inside any detail)
Inside: <Tables>
Type: String, required
Value: String, required
Usage: String, optional (Final, Public, Private)

<Select Selections=""></Select>
Inside: <Detail>
Selections: Integer, optional

<Choice Chance=""></Choice>
Inside: <Select>
Chance: Integer, optional

<Information Type="" Data=""/>
Inside: <Detail>, <Choice>, <TableCheck>
Type: String
Data: String

<Roll Die="" Num="" Bonus="" Multiplier=""/>
Inside: <Detail>, <Information>
Die: Integer
Num: Integer
Bonus: Integer
Multiplier: Integer

<Each/>
Inside: <Trait>, <Detail>

<Noprint/>
Inside: <Trait>, <Detail>

<Var Name="">
Inside: <Declare>
Name: String, required

<VarMod Type="" Name="" Value="">
Inside: <Declare>, <Detail>, <Table>, <Choice>, <Roll>, <TableCheck>
Type: String (Add, Subtract, Multiply, Divide, Set), required 
Name: String, required
Value: Integer (Add, Subtract, Multiply, Divide) String (Set), required

<TableCheck Name="">
Inside: <Detail>, <Choice> - note, cannot be used inside one of these that ALSO contains a <Detail>
Name: String, required


Variables:
All fields are parsed to see if they contain variables.  A variable is declared and set to an initial value inside the <Declare> tag, using the <Var> tag.  Any <VarMod> tags will use the name to determine any changes to that variable.  to use the variable, inside the parameter of any other tag, you can use this: ${varname} - which will be replaced with the variable's value.


Creating tabs:
to create new top level tabs, you use the 'Config.xml' file, which will look something like this:
<Config>
  <Tab Directory="Personality" TopPanel="PersonalityTopPanel" Title="NPC Personality"/>
  <Tab Directory="Treasure" TopPanel="TreasureTopPanel" Title="Treasure"/>
</Config>

Each <Tab> line creates a new tab

Directory tells the name of the directory dedicated to that tab, where the matrix.xml & traits.xml file will exist.
TopPanel gives the name of the Panel that will go up top.  So far, you can use:
  PersonalityTopPanel - requires that the tab's directory contains a folder called 'names' that contains .nam files
  TreasureTopPanel
  DefaultTopPanel
Title is the title of the tab.