Store edition offsets as data files

This commit is contained in:
Debugger committed 2026-09-17 02:13:34 -04:00
1 parent d868876d70
commit b54f4c48c5
6 files changed
+5 -5

No files matched your search

+1 -1
View File
@@ -4,7 +4,7 @@ This edition runs the YimMenu Legacy script through a Nenyoo API adapter on GTA
Copy the contents of this folder to `%LOCALAPPDATA%\Nenyoo\Plus\Scripts\User\UltimateMenu\`, then select `Ultimate_Menu.lua` from Nenyoo's Scripts menu to load its page. Keep the `lib` folder beside the entry script. The script selects the matching address catalog using Nenyoo's game-edition API. The included catalogs target GTA V Legacy build 3889 and Enhanced build 1158.13. Use the online menus only after joining GTA Online.
When a GTA update changes script addresses, update the named entries in `lib/game_offsets_legacy.lua` or `lib/game_offsets_enhanced.lua`. Each file separates `globals`, `locals`, and script names and keeps dynamic address formulas beside their bases. `lib/game_offsets.lua` only detects the edition and loads the appropriate catalog.
When a GTA update changes script addresses, update the named entries in `lib/game_offsets_legacy.offsets` or `lib/game_offsets_enhanced.offsets`. The `.offsets` files contain Lua-readable data but do not appear as runnable Lua scripts. Each catalog separates `globals`, `locals`, and script names and keeps dynamic address formulas beside their bases. `lib/game_offsets.lua` only detects the edition and loads the appropriate catalog.
The adapter requires a Nenyoo build exposing `ctx.edition`, `__ny_execute_as_script`, and `__ny_request_script_host`. The host request uses Nenyoo's cooperative script-host election and cannot evict a healthy current host. Actions that rely on becoming mission-script host therefore need in-game validation on each edition.
+1 -1
View File
@@ -1,6 +1,6 @@
# Nenyoo Legacy and Enhanced in-game verification
Run this pass separately on GTA V **Legacy build 3889** and **Enhanced build 1158.13** with the Nenyoo DLL that exposes `ctx.edition`, `__ny_execute_as_script`, and `__ny_request_script_host`. The package must be at `%LOCALAPPDATA%\Nenyoo\Plus\Scripts\User\UltimateMenu\` with `Ultimate_Menu.lua`, `lib\game_offsets.lua`, both edition-specific offset catalogs, and `lib\yim_compat.lua` beside `lib\Ultimate_Menu_Legacy.lua`. Open `Ultimate_Menu.lua` from Nenyoo's Scripts menu; it is a menu page that loads when opened. Confirm its heading says `Legacy` or `Enhanced` to match the running game before testing any action.
Run this pass separately on GTA V **Legacy build 3889** and **Enhanced build 1158.13** with the Nenyoo DLL that exposes `ctx.edition`, `__ny_execute_as_script`, and `__ny_request_script_host`. The package must be at `%LOCALAPPDATA%\Nenyoo\Plus\Scripts\User\UltimateMenu\` with `Ultimate_Menu.lua`, `lib\game_offsets.lua`, both edition-specific `.offsets` catalogs, and `lib\yim_compat.lua` beside `lib\Ultimate_Menu_Legacy.lua`. Open `Ultimate_Menu.lua` from Nenyoo's Scripts menu; it is a menu page that loads when opened. Confirm its heading says `Legacy` or `Enhanced` to match the running game before testing any action.
## First run
+1 -1
View File
@@ -9,5 +9,5 @@ if ctx and type(ctx.edition) == "function" then
if reported:lower() == "enhanced" then edition = "Enhanced" end
end
local filename = edition == "Enhanced" and "game_offsets_enhanced.lua" or "game_offsets_legacy.lua"
local filename = edition == "Enhanced" and "game_offsets_enhanced.offsets" or "game_offsets_legacy.offsets"
return assert(loadfile(directory .. filename, "t", _ENV))()
File renamed without changes.
+2 -2
View File
@@ -162,8 +162,8 @@ io.open = function(name, mode)
end
local before_load = #native_calls
local legacy_offsets = dofile("Nenyoo/lib/game_offsets_legacy.lua")
local enhanced_offsets = dofile("Nenyoo/lib/game_offsets_enhanced.lua")
local legacy_offsets = dofile("Nenyoo/lib/game_offsets_legacy.offsets")
local enhanced_offsets = dofile("Nenyoo/lib/game_offsets_enhanced.offsets")
for _, group_name in ipairs({"globals", "locals", "scripts"}) do
for name in pairs(legacy_offsets[group_name]) do
assert(enhanced_offsets[group_name][name] ~= nil,