Here's a prototype army list editor file... this one only specifies the structure of a Blood Angels force (and the required other 40k information such as unit types and basic FOCs).
The code section shows the file contents of BloodAngels.json.
{
"schema": "http://schema.lan/2014/09/ale-json.html",
"gameSystems": [
{
"name": "Warhammer 40,000",
"focCharts": [
{
"name": "Standard",
"sections": [
{ "section": "HQ", "min": 1, "max": 2 },
{ "section": "Elites", "min": 0, "max": 3 },
{ "section": "Troops", "min": 2, "max": 6 },
{ "section": "Fast Attack", "min": 0, "max": 3 },
{ "section": "Heavy Support", "min": 0, "max": 3 }
]
},
{
"name": "Allies",
"sections": [
{ "section": "HQ", "min": 1, "max": 1 },
{ "section": "Elites", "min": 0, "max": 1 },
{ "section": "Troops", "min": 1, "max": 2 },
{ "section": "Fast Attack", "min": 0, "max": 1 },
{ "section": "Heavy Support", "min": 0, "max": 1 }
]
}
],
"unitTypes": {
"Infantry": [],
"Jump Infantry": [],
"Vehicle": ["Walker", "Fast", "Tank", "Skimmer", "Open-topped"],
"Monstrous Creature": ["Flying"],
"Beast": [],
"Bikes": [],
"Jetbikes": []
}
}
],
"armyBook": {
"name": "Blood Angels",
"gameSystem": "Warhammer 40,000",
"groupMacros": {
"lightTransports": [
{"name":"Rhino","min":0,"max":1},
{"name":"Razorback","min":0,"max":1},
{"name":"Drop Pod","min":0,"max":1}
],
"heavyTransports": [
{"name":"Land Raider","min":0,"max":1},
{"name":"Land Raider Crusader","min":0,"max":1},
{"name":"Land Raider Redeemer","min":0,"max":1}
]
},
"units": [
{ "name": "Commander Dante", "section": "HQ", "type": "Jump Infantry", "unique": true,
"children": [{"name": "Honour Guard", "min": 0, "max": 1}] },
{ "name": "Chapter Master Gabriel Seth", "section": "HQ", "type": "Infantry", "unique": true,
"children": [{"name": "Honour Guard", "min": 0, "max": 1}] },
{ "name": "Astorath the Grim", "section": "HQ", "type": "Jump Infantry", "unique": true,
"children": [{"name": "Honour Guard", "min": 0, "max": 1}] },
{ "name": "The Sanguinor, Example of the Host", "section": "HQ", "type": "Jump Infantry", "unique": true,
"children": [{"name": "Honour Guard", "min": 0, "max": 1}] },
{ "name": "Mephitson, Lord of Death", "section": "HQ", "type": "Infantry", "unique": true,
"children": [{"name": "Honour Guard", "min": 0, "max": 1}] },
{ "name": "Captain Tycho", "section": "HQ", "type": "Infantry", "unique": true,
"children": [{"name": "Honour Guard", "min": 0, "max": 1}] },
{ "name": "Librarian", "section": "HQ", "type": "Infantry", "types": ["Infantry", "Jump Infantry", "Bikes"] ,
"children": [{"name": "Honour Guard", "min": 0, "max": 1}] },
{ "name": "Reclusiarch", "section": "HQ", "type": "Infantry", "types": ["Infantry", "Jump Infantry", "Bikes"],
"children": [{"name": "Honour Guard", "min": 0, "max": 1}] },
{ "name": "Captain", "section": "HQ", "type": "Infantry", "types": ["Infantry", "Jump Infantry", "Bikes"],
"children": [{"name": "Honour Guard", "min": 0, "max": 1}] },
{ "name": "Honour Guard", "type": "Infantry", "types": ["Infantry", "Jump Infantry"], "children": "groupMacros(['lightTransports','heavyTransports'])" },
{ "name": "Chaplain", "section": "Elites", "type": "Infantry", "types": ["Infantry", "Jump Infantry", "Bikes"] },
{ "name": "Sanguinary Guard", "section": "Elites", "type": "Jump Infantry" },
{ "name": "Furioso Dreadnought", "section": "Elites", "type": "Vehicle", "subTypes": ["Walker"],
"transportSize": 10, "children": [{"name":"Drop Pod","min":0,"max":1}] },
{ "name": "Terminator Squad", "section": "Elites", "type": "Infantry", "children": "groupMacros('heavyTransports')",
"transportSize": 2 },
{ "name": "Terminator Assault Squad", "section": "Elites", "type": "Infantry", "children": "groupMacros('heavyTransports')" },
{ "name": "Techmarine", "section": "Elites", "type": "Infantry" },
{ "name": "Sternguard Veteran Squad", "section": "Elites", "type": "Infantry", "children": "groupMacros(['lightTransports','heavyTransports'])" },
{ "name": "Sanguinary Priests", "section": "Elites",
"children": [{"name": "Sanguinary Priest", "min": 1, "max": 3}] },
{ "name": "Sanguinary Priest", "section": "Sanguinary Priests", "type": "Infantry",
"types": ["Infantry", "Jump Infantry", "Bikes"] },
{ "name": "Tactical Squad", "section": "Troops", "type": "Infantry", "children": "groupMacros(['lightTransports','heavyTransports'])" },
{ "name": "Death Company", "section": "Troops", "type": "Infantry", "types": ["Infantry", "Jump Infantry"],
"min": 0, "max": "[1,100][army.has('Astorath the Grim')]", "children": "groupMacros(['lightTransports','heavyTransports'])" },
{ "name": "Death Company Dreadnoughts", "section": "Troops", "type": "Vehicle", "subTypes": ["Walker"],
"min": 0, "max": "army.numberOf('Death Company')", "transportSize": 10, "children": [{"name":"Drop Pod","min":0,"max":1}] },
{ "name": "Assault Squad", "section": "Troops", "type": "Jump Infantry", "types": ["Infantry", "Jumpy Infantry"],
"children": "groupMacros(['lightTransports','heavyTransports'])" },
{ "name": "Vanguard Veteran Squad", "section": "Fast Attack", "type": "Jump Infantry", "types": ["Infantry", "Jump Infantry"],
"children": "groupMacros(['lightTransports','heavyTransports'])" },
{ "name": "Land Speeder Squadron", "section": "Fast Attack", "type": "Vehicle", "subTypes": ["Fast", "Skimmer"] },
{ "name": "Baal Predator", "section": "Fast Attack", "type": "Vehicle", "subTypes": ["Fast", "Tank"] },
{ "name": "Attack Bike Squad", "section": "Fast Attack", "type": "Bikes" },
{ "name": "Bike Squad", "section": "Fast Attack", "type": "Bikes" },
{ "name": "Scout Bike Squad", "section": "Fast Attack", "type": "Bikes" },
{ "name": "Dreadnought", "section": "Heavy Support", "type": "Vehicle", "subTypes": ["Walker"],
"transportSize": 10, "children": [{"name":"Drop Pod","min":0,"max":1}] },
{ "name": "Stormraven Gunship", "section": "Heavy Support", "type": "Vehicle", "subTypes": ["Fast", "Skimmer"] },
{ "name": "Predator", "section": "Heavy Support", "type": "Vehicle", "subTypes": ["Fast", "Tank"] },
{ "name": "Devastator Squad", "section": "Heavy Support", "type": "Infantry", "children": "groupMacros(['lightTransports','heavyTransports'])" },
{ "name": "Vindicator", "section": "Heavy Support", "type": "Vehicle", "subTypes": ["Fast", "Tank"] },
{ "name": "Whirlwind", "section": "Heavy Support", "type": "Vehicle", "subTypes": ["Fast", "Tank"] },
{ "name": "Rhino", "type": "Vehicle", "subTypes": ["Fast", "Tank"], "capacity": 10 },
{ "name": "Razorback", "type": "Vehicle", "subTypes": ["Fast", "Tank"], "capacity": 6 },
{ "name": "Drop Pod", "type": "Vehicle", "subTypes": ["Open-topped"], "capacity": 10 },
{ "name": "Land Raider", "type": "Vehicle", "subTypes": ["Tank"], "capacity": 10 },
{ "name": "Land Raider Crusader", "type": "Vehicle", "subTypes": ["Tank"], "capacity": 16 },
{ "name": "Land Raider Redeemer", "type": "Vehicle", "subTypes": ["Tank"], "capacity": 12 }
]
}
}
It may be difficult to read if you don't understand JSON. However, it shouldn't be too difficult to pick up. Basically the file starts by defining how 40k works. It says that there's a standard and allies FOC available to use and that there are a number of unit types available (this list isn't actually full but is enough for Blood Angels). This is, I believe, enough to describe how 40k works. The file then defines an army book - in this case Blood Angels. The two "macros" are experimental things that are used to make the rest of the list quicker to type and a bit smaller... so they may not make it into the final file format. They are basically lists of transport vehicles so I need not repeat them multiple times in the list.
The unit definitions here are much more complex than in the old editor - we used to say a unit belonged to an army list section and had a name. Now we give a default section, the default type of unit, additional types (for vehicles) and optional types (e.g. Jump Infantry if you upgrade a captain with a jump pack). If a unit is unique the editor should not allow you to include it twice in a roster. The children of a unit are a useful idea - it says which units are in effect a child of the current unit. For example, a rhino can be a child of a tactical squad - the rhino doesn't take up an FOC slot but still requires the tactical squad to remain in the army. This is especially useful for units such as Imperial Guard Platoons as these need a container unit but a lot of children. This will allow the editor to accurately monitor the number of used army sections (HQ/Elites/etc). Also, children can have minimum and maximum requirements - e.g. a tactical squad can have 0-1 rhinos whilst a IG platoon can have 2-5 infantry squads. Unfortunately the current system would let you have both a rhino and drop pod - I'm not quite sure how to fix this unless I only allow one transport but this may be allowed in some game systems. This could potentially be solved by having a "maxTransports" toggle in the army definition. (A unit is a transport if it has a "capacity" entry).
NB: if a unit has no section then it can *only* be added as a child unit. For technical reasons, you should be able to override a unit section (as long as it had one to start with) in case things such as Dante allow you to have differently placed Sanguinary Guard (troops not elites) or similar circumstances. If you validate your army list it should warn you about any overrides that cause your list not to follow the army definition file.
Hopefully I can push out something in the next couple of days to allow you to edit army definition files.