As we know, unfortunately, we can't mod Mafia 2 as much as some other games because its developers used a lot of their own stuff (their programs, techniques etc.). We can change textures, script the game to some extent and add/replace cars. But it is almost impossible to put your own model (not a car model) into the game. Though I may have found a little workaround. I've always wanted to be able to put pieces of roads into the Mafia 2's world. I had an idea to put a bridge model onto a roof of a car and then spawn the car in the game. Crazy as it may seem, it was possible. I shared this idea with agens who tried it first.

BTW: It is worth knowing that you can add modded cars into the game as add-ons meaning, you don't have to replace anything and the car won't spawn in the streets.

Vide the first attempt:

The biggest problem was that it was impossible to drive on it and it was very unstable.

I had an idea to find a script that would freeze the car in one place. It took me a few days but I was succesful, the script is xxxxxxxx:Lock()

The problem is that for some reason you can't get in the car (truck). Almost every script mod regarding car changes available on the internet requires you to be in the car to activate the script. Luckily I was able to deal with it. I needed to use the StrM Editor, which can be found here: http://www.playground.ru/files/mafia_2_self_tools_nabor_utilit-83905/

in order to create an entity to which I could refer. There is a nice tutorial on how to do that in Mafia 2 Self Tools\StrM_Editor\Example\Example_2\Help

I opened the StreamMapa.bin found in Mafia 2\pc\dlcs\cnt_jimmys_vendetta\game_edit\tables via the program to add an entity.

I set the path of the entity (called Car_Entity_01) to sds/cars/shubert_armoured.sds, which is the car model with the bridge.

Then I made the line apply to config number one "game_main_load" and I saved the file.

Then I started the game and played Jimmy's Vendetta. Via a trainer that has been recently released for Mafia 2 you are able to add scripts in the game. I opened the script windows and entered my script:

It spawns the enity (the car model) at the given coordinates and locks it afterwards. The result is this:

Possible uses: a WTC mod, jump models, hopefully expanding the map

Problems: The biggest problem is that once you exit the car on the bridge you can't enter the car again (though it may be done using a script) but still it sucks It is also buggy to spawn cars via the trainer on the bridge.
It is hard to spawn it in some places, because it is too big.

It is not fully tested yet. But so far it works better than expected.

Last edited by T3mas1 on Sat Mar 17, 2018 6:56 pm; edited 2 times in total

AMadeMan: Thank you, though I wouldn't call it a breakthrough yet. It is rather just a little workaround than a proper solution.

Jaqub: Sorry for expressing my a bit discourteous opinion. If you can't import along with the map the great car handling and the awesome cover shooting system that Mafia 2 had, it is pointless to some extent, no style lol.

This is very important. Now I can build places by moving spawned objects. The same concept on which Map Editor used with Map Builder for GTA V works. I could make road and buildings packs for you.

For example: I created this map for GTA V just by spawning blocks next to each other: https://www.gta5-mods.com/maps/great-island and it looked good. The same principle could be used in Mafia 2. A simple moving objects trainer in which you can change the set attributes in-game would come in handy. It would make the task much easier and less "pain in the ass".

If you want to test the model in-game for youreself, you can. Everything you need to know is below:

agens delighted me with a surprise today - he worked on the model a bit and now the bridge has textures, has better collisions and works as an Add-on.

Video by me:

Video by agens:

Problems that I encountered: The collisions are buggy, the collisions are a bit too high. These are serious problems but the positive thing is that other than that the model works pretty well.

Some problems stay: you can't re-enter the car once you have got out of it on the bridge. It can be re-entered only by using a script.

I may have a brilliant idea. I've already written about the GTA V Map Editor/Map Editor thing here and using this method I could build a little city (hopefully!) on the flat surface used for testing in Joe's Adventures: https://www.youtube.com/watch?v=rie0u50YFvg

I would place there a flat object with textures of road, it would just cover the surface of the testing scene. There are already collisions on the flat surface so I wouldn't have to add any collisions to the added object. Added collisions would be only on buildings and pavements that I would later place there. This way it would be actually possible to re-enter cars on the road in the little city. The city would be connected with the rest of the map with the bridge model showed in the videos. But it is just theory.

Simply Awesome T3mas1 and agens! This could lead to modders being able to expand the games map, improve, or add different areas across Empire Bay. I'm seein a bridge at the port that'll let you get a close up of the titanic right now.

I made a long video testing one thing - moving the object. I spawned actually two objects of the same model to move them around the map to see if the game crashes or not or if there is any problem. Luckily it works perfectly! To add an object I just had to write another line in StreamMapa.bin using the StrM editor.

*Again I used scripts to move the object, more about that in the previous post.

During the testing I found out about a few things that I hadn't known about before. I made NOTES in the video, the NOTES are numbered.

Interestingly the object after using the "spawning" script which includes the lock script as well doesn't fully fix itself. If you decide to take a ride on it with a car, the car will fall throught the object - this is the situation that occurs: https://youtu.be/wuVWpWsSwrs?t=2m39s

In order to fix it you have to step on it, just little untill it shakes a little bit and you hear a sound. It may sound unpractical, luckily that is not the only way to do it! You can instead run the script consecutively twice to get the same result.
Moving the object in any direction using the F1-F6 script should do the trick as well.

As agens told me once, in the game there are invisible collision walls along the the shores between the land and water. If you happen to know how to delete/move them, let me know as soon as possible. Luckily those collision walls aren't infinitely high opposed to Mafia 1 where the collisions were as high as they could. Using the bridge you should be able to get over these invisible walls by over passing them.