Extra configuration

game.json

Advanced users can tweak additional options and make minor modifications by changing the values in their game.json. It’s installed alongside the rest of the data and the launcher will show you the location where you can find it. You can make a copy and put it near your ja2.json configuration file, by creating a data folder for it. This way you won’t lose your settings when you reinstall the engine. As of v0.22 creating a patch for the file is suggested (see section below), so it’s less likely to become stale with later JA2S upgrades.

Other externalized settings

The project extracted many hardcoded values from the original sources into editable text files stored in the assets/externalized directory. You can edit weapons, ammo, shops, enemy weapon choices and much more — at your own peril! You can copy them to your user directory the same way as game.json.

If you’re using the AppImage version and want to modify any of the json files, create ~/.ja2/data and copy them inside. They will have precedence over the files supplied by us.

List of mods

Bundled mini-mods

A few data-altering mods are included with JA2S, but must be explicitly selected to be used:

  • Generous Rebels, From Russia With Love: extra items in Omerta
  • Honest IMP quiz questions: the satirical answers now include the personality aspect that they would contribute to
  • O Fortuna: dramatic intro music for Jagged Alliance 2

Other official mods

Several additional mods can be downloaded from our GitHub organization. Either individually or conveniently bundled in a single file.

Currently the bundle includes:

  • Stracciatella Gun Pack by Kaerar
  • Night Ops map pack for JA2: Map pack for JA2 Stracciatella, adapted from the Night Ops JA2 mod

Then there is of course the Wildfire support mod.

External mods

Mods not hosted by us include:

  • Return to San Amaro by Azazel and Papill0n: See forum thread for latest downloads.
  • Azazel’s custom map pack: Download here. See forum thread for discussions.
  • Sweet Revenge by Inveris: See forum thread for latest downloads.
  • RogueLike by Ashley Pringle: made obsolete by Dead is Dead game mode
  • Alternate IMP creation by mgl: merged into core, enable pick_skills_directly in game.json

Let us know if you’re working on a mod, so we can feature it here!

Installing mods

Most mods come with their own installation instructions. Some vanilla JA2 mods may require overwriting existing files, a need that JA2S obviates — mod files and folders have priority. So in general it’s enough to copy the whole mod folder into a mods folder in your JA2S user directory (where you have ja2.json). You will have to create this mods folder yourself.

JA2S enables running multiple mods at once, but beware: there are no guarantees mods will work with each other. If two mods modify the same file, only one of the changes will have an effect in game — the one from the mod that was loaded last.

For modders

For mods to show up in the launcher, a manifest.json is required. It currently has 3 mandatory keys: name, description and version. An example from Night Ops maps looks like this:

{
    "name": "Night Ops maps",
    "description": "This map pack contains more than 60 town and strategically important sectors from Night Ops mod, adapted to the original balance of Jagged Alliance 2.",
    "version": "0.1.0"
}

You can also find some extra tooling in our GitHub organization. See for example the ja2-open-toolset and the prototype of straccatella toolset for editing json files.

If you have any questions, reach out to us on the usual channels. There are some labels on our issue tracker that are more likely to be interesting to modders: modding, externalization, modding-breaking-change.

Using JSON patches

As of v0.22 JA2S supports the JSON Patch format. What that means is that you don’t have to maintain copies of whole JSON files, but just specify what you want to change. This has several benefits:

  • it makes the mod more resilient to changes to the files upstream,
  • it makes it possible for several mods to change the same file while maintaining compatibility (provided the changes don’t conflict)
  • it reduces size and maintenance burden.

Like with the full files themselves, the patches will be applied in the reverse mod loading order, oldest enabled mod to first. So if you want to create a mod for a mod, the user will just have to make sure your mod is in the list before it. If you’re unsure about the order, you can run JA2S and it will log the mod priorities (and paths) on startup.

Creating patches

If you want to change FILE.json, you will have to create FILE.patch.json. The easiest way is to make a copy of the file, change it however you desire, then use a patch generator to create the contents for the patch file. With the linked tool this would mean you paste the original file in the “input” box, the changed one in the “output” box and then “results” will change to show the patch, which you should save.

That particular tool unfortunately does not support JSON comments. If you get parsing errors, you can try stripping all lines with // from both boxes first, since it is very likely the patch will apply normally to the original file (with the comments). Or you can write the patch manually, following the examples. Here’s one for game.json, turning on multiple interrupts, IMP skill picking instead of the quiz and allowing for less skilled IMPs:

[
  {
    "op": "replace",
    "path": "/multiple_interrupts",
    "value": true
  },
  {
    "op": "replace",
    "path": "/imp/min_attribute_points",
    "value": 15
  },
  {
    "op": "replace",
    "path": "/imp/pick_skills_directly",
    "value": true
  }
]