Getting started

The mod folder

What a mod is on disk - mod.toml, the files each editor writes, replacing any file of the disc by its path, sources and the cooked pack, and how several mods combine in load order.

A mod is a folder under mods/ beside the game. The folder's name is the mod's id. Everything in it is plain files: tables in TOML, maps, scripts, images, sounds and the pack the devkit cooks. You can make all of them in the devkit, and you can open and edit most of them in any text editor too.

What a mod folder holds

mods/<id>/                                   # the folder name is the mod's id
  mod.toml                                   # name, description, author, version, requires
  gamedata/*.toml                            # the game's numbers: monsters, items, heroes, skills, areas, rules,
                                             #   effects, world (skies and weather), campaign (the realm map)
  maps/<id>.toml                             # maps of your own and remasters, with their
  maps/<id>.heightfield .voxels .terrain     #   ground, caves, tiles,
  maps/<id>.automap  maps/<id>.qs            #   minimap and script
  prefabs/*.toml                             # groups of objects placed as one
  scripts/**/*.lua                           # Lua: hero passives, skills, traits, monster and game scripts
  BG/DATA/<ARCHIVE>.LMP/<entry>              # replacements of the disc's files, by path (below)
  BG/DATA/<LEVEL>.GOB/<lump>.lmp/<entry>
  assets/models/ assets/replace/ assets/textures/ assets/sources/   # imported models, clips, images (sources)
  assets/graphs/*.rgraph                     # Blueprint and Material graphs
  replacers.toml                             # model and clip replacements and their settings (a source)
  cloth/**/*.cloth                           # cloth weights from the Cloth Painter
  textures/ground/                           # images used by the ground and caves layers
  ui/                                        # interface skin and Lua screens
  cooked/mod.rpak                            # the sources, cooked: what the game reads
  .trash/                                    # files the devkit deleted (kept until File > Empty Trash)

A mod has only the files it needs. A mod that makes kobolds tougher is a mod.toml and a five-line gamedata/monsters.toml.

mod.toml

[mod]
name = "Kobold Keep"
description = "A warren of kobolds under the mines."
author = "You"
version = "1.2"
requires = "my-creatures more-blood"   # mods this one needs, by id (space separated)
Key Means
name The name shown in the launcher's Mods list and on the website.
description One or two lines shown under the name in the launcher. The website's page has its own longer description, written when you publish.
author, version Shown in the launcher. Publishing asks for a version number for each upload.
requires Mods that must be on for this one to work, by id: other folder mods, or a built-in mod's id such as more-blood. See Requirements.

The devkit writes mod.toml when it makes the mod, and you edit it at the top of the Modules panel. The id (the folder name) is 3 to 48 characters of a-z, 0-9, _ and -; the website uses the same id.

Note A new mod folder starts off in the launcher. A player (or you, when testing) turns it on in the Mods list. The devkit's own play tests don't need that: they always play the open mod.

Replacing any file of the disc

Every file of the disc can be replaced by a file at the same path in the mod. Each archive of the disc (a .LMP, or a level's .GOB and the lumps inside it) stands for a folder of the same name holding its entries:

mods/blue-barrels/BG/DATA/BARREL.LMP/barrel.png              # a texture of the BARREL archive
mods/blue-barrels/BG/DATA/FX.LMP/explode1.wav                # a sound
mods/my-quests/BG/DATA/AIRARENA.GOB/airarena.lmp/script.qs   # a level's script

The file replaces that one entry (or adds it, if the archive has no entry of that name), and the rest of the archive stays the disc's. So two mods can change different entries of the same archive without clashing.

To change Put in the mod Notes
A texture BG/DATA/<ARCHIVE>.LMP/<name>.png (or .jpg, .tga, .bmp), then Cook Any size. Cooked into the mod's pack the way the disc's textures are. The image's alpha is not used: the game's texture alpha is a darkening mask, so a mod's texture is cooked without one. Level textures (the <LEVEL>.TEX banks) can only be replaced whole.
A model The Model Replacer, then Cook A glTF in its place and/or the original remastered. Also the only way to replace worn equipment.
An animation The Animation Replacer or Animation Editor, then Cook
A sound BG/DATA/<ARCHIVE>.LMP/<name>.wav Any rate from 500 to 96000 Hz, 8 to 32 bit or float, stereo is mixed to mono. A name with _lp loops. The Sounds module does this for you.
Text BG/DATA/GTEXT.LMP/gtext.uni.txt Written by the Text module.
A level's script BG/DATA/<LEVEL>.GOB/<level>.lmp/script.qs QuestScript, written by the Script Editor.
Anything else The entry, at its path, in the game's own format .bal, .bin, .cut, .fnt, .world... made with your own tools.
A whole archive BG/DATA/<ARCHIVE>.LMP as a file Later mods' loose entries still apply on top.

The readable forms (.png, .wav, .uni.txt, .qs) are what the devkit makes. The game's own formats work too (a .tex, .vag or .uni), but they can't be published. When a mod has both a texture's .png and its .tex, the .png wins.

Tip To find the name and archive of what you want to replace, find it in the Content Browser (its filter searches names) and open it in the Asset Viewer. The Asset Viewer's Model Replacer button goes straight to replacing it.

Sources and the cooked pack

Some of what a mod holds is sources that the game never reads:

  • imported models and clips (assets/, glTF and FBX),
  • images (.png and the others),
  • replacers.toml (which model or clip replaces which, and the remaster settings),
  • Material graphs.

The devkit cooks them into cooked/mod.rpak, the mod's pack, in the formats the game uses. The game copies that pack over the disc's converted data when it prepares a mod. Open Mod > Cook & Package and press Cook the mod after changing any of them (Cook & Package).

Everything else is read by the game as it is, when it starts: mod.toml, gamedata/, maps/, prefabs/, scripts/, ui/, sounds, text, level scripts and cloth. Changing those needs no cook.

The game keeps each enabled mod's prepared data in data/cache-mods/<id>/, with a fingerprint of the mod's files. When a file changes, only what changed is prepared again at the next start.

Game data merges key by key

A mod's gamedata/<file>.toml lists only what it changes. The game reads its own data first (converted from your disc into data/cache/gamedata/), then merges each mod's file of the same name over it, key by key:

# mods/tough-kobolds/gamedata/monsters.toml
[kind.Kobold]
health = 300       # only these two keys change; every other key of the Kobold stays the game's
scale = 1.33

So three mods can each change a different key of the Kobold and all three changes apply. Tables are matched ignoring case. Read the game's files in data/cache/gamedata/ to see every table and key (each file starts with comments explaining it), but never edit them there: they are rebuilt from the disc. The devkit's table editors and Data Sheets show the same data.

File What it holds Edited in
monsters.toml Creature kinds and classes, AI roles, attack timings Creature Editor, AI Behaviours
heroes.toml Classes, races, the experience table Class & Race Editor
items.toml Items, prefixes, suffixes, bonuses, the shop and loot Items and loot
skills.toml Skill trees, spell numbers, designed skills Skill Designer, Skill trees
effects.toml Data effects Effect Creator
rules.toml, areas.toml The formulas' constants, difficulty, areas Rules and game data
world.toml Skies, light rigs, fog, weather Skies, lighting and weather
campaign.toml The realm map's rows Campaign and remasters

Load order

Several mods can be on at once. They apply in the load order of the launcher's Mods list: the built-in mods first, then the folder mods from top to bottom. Players move a mod with L1 / R1, Shift + Up / Down or the arrows on its row; the order is kept in settings.ini (mods.order), and folders it doesn't name follow alphabetically.

A later mod wins wherever two change the same thing:

What Rule
gamedata/*.toml The game's data, then each mod in order, merged key by key.
gamedata/world.toml The built-in presets, then each mod, key by key.
gamedata/campaign.toml The disc's twelve rows, then each mod key by key. [campaign] replace = true drops every row before that file. Then the maps' own rows.
maps/*.toml Never clash: a map's key is @<mod>/<id>. If two mods remaster the same disc level, the later one's map wins.
Classes, races, prefixes, suffixes, bonuses By number, code or keyword, key by key: a later mod changes the same entry, a new number or code adds one.
Replaced files Entry by entry. A mod that replaces a whole archive drops the loose entries of mods before it, not after it.
Imported models and clips Name by name.

Requirements

A mod that uses another mod's creatures, items, models or prefabs must name it in requires. Edit the list at the top of the devkit's Modules panel. The Creature Editor adds it for you when a creature uses another mod's model.

  • Requirements always load before the mod that needs them, whatever the list's order. A move that would put a mod above something it needs is refused.
  • In the launcher, a mod shows requires ... under its description, and needs <mod> in red when it is on while a requirement is off. Turning it on, or pressing Play like that, asks "Turn them on too?".
  • A requirement that isn't installed is listed as (not installed). On the website, a published mod's requirements are listed on its page.

Mods and multiplayer

A shared-screen game plays with the enabled mods. A LAN game needs the same mod folders on every machine; when they differ, the joining player is told which mods the host has. Return to Norrath Online loads no folder mods.

Never share the disc

Don't put anything taken from the disc in a mod you share: files from data/cache/, images exported by the Model Replacer that you haven't changed, the disc's own archives. The website accepts only the kinds of files the devkit makes (what a mod may contain).