Lua and Library Scripthook for Mafia 3 allowing you to run your own code in Mafia 3. Simply create a lua script or use the ExampleDLL to create your plugin and start creating yor mod. The Library Scripthook features a hooking library to find pattern, patch function calls/jumps with your own, overwriting opcodes/functions etc.
List of all available commands follows in the next few hours, meanwhile you can tryout Mafia2's scripting commands (which can be found here), as they don't have really changed.
Mafia 3 Script Hook is completly open source and can be found at https://github.com/MartinJK/Mafia3ScriptHook
If you want to reload Lua scripts while being in the game, simply press F1 and all Lua scripts in side the scripts/ folder will reload.
A list of functions; parameters; strings can be found here: https://mega.nz/#F!VscigCQQ!yl3PBpGpZ075v6K5x6PICA
If you need help or are experiencing troubles, don't hesitate to ask for help: https://mafiamods.com/forums/topic/mafia-3-modding-mega-thread/
ScriptHook implemented functions:
printToLog("YourLogfile", "String"); // e.g. printToLog("Test.log", "Test"); bindKey("k", "ContentToExecute") // e.g. bindKey("k", "printToLog('Test.log', 'test')"); unbindKey("k"); // (removes all bindings of key "k", even in other scripts) setTimeout("5000", "ContentToExecute") // e.g. setTimeout("5000", "printToLog('Test.log', 'test')"); (5000 = 5000ms) An example file for scripting can be found here: https://github.com/MartinJK/Mafia3ScriptHook/blob/master/files/scripts/dev.lua
INSTALLATION:
|- M3ScriptHookLauncher.exe
|- M3ScriptHook.dll
If you need help or are experiencing troubles, don't hesitate to ask for help: https://mafiamods.com/forums/topic/mafia-3-modding-mega-thread/
ScriptHook implemented functions:
printToLog("YourLogfile", "String"); // e.g. printToLog("Test.log", "Test"); bindKey("k", "ContentToExecute") // e.g. bindKey("k", "printToLog('Test.log', 'test')"); unbindKey("k"); // (removes all bindings of key "k", even in other scripts) setTimeout("5000", "ContentToExecute") // e.g. setTimeout("5000", "printToLog('Test.log', 'test')"); (5000 = 5000ms) An example file for scripting can be found here: https://github.com/MartinJK/Mafia3ScriptHook/blob/master/files/scripts/dev.lua
INSTALLATION:
- Download .ZIP
- Extract the .ZIP content into Mafia III directory so the structure looks like this
|- M3ScriptHookLauncher.exe
|- M3ScriptHook.dll
- Run M3ScriptHookLauncher.exe once the game has started.
Download Mafia III mods |
0 comentarii:
Post a Comment