Add a new miz file based campaign generator.

Defining a campaign using a miz file instead of as JSON has a number of
advantages:

* Much easier for players to mod their campaigns.
* Easier to see the big picture of how objective locations will be laid
  out, since every control point can be seen at once.
* No need to associate objective locations to control points explicitly;
  the campaign generator can claim objectives for control points based
  on distance.
* Easier to create an IADS that performs well.
* Non-random campaigns are easier to make.

The downside is duplication across campaigns, and a less structured data
format for complex objects. The former is annoying if we have to fix a
bug that appears in a dozen campaigns. It's less an annoyance for
needing to start from scratch since the easiest way to create a campaign
will be to copy the "full" campaign for the given theater and prune it.

So far I've implemented control points, base defenses, and front lines.
Still need to add support for non-base defense TGOs.

This currently doesn't do anything for the `radials` property of the
`ControlPoint` because I'm not sure what those are.
This commit is contained in:
Dan Albert
2020-11-17 20:17:29 -08:00
parent 20f97e48a9
commit df80ec635f
6 changed files with 322 additions and 118 deletions

View File

@@ -3,82 +3,5 @@
"theater": "Syria",
"authors": "Khopa",
"description": "<p>In this scenario, you start from Jordan, and have to fight your way through eastern Syria.</p>",
"player_points": [
{
"type": "airbase",
"id": "King Hussein Air College",
"size": 1000,
"importance": 1.4
},
{
"type": "airbase",
"id": "Incirlik",
"size": 1000,
"importance": 1.4,
"captured_invert": true
},
{
"type": "carrier",
"id": 1001,
"x": -210000,
"y": -200000,
"captured_invert": true
},
{
"type": "lha",
"id": 1002,
"x": -131000,
"y": -161000,
"captured_invert": true
}
],
"enemy_points": [
{
"type": "airbase",
"id": "Khalkhalah",
"size": 1000,
"importance": 1.2
},
{
"type": "airbase",
"id": "Palmyra",
"size": 1000,
"importance": 1
},
{
"type": "airbase",
"id": "Tabqa",
"size": 1000,
"importance": 1
},
{
"type": "airbase",
"id": "Jirah",
"size": 1000,
"importance": 1,
"captured_invert": true
}
],
"links": [
[
"Khalkhalah",
"King Hussein Air College"
],
[
"Incirlik",
"Incirlik"
],
[
"Khalkhalah",
"Palmyra"
],
[
"Palmyra",
"Tabqa"
],
[
"Jirah",
"Tabqa"
]
]
"miz": "inherent_resolve.miz"
}

Binary file not shown.