JSON Configuration
This page provides comprehensive information about our configuration files, particularly the JSON formats.
Last updated
This page provides comprehensive information about our configuration files, particularly the JSON formats.
Last updated
Departments, districts and incidents all have their own JSON configuration files, allowing you to edit and configure the settings to your needs. This can be configured through a GUI ( the recommended method ) , utilising our incident configurator. See
Departments
Departments are defined in the departments.json file, found in the path /settings/jsons/departments.json
Departments are stored in objects, with the key for each object being a unique short code for that department ( eg LSCFD ). Departments have the following properties:
Colour This field allows you to configure the cosmetic appearance of the department.
Department Name The department name gives a title to the department. It is referenced as name in the object.
Description The description allows you to briefly give a free text outline of any credible information you may wish to include.
District The district field takes the ID of a district, as defined in the districts JSON file. A department will receive incidents from within the defined district.
Framework This field allows you to configure the behaviour of the department with your servers framework. Supported frameworks include ESX, qb-core, qbox, and ace permissions. The object remains empty when there are no frameworks selected, but when one is selected, its name is used as the key in upper case, as ESX, QBCORE, QBOX and ACE.
As below in the example, the parameters include enabled of type boolean, jobs of type array and autoBook of type boolean. Jobs allows you to define the jobs which users are allowed to book on as, while autoBook allows you to configure if the system should automatically book users on for incidents without the need to do /bookduty.
Icon This field allows you to configure an fa icon that will be used to graphically identify the department.
Incident Intervals The customisation of intervals allows you to customise the frequency of incidents. There is a built in delay between incidents as a standard, but this allows you to enhance the delay between incidents and create variability in the frequency.
The interval object takes 2 parameters, of min and max with both the values being integers in seconds representing the minimum time between incidents and maximum time between incidents respectively. These are used as bounds in a random function.
Minimum Staff Online This field allows you to configure at what number of booked on users to that specific department, will automatic incidents start being generated.
Short Code The short code appears in two places. First, as the key for the object within the departments.json, and secondly as a field in the object as shortCode.
Each short code must be unique to that department.
Districts
Departments are defined in the districts.json file, found in the path /settings/jsons/districts.json
Districts are stored in objects, with the key for each object being a unique ID for that district ( eg district_index_1). Districts have the following properties:
Colour This field allows you to configure the cosmetic appearance of the district.
Description This field allows you to give free text information about the district
ID This unique field is used to identify the district. It is used as the key in the object, and as a field labelled id.
Name This field allows you to give a name to the district
Incidents
Incidents are defined in the Incidents.json file, found in the path /settings/jsons/Incidents.json
Incidents are stored in objects, with the key for each object being a unique short code for that incident ( eg incident_index_1 ). Incidents have the following properties:
ID This unique field is used to identify the incident. It is used as the key in the object, and as a field labelled id.
Position TODO