Mafia 3 Modding (Mega Thread)

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

This topic contains 184 replies, has 65 voices, and was last updated by  jehodonjohn 10 months, 3 weeks ago.

Viewing 15 posts - 31 through 45 (of 185 total)
  • Author
    Posts
  • #162895
    Draconio
    Draconio
    Keymaster

    I have spent a good deal of time teleporting around the map via the Mafia II SetPos script, and noticed that the game appears to feature some unused locations. There is a concentration of these locations north of the Causeway bridge, in the area above the lake. The Casino up there is the only place that is used during the game, the rest of the Northshore is inaccessible.

    The biggest thing is a huge international airport at the very top of the map. It is impossible to get to it because the ground surrounding it is not solid, however various buildings at the airport do have collision data, along with the jumbo jets parked there. The weirdness doesn’t end there, though…there’s a second airport in Delray, closer to the location of the real life New Orleans Int’l, and it can be visited, but it’s gated off and you can’t walk around the tarmac and runways. It’s submerged under a thin layer of water, probably to justify its abandonment. Unlike the other one, you can actually swim around if you teleport yourself into the airport via the SetPos script, but the wrecked planes at the airport aren’t solid. I have a reddit thread with more pictures here.

    I originally assumed the Northshore (Lewis Springs) area was supposed to be DLC, but it’s actually used one time for the final mission of the game. Will not go into detail to avoid spoilers, but only one building up there (the Casino) is visited. I myself have not finished the game yet due to extreme business, but I’ve got confirmation from people on reddit of what happens. You just cross the Causeway, which is finished being built at that point of the story, and head to the Casino, then it’s back to the city. Aside from the airport I’ve found a few other industrial areas and a huge construction site up there, which, as a big surprise to me, contains multiple drivable forklifts…which are the exact same forklift that was scrapped from Mafia II, and found in the game files with missing textures. I’ve even had it up as a mod on my site for years. Now you can drive it with textures and all, and as soon as we get our hands on an SDS tool akin to Rick’s Mafia II set, I’ll grab those textures and update the Mafia II mod.

    Sorry for this wall of text, but the story doesn’t end there…it seems that the Mafia developers never learn their lesson. As many of us know, Empire Bay originally had an elevated rail/subway hybrid that the player could ride that was cut from the game. They’ve done it again in the form of New Orleans streetcars…they were in the earliest gameplay demo, but are not in the final release…it seems that Mafia 1 will remain the only Mafia with a train you can ride on. Someone on reddit says that other vehicles were scrapped. Regardless, please let me know if you guys find any of that stuff in the game files, and more importantly, if it can be restored into the game in the form of  a mod. Thanks.

    Here’s the script I used:

    game.game:GetActivePlayer().invulnerability = true;
    game.game:GetActivePlayer():SetPos(Math:newVector(0, 0, 0))

    First line of the script is God Mode so you don’t die when you hit the ground, second is the SetPos script with x, y, and z values that you need to change in order to position yourself in the correct spot.

    5 users thanked author for this post.
    #162896

    dirtydanisreal
    Participant

    hey i know there is this plugin that enabled the dev console in mafia 2, any way it could be adapted to work in mafia 3?

     

    http://www.mediafire.com/file/8mdh8z226yhtfro/m2dev.zip

    #162897
    Josh
    Josh
    Participant

    @draconio Here is early version of Mafia 3 SDS Tool! http://www.filedropper.com/mafia3sdstool You can extract and view some files and I believe you can replace and save as well. Tool is made by @barzakh.

    #162910

    honzavalusek
    Participant

    @josh Is there any way, how to open and extract textures with this tool? Because when I click “view”, it says, that it’s not DDS texture. But thanks even so!

    #162914

    Barzakh
    Participant

    New version of ScriptHook is out now, featuring stuff like setTimeout (delayBuffer), key bindings, logs etc.

    See all here: https://mafiamods.com/mods/mafia-3-scripthook/ (Please read carefully through it if you want to develop scripts)

     

    PS 😀

    • This reply was modified 2 years, 3 months ago by  Barzakh.
    2 users thanked author for this post.
    #162916

    P3ti
    Participant

    Good job on ripping off M2LuaInjector source code, taking credits from its original author (Klusark) and violating GPLv2.. (Y)

    https://code.google.com/archive/p/mafia2injector/
    https://storage.googleapis.com/google-code-archive-source/v2/code.google.com/mafia2injector/source-archive.zip

    • This reply was modified 2 years, 3 months ago by  P3ti.
    • This reply was modified 2 years, 3 months ago by  P3ti.
    #162921

    Wolfmeister101
    Participant

    Can we use scripthook to do things like increase pedestrian count and traffic density?

    #162923

    Barzakh
    Participant

    First of all, the source was not ripped off, the only class structures that are taken over are those from LuaFunctions, LuaStateManager and the PluginSystem. All content was reversed by myself, even the hooking module etc. was replaced. If you take a look at my source code you will see that it’s pretty much different etc.

    Second of all, I have no problem with giving credits and copying license infos as seen here https://github.com/MartinJK/Mafia3ScriptHook/blob/master/shared/include/hooking/hooking.h#L50 .

    There was no intention to violate the rights of his source code.

    Unfortunately, his source code did not have any license info (the google code side does, but I’ve downloaded it somewhere else). Thats probably why I’ve forgot to add him.

    I’ll add his credits, again, there was no intention to violate it.

     

    Writing me a ‘normal’ note about that would be probably asking too much? (Good Job, ripping etc.)

    • This reply was modified 2 years, 3 months ago by  Barzakh.
    #162930

    Barzakh
    Participant

    Can we use scripthook to do things like increase pedestrian count and traffic density?

    Yes there should be a way todo so.

    Here’s the game.traffic class http://hastebin.com/sedasiditu.hs

    You should be able to control the density with one of these functions

    If not, you probably need to modify the game config file directly

    #162933

    KNGR
    Participant

    New version of ScriptHook is out now, featuring stuff like setTimeout (delayBuffer), key bindings, logs etc. See all here: https://mafiamods.com/mods/mafia-3-scripthook/ (Please read carefully through it if you want to develop scripts) PS ?

    thank you

    already updated my mods with 1.1 compatibility

    now you can all bind yourself some keys!

    • This reply was modified 2 years, 3 months ago by  KNGR.
    #162937

    cripplefinger
    Participant

    is there any way to get rid of any visual car damage? (by the way, thanx for a hook)

    trying with diff. params. any of this resulted in crashing game:

    game.game:GetActivePlayer():GetOwner():Repair(xx) xx = true\false
    game.game:GetActivePlayer():GetOwner():RepairAndClear(xx) xx = true\false

    game.game:GetActivePlayer():GetOwner():SetCarDamage( ? )

    • This reply was modified 2 years, 3 months ago by  cripplefinger.
    #162939

    herby4
    Participant

    First of all: Thank you for your hard work on this!

    Sadly this version crashes the game when I run it. The previous version worked like a charm.

    Here’s the ScriptHook log:

    M3ScriptHook::M3ScriptHook
    PluginSystem::LoadPlugins
    PluginSystem::LoadPlugins loaded plugin ExampleDLLPlugin.dll
    M3ScriptHook::StartThreads
    LuaStateManager::StartThread
    M3ScriptHook::mainThread
    LuaFunctions::LuaFunctions
    LuaFunctions::LuaFunctions Game is not ready, script engine not initialized, retry
    LuaFunctions::LoadPointers
    m_pMainGameScriptMachine (7ff6f19b41b8)
    lua_pcall2 (7ff6efef3100)
    lua_tostring (7ff6ec5bb2d0)
    lua_isstring (7ff6ef00e7f5)
    lua_isstring (7ff6ef00e7f5)
    luaL_loadbuffer (7ff6eff51b93)
    plua_loadBuffer (7ff6efefd370)
    lua_newthread (7ff6efef2d30)
    lua_pushcclosure (7ff6efef51d0)
    lua_setfield (7ff6ec5bb090)
    LuaStateManager::StateChanged
    LuaFunctions::Setup

     

    #162940

    Barzakh
    Participant

    First of all: Thank you for your hard work on this! Sadly this version crashes the game when I run it. The previous version worked like a charm. Here’s the ScriptHook log: M3ScriptHook::M3ScriptHook PluginSystem::LoadPlugins PluginSystem::LoadPlugins loaded plugin ExampleDLLPlugin.dll M3ScriptHook::StartThreads LuaStateManager::StartThread M3ScriptHook::mainThread LuaFunctions::LuaFunctions LuaFunctions::LuaFunctions Game is not ready, script engine not initialized, retry LuaFunctions::LoadPointers m_pMainGameScriptMachine (7ff6f19b41b8) lua_pcall2 (7ff6efef3100) lua_tostring (7ff6ec5bb2d0) lua_isstring (7ff6ef00e7f5) lua_isstring (7ff6ef00e7f5) luaL_loadbuffer (7ff6eff51b93) plua_loadBuffer (7ff6efefd370) lua_newthread (7ff6efef2d30) lua_pushcclosure (7ff6efef51d0) lua_setfield (7ff6ec5bb090) LuaStateManager::StateChanged LuaFunctions::Setup

    Alright this is my log

    m_pMainGameScriptMachine (7ff7ef0e41b8)
    lua_pcall2 (7ff7ed623100)
    lua_tostring (7ff7e9ceb2d0)
    lua_isstring (7ff7ec73e7f5)
    lua_isstring (7ff7ec73e7f5)
    luaL_loadbuffer (7ff7ed681b93)
    plua_loadBuffer (7ff7ed62d370)
    lua_newthread (7ff7ed622d30)
    lua_pushcclosure (7ff7ed6251d0)
    lua_setfield (7ff7e9ceb090)
    LuaStateManager::StateChanged
    LuaFunctions::Setup
    LuaFunctions::Setup::<lambda_b200b67e7317fa8bad38b3b12cc28be3>::operator ()
    LuaFunctions::Setup::<lambda_c766ceade28b194d58c2921e491dccd0>::operator ()
    LuaFunctions::Setup::<lambda_50df289ee3f51bfa67048f7e179908b0>::operator ()

     

    The reason why it crash must be lua_pushcclosure or lua_setfield, I’ll try to get a fix out as soon as possible. Thanks for sharing your information!

    #162941

    Wolfmeister101
    Participant

    Can we use scripthook to do things like increase pedestrian count and traffic density?

    Yes there should be a way todo so. Here’s the game.traffic class http://hastebin.com/sedasiditu.hs You should be able to control the density with one of these functions If not, you probably need to modify the game config file directly

    Oh dear

     

    I am way too stupid and inexperienced to try to do it myself. I’ll just wait haha. I’m sure someone will make it, considering how lots of people have complained about how empty the game’s streets are

    #162943

    Barzakh
    Participant

    For those where version 1.1 of the Script Hook is crashing, can you please try out the 1.2 release candidate? You can download it here https://mega.nz/#!c9diTBBQ!vhjXV1uMWLd6g2kYG1YblNeKUQdTr6f_xugUIS1sdaA and give me feedback if it works for you now? Thanks!

    • This reply was modified 2 years, 3 months ago by  Barzakh.
    1 user thanked author for this post.
Viewing 15 posts - 31 through 45 (of 185 total)

You must be logged in to reply to this topic.