File Formats

This is the authoritative, field-level reference for every file a Streets of Rage 2 New Era mod is made of. It is written to be precise enough to author and edit mod content by hand or with tooling, without opening the editors.

If you are working through the editors, the Editors section is the friendlier route. Come here when you need to know exactly what a file contains.

Per-format pages

Page Covers
Pack Layout and Conventions Folder structure, file naming, name resolution, and the rules every file obeys.
Pack Config config.json, including the full session settings and difficulty tables.
Entity Files spriteSettings.json, animations.json, logic.json, dependencies.json, sprite PNGs, and every logic event.
Level Files level <n>.json, - art.json, - cutscenes.json, title.json, presentation.json, ending.json, and level art.
Palette Files Palette PNGs, guides versus final palettes, and indexing.
Audio Files Sounds/, Musics/, loop point files, and replacement maps.
Package Format Exported .cne and .zip packs, and why you should not author them directly.
Enums and Identifiers Every numeric enum, the animation slot table, Classic entity names, and the name hash.
Validating a Mod Machine-readable JSON Schemas and the checks they do not cover.
Classic Game Mechanics Units and axes, throw choreography, running, special-move costs, items, containers and enemy AI as the original game implements them.

The serialization contract

Every JSON file in a mod is read by Newtonsoft.Json with these settings, configured once in JsonUtils:

TypeNameHandling = TypeNameHandling.Auto,
DefaultValueHandling = DefaultValueHandling.Ignore,
NullValueHandling = NullValueHandling.Ignore,

Six consequences matter when you write these files yourself.

Polymorphic values carry $type. TypeNameHandling.Auto means any value whose declared type is an interface or abstract base is tagged with its concrete type. In practice this is only the logic events in logic.json, which must each carry a $type of the exact form:

"$type": "Sor2NewEra.Gameplay.SoundEvent, Sor2NewEra"

The namespace prefix Sor2NewEra.Gameplay. and the assembly suffix , Sor2NewEra are both required. An event without a valid $type is silently dropped.

Omitted fields are not errors. DefaultValueHandling.Ignore and NullValueHandling.Ignore mean the editors never write defaults or nulls, and the loader is happy to receive a partial object. Any field you leave out simply keeps its type default: 0, false, "", or null. This is why the files the editors produce are often much smaller than the schemas suggest.

Unknown fields are ignored. Newtonsoft's default MissingMemberHandling skips properties it does not recognise. Real mod files in the wild contain plenty of these: computed properties like HasEvents and isPlayable that older builds serialized, and editor-only fields like animationsLogic[].name. They do no harm, but do not write new ones — they are noise, and a future strict loader could reject them.

Property matching is case-insensitive. LevelData.Scenes is written with a capital S by the Level Editor, but scenes loads identically. Do not rely on this when hand-editing; match what the editors write so diffs stay clean.

The reader is lenient about JSON syntax. Newtonsoft accepts trailing commas and // and /* */ comments. Several hand-authored level art files in the repository use trailing commas and load fine. Tooling that reads these files with a strict JSON parser will choke, so write strict JSON even though the game would accept more.

Numbers are culture-invariant. JSON numbers are parsed with invariant culture, so the decimal separator is always a dot regardless of the player's locale. The one place this used to break is music loop points, which the Audio Editor writes as strings; those are now also parsed invariantly. See Audio Files.

Two forms of a mod

A mod exists in two forms, and they are not the same format.

The source folder, under Editor/<Mod Name>/. Loose JSON, PNG, and audio files. This is what the editors read and write, and the only form you should ever author or edit directly.

The exported package, under Mods/<Mod Name>.cne. A ZIP archive, optionally through an encryption stream, containing the same JSON but with every sprite repacked into texture atlases and an atlasesData.json index describing them. Produced by the in-game editor's export step. See Package Format.

Work in the source folder. Export is a build step, not an editing format.

Where the truth lives

These pages are derived from the runtime's own serialization classes under Assets/Scripts/ContentPacks/ and from the Godot editors' data models. Where a page states a numeric enum value or a fallback rule, it came from that code, and the JSON Schemas in docs/schemas/ are checked against every mod in the repository's Editor/ folder.

Where the tools disagree with each other, the page says so rather than picking a side. Where a field has changed shape over time, the page names the canonical form and how to convert the older ones — see collisionBox_3_4_5 in Level Files.