Skip to content

launcher.json: a level for the settings shown first, and the render scale's base size - #399

Closed
v0lumehi wants to merge 4 commits into
seedds:mainfrom
v0lumehi:launcher-schema
Closed

v0lumehi wants to merge 4 commits into
seedds:mainfrom
v0lumehi:launcher-schema

Conversation

@v0lumehi

@v0lumehi v0lumehi commented Oct 27, 2026 •

Copy link
Copy Markdown
Contributor

Update: rebased on main 6138a54. settings.tsv keeps both: the platform:ios rows from #352, your <ios>|<mac> defaults from 6138a54, and the level column here (basic on Frame rate, Render scale, Console mode, Game language, Game rumble). Also fixed the ruff B023 finding that made this PR's lint job fail (the test's lambda now binds its loop variable). Launcher, Mac app, docs and launcher-storage tests pass, and the lint ratchet reports 0 new.

This adds two things to the settings list that launchers already read (dm/launcher.json, written by settings.py from settings.tsv), so a launcher can draw a better settings screen. A reader that doesn't know the new fields ignores them.

level: the settings to show first

settings.tsv gets an optional ninth column, level. basic marks the settings a launcher shows first:

  • frame rate
  • render scale
  • console mode
  • language
  • rumble

Empty leaves the choice to the launcher. settings.py writes the value into the row as level, and stops on an unknown one.

This is the split proposed in #374's mockups. Seen from the settings list it is just data, so any launcher can use it: the iOS launcher's Advanced page (#214) could as well.

render_base: the render scale in pixels

A new profile key holds the 3D views' base size, docked then handheld (1600x900 1280x720), which is what DM_RENDER_SCALE scales. settings.py writes it into the render scale's row as base, so a launcher can show 0.75 as 1200×675 docked instead of 75%. Breath of the Wild gets its value from its note's Render scale section. Other games can follow wherever their note documents the size.

Checked

  • test_launcher_settings.py checks that:
    • the five basic rows carry level and the rest do not;
    • render_base lands in the render scale's row, and is absent for a profile without it;
    • a malformed render_base or level stops settings.py.
  • test_docs, test_lint_python, test_launcher_storage and test_nsp_mac_app pass.
  • game.py header for Breath of the Wild is unchanged in content: the key is not a macro.
  • The iOS launcher decodes rows with Decodable, which ignores the new fields.
  • dm/games/README.md documents the column and the key.

Context

