View previous topic :: View next topic |
Author |
Message |
AMadeMan
Senior Member


Joined: 23 May 2017 Posts: 293 Location: United States 394 Bank Notes
Items
|
|
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. |
|
Back to top |
|
 |
T3mas1
Member


Joined: 11 Jul 2015 Posts: 150 Location: Czech Republic 342 Bank Notes
Items
|
|
Back to top |
|
 |
AMadeMan
Senior Member


Joined: 23 May 2017 Posts: 293 Location: United States 394 Bank Notes
Items
|
|
Back to top |
|
 |
agens
New Member


Joined: 29 Apr 2016 Posts: 13
29 Bank Notes
Items
|
|
In order to normally add maps to Mafia 2, we need an exporter of maps for 3ds Max. Then, to edit the traffic paths, we need a program for NAV files.
http://yadi.sk/i/kEV0dhoJ3Ttgfc
Last edited by agens on Thu Mar 29, 2018 7:21 pm; edited 2 times in total |
|
Back to top |
|
 |
agens
New Member


Joined: 29 Apr 2016 Posts: 13
29 Bank Notes
Items
|
|
We also need a program for "roadmap.gsd" in "ingame..sds" |
|
Back to top |
|
 |
Jaqub
Junior Member


Joined: 12 Dec 2017 Posts: 53 Location: idk 2 Bank Notes
Items
|
|
agens wrote: | We also need a program for "roadmap.gsd" in "ingame..sds" |
Traffic and such?
Like this?

 _________________
 |
|
Back to top |
|
 |
agens
New Member


Joined: 29 Apr 2016 Posts: 13
29 Bank Notes
Items
|
|
[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.
Also, when creating maps, it is desirable to make the loading locations as developers have done. Example as in this video https://www.youtube.com/watch?v=NYrKi9jU-1M to do this, you will need to use the program "CityShop" and edit the file "city_univers.sds"
https://www.youtube.com/watch?v=yttCkpmXT74&t=9s
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. |
|
Back to top |
|
 |
Jaqub
Junior Member


Joined: 12 Dec 2017 Posts: 53 Location: idk 2 Bank Notes
Items
|
|
Thanks for the information. I will look into soon! _________________
 |
|
Back to top |
|
 |
T3mas1
Member


Joined: 11 Jul 2015 Posts: 150 Location: Czech Republic 342 Bank Notes
Items
|
|
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.
The original text that agens wrote is available under one of my videos in the comment section, I translated it, - the text above, if you understand Russian, you can read it directly here (the comments): https://www.youtube.com/watch?v=hwLOxdSrYPc&lc=z23dhtkbiojpgpboa04t1aokg2vlhk23xul02w3s42ldbk0h00410.1524678334252900
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! |
|
Back to top |
|
 |
AMadeMan
Senior Member


Joined: 23 May 2017 Posts: 293 Location: United States 394 Bank Notes
Items
|
|
Great progress! Mafia 2 will look so good with new tier mods. |
|
Back to top |
|
 |
T3mas1
Member


Joined: 11 Jul 2015 Posts: 150 Location: Czech Republic 342 Bank Notes
Items
|
|
Back to top |
|
 |
AMadeMan
Senior Member


Joined: 23 May 2017 Posts: 293 Location: United States 394 Bank Notes
Items
|
|
Nice vids! Though it would probably be better if the title is just Mafia 2 Remake or Remastered, so we don't have to acknowledge Mafia 3's existence.  |
|
Back to top |
|
 |
T3mas1
Member


Joined: 11 Jul 2015 Posts: 150 Location: Czech Republic 342 Bank Notes
Items
|
|
Back to top |
|
 |
AMadeMan
Senior Member


Joined: 23 May 2017 Posts: 293 Location: United States 394 Bank Notes
Items
|
|
Awesome! I look forward to seeing more progress. This is probably the most amount of breakthroughs we've hit with Mafia 2 modding since the ability to add new working car models back in 2015. |
|
Back to top |
|
 |
T3mas1
Member


Joined: 11 Jul 2015 Posts: 150 Location: Czech Republic 342 Bank Notes
Items
|
|
AMadeMan: There is more to come, I daresay.
UPDATE
It has been a long time since I wrote here for the last time.
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:
http://mafiascene.com/forum/viewtopic.php?p=129169#129169
Here are some screenshots of his work on the maps:
Collisions_0 of Freddy's bar
Sicily collisions
A deleted collision (just for fun)
AREAS
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.
This is how it likely looks like:
AREAS from Joe's Adventures
///////////////////////By The Way//////////////////////////////////
I translated the Material_IDs from Czech into English. You can download the translated version here: http://www.mediafire.com/file/8ddliglx18xu43d/MaterialsTranslated.rar/file
I recommend using the file just as a reference, edit the original file.
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.
That is all for now! I hope I made you well informed!  |
|
Back to top |
|
 |
|
|