- Location
- Germany
@Artemis1992, since I'm yet again expanding the unit definitions with a bunch of values, I restructured a bit. Also helped clean up the code a whole lot.
These are the parts of a unit definition as I'm storing them internally.
Unit definition:
Attachment definition:
Unit or attachment name:
These are the parts of a unit definition as I'm storing them internally.
Unit definition:
JSON:
{
"Type_ID": "dummy",
"Unit_Sets": [
"none"
],
"Accepted_Attachments": [],
"Movement_Speeds": {
"Land": 3.0,
"Air": -999999.0,
"Tunneling": -999999.0,
"Water_Surface": -999999.0,
"Water_Dive": -999999.0,
"Deep_Strike_Range": -999999.0
},
"Maneuverability": 100.0,
"Readiness": 100.0,
"Readiness_Regain": 3.0,
"Organization": 100.0,
"Organization_Regain": 3.0,
"Attack_Strength": {
"Physical": 1.0,
"Death": 0.0,
"Psychic": 0.0,
"Long_Range": 0.0
},
"Defense_Percentage": {
"Physical": 0.0,
"Death": 0.0,
"Psychic": 0.0,
"Long_Range": 0.0
},
"Construction_Ticks": 30,
"Points_Cost": {
"Wealth": 1.0,
"Ressources": 0.0,
"Supplies": 0.0,
"Mages": 0.0
},
"Capacity_Cost": {
"Administrative": 1.0,
"Diplomatic": 0.0,
"Construction": 0.0,
"Enchanting": 0.0,
"Research": 0.0,
"Intelligence": 0.0,
"Tactical": 0.0,
"Forge": 0.0
},
"Reinforcement_Cost_Factor": 0.5,
"Supplies_Upkeep": 0.1,
"Supplies_Combat": 0.1
}
Attachment definition:
JSON:
{
"Attachment_ID": "dummy",
"Unit_Sets": [
"none"
],
"Movement_Speeds": {
"Land": 0.0,
"Air": 0.0,
"Tunneling": 0.0,
"Water_Surface": 0.0,
"Water_Dive": 0.0,
"Deep_Strike_Range": 0.0
},
"Maneuverability": 0.0,
"Readiness": 0.0,
"Readiness_Regain": 0.0,
"Organization": 0.0,
"Organization_Regain": 0.0,
"Attack_Strength": {
"Physical": 0.0,
"Death": 0.0,
"Psychic": 0.0,
"Long_Range": 0.0
},
"Defense_Percentage": {
"Physical": 0.0,
"Death": 0.0,
"Psychic": 0.0,
"Long_Range": 0.0
},
"Construction_Ticks": 30,
"Points_Cost": {
"Wealth": 1.0,
"Ressources": 0.0,
"Supplies": 0.0,
"Mages": 0.0
},
"Capacity_Cost": {
"Administrative": 1.0,
"Diplomatic": 0.0,
"Construction": 0.0,
"Enchanting": 0.0,
"Research": 0.0,
"Intelligence": 0.0,
"Tactical": 0.0,
"Forge": 0.0
},
"Reinforcement_Cost_Factor": 0.5,
"Supplies_Upkeep": 0.1,
"Supplies_Combat": 0.1
}
Unit or attachment name:
JSON:
{
"ID": "DUMMY",
"Unit_Set": "none",
"Name": "DUMMY",
"Description": "DUMMY"
}