Given how many amazing breakthroughs we've had thanks to you guys, i was hoping we wouldn't such an annoying snag in the road.

There must be a workaround somewhere.

I'm sure though that if we need to find someone to help with collisions, we'll find em. We found agens who helped us so much and such amazing work. So there has to be someone out there thats experienced.

[quote="Jaqub"]
Yes. For movement for NPC, you need the program "Autodesk Kynapse". On the screenshots you can see that the game itself is loaded and most likely directly through the game the developers prescribed routes, although I may be wrong.

To load a map (by dam type), you need to register a new map of "cityareas", and to load apartments and the like need to register in "cityshops". But most likely you need to register the maps in the files .... sds.patch, but with this as yet there is no exact answer. But you can try to attach a new card to an existing card. The game can immediately load only two parts of the map and one location and "shops", hence it should work with a new location. In any case, without the ability to export maps, we have not yet been able to do all this.

As you might have read on these forums, agens asked Oleg to make an exporter for Mafia 2 maps. I don't know exactly how that is being made, if you want to know more about it, ask agens or Oleg.

There are some things that agens found out about the Mafia 2 files. This information may help us understand the structure of the Mafia 2 maps better:

For the maps, it is neccessary to learn how to read and edit these files:

FrameResource_0 - that is the main file, as it seems.

IndexButterPool_0 and VertexBufferPool_0, it is unknown what the first file does, the second one contains the map model and its collisions.

FrameNameTable_0 contains some names and some names of details of maps with some settings (the FrameNameTable.exe program opens it).

Collision_0 contains information about collisions of maps. *Note: this file can be deleted and the game will work. However, there will be no collisions and the player will fall through the map. This file needs to be learnt as well, though not necessarily in the beginning, it will need to be concluded in the exporter, for new information about the collisions of a map.

There are also files ItemDecs, those are somewhat connected with collisions, but they contain mainly collisions for small objects. They may or may not be in a folder of a map, or just a few of them. *Note: it is possible to delete them and the game will work.

In order to be able to export it is necessary to take a look at the first four files, the rest can be taken care of later.

Unlike car models, models of maps contain a number of files that can be deleted and the game will work anyway.

It is doubtful whether we can make new maps in an exporter for cars or not (with collisions and everything).

Note that with collisions of cars there is a "hash" number, deleting it doesn't help. It doesn't matter where you place your model in Mafia 2, there seem to be no boundaries limiting you (for example - in Mafia 1 there are boundaries 5km x 5km around the map that limit you in adding new face collisions).

We need to be able to export maps into Mafia 2. Adding maps using the car models doesn't seem to be sufficient.

In "city_universal" there seems to be something called AREA - that are big boxes, from which parts of maps load. These boxes can be of different sizes. We need to learn how to edit "city_universal" so our new map doesn't disappear after the player has got out of these boxes. This video shows how AREA works: https://www.youtube.com/watch?v=OXcr9jGuuv0

The same thing applies to maps themselves, they disappear after certain distance and thus we will have to be able to edit AREAs or add new ones.

If everythings works out, we will have to have a program for roadmap.gsd (Ingame.sds) to edit the traffic paths and for files "Nav_" (in the folder with maps) that map paths for NPCs. None of us can make a program, we need somebody to help us. If you think you can make such a program, feel free to contact me or agens. The more people are in the team, the better. Your help will be appreciated!

I, on the other hand, decided to use the things that have been already created and made a fan-made trailer for Mafia 4, in which I used the bridge model and the countryside model. In the video description I explained the situtation I refered to this post in the hope that this way more people will know about this project.

AMadeMan: Glad you like them. I understand, I am not sure if there is a similar expression for that in English, but in the Czech language we would say Mafia 3 is a thorn in my eye and that is exactly how I feel about M3.

I have some news:

Firstly I'd like to share one video that agens made, in the video he plays with collisions by editing the Collisions_0.bin file.

Yesterday agens made a video about his plans on Mafia 2. In that video he explains what he wants to do in terms of Mafia 2 modding. He says that he wants to convert the Mafia 1 map into the world of Mafia 2. There is no exporter yet, so in the meanwhile he made a new HUD (in the style of the first Mafia) and expanded the paper map by adding the map of Lost Heaven underneath. He also wants to convert some car models from the HD remaster pack released for the first Mafia. You can also now see new trees in front of the Clark's motel.

///////////////*To the second video:
5:14 - showing the paper map
7:58 - the part at the Clark's motel. With the drizly weather, the trees and the new car you gotta say that Mafia 2 still holds up very well in terms of graphics considering the fact that it has been a long while since the game was released.

From what I’ve heard Oleg actually took on the task and tried to export collisions, but they slowed the game (FPS drops) and made the game crash on occasions. He and Greavesy were e-mailing and discussing the collisions and the map structure, during which Oleg sent Greavesy his ZM3 plugin source. Unfortunately it is unknown to me whether Oleg is continuing this work or not. I hope he is.
Greavesy is a British modder/programmer whose goal is to be able to modifiy the map files and to provide the Mafia 2 community with tools. He has been attempting to make the M2 map files readable since late May and he has been very helpful! He’s just released his Mafia 2 Modding Toolkit and made a post about it – I recommend reading it through, there is everything well described:

I've already talked about AREAS here in this post. In a nutshell it contains positions of boxes. These boxes are placed all over the city and within their boundaries an object is loaded, once you (the player) have got out of the box, the object disappears. In Mafia 2, only two areas with a map part (=a series of objects, models) from the folder "City" and one from "Shops" can be loaded at the same time.

Once I replaced a body of a car with a boat model that I had found in the M2 game files and spawned it in-game. The collisions of the boat obviously don't work, however, there are some auto-made collisions for bullets, which copy the shape of the model. When you shoot at it, the boat moves as if I had made a collision for it. So the mesh actually acts as a collision too.