The Mac launcher in the NX2Apple fork reads both fields: basic settings first with the rest under Advanced settings, and the render scale in pixels (issues LNPANDY/NX2Apple#37 and #36, implemented in #54 and #55). Until this lands it falls back to its own list.

A Display mode row for Mac apps (DM_FULLSCREEN) needs a platform condition, which #352 brings, so it is not part of this PR.

LNPANDY pushed a commit to LNPANDY/NX2Apple that referenced this pull request Oct 27, 2026
…tings (#37)

The sheet listed every row of the app's launcher.json in one column of
sections (Game, Controls, Performance), so the settings a player changes
most sat among the ones only a tuning session needs. The basic ones come
first now, in their sections: frame rate, render scale, console mode,
language and rumble. The rest is behind an Advanced settings row that
says how many it holds and opens them in place.

Which rows are basic comes from the list when it says so (a row's level,
seedds/nxnative#399: settings.tsv's optional level column), else from
the launcher's own list of those five. Apps packed before the column
show the same split.

LaunchOptionsTests: the default split, and a level in launcher.json
winning over it.
LNPANDY pushed a commit to LNPANDY/NX2Apple that referenced this pull request Oct 27, 2026
#35 Display mode: Window or Fullscreen for a Mac game, under the render
scale. The host starts fullscreen when DM_FULLSCREEN is set at all
(front_mac.m), so Window leaves the variable out instead of setting it
empty. A list from settings.tsv will carry the row once it has a
platform condition (seedds/nxnative#352); until then the launcher adds it
to a list that has none.

#36 Render scale in pixels: with the game's base size, the row shows
0.75 as 1200x675 and says what it is a share of ("75% of 1600x900
docked"), for the console mode chosen (1280x720 handheld for Breath of
the Wild). The base size comes from the row's base (seedds/nxnative#399:
a profile's render_base, written by settings.py), else from the game's
profile in the repository, so apps packed before still show pixels. A
game without one keeps the percentage. Play goes through the same list,
so Display mode reaches the app.

LaunchOptionsTests: Display mode's place and its unset Window, the
pixels docked and handheld from the profile, and the percentage without
a base size.
…ON Schema front ends read

Draft for the discussion in seedds#388. Two open PRs want the ninth column of
settings.tsv for different things (seedds#355: needs, seedds#399: level), and seedds#379
brings its own metadata. This makes the ninth column one optional meta
column of key=value pairs, so any number of optional fields fit:

- settings.py's META lists the keys with the pattern each value must
  match (level=basic, needs=<VAR>=<value>); an unknown key, a key given
  twice, a value that does not match, or needs naming a variable no row
  sets stops settings.py. The fields go into the row of launcher.json.
- launcher.json gets "schema": 1. Schema 1 grows only by optional
  fields: a reader ignores fields it does not know, and a field keeps its
  meaning. docs/launcher.schema.json describes the file as a JSON Schema,
  so a front end can check it and generate types from it.
- The five settings a front end shows first carry level=basic, and
  Rumble strength carries needs=DM_RUMBLE=1, as seedds#355 has it.

The platform split stays the shown column's platform:<ios|mac> (seedds#352).

test_launcher_settings.py: the fields and the version in a written list,
the strict meta parsing, META agreeing with docs/frontends.md and the
schema, and every list written for Breath of the Wild, Wonder and Hades
(iOS and Mac) conforming to the schema (a small validator for the
keywords the schema uses, as CI has no jsonschema package).
test_docs, test_lint_python, test_launcher_storage, test_nsp_mac_app and
test_pso_offline pass.
@v0lumehi

Copy link
Copy Markdown
Contributor Author

Once the schema in #418 is agreed (#388), I'll rebase this PR onto it: level then comes from the meta column, and the render scale's base size stays a profile key.

seedds and others added 3 commits October 27, 2026 21:39
A reader draws a section it does not know under its name, as the iPhone
app already does (sections in the order of their first rows). A new kind
stays a schema change, since a reader cannot draw it.

Co-authored-by: v0lumehi <[email protected]>
A needs value the parent row never takes (needs=DM_RUMBLE=on, when the
toggle takes 1 and 0) would hide the sub-setting for good. settings.py
now stops on it, for toggles and choices; a range or the game's languages
take any value.

Co-authored-by: v0lumehi <[email protected]>
…r_base

A profile's render_base (the 3D views' base size, docked then handheld)
goes into the render scale's row as base, so a front end can show 0.75
as 1200x675 docked instead of 75%. Breath of the Wild's is 1600x900
1280x720, from its note's Render scale section. base is an optional
field of schema 1, in docs/frontends.md and docs/launcher.schema.json.

The level half of the first version of this change is level=basic in
the meta column (seedds#418).

Co-authored-by: v0lumehi <[email protected]>
seedds added a commit that referenced this pull request Oct 27, 2026
… Schema for front ends (#418, #388)

settings.tsv's ninth column becomes one optional meta column of
key=value pairs separated by ;, so the optional fields #355 (needs) and
#399 (level) wanted no longer compete for it. settings.py's META lists
the keys with the pattern each value must match. It stops on an unknown
or repeated key, a value that does not match, and a needs that names a
variable no row sets or a value that row never takes (needs=DM_RUMBLE=on,
when the toggle takes 1 and 0, would hide the row for good). The fields
go into the row of launcher.json.

launcher.json gets "schema": 1, described by docs/launcher.schema.json,
so a front end can validate the list and generate its types. Schema 1
grows only by optional fields and new sections: a reader ignores fields
it does not know and draws a section it does not know under its name, as
the iPhone app already does; a new kind would be schema 2.
docs/frontends.md documents the fields and these rules.

The five settings a front end shows first carry level=basic, and Rumble
strength carries needs=DM_RUMBLE=1.

test_launcher_settings.py checks the fields and the version, the strict
meta parsing, that META agrees with docs/frontends.md and the schema,
that the lists written for Breath of the Wild, Wonder and Hades (iOS and
Mac) conform to the schema, and that a new section conforms while a new
kind does not.

Co-authored-by: v0lumehi <[email protected]>
seedds added a commit that referenced this pull request Oct 27, 2026
…r_base (#399)

A profile's render_base (the 3D views' base size, docked then handheld)
goes into the render scale's row as base, so a front end can show 0.75
as 1200x675 docked instead of 75%. Breath of the Wild's is 1600x900
1280x720, from its note's Render scale section. base is an optional
field of schema 1, in docs/frontends.md and docs/launcher.schema.json;
a malformed render_base stops settings.py. The level half of #399 is
level=basic in the meta column.

Co-authored-by: v0lumehi <[email protected]>
@seedds

seedds commented Oct 27, 2026

Copy link
Copy Markdown
Owner

Thanks, @v0lumehi. This landed on main as 7488443, with you as co-author, on top of the schema from #418 (f646545).

  • level is level=basic in the meta column, on the same five rows.
  • render_base is as you had it: Breath of the Wild's 1600x900 1280x720 goes into the render scale's row as base. base is now an optional field in docs/frontends.md and docs/launcher.schema.json, and a test checks that a list with it conforms.

All dm/tools/tests and dm/ios/tests files pass, and the lint ratchet finds nothing new. Closing this PR.

@seedds seedds closed this Oct 27, 2026
Xipzer pushed a commit to Xipzer/nxnative that referenced this pull request Oct 27, 2026
…ON Schema front ends read

Draft for the discussion in seedds#388. Two open PRs want the ninth column of
settings.tsv for different things (seedds#355: needs, seedds#399: level), and seedds#379
brings its own metadata. This makes the ninth column one optional meta
column of key=value pairs, so any number of optional fields fit:

- settings.py's META lists the keys with the pattern each value must
  match (level=basic, needs=<VAR>=<value>); an unknown key, a key given
  twice, a value that does not match, or needs naming a variable no row
  sets stops settings.py. The fields go into the row of launcher.json.
- launcher.json gets "schema": 1. Schema 1 grows only by optional
  fields: a reader ignores fields it does not know, and a field keeps its
  meaning. docs/launcher.schema.json describes the file as a JSON Schema,
  so a front end can check it and generate types from it.
- The five settings a front end shows first carry level=basic, and
  Rumble strength carries needs=DM_RUMBLE=1, as seedds#355 has it.

The platform split stays the shown column's platform:<ios|mac> (seedds#352).

test_launcher_settings.py: the fields and the version in a written list,
the strict meta parsing, META agreeing with docs/frontends.md and the
schema, and every list written for Breath of the Wild, Wonder and Hades
(iOS and Mac) conforming to the schema (a small validator for the
keywords the schema uses, as CI has no jsonschema package).
test_docs, test_lint_python, test_launcher_storage, test_nsp_mac_app and
test_pso_offline pass.
Know-It-All-Brother pushed a commit to Know-It-All-Brother/nxnative that referenced this pull request Nov 9, 2026
… Schema for front ends (seedds#418, seedds#388)

settings.tsv's ninth column becomes one optional meta column of
key=value pairs separated by ;, so the optional fields seedds#355 (needs) and
seedds#399 (level) wanted no longer compete for it. settings.py's META lists
the keys with the pattern each value must match. It stops on an unknown
or repeated key, a value that does not match, and a needs that names a
variable no row sets or a value that row never takes (needs=DM_RUMBLE=on,
when the toggle takes 1 and 0, would hide the row for good). The fields
go into the row of launcher.json.

launcher.json gets "schema": 1, described by docs/launcher.schema.json,
so a front end can validate the list and generate its types. Schema 1
grows only by optional fields and new sections: a reader ignores fields
it does not know and draws a section it does not know under its name, as
the iPhone app already does; a new kind would be schema 2.
docs/frontends.md documents the fields and these rules.

The five settings a front end shows first carry level=basic, and Rumble
strength carries needs=DM_RUMBLE=1.

test_launcher_settings.py checks the fields and the version, the strict
meta parsing, that META agrees with docs/frontends.md and the schema,
that the lists written for Breath of the Wild, Wonder and Hades (iOS and
Mac) conform to the schema, and that a new section conforms while a new
kind does not.

Co-authored-by: v0lumehi <[email protected]>
Know-It-All-Brother pushed a commit to Know-It-All-Brother/nxnative that referenced this pull request Nov 9, 2026
…r_base (seedds#399)

A profile's render_base (the 3D views' base size, docked then handheld)
goes into the render scale's row as base, so a front end can show 0.75
as 1200x675 docked instead of 75%. Breath of the Wild's is 1600x900
1280x720, from its note's Render scale section. base is an optional
field of schema 1, in docs/frontends.md and docs/launcher.schema.json;
a malformed render_base stops settings.py. The level half of seedds#399 is
level=basic in the meta column.

Co-authored-by: v0lumehi <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants