Created Custom campaigns (markdown)

C. Perreau
2020-10-09 15:12:54 +02:00
parent fa06adfb2f
commit fd47a9660e

131
Custom-campaigns.md Normal file

@@ -0,0 +1,131 @@
# Principle
Ever felt frustrated by the limited choice of map settings offered by DCS Liberation ?
Good news, you can mod your custom campaigns setup in liberation !
Custom campaigns/theaters can be created easily with a text editor as a json file.
You can put your own campaigns configuration json files in the folder **./resources/campaigns**, and restart DCS Liberation to load them.
If there is no error, your custom campaign will appear in the New game wizard.
If there is an error, with the file, please check the content of the console output, it might contains hints.
# File format
This json file should contain a json object, with the following parameters :
* **name** : The name of the campaign/theater
* **theater** : The map for the campaing (Either : "Caucasus", "Persian Gulf", "Nevada", "Normandy", "Syria" or "The Channel"
* **player_points** : A list of control points owned by the player by default
* **enemy_points** : A list of control points owned by the enemy by default
* **links** : The existing connections between points. A list of connected points (using their id) You shouldn't link points if there is water between them.
Control point object structure in the json file :
* **type** : Either "airbase" for an existing base in DCS, "lha" for helicopter Carriers, or "carrier" for an aircraft carrier.
* **id** : The name of the airbase (if an airbase), or a number (> 1000) for an aircraft carrier or an lha. (If you have multiple carriers/lhas, make sure they do not share the same ID)
* **x** : X starting position of the carrier or lha in DCS coordinates (See the last part of this tutorial to see how to retrieve these coordinates from DCS mission editor)
* **y** : Y starting position of the carrier or lha in DCS coordinates
* **importance** : Importance of the base for the AI. (1 for low importance, 1.4 for high importance) (airbase only)
* **size** : Size of the airbase in meter for unit placement. (This is a legacy parameter, that you can ignore and put 1000)
* **captured_invert** : Whether the control point should be owned by the player if you select "invert map" in new game wizard.
**Note :**
*I highly recommend you look at the default file provided in DCS Liberation for examples. There might be other parameters in these files, but you shouldn't change them.*
# Example file
Below is an example of campaign file :
```json
{
"name": "Caucasus - Western Georgia",
"theater": "Caucasus",
"player_points": [
{
"type": "airbase",
"id": "Kobuleti",
"size": 600,
"importance": 1.1
},
{
"type": "carrier",
"id": 1001,
"x": -285810.6875,
"y": 496399.1875,
"captured_invert": true
},
{
"type": "lha",
"id": 1002,
"x": -326050.6875,
"y": 519452.1875,
"captured_invert": true
}
],
"enemy_points": [
{
"type": "airbase",
"id": "Kutaisi",
"size": 600,
"importance": 1
},
{
"type": "airbase",
"id": "Senaki-Kolkhi",
"size": 1000,
"importance": 1
},
{
"type": "airbase",
"id": "Sukhumi-Babushara",
"size": 1000,
"importance": 1.2
},
{
"type": "airbase",
"id": "Gudauta",
"size": 1000,
"importance": 1.2
},
{
"type": "airbase",
"id": "Sochi-Adler",
"size": 2000,
"importance": 1.4,
"captured_invert": true
}
],
"links": [
[
"Kutaisi",
"Senaki-Kolkhi"
],
[
"Kobuleti",
"Senaki-Kolkhi"
],
[
"Senaki-Kolkhi",
"Sukhumi-Babushara"
],
[
"Gudauta",
"Sukhumi-Babushara"
],
[
"Gudauta",
"Sochi-Adler"
]
]
}
```
# Annex : Retrieving X/Y coordinates from DCS Mission Editor :
* **Step 0 :** Open DCS ME, with the map you are using
* **Step 1 :** Place the carrier where you want it to be located
* **Step 2:** Keep the mouse cursor on the carrier, and press ```right-alt+y``` multiple time, until DCS changes to X/Y coords scheme. Copy these coordinates in your campaign json file ! (Do not forget the sign, often coordinates can be negative)