Before proceeding though, make sure you undestand how hashes, names, and aliases work: viewtopic.php?f=177&t=6499
Here's an example XML file, which I have assembled from various sources. Note that this file is not an exact representation of what you'll find in the game itself, as I've assembled a variety of different property types in order to explain how they all work.
Code: Select all
<?xml version="1.0" encoding="utf-8"?>
<properties>
<string16 name="description">Complete Themes for Booster Pack 1</string16>
<key name="parent" groupid="creatureeditortemplates" instanceid="labcreaturemouthtemplate" />
<key name="mouthtype" instanceid="SHD" />
<float name="itemUnlockFindPercentage">0.99</float>
<int32 name="modelRunTimeBoneCount">0</int32>
<bool name="modelUseDummyBlocks">true</bool>
<texts name="blockName">
<text tableid="#4C3AB0DD" instanceid="ce_mouth_beastSentinel_01">KneeNoggin</text>
</texts>
<keys name="modelHandlePlacementTypesTemplate">
<key groupid="DeformAxisLeft" instanceid="Preserveall" />
<key groupid="DeformAxisForward" instanceid="Preserveall" />
<key groupid="DeformAxisUp" instanceid="Preserveall" />
</keys>
<string8s name="modelHandleStretchSounds">
<string8>creature_x</string8>
<string8>creature_y</string8>
<string8>creature_z</string8>
</string8s>
<vector3 name="modelRotation">
<x>0</x>
<y>-90</y>
<z>0</z>
</vector3>
<vector4 name="palettePageBorder">
<x>0</x>
<y>0</y>
<z>0</z>
<w>0</w>
</vector4>
</properties>
Alright, so the first thing to keep in mind is that all of these XML files have two lines of boilerplate at the beginning. You can copy and paste these. The beginning is as follows:
Code: Select all
<?xml version="1.0" encoding="utf-8"?>
<properties>
The first property in this XML file is a string16 property:
Code: Select all
<string16 name="description">Complete Themes for Booster Pack 1</string16>
It has an opening tag:
Code: Select all
<string16 name="description">
Code: Select all
<string16
The
Code: Select all
name="description"
The
Code: Select all
>
Next, it has a value:
Code: Select all
Complete Themes for Booster Pack 1
Finally, it has a closing tag:
Code: Select all
</string16>
The next property is a key property:
Code: Select all
<key name="parent" groupid="creatureeditortemplates" instanceid="labcreaturemouthtemplate" />
The
Code: Select all
<key
The
Code: Select all
name="parent"
After this, we will see up to three more segments similar to the name, but instead of name, they will include any combination of:
Code: Select all
instanceid
Code: Select all
groupid
Code: Select all
typeid
Finally, the
Code: Select all
/>
Now we come to...another key property:
Code: Select all
<key name="mouthtype" instanceid="SHD" />
The next tag is a float, or floating point value:
Code: Select all
<float name="itemUnlockFindPercentage">0.99</float>
The next tag is an int32, or integer:
Code: Select all
<int32 name="modelRunTimeBoneCount">0</int32>
After that, we have something called a bool, or boolean:
Code: Select all
<bool name="modelUseDummyBlocks">true</bool>
Code: Select all
true
After that is a texts property. Now, this property is a bit weird, as, in a sense, it contains another property. Think of it like a plural version.
Code: Select all
<texts name="blockName">
<text tableid="#4C3AB0DD" instanceid="ce_mouth_beastSentinel_01">KneeNoggin</text>
</texts>
Code: Select all
<texts name="blockName">
Next, we have this entire line:
Code: Select all
<text tableid="#4C3AB0DD" instanceid="ce_mouth_beastSentinel_01">KneeNoggin</text>
Code: Select all
<text tableid="#4C3AB0DD" instanceid="ce_mouth_beastSentinel_01">
Code: Select all
tableid
Code: Select all
instanceid
The next part is the value. In this case, it's "KneeNoggin". This value is only used if the tableid and instanceid are not present.
After that is the closing tag:
Code: Select all
</text>
Since this property is plural, you can add as many lines like this:
Code: Select all
<text tableid="#4C3AB0DD" instanceid="ce_mouth_beastSentinel_01">KneeNoggin</text>
Code: Select all
</texts>
Code: Select all
<keys name="modelHandlePlacementTypesTemplate">
<key groupid="DeformAxisLeft" instanceid="Preserveall" />
<key groupid="DeformAxisForward" instanceid="Preserveall" />
<key groupid="DeformAxisUp" instanceid="Preserveall" />
</keys>
Code: Select all
<string8s name="modelHandleStretchSounds">
<string8>creature_x</string8>
<string8>creature_y</string8>
<string8>creature_z</string8>
</string8s>
And now, we come to a vector3 property:
Code: Select all
<vector3 name="modelRotation">
<x>0</x>
<y>-90</y>
<z>0</z>
</vector3>
Also note that vector2 (x, y), vector4 (x, y, z, w), colorRGB (r, g, b), and colorRGBA (r, g, b, a) properties exist. The syntax is the same, just with different inner values. Here are a few examples:
Code: Select all
<vector4 name="palettePageBorder">
<x>0</x>
<y>0</y>
<z>0</z>
<w>0</w>
</vector4>
Code: Select all
<colorRGB name="consequenceTraitColor">
<r>0.282</r>
<g>0.733</g>
<b>0.549</b>
</colorRGB>
Finally, one more line of boilerplate at the end:
Code: Select all
</properties>
Now you know how to understand properties in Spore XML files, and with a bit of practice, you'll know this stuff like a second language!
If you have any further questions, feel free to ask.