And finally, data. Without the XML files, this is all, in the words of Han Solo, a really short trip. These (redundant, poorly structured) batches of XML are representative of the nature and structure of data required. Here's what they contain.
BulkGoods.xml: Detailed breakdowns of additional properties of bulk goods, notably the unit of measurement and containment type. These include W for wet goods like wines and pickles which must be stored in waterproof containers, D for dry goods like spices which can go in boxes and bags, and N for things like hides and raw fibers which are measured by bulk quantities but don't require containment.
Containers.xml: Detailed breakdowns of additional properties of containers, notably containment type and storage capacity.
Curses.xml: Curses are like lightweight enchantments or embellishments, with a name and a CF, which Items use to modify the cost of enchantments.
Embellishments.xml: Properties of mundane embellishments, including name, weight modifier, CF, and embellishment codes indicating properties of items with which they can be matched. Some have motif code, indicating whether or not decorative motifs are suitable to the embellishment.
Enchantments.xml: Name, cost, and item type for enchantments. Also includes energy reserve value, which isn't actually used in my code, 'cause all of the XML files are automated extracts from the database tables I maintain for my own use.
Gems.xml: Name and value modifier for gems.
Items.xml: As the Item class is key to the code, Items.xml is the most important data file. Lists items with name, base cost, base weight, and one or more attributes indicating which embellishments and enchantments are suitable for use with it.
Motifs.xml: A fairly simple list of decorative motifs.
SupernaturalEmbellishments.xml: List of supernatural embellishments which is called on for some enchanted items. Just a name and CF.
<?xml version="1.0" encoding="UTF-8"?> <embellishments> <item name="Extra Shiny"> <Embellishment>Extra Shiny</Embellishment> <CF>0.25</CF> </item> <item name="Smells faintly of lilac"> <Embellishment>Smells faintly of lilac</Embellishment> <CF>0.1</CF> </item> <item name="Bringz in da funk, bringz in da noize"> <Embellishment>Bringz in da funk, bringz in da noize</Embellishment> <CF>0.5</CF> </item> <item name="Always points the other direction"> <Embellishment>Always points the other direction</Embellishment> <CF>1</CF> </item> <item name="Knows how to tango"> <Embellishment>Knows how to tango</Embellishment> <CF>1</CF> </item> </embellishments>