Commit Graph

13 Commits

Author SHA1 Message Date
96befbdd3e Merge pull request #2181 from Tauwni/fix/mods-gui-tkinter-hint-macos
leonida_mods gui: on macOS, the missing-Tkinter hint names Homebrew's python-tk@<version> (MODS-GUI-TKINTER-HINT-MACOS)
2026-12-01 16:17:21 +01:00
7357674733 Merge pull request #1834 from RK28A/mods-manager-camera-bom
leonida_mods: read mod.json as the runtime does, camera section and byte-order mark included (MODS-MANIFEST-RUNTIME-RULES)
2026-11-28 21:15:35 +01:00
9ae734c888 Merge pull request #852 from KernelSmoker/kernelsmoker/mods-parse-model-whitespace
leonida_mods: trim model ID whitespace (MODS-PARSE-MODEL-WHITESPACE)
2026-11-28 14:05:49 +01:00
00131bb85e main keeps its own runtime, tools and tests; the branch's variants stay on port/d3d12-nvidia
After the merge the tree held this branch's older states of files main maintains. Run against main's code,
tests/test_acphal_abi.py and 11 of the 15 translator tests that differed failed, and the C++ runtime would have
been built from two generations of its sources. So that the merge cannot break what main builds and tests:

- runtime/ is main's, file for file (68 files only this branch had are not carried over);
- every file under tools/, tests/ and docs/ that both sides have is main's (80 files);
- ten translator tests only this branch has, which test rules main's translator does not have, and their
  fixtures are left out.

What main gains: d3d12/ (the Rust D3D12 runtime), its launchers and helpers (Launcher.bat, scripts/play*.ps1,
play-linux.sh, port_ctl.py, smooth-motion.ps1, fetch_vkd3d_proton.py, sync_victory.py), mods/example_lua, eleven
notes under docs/, seven tools and the tests that pass with main's code, the README's sections and credits, and
the "Runtime traps" section of AGENTS.md. Everything left out here is on the branch port/d3d12-nvidia.

Checked: compileall; make_game.py --help; check_no_game_data.py over every file this adds to main; the
line-ending, docs-encoding, CI-registration and docs tests; each test file that differs from main, on its own.
Not run: the whole translator suite, the C++ build, cargo over d3d12/ after the merge (d3d12/ is byte for byte the
branch's), CI.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-27 17:58:38 -05:00
b87abdef57 Merge mandy's main into port/d3d12-nvidia
Brings the D3D12 runtime branch (d3d12/, its launcher scripts and notes, and the pull requests reviewed and applied
on it) together with mandy's main.

Conflicts (67 files, none under d3d12/): docs/, make_game.py, runtime/, scripts/build_runtime.ps1, tests/ and
tools/. Every one takes main's side: main is where that code is maintained, and this branch's copies were older
states of the same files or the same pull requests in another form. tests/test_fspx_unpack.py is main's too, as it
tests main's tools/fspx_unpack.py. Nothing under d3d12/ is changed by the merge.

Checked before pushing: python -m compileall over make_game.py, tools and tests; make_game.py --help;
scripts/check_no_game_data.py over the files this adds to main; tests/test_text_write_line_endings.py. The
translator suite, the C++ runtime build and CI have not run on the result.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-27 17:50:37 -05:00
581440a319 Lua mods: an example mod, the docs, and the mod manager lists them
What: mods/example_lua (mod.json disabled by default, main.lua: a frame-rate and
time line in the lower left, a page in the F4 menu with a toggle, a number and two
actions, an F9 key handler); docs/lua-modding.md (the API reference, the sandbox
rules, what is not available and why, what was not tried), pointers in
docs/README.md, docs/mod-menu.md, docs/modding.md and a row in d3d12/README.md.
tools/leonida_mods.py reads "script": it must be a .lua path inside the folder, the
list shows `Lua main.lua`, the JSON report has "script", and a Lua mod no longer
warns that it has no archetype_swaps.
Why: a Lua mod is mods\<name>\mod.json plus a script, so the manager that lists the
asset mods should list these too, and a mod author needs the reference.
How checked: python -I tests/test_leonida_mods.py (13 tests, 3 new, pass; the one
failure, test_run_print_builds_gta6rt_command, fails the same on the base: no gta6rt
build here). The example's script was not run in the title. AI-assisted.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-27 00:11:50 -05:00
1c06996a08 leonida_mods gui: on macOS, the missing-Tkinter hint names Homebrew's python-tk@<version>
Homebrew's Python ships without Tkinter, so ./Mods.sh on a Mac stopped with the Debian hint (sudo apt install
python3-tk). The hint now names the formula for the running version; docs/modding.md says it too.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-26 04:04:16 +01:00
4895e63a99 Merge remote-tracking branch 'up/main' into mods-manager-camera-bom
# Conflicts:
#	tests/test_leonida_mods.py
#	tools/leonida_mods.py
2026-11-25 23:08:37 +01:00
c5b09c21ec leonida_mods: read mod.json as the runtime does, camera section and byte-order mark included
The manager checks a manifest with its own copy of the rules in
runtime/src/mods.h, and the copy had fallen behind in three places.

The "camera" section was not read at all. `list` said of mods/first_person,
which ships in this repository, "no archetype_swaps; this mod currently
changes nothing", and `check` passed a section the runtime skips the mod
for: an unknown view_mode, a first_person_value that is not a whole number
0-255, contexts that are not whole numbers.

A UTF-8 byte-order mark in front of mod.json was reported as invalid JSON,
although the runtime skips it and docs/modding.md says it is accepted.
Notepad's "UTF-8 with BOM" and Windows PowerShell 5.1's -Encoding utf8
write one. `enable`, `disable` and `install` failed on it too. A UTF-16
file is now named as the runtime names it.

"archetype_swaps": null passed as a mod without swaps; the runtime refuses
it.

`list` and `list --json` now show the camera a mod sets, and which mod's
camera wins when several enabled mods have one.
2026-11-25 12:23:54 +00:00
43b445ca38 leonida_mods: trim model id whitespace 2026-11-24 15:33:35 +01:00
72e8616468 mods: report swap conflicts in JSON and add check --strict 2026-11-24 20:53:22 +08:00
12d28c0879 tests: the drive-root cases give check() a manifest, and the mods run case writes the launcher Windows looks for
Two standard-library tests fail on native Windows and are skipped or pass
elsewhere:

- test_make_game_paths: since BUILD-2367 main() takes a drive-root dump's
  top-level names from the version manifest, but the two drive-root cases
  still mocked check() as {} and patched os.listdir, so main() raised
  KeyError: 'expected_exe' before reaching the rule under test. They now
  pass a manifest with the same entries.
- test_leonida_mods: test_run_print_builds_gta6rt_command wrote only
  gta6rt.sh, and runtime_executable() accepts only gta6rt.exe on Windows.
  It now writes the launcher of the platform it runs on.

Tests only; no tool changes.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-23 21:14:02 -05:00
234d657349 mods: the mod manager and four manifest-only examples
tools/leonida_mods.py manages the port's mods folder: create, install,
list, check, enable, disable, pack, remove and a gta6rt launcher, with a
Tkinter window behind Mods.bat on Windows. Packages are plain ZIPs with
mod.json at the top level; the installer refuses paths that climb out of
the package and never touches game data. mods/ ships four archetype-swap
examples, three of them installed disabled.

Generated with [Devin](https://devin.ai)

Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
2026-11-23 13:47:00 -07:00