Skip to content

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

ClassicOpenGorky project
What it isA copy of the game folderA folder with opengorky.mod on top of the installed game
Saving writesThe game's .dat archivesOnly the project's src/ (and the editor's .og/)
Runs inThe original exe and Open GorkyOpen Gorky only
Models1024 vertices and 2048 triangles a part, textures up to 256Any vertex count, 32-bit textures up to 4096
VideoConverted to the game's ASF (640×480, 15 fps)Kept as is: mp4, mkv, webm, mov… up to 4K
ScriptsClassic scriptsOG 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

  1. Open a Classic copy of the game and convert it (see above). The editor reopens on the new project.
  2. Change something: an enemy class's HP, a weapon's damage, a line of dialogue.
  3. Ctrl+S saves into src/. The status line says how many files were written.
  4. Play builds the project and starts the game. Build errors are listed instead, and nothing starts.
  5. 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