Field manual / Level editor
Projects and packages
How an OpenGorky project is laid out, how to turn a Classic project into one, and how to ship a mod to players as a single .ogp package.
Classic or OpenGorky
| Classic | OpenGorky project | |
|---|---|---|
| What it is | A copy of the game folder | A folder with opengorky.mod on top of the installed game |
| Saving writes | The game's .dat archives | Only the project's src/ (and the editor's .og/) |
| Runs in | The original exe and Open Gorky | Open Gorky only |
| Models | 1024 vertices and 2048 triangles a part, textures up to 256 | Any vertex count, 32-bit textures up to 4096 |
| Video | Converted to the game's ASF (640×480, 15 fps) | Kept as is: mp4, mkv, webm, mov… up to 4K |
| Scripts | Classic scripts | OG Script: components, traits, hooks |
The status bar shows which kind is open: Original (Classic) or Mod: <name>.
Converting a Classic project
In Settings, choose Convert to OpenGorky…. The editor asks for a new, empty folder next to the game, converts everything to OG Script, builds the result and reopens itself on the new project. The Classic project and the installed game are not changed.
The command-line tool does the same thing: gorky-tool convert <game> <out>.
Project layout
my-mod/
opengorky.mod manifest: format = ogs, title, the installed game's path (game)
src/
rules/*.ogs the engine's rules as call rows; Campaign(…) = the new game
game.ogs the game's hooks: OnDamage, OnTurnStart, OnLevelEnter…
texts/*.ogs texts (UiText, Examine, AreaExamine), UTF-8
locations/<name>/ a location's block, its paths and code
battles/<name>/ a battle's block
assets/ the project's own and changed assets
.og/ the editor's own: history, test kit
dist/<id>.ogp what players get
The game's own assets are read from the installed game and never copied. $OPENGORKY_GAME overrides the manifest's game path.
Your first mod
- Open a Classic copy of the game and convert it (see above). The editor reopens on the new project.
- Change something: an enemy class's HP, a weapon's damage, a line of dialogue.
- Ctrl+S saves into
src/. The status line says how many files were written. - Play builds the project and starts the game. Build errors are listed instead, and nothing starts.
- When it works, Settings → Build package packs
dist/<id>.ogp. The test kit and test rooms are left out.
Giving it to players
Players put the .ogp into the game's mods/ folder (or the settings folder's mods/) and choose it on the launcher's Play tab. They can also pass it as the first argument: opengorky-viewer my-mod.ogp --play. The package uses the player's own installed game, not your game path. Saves restore the mod's objects with their values.
From the command line
gorky-tool convert <game> <out> # Classic game → new project
gorky-tool build <project> # check and pack dist/<id>.ogp
gorky-tool play <project> --start location:<level> # play it