Keep offset loader out of script listings

This commit is contained in:
Debugger
2026-09-17 02:14:43 -04:00
parent b54f4c48c5
commit e8adcde6e2
6 changed files with 5 additions and 5 deletions
+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.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.
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.offsets` 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 `.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.
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`, the three `lib\game_offsets*.offsets` files, 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
@@ -34,7 +34,7 @@ local function run(path)
return chunk()
end
local offsets = run(directory .. "lib\\game_offsets.lua")
local offsets = run(directory .. "lib\\game_offsets.offsets")
for _, group in ipairs({offsets.globals, offsets.locals, offsets.scripts}) do
for name, value in pairs(group) do environment[name] = value end
end
+1 -1
View File
@@ -1,4 +1,4 @@
-- GTA V global and script-local addresses are loaded from game_offsets.lua.
-- GTA V global and script-local addresses are loaded from game_offsets.offsets.
function MPX()
local PI = stats.get_int("MPPLY_LAST_MP_CHAR")
+1 -1
View File
@@ -174,7 +174,7 @@ for _, group_name in ipairs({"globals", "locals", "scripts"}) do
"Legacy catalog is missing " .. group_name .. "." .. name)
end
end
local offset_catalog = dofile("Nenyoo/lib/game_offsets.lua")
local offset_catalog = dofile("Nenyoo/lib/game_offsets.offsets")
assert(offset_catalog.globals.TRANSACTION_ERROR_GLOBAL_1 == 4516981, "Global offset catalog did not load")
if ctx.edition() == "Enhanced" then
assert(offset_catalog.edition == "Enhanced" and offset_catalog.build == "1158.13",