Sladernimo

Forum Replies Created

Viewing 13 posts - 1 through 13 (of 13 total)
  • Author
    Posts
  • in reply to: Mafia 3 Modding (Mega Thread) #163407
    Sladernimo
    Sladernimo
    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 …) ?

    3 users thanked author for this post.
    in reply to: Mafia 3 – Godmodescript – Need help #163393
    Sladernimo
    Sladernimo
    Participant

    First problem is that togglePlayerGodMode never can be 0 or 1 because you say
     
    togglePlayerGodMode = 0; — here you set variable value to 0.
    togglePlayerGodMode = [[ — here you use the same variable and set value to a code block.
     
    Also invulnerability should be used like that:
    game.game:GetActivePlayer().invulnerability = true; — the “;” sign is not needed in lua but can be used
     
    So for example your code could look like this:
    togglePlayerGodModeSetting = 0
    togglePlayerGodModeFunction = [[
    if togglePlayerGodModeSetting == 0 then
    game.game:GetActivePlayer():InventorySetUnlimitedAmmo(true)
    game.game:GetActivePlayer().invulnerability = true
    togglePlayerGodModeSetting = 1
    elseif togglePlayerGodModeSetting == 1 then
    game.game:GetActivePlayer():InventorySetUnlimitedAmmo(false)
    game.game:GetActivePlayer().invulnerability = false
    togglePlayerGodModeSetting = 0
    end
    ]]
    unbindKey(“o”)
    bindKey(“o”, togglePlayerGodModeFunction)
     
    For additional help take a look at the scripting wiki and its links at http://mafia3scripting.wikia.com/
    Everyone can help to contibute the wiki 🙂

    • This reply was modified 2 years, 10 months ago by Sladernimo Sladernimo.
    in reply to: Mafia 3 Modding (Mega Thread) #163361
    Sladernimo
    Sladernimo
    Participant

    @cole8055
    Hey, I’ve got some good news for you. I just uploaded first version of my Hardcore Difficulty Mod. It increases damage player takes from enemies by 5x.
    https://mafiamods.com/mods/hardcore-difficulty/

    2 users thanked author for this post.
    in reply to: Mafia 3 SDS Files #163331
    Sladernimo
    Sladernimo
    Participant

    Follow that link. It might be interesting:
    http://forum.xentax.com/viewtopic.php?f=10&t=15336
    Also Mafia3SdsExlorer is open source. You can watch progress here:
    https://github.com/MartinJK/Mafia3SDSExplorer
     
    I hope Barzakh / MartinJK will update SdsExplorer & ScriptHook soon.

    in reply to: Mafia 3 Modding (Mega Thread) #163328
    Sladernimo
    Sladernimo
    Participant

    @cole8055
    Mafia III Scripting Wiki will help modders to know how to use scripting functions. Atm some functions are known but not how many and what kind of parameters they need. Scripters need to find out by trial and error how to use them. In the wiki people can bring together what they found out. The wiki already helped me for making my new script mod. You can get ar stromer 223 using it:
    https://mafiamods.com/mods/all-weapons/
    I also finished first version of my hardcore difficulty mod but it is to unstable to release. Mafia3ScriptHook needs to be updated first.
    @dirtydanisreal
    I guess it would be possible to start scripthook and mafia3 together but someone needs to code it. Someone could make a new application that starts scripthook and mafia3 together or someone adds this feature to scripthook on a branch on https://github.com/MartinJK/Mafia3ScriptHook .

    1 user thanked author for this post.
    Sladernimo
    Sladernimo
    Participant

    Hey, I just made a lua script that does what you want: https://mafiamods.com/mods/all-weapons/
    With this script you can switch between all weapons. M60 should be two handed weapon number 3.

    1 user thanked author for this post.
    in reply to: Mafia 3 Modding (Mega Thread) #163230
    Sladernimo
    Sladernimo
    Participant

    @deewarz That’s great! Excactly what we needed. I will contribute too.

    2 users thanked author for this post.
    in reply to: Change Time of day #163222
    Sladernimo
    Sladernimo
    Participant

    I just made a script mod that does what you are looking for: https://mafiamods.com/mods/change-time-of-day/

    in reply to: Mafia 3 Modding (Mega Thread) #163190
    Sladernimo
    Sladernimo
    Participant

    Is there any way to make a endless loop for code without crashing atm?
    There is this note on M3ScriptHook mod page:
    “Please be careful with pressing keys, spaming keys / executing the same things too often in a short time period can cause the game to crash!”
     
    I made a script that executes code in a loop. To limit the rate I use setTimeout to trigger the script less often like this:
    myFunc= [[
    CODE TO EXECUTE … ;
    setTimeout(“1000”, myFunc);
    ]]
     
    Without limitation the game crashes almost instantly.
    But even while waiting 1 – 5 seconds before each code exec the game crashes after a few minutes.
    ScriptHook.log doesn’t tell anything about it.
     
    Last lines of ScriptHook.log:
    Trying to execute: CODE TO EXECUTE … ;
    LuaFunctions::DelayBuffer
    LuaFunctions::DelayBuffer::<lambda_3e31ca3edde28b6914e6e540dd3f3484>::operator ()
    M3ScriptHook::Shutdown
    M3ScriptHook::EndThreads
    PluginSystem::StopPlugins

    in reply to: Mafia 3 Modding (Mega Thread) #163160
    Sladernimo
    Sladernimo
    Participant

    Okay maybe M3ScriptHook needs to be updated for game version 1.02. I was using M3 game version 1.01 last time.
    @barzakh
    You have mentioned the new lua classes. How is your progress releasing the corresponding functions like you already did for game.game etc. I don’t know how to find them. I need especially functions from game.police.
    Is it possible to use events in lua scripts atm?
    Btw it would be nice if someone could host a wiki for scripting or a nice function page like the one from gta 5 here

    in reply to: Mafia 3 Modding (Mega Thread) #163157
    Sladernimo
    Sladernimo
    Participant

    @b4d8oy
    I am using M3ScriptHook 1.2 ReleaseCandidate from here: https://mega.nz/#F!VscigCQQ!yl3PBpGpZ075v6K5x6PICA
    You should try that one. It works for me with current M3 game version.

    in reply to: Mafia 3 Modding (Mega Thread) #163153
    Sladernimo
    Sladernimo
    Participant

    @b4aD8oY:  The only problem that I expirienced was that when I started M3ScriptHookLauncher it wasn’t able to hook the game. I solved this by starting M3ScriptHookLauncher as administrator.
     
    @lincoln clay: I’m also trying to decompile the scripts but with no luck so far. I tried several lua decompilers from here:
    http://luadec.luaforge.net/
    https://github.com/viruscamp/luadec
    https://github.com/sztupy/luadec51/
     
    I also found those threads that might be useful:
    http://mafiascene.net/thread-697.html
    http://forum.kalypsomedia.com/showthread.php?tid=24160

    Sladernimo
    Sladernimo
    Participant

    I’m trying to achieve a harder difficulty mod aswell but everything I found out is how to reduce players max health bar counter to 1 healthbar (instead of max 3) and how to disable players armor. But I don’t know how to change the weapon damage itself and how to access peds (like enemy and police) to change their behaviors like fore example their accuracy …
    I think we need a more complete api for scripting first and/or better modding tools before we can do that.

Viewing 13 posts - 1 through 13 (of 13 total)