Commit Graph

19 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
fab16f9512 Merge pull request #1835 from RK28A/mods-package-file-names
leonida_mods: install accepts the file names pack writes (MODS-PACKAGE-FILE-NAMES)
2026-11-28 21:15:57 +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
f2fb557027 Merge pull request #729 from promise-ssss/feat/mods-conflict-reporting
mods: report swap conflicts in JSON and add check --strict (MODS-CONFLICT-REPORTING)
2026-11-25 22:05:45 +01:00
58f14c3d68 leonida_mods: install accepts the file names pack writes
zip_parts() decided whether a package member's name was safe by comparing
it with safe_folder_name(), which makes a tidy folder label out of free
text: it also collapses runs of spaces, strips them at both ends and cuts
at 80 characters. So a mod holding `read  me.txt`, a file name with an
ideographic space or one longer than 80 characters packed without a word
and could not be installed again: "unsafe ZIP member name". The same ZIP
made by hand was refused the same way.

Members are now checked with portable_name(): no separator, control or
reserved character, no trailing dot or space, not a device name. It also
refuses `COM1 .log`, which the label comparison let through.

`pack` runs the same check before it writes anything, so it stops at a
file `install` would refuse (`con.txt` or `a:b` made on Linux) instead of
writing a package nobody can install.
2026-11-25 12:24:35 +00: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
2277b2d76e leonida_mods: reject pack outputs aliasing source files (MODS-PACK-OUTPUT-ALIAS) 2026-11-24 18:25:05 +01: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
c07ec72c49 Merge pull request #227 from bhimio1/feat/linux-native-support
Linux: versioned llvm-mc, Build.sh/Mods.sh, case diagnostic, portable runtime tests, docs/linux.md
2026-11-23 22:36:28 -05:00
0c7beb7e57 leonida_mods: hash names as the pinned latin-1 joaat does
The copy encoded the name to UTF-8 and lowercased ASCII bytes only, so every
accented name hashed differently from tools/hashdict.py and from
audio_config, awc_names and world_names: 'café' gave 2425794034 here and
4009490211 there, and a mod manifest naming a model or swap with an accent
would resolve to an id no package entry has.

Leonida's joaat is over the lowercased latin-1 bytes; characters outside
latin-1 hash as '?', as hashdict.joaat does.
2026-11-24 03:55:41 +02:00
5a8af54cbd build(linux): add Build.sh and Mods.sh, the shell counterparts of Build.bat and Mods.bat
Linux and macOS had no one-command entry point: Build.bat and Mods.bat are
cmd.exe scripts. Build.sh and Mods.sh find Python 3.12 or newer (the
versioned python3.N first, since a distribution's python3 can be older)
and run make_game.py or the mod manager's window with -I, passing every
argument through. They install and download nothing.

tests/test_shell_launchers.py runs both against stub interpreters on a
private PATH. The mod manager's missing-Tkinter message now names the
distribution package off Windows.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-23 20:51:04 -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