Reusing settings
You often want this: start from something that already works, change only what differs. VN-Mikro does that in several places. The idea is the same; the words and rules are not. This page keeps them apart.
When a later chapter says extends or source, it will point at one row of the table below — not at “inheritance” in general.
The kinds (start here)
| What you reuse | Where you write it | How you say it | What happens |
|---|---|---|---|
| A character expression | characters/<id>/*.json | "extends", "override", "add" | Copy another expression’s layers, then patch layers or append new ones |
| A dialogue-box look | themes/… → panel.<name> | "extends" | Merge another panel preset’s keys |
| A button / choice / name-entry look | a pack file under themes/ | "source" or "style" | Load that pack, then merge your local keys on top |
| Splash per platform | game.json → splash.web / android / desktop | nested blocks | Platform block merges over the shared splash root |
| A whole mood for a scene | story command theme_style | profile name | That theme file merges over the base theme |
| Text or looks per language | locale overlays / string catalogs | locale files | Language layer sits on top of the base |
Objects under sprites/*.obj.json do not reuse another object this way. They are a flat list of parts; you change an instance with update and live links to flags. See Sprites and objects.
One example per kind
Character expression (layers)
"default": [
{ "path": "base.png" },
{ "path": "mouth.png" }
],
"happy": {
"extends": "default",
"override": [{ "layer": 1, "path": "mouth_happy.png" }]
}
happy starts as default, then replaces layer 1. "add" would append extra layers. This is not the same tool as panel "extends".
Dialogue-box look (keys)
"panel": {
"default": { "width": "100%", "bg": "#1e2133e0" },
"whisper": {
"extends": "default",
"width": "60%",
"bg": "#00000099"
}
}
whisper keeps everything from default except the keys you set. Full story: Theme and the dialogue box.
Pack look (source / style)
{ "style": "choice_plain" }
{ "source": "choice_plain", "gap": 12 }
"style": "name" means the same as "source": "name". The pack loads from themes/<name>.json, then your local keys merge on top. Used for buttons, choices and name-entry — not for character packs, cursors, or name-plate style keys.
Splash per platform
"splash": {
"logo": "splash/logo.png",
"web": { "logo_max_width": 280 },
"desktop": { "min_seconds": 0.6 }
}
Shared keys at the root; web / android / desktop only change what that platform needs. Details: Title, icon, splash.
Shared merge rule (deep merge)
These places merge key by key (panel extends, pack source, splash platforms, scene mood files):
| In your file | Effect |
|---|---|
| Key omitted | Keep the base value |
| Key present | Use yours |
null | Clear the base value |
| A list (array) | Replace the whole list — not item by item |
Character expression "extends" is different: it works on layers (override / add), not this key table alone.
Do not mix these
| Easy mix-up | Reality |
|---|---|
Character "extends" vs panel "extends" | Same English word; different tools. Characters = layers; panels = keys. |
"source" / "style" vs character packs | Pack compose is for controls. Character art uses its own pack files and expression extends. |
Sticky story overrides (theme_style, choice_style, node panel) | “Use this until I clear it” during play — not a JSON extends between files. |
Defaults in game.json | Project defaults (typing, layout, session). They are not inheritance between files. |
Object parts | No object-to-object extends. Parts are edited with update / binds. |
When you need this page
- First time you copy a look and change one field → read the matching row above.
- Later chapters link here instead of re-explaining merge rules.
Glossary: Words used in these docs.