Skip to content

Plugin Pretense

With this plugin, you can display persistent status update embeds for your Pretense missions.

Configuration

As Pretense is an optional plugin, you need to activate it in main.yaml first like so:

# config/main.yaml
opt_plugins:
  - pretense
The configuration has to be done in config/plugins/pretense.yaml and is quite easy. You can define a channel per instance that you want your embeds to be displayed in. And you can define, how often they should be updated. Embeds will only be updated, if there is a pretense mission running and if there is new data to be displayed.

# config/plugins/pretense.yaml
DEFAULT:
  update_interval: 120        # interval in seconds when the embed should update (default = 120)
DCS.dcs_serverrelease:
  json_file_path: '{instance.home}\Missions\Saves\player_stats.json'        # this is the default
  #json_file_path: '{instance.home}\Missions\Saves\player_stats_v2.0.json'  # use this for Pretense v2.0
  channel: 1122334455667788   # channel, where to upload the stats into (default: Status channel)
Every parameter has a default value, which means, that you do not need to specify a configuration file at all.

File Upload

You can upload a modified pretense*.json or player_stats.json by dragging and dropping them into your admin folder.

File Download

If you want to download the pretense files, you can add this section to your admin.yaml:

# config/plugins/admin.yaml
DEFAULT:
  # [...]
  - label: Pretense
    directory: '{server.instance.missions_dir}\Saves'
    pattern: '*.json'
This would work for Foothold and similar missions also.

Credits

Credits to No15|KillerDog for implementing the base version of this plugin!


Configuration reference

Key Type Description Example
DEFAULT map Applies to every instance.
commands
chat_commands

DEFAULT

Key Type Description Example
DEFAULT.update_interval int Seconds between updates of the Pretense status embed. (range: min 60) 120
DEFAULT.json_file_path str Path to the Pretense player_stats JSON file. (range: min 1) {instance.home}\Missions\Saves\player_stats.json
DEFAULT.channel int Discord channel where the Pretense stats are posted. 1122334455667788

<(.+)>

Key Type Description Example
<(.+)> any (one of: element_schema, instance_schema)