Lua

Lua / Lui modding instructions

Lua Config ( Found In ProjectBo4.json)

The added configs are:

{
    "lua": {
        "info": false,
        "error": false,
        "allow_unsafe_function": false
    },
}

Register Lua

To register a Lua script it's like with the GSCs, inside the metadata.json file,Using another method to hook.

The hook can be done before or after another script using either the config hooks_pre or hooks_post.

{
    "name": "Lua test",
    "data": [
        {
            "type": "luafile",
            "name": "ui/shield/testhud",
            "path": "test.luac",
            "hooks_post": [
                "x64:fedcba9876543210"
            ],
            "hooks_pre": [
                "x64:0123456789abcdef"
            ]
        }
    ]
}

Hook Points


To Compile Lua

https://github.com/ate47/hksc/tree/test_t8. The Lua in BO4 is adding a new custom datatype xhash compared to bo3.


Last updated