Jump to content

[FEATURES REQUEST] To help reverse engineering and documentation

Recommended Posts


Some ScriptHook features that I definively need in order of priority:


  • Dump Lua stack in log file

Currently, Lua errors are not logged in any file. Could be in MPlus.log ?


  • Be able to open MPlus.log when the game is running

To view full logs without having to quit the game


  • Scrolling in the console



  • Print screen and save image in ScriptHook folder
ScriptHook.PrintScreen(string fileName) -- if contains / (slash) consider path


  • Log in custom file

Like in previous ScriptHook

printToFile(string fileName, any value, any value, ...) -- if contains / (slash) consider path





Share this post

Link to post
Share on other sites
  • Log in custom file

I make my own, could be added to globals (in lua/main.lua)?

function printToFile(filename, ...)
    local file = io.open(filename, "a")

    local result = ""
    for i, v in ipairs(arg) do
        result = result .. tostring(v)

        if i ~= #arg then
            result = result .. "\t"

    file:write(result .. "\n")


Edited by Deewarz

Share this post

Link to post
Share on other sites

Hi, thanks for your suggestions 🙂

  • Lua errors into Log: We will take a look, thanks for reporting it!
  • Open Log while game is running: This is fixed, will be integrated into the next release.
  • Scrolling in console: We're currently reworking our Input Hooking, once it's done all UI elements (including the Console) will accept mouse input
  • PrintScreen: why exactly does this have to be a Lua feature? Steam/Epic have overlays which accept a keybind for screenshots
  • Log in custom file: Script developers are free to integrate a function like that into their script, I don't think this needs to be in the built-in Lua files.
  • "clear" console command: Already integrated for the next release.

Share this post

Link to post
Share on other sites

Thank for your reply!

  • PrintScreen : This function could be very useful to automate taking screenshots for documentation.
    For example a loop for SpawnProfile which takes screenshots and named capture with SpawnProfile value.

Share this post

Link to post
Share on other sites

The original game had no-pause map, it was so much more engaging, pseudo realistic. Its like turning my head from the road to look at paper map for a second, risking crushing the car.
Would you make it like it was in original game? Almost full screen, almost non transparent. Maybe allow chosing lever of transparancy and if it is transparent at all. It would add to the game so much!

Here is how it looked - https://youtu.be/TNVKWC_IL7c?t=697

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Nomad Group

We are a dedicated team of software & game developers, reverse engineers and most importantly gaming enthusiasts.

Our team has developed dozens of mods and toolkits and contributed to major multiplayer and game projects over the past years.

Useful Links

Legal Statement

NOMAD Group and the contents herein, are not affiliated with Ubisoft or Take-two Interactive Software Inc.

Watch_Dogs, Watch_Dogs 2 and Watch_Dogs Legion are registered trademarks of Ubisoft.

Mafia 2, Mafia Definitive Edition are registered trademarks of Take-Two Interactive Software Inc.

  • Create New...