

Additional library modifications for things like bitwise operations, internally added things like LuaSocket, etc. This is the preferred method since in most cases, companies will modify their copy of Lua to change various things around.

Obtain pointers to all the Lua functions you require and invoke them manually. If the modifications made line up, you're good to go and no more additional work is required.Ģ. Once compiled, your injected DLL just needs to find the Lua state pointer and then you can just pass that to your own Lua functions compiled in your DLL. (Only edit these directly if you have to.) Editing types/sizes is generally just through modding these: So doing this you must be sure your compiled copy of the Lua library matches theirs.ĭownload the copy of Lua that you found they used, make any required adjustments to the size data or types. Any changes to how Lua works, size information that you fail to correct in your compiled build, etc.

Going this route is only really recommended if you are 100% sure they are using a stock build of Lua / LuaJIT and have done nothing to it. Obtain the Lua state pointer and just use your own compiled version of Lua in an injected DLL that matches their version and modifications. A small change to 1 data type can break everything if you just try to use normal compiled Lua libs.)Īt this point there are two ways you can go about doing things.ġ. (This is optional if the game uses stock Lua but this is recommended to be done to validate the size information of how their Lua instance was compiled. Find the functions used for reading/writing compiled Lua chunks. (You can search for Lua's version string information to do this. I've never released any of mine open-source so I don't have any of mine to share personally. There are a handful of examples people have done for newer titles on sites like GitHub, one for Payday 2 here:
