Armoured Commander II - Campaign Modding Guide - MGW

Armoured Commander II – Campaign Modding Guide

1 739

Guide to the data structure for campaigns for players who wish to mod existing campaigns or create their own.

 

 

Campaign Modding Guide

Campaigns are JSON files that should be placed within the “/mods/campaigns” subdirectory within the main install directory (“…/Steam/steamapps/common/Armoured Commander II/mods/campaigns”).

 

If a modded campaign in this folder has the same filename as an official campaign, it will replace that campaign in the game. Otherwise, any modded campaign file that can be loaded and parsed will be added to the New Campaign menu. Note that each campaign in the mod directory must have a unique filename, which distinguishes it from other possible campaigns.

 

The structure of the campaign must be as outlined below. Syntax errors in what the JSON importer expects to find will result in an error when trying to enter the New Campaign menu. The first syntax error encountered will be displayed in a pop-up message, and the campaign will not be added to the menu.

 

If the campaign has other sorts of errors, such as typos or incorrect data in the data fields, it will load the campaign into the menu, but it may cause crashes or other unexpected behavior later on.

 

You can always consult one of the game’s standard campaigns for examples on correct formatting.

 

 

1. General Campaign Information

The JSON file as a whole must start and end with squiggly brackets {} as the overall data structure is that of a dictionary. These fields are required in every campaign:

 

Field

Contents

Format

 

“name”

The name of the campaign

String, maximum ~40 characters

 

 

“start_date”

The earliest possible combat day in the campaign

ISO date separated by periods, eg. “1939.09.01”

 

 

“end_date”

The latest possible combat day in the campaign

ISO date separated by periods

 

 

“player_nation”

The nation that the player is fighting for

String, must be one of the keys defined in /data/nation_defs.json

 

 

“enemy_nations”

List of nations of the enemy forces

List of Strings, each must be a key in nation_defs.json

 

 

“region”

Region in which the campaign takes place

Must be one of the pre-designated regions, consult existing campaigns for examples

 

 

“desc”

A narrative description of the entire campaign

String

 

 

“player_unit_list”

List of units that the player can possibly command

List of Strings, each one must be a unit_id in /data/unit_type_defs.json, also it should probably be an armoured vehicle of some sort

 

 

“player_squad_list”

Dictionary of possible squadmates

Dictionary, where each key is a unit_id in player_unit_list, and has a list of units as its value

 

 

“tank_vp_modifiers”

Victory Point multipliers for player units

Dictionary, where each key exists in player_unit_list and each one has a float for its value (1.0 will be no VP change, 0.5 will be -50%, 1.5 +50%)

 

 

“campaign_skills”

List of skills automatically given to eligible player crew

List of Strings, each one must be a key in /data/skill_defs.json

 

 

“player_air_support”

Unit types that can arrive for player air support

List of Strings, each one must be a key in unit_defs.json, should also be a unit of the category “Airplane”

 

 

“player_arty_support”

Unit types that can be used for player artillery support

List of Strings, each one must be a key in unit_defs.json, should also be a unit of the category “Artillery Gun”

 

 

“player_unit_support”

Unit types that can be requested for player unit support

Dictionary, where each key is a list of units

 

 

“friendly_transported_units”

Unit types that can be passengers in friendly units

Dictionary, where each key is a unit somewhere in a player_unit_support category, and each of those keys has a dictionary of unit_ids with their spawn change as their value

 

 

“enemy_air_support”

Unit types that can arrive for enemy air support

List of Strings, each one must be a key in unit_defs.json, should also be a unit of the category “Airplane”

 

 

“enemy_arty_support”

Unit types that can be used for enemy artillery support

List of Strings, each one must be a key in unit_defs.json, should also be a unit of the category “Artillery Gun”

 

 

“enemy_unit_list”

List of nations and unit types that may be spawned

Dictionary, where each key is a Nation, and each has as its value a list of strings, each one of which is a unit in unit_defs.json

 

 

“enemy_unit_class_odds”

Unit classes and the odds that they will be spawned

Dictionary, where each key is a unit class, and each has as its value an integer between 1 and 100

 

 

“enemy_transported_units”

Unit types that can be passengers in enemy units

Same structure as friendly_transported_units

 

 

“decorations_list”

Possible decorations awarded to the commander at end of the campaign

Dictionary, where each key is a Victory Point amount, with a String value that is the name of the decoration

 

 

“combat_days”

How many combat days to generate for the campaign Integer of at least 1, at most the total of the calendar days defined below

 

 

2. Combat Calendar Week Definitions

The calendar_weeks field must have a value that is a list of dictionaries. Each of these dictionaries defines a week (or a slightly shorter period) in the campaign calendar, and each one has a similar structure, with the exception of refitting weeks. Most of the fields in each dictionary are required, if one is optional then it will be tagged as such.

 

Field

Contents

Format

 

 

“start_date”

The starting date for this calendar week

ISO date separated by periods, should not be earlier than the start date of the campaign, and make sure that it does not fall earlier than the end of the previous week

 

 

“end_date”

OPTIONAL – if this “week” is to be shorter than 7 full days, define the last day here

ISO date separated by periods

 

 

“location”

Geographic location for this combat week

Decimal latitude and longitude

 

 

“combat_chance”

The odds that a given day from this week will be added to the combat calendar

Integer between 1 and 100

 

 

“average_resistance”

The average enemy resistance level for hex zones in the Campaign Day map

Integer between 1 and 10

 

 

“week_title”

Title for this week in the campaign

String, maximum ~40 characters

 

 

“week_description”

A narrative description of this week

String, maximum ~242 characters

 

 

“mission_odds”

Odds of different mission types for each combat day

Dictionary, each key must be one of the mission types, and each has a value of an integer between 1 and 100; not all possible mission types must be included as keys

 

 

“enemy_nations”

Enemy nations that may be encountered this week

List of Strings, each must correspond to a key in nation_defs.json

 

 

“air_support_level”

OPTIONAL – base level of air support for each combat day

Float between 0.0 and 100.0

 

 

“arty_support_level”

OPTIONAL – base level of artillery support for each combat day

Float between 0.0 and 100.0

 

 

“unit_support_level”

OPTIONAL – base level of unit support for each combat day

Float between 0.0 and 100.0

 

 

“terrain_odds_modifier”

OPTIONAL – modify odds of Campaign Day map zone terrain for this week only

Dictionary, where each key is a terrain type, and each has a value of an integer between 0 and 100

 

 

“enemy_class_odds_modifier”

OPTIONAL – modify one or more enemy_unit_class_odds values permanently, for the rest of the campaign

Dictionary, where each key is a unit class, each of which has a value of an integer between 0 and 100

 

 

Refitting periods only need three lines of data:

 

“start_date”

The starting date of the refitting period

ISO date separated by periods

 

 

“end_date”

The ending date for this refitting period, this date is used for rarity factor checks

ISO date separated by periods

 

 

“refitting”

Set to “TRUE”

 

  • 1 20 1

    He is the founder and editor of Magic Game World. He loved gaming from the moment he got a PlayStation 1 with Gran Turismo on his 7th birthday.

    View all posts
Subscribe
Notify of
guest

0 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x