Reply To: Mafia 3 Modding (Mega Thread)

Download Mods for the Mafia Games Forums Mod Creation Mafia 3 Modding (Mega Thread) Reply To: Mafia 3 Modding (Mega Thread)

#163408
Deewarz
Participant

@dirtydanisreal If you want to start mafia3 + ScriptHook together (similar to gta5) you can use my new tool: https://mafiamods.com/mods/mafia3-extended-configurator/ @fireking117 I had no trouble using the mod so far. Will test it in the next days with new game version. @deewarz Great update on the scripting wiki! How did you find out functions of the new classes (game.police …) ?



@Sladernimo
Damn thanks you for your tool!

Here’s how I found these new features: ==> Zip in attachment

    1. Create a new folder called libs in your scripts directory
    2. Create a file called inspect.lua
    3. Copy/paste this script : https://raw.githubusercontent.com/kikito/inspect.lua/master/inspect.lua
    4. In your scripts directoy, create a new lua file and add this :


    local inspect = require 'scripts.lib.inspect'

    function printObject(object)
    if tostring(type(object)) == "userdata" then
    object = inspect(getmetatable(object))
    else
    object = inspect(object)
    end

    printToLog("object.log", "---------------------------")
    printToLog("object.log", os.date("-- %d/%m/%Y - %X --"))
    printToLog("object.log", "---------------------------")
    printToLog("object.log", object)
    printToLog("object.log", "---------------------------")
    end

    printObject(game) -- will log all Game libraries

     

    Now, use printObject() for any object (game, ai, game.game, etc.)

    I search in the compiled scripts for some keywords to test.

    enums seems very interesting!

     

    Attachments:
    1. printObject.rar
    2 users thanked author for this post.