229
« on: March 09, 2016, 05:59:02 PM »
Hi all,
I finished the pause system on Sunday, it allows the Captain to pause the game's simulation while still allowing all of the ship's systems to be interacted with.
I have intended to work on the armour system after that, adding the armour condition display to the Engineering UI, but decided to put it on hold while I implement Spaceship Templates.
The spaceships in UNION are modular, but up until now configuring those modules has been hardcoded into the game. That meant you had to modify the source if you wanted to change or add a spaceship, which is important for modding the game. I decided that before I made more changes to the spaceship system I would move spaceship definitions into external editable "Spaceship Template" files.
I has initially thought I would use the XML format for these templates, but XML is so a verbose and difficult to read, so instead I have opted for the JSON format.
To give you an idea of what these Spaceship Templates will look like, here is a snippet of the work-in-progress file:
/* UNION Spaceship Template v0.2a */
{
"ClassType": "Frigate",
"ClassTitle": "Kite",
"HullIntegrity": 6540,
"Parts": {
"Reactors": [{
"PowerWheelRotation": 0.0,
"MaxPowerOutput": 9
}, {
"PowerWheelRotation": 60.0,
"MaxPowerOutput": 9
}, {
"PowerWheelRotation": 155.0,
"MaxPowerOutput": 9
}, {
"PowerWheelRotation": 205.0,
"MaxPowerOutput": 9
}, {
"PowerWheelRotation": 300.0,
"MaxPowerOutput": 9
}],
"Systems": [{
"EquipmentType": "Turret",
"Name": "Forward Turret",
"PowerWheelRotation": 0.0,
"Class": 3,
"LocalPosition": {
"X": 0.0,
"Y": -1.185,
"Z": 0
},
"LocalRotation": {
"X": 0.0,
"Y": 0.0,
"Z": 180.000015
},
"HullSectionIndex": 0,
TurretMinXRotation = 270.0f,
TurretMaxXRotation = 0.0f,
TurretMinYRotation = 215.0f,
TurretMaxYRotation = 145.0f
}, {
"EquipmentType": "Sensors",
"Name": "Sensors",
"PowerWheelRotation": 22.5,
"Class": 3,
"LocalPosition": {
"X": 1.05,
"Y": 0.365,
"Z": 1.35
},
"LocalRotation": {
"X": 0.0,
"Y": 0.0,
"Z": 315.000031
},
"HullSectionIndex": 0
}, {
"EquipmentType": "TorpedoLauncher",
"Name": "Rear Torpedo Tubes",
"PowerWheelRotation": 47.0,
"Class": 3,
"LocalPosition": {
"X": 0.0,
"Y": 1.16,
"Z": -2.635
},
"LocalRotation": {
"X": 0.0,
"Y": 180.000015,
"Z": 0.0
},
"HullSectionIndex": 0
}],
"ReactorConnections": [{
"ReactorIndex": 0,
"SystemIndex": 8,
"DefaultPower": 2,
"MaxPower": 9
}, {
"ReactorIndex": 0,
"SystemIndex": 9,
"DefaultPower": 2,
"MaxPower": 9
}, {
"ReactorIndex": 0,
"SystemIndex": 0,
"DefaultPower": 2,
"MaxPower": 9
}]
}
}
Everything, from the systems on the ship to the models and textures, will be configured in these Spaceship Templates.
Thanks for reading!
Mark