Pre-Order the Game!

Desura Digital Distribution

Tuesday, October 9, 2012

Final Ship Data Structure

I mentioned in my last post that I'm working on the projects and re-working technology system.  What I didn't realize at the moment is that it'd require overhaul of the technology system AND data files.  This occured when I was thinking about equipment in ships, and how should mounts and modifiers work?  How do the game know to create a combo box, or a list of checkboxes?

I believe that I have figured out a system that will be final and flexible.  This is how the data will look like (I've started work on updating the data files to match the new system)

ShipEquipments.xml - Contains three types of items:

ShipItem - The basic data about an item, it also have "modifiers" and "enhancers", that if a modifier or enhancer matches the type (For example, Laser would have beamModifiers and beamEnhancers as values), it is added to the UI in ship design.  Can have more than 1 modifier and/or enhancer types.
ShipModifier - This is an item that can be used to modify ShipItem.  It defines which types it can modify.  Can modify more than 1 type.  However, the item can only pick one modifier for a type.  So if an item have "BeamModifier" and "BeamModifier2" types, it can only have one item for each type, totalling 2 modifiers.
ShipEnhancer - This is similar to ShipModifier, but in that multiple enhancers can be added (checkboxes instead of a combobox).

With this system, it's possible to create a game like MoO 1 (have all items be standalones, no modifiers or enhancers), MoO 2 (have firing arc modifiers and special attributes as enhancers), or MoO 3 (sized mount modifiers with special attributes enhancers).

I should have this new system done by end of week, if all goes well!

1 comment: