How to create campaigns

How to create campaigns

From BeamNG
Language: English


Since version 0.7 you are able to create your own campaigns. Campaigns are sequences of scenarios - in the end the game gives an overview of the results of all scenarios related to this campaign.


To create your own campaigns you need to have a json file which contains all the single scenarios. This files needs to be in the campaigns folder or even better in a subfolder. For modders the mod should have a structure like this: #yourmodname#.zip\campaigns\#yourmodname#\yourcampaign.json.

Furthermore you should have a picture with the size of 400px x 192px which acts as the thumbnail in the campaign selector.


Following I'll explain the different properties of these json files by the reference of an example. This example is an excerpt of the default 'Driver's Training' campaign.



{
    "title": "Driver's Training",
    "description": "get started by learning the essentials of driving in BeamNG.drive",
    "authors": "BeamNG",
    "difficulty": "20",
    "date":1455193290,
    "startingScenario" : "training_acceleration_braking",
    "scenarios":
    {
        "training_acceleration_braking":
        {
            "title": "Training 1: Accelerating and Braking",
            "description": "",
            "path": "levels/driver_training/scenarios/driver_training/training_acceleration_braking.json",
            "nextScenario": "training_drift"
        },

        "training_drift":
        {
            "title": "Training 2: Drifting",
            "description": "",
            "path": "levels/driver_training/scenarios/driver_training/training_drift.json",
        },
    }
}



title : Is the title of your campaign which also appears in the campaign selector.

description : The description of you campaign which also appears in the campaign menu.

authors : The author of the mod so probably you.

difficulty : The difficulty of your campaign. The higher the value the more difficult it is.

date : The date on which the campaign was created.

startingScenario : Defines the scenario which will be the first one of this campaign. The string needs to match one of the scenarios which we'll define below.

scenarios : In this scenario object we'll define the scenarios which will be used for the campaign.

cliffjump(example) : This is the id of the scenario which will be used to call the next scenario for example. We already used this kind of id as a value in the startingScenario object.

  • title : The description of the single scenario...
  • description : ... and its description.
  • path : This is the path of the json file of the actual scenario.
  • nextScenario : Here you can define the scenario which will be called after this scenario (by using a scenario id). If there is no nextScenario property, the campaign will end and the results screen will appear.