Skip to main content

arme2cosmos

A migration tool that ports legacy Artemis 2.8 XML missions (MISS_*.xml) to Artemis Cosmos. It produces a runnable Cosmos mission and leaves a clear, per-item punch-list (MIGRATION_NOTES.md) for the handful of things a human must decide.

On the reference a28 corpus it converts 26 of 27 missions with zero leftover TODOs; all 27 compile under the real MAST compiler and run headless in both output styles. The few remaining TODOs are genuine source issues (a name that references an object the mission never created) — not tool gaps. See docs/coverage.md.

It can produce the mission in either of two styles (--target):

  • mast (default) — an idiomatic MAST scaffold: the 2.8 event model translated into MAST tasks/routes.

  • amd — a declarative quest-tree mission (story.amd + a thin story.mast): 2.8 objectives, win/lose, and story beats become Cosmos quests with a live objectives log. See docs/amd_target.md.

  • No dependencies — Python 3.10+ is all you need to run the tool. (The missions it generates depend on the a2x layer in sbs_utils and the LegendaryMissions addons at Cosmos run time — never at the tool's build time.)

  • Every translatable command becomes a real call; everything else is a # TODO with the original XML preserved inline.


Install

Run it directly from the folder:

python -m arme2cosmos --help

Or install it to get the arme2cosmos command:

pip install .
arme2cosmos --help

The three commands

Command What it does Writes files?
report Shows how much of a mission maps to Cosmos No
artmap Builds the ship-hull crosswalk (hullmap.json) hullmap.json
convert Scaffolds a full Cosmos mission folder Yes (out/<name>/)

Typical workflow

# 1. (once) Build the hull crosswalk from the two game data files.
arme2cosmos artmap \
    --vesseldata /path/to/Artemis2.8/dat/vesselData.xml \
    --shipdata   /path/to/Cosmos/data/shipDataBB.json \
    --out hullmap.json

# 2. See how much of a mission (or a whole folder) maps.
arme2cosmos report /path/to/Artemis2.8/dat/missions/MISS_TheEndOfPeace

# 3. Scaffold it, using the hullmap for real ship art.
arme2cosmos convert /path/to/Artemis2.8/dat/missions/MISS_TheEndOfPeace \
    --hullmap hullmap.json --out out/
#    ...or emit a quest-tree mission with an objectives log:
#    arme2cosmos convert <path> --target amd --hullmap hullmap.json --out out/

# 4. Open out/<name>/MIGRATION_NOTES.md and finish the TODOs by hand.

Every command accepts a single .xml file, a single MISS_* mission folder, or a parent directory full of them (it recurses and skips ~ editor backups).


report — see what maps

arme2cosmos report <path> [--json] [--summary] [--detail]

Classifies every command/condition in a mission. For one mission it prints a per-kind breakdown; for many it prints a one-line summary per mission plus a corpus total.

Each item is rated:

Status Meaning
full Translated mechanically, high confidence
partial Translated, but leaves a # TODO (closest-fit)
manual Needs you to wire it (a few object properties, GM keys)
unknown Not recognized (shouldn't normally happen)

Options: --json (machine-readable), --summary (skip the per-kind detail for one mission), --detail (corpus mode: also print each mission's breakdown).


artmap — ship art crosswalk

arme2cosmos artmap --vesseldata <vesselData.xml> --shipdata <shipDataBB.json> [--out hullmap.json]

Artemis 2.8 and Cosmos name their ship hulls differently, so this builds a best-effort map between them by matching each 2.8 vessel (race + class) to the closest Cosmos hull.

It prints how many vessels matched and writes hullmap.json. Hand that file to convert --hullmap so converted ships use real Cosmos art instead of placeholders. Vessels it couldn't match confidently are listed under unmatched in the file — those will use a placeholder you can swap later.


convert — scaffold a mission

arme2cosmos convert <path> [--out out] [--target mast|amd] [--lib-version v1.4.0] [--hullmap hullmap.json]

Creates a ready-to-open Cosmos mission folder:

out/<name>/
├── story.mast           # the translated mission (thin, on --target amd)
├── story.amd            # (--target amd) the quest tree: objectives, win/lose, story beats
├── scans.amd            # recovered 2.8 scan_desc as declarative science scans (if any)
├── script.py            # standard Cosmos entry-point boilerplate
├── story.json           # the sbslib + LegendaryMissions addons the mission needs
├── description.yaml     # mission browser entry
├── __lib__.json         # library version marker
└── MIGRATION_NOTES.md   # your punch-list of TODOs / things to verify

Options:

  • --out — where to write (default out/).
  • --target — the output style, mast (default) or amd (see Two output styles below).
  • --lib-version — the library version tag written into story.json (default v1.4.0; set it to match the libraries installed with your Cosmos).
  • --hullmap — a hullmap.json from artmap, for real ship art.
  • --event-model — how 2.8 events are generated (mast target only; amd builds a quest tree instead):
    • hybrid (default) — flag-chained "scene" events stay one readable sequence; independent events run concurrently, and the ones the engine can push (respawn-on-destroy, dock, flag) become event-driven routes instead of polling. Matches how 2.8 checks all events every tick, without always-on tasks where avoidable.
    • linear — force every event into a single sequential chain (simplest to read / hand-edit; use for missions you know are strictly sequential).
    • a28_compatible — every event becomes its own continuous polling task, exactly like 2.8's flat-event model. No classification, no chain, no routes: the worst-case faithful fallback to reach for if a hybrid conversion behaves wrong.

Two output styles (--target)

  • mast (default) — the classic scaffold: 2.8 events translated into MAST tasks and routes, controlled by --event-model. Best when you want to read/hand-edit the mission as MAST.
  • amd — a declarative quest-tree mission. Instead of hand-wiring the event machinery, it emits a story.amd where 2.8 objectives, win/lose, and narrative become Cosmos quests the LegendaryMissions quest_driver runs — so the port gets a live objectives log for free. It builds: kill / reach / dock / scan objectives, a Win/Lose/Critical end-game tree, timed and flag-driven reveal chains, "protect" objectives for friendly targets, and story-beat quests for narrative moments. The story.mast it emits is thin (spawn the start block, tag roles, grant the quests, carry the imperative bits as //signal routes). See docs/amd_target.md.

Both targets compile the full a28 corpus; both recover 2.8 set_ship_text scan_desc (→ science scans) and hailtext (→ a Hail comms button).

What it translates for you

Positions are converted automatically (2.8 and Cosmos use mirrored coordinates — you don't have to think about it). Translated mechanically:

  • Spawns — players, enemies, neutrals, stations, monsters, black holes, anomalies. Named objects are remembered, so later commands that reference them by name still work.
  • Terrain — nebula / asteroid / mine fields.
  • Messages — comms text, big chapter titles, audio messages, and console warnings.
  • AI — common enemy/monster behaviors (chase player, chase station, attack, …).
  • Movementdirect to a point or a target; destroy.
  • Story flow — events become a step-by-step sequence; "when" conditions become real waits (distance, sphere, fleet destroyed, docked, object exists, timers).
  • Comms buttons — become a comms menu (//comms route).
  • Game Master buttons — become a Game-Master comms menu.
  • Ship text — name / race / class / description; a ship's scan_desc is recovered as a declarative science scan (scans.amd) and its hailtext as a Hail comms button.
  • Tags — preserved as object data, with notes on rebuilding the tag gameplay.
  • Objectives (--target amd) — the mission's win/lose and objective structure become a Cosmos quest tree with a live objectives log (see Two output styles above).

What you finish by hand

Nearly every 2.8 command and property now maps to a real call. What's left as a # TODO (with the original XML next to it, and listed in MIGRATION_NOTES.md) is:

  • Ship art where no confident hull match was found (a placeholder is used).
  • A handful of 2.8-specific features with no Cosmos equivalent (marked as engine-stub notes, non-blocking): mission music volume, per-object mine immunity, free-velocity drift.
  • Genuine source issues — e.g. a command that references an object the mission never created (a dead reference / typo in the original XML).
  • GM key/click interactions (2.8 GM hotkeys become GM comms buttons instead).

Treat the output as a strong first draft: the structure, spawns, positions, orientation, objectives, and story flow are in place; you polish the few details the notes call out.

How the port is verified

Two layers back the conversion (both need a Cosmos checkout with sbs_utils + LegendaryMissions):

  • ConformanceA2xTestRange (a standalone test mission) has ~28 maps that assert the runtime behavior of every emitted a2x_* call in the engine.
  • Mock run — every converted mission is run headless in both targets; the whole corpus passes. The tool's own logic is covered by stdlib unit tests (python -m unittest discover -s tests).

See docs/coverage.md for the full command/condition status.

For the full command-by-command coverage (what's finished vs. what needs a human decision), see docs/coverage.md; property mappings are detailed in docs/property_map.md.


Running the converted mission

  1. Copy the out/<name>/ folder into your Cosmos data/missions/ directory.
  2. Make sure the libraries listed in its story.json are installed with your Cosmos (adjust --lib-version when converting if your version differs).
  3. Start Cosmos, host a server, and pick the mission from the list — or smoke-test it headless if you have the Cosmos dev tools.

"Close enough to the original" is the goal — expect to playtest and tweak.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

arme2cosmos-0.1.0.tar.gz (65.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

arme2cosmos-0.1.0-py3-none-any.whl (57.9 kB view details)

Uploaded Python 3

File details

Details for the file arme2cosmos-0.1.0.tar.gz.

File metadata

  • Download URL: arme2cosmos-0.1.0.tar.gz
  • Upload date:
  • Size: 65.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.14

File hashes

Hashes for arme2cosmos-0.1.0.tar.gz
Algorithm Hash digest
SHA256 759265326c974b349e219d61a7a4da9b4833cf94c050c883909e8da15f3fa562
MD5 52e27c18b7c43cfdd203af2e131fe81f
BLAKE2b-256 69ecec104d7656abd69ffda778cd979dbeb94fe422d215a2c772d59d4827c4a4

See more details on using hashes here.

Provenance

The following attestation bundles were made for arme2cosmos-0.1.0.tar.gz:

Publisher: release.yml on artemis-sbs/arme2cosmos

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file arme2cosmos-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: arme2cosmos-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 57.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.14

File hashes

Hashes for arme2cosmos-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 042226f2ba1fdace6f07133a44348c74e511ee7c04c76b9525689eb75d567345
MD5 cd0a63e979b14bb776e770f39641daee
BLAKE2b-256 0823a79b8be83ff9b59629ab9b168431dbe08268136a279fd644569e67645020

See more details on using hashes here.

Provenance

The following attestation bundles were made for arme2cosmos-0.1.0-py3-none-any.whl:

Publisher: release.yml on artemis-sbs/arme2cosmos

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

0.3.0

2 files

0.2.0

2 files

This release

0.1.0 This release

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page