View previous topic :: View next topic |
Author |
Message |
Greavesy1899
New Member


Joined: 22 Jun 2018 Posts: 22
80 Bank Notes
Items
|
|
Mafia 2 Modding Toolkit
Update!
This tool has been released! You can download it from the repository from GitHub! Make sure to check on this page frequently, as I release updates frequently.
What can it do?
First of all, the toolkit includes a library, which allows other programmers to build their own tools, and is used as a base for this toolkit. The programs included in this toolkit allow users to read and save FrameResource.bin and when editing this file a new "FrameNamesTable.bin" is created. This also allows modders to configure LOD settings. Other files includes Collisions.bin and material libraries. I hope to also build a 3DS Max plugin to able support for models and collisions. As development progresses, more will be able to be achieved with this toolkit.
The toolkit can read the following files:
Files in the SDS:
FrameResource_*.bin
FrameNameTable_*.bin
Actors_*.bin
IndexBufferPool_*.bin
VertexBufferPool_*.bin
Collisions_*.bin
ItemDesc_*.bin
CityAreas.bin
Other Files:
default.mtl
default50.mtl
default60.mtl
Please note all programs are WIP so there are quite a few errors shown.
Here are some pictures of the toolkit in action:
Collision Editor:
This is the contents of the editor. It reads Collision.bin and allows you to edit placements of collisions and other unknown values. It does not allow saving just yet.
FrameResource Editor:
The big one. Allows modders to edit all possible data, and save it when done. It either displays the contents of the file in a hierarchy view or a list view. The buttons at the top allow modders to view material libraries, export all 3D data which then can be imported into 3DS. Switch view just toggles between the list view or hierarchy view. The final button, opens the collision editor which is shown above.
Material Library Editor:
Another big one. Allows modders to edit all possible data, and change each material. I've not reversed a lot of this file type yet. This editor doesn't allow the modder to delete or add new materials, just edit existing ones.
Collision Importer into 3DS:
A small importer for collisions. Before 3DS can read collisions, the modder needs to run the FrameResource program and then save collisions as a custom file type called "EDM". This file type is so much simpler than Mafia 2, whilst keeping data which might be lost if the editor saved the data as '.OBJ'. In the picture below, this contains all collisions from 'Collisions.bin', from the SDS 'Italy_Z'. It doesn't allow any exporting because I have not fully reversed the file type. With the development of the 3DS plugin, I hope to build a new modifier type to add onto objects and allow modders to export collisions without manual editing.
Model Importer into 3DS:
A small importer for models. Before 3DS can read models, the modder needs to run the FrameResource program and then save models like collisions. In the picture below, this contains all models from the SDS 'Italy_Z'. It doesn't allow any exporting because I have not fully reversed the file type. With the development of the 3DS plugin, I hope to build a new modifier type to add onto objects and allow modders to export models.
Finally...
What I've shown off above isn't the only thing which this library can do. Other file formats can be read but not edited, but really needs modders to test and find out what the data actually does. Here is the link to the GitHub repository:
https://github.com/Greavesy1899/Mafia2Toolkit
If you have a github account, go and watch and star that repo for the latest updates and releases. If you're a programmer and are interested in Mafia 2 modding, please message me or just start working on the repo.
For the people interested:
Join this discord for the latest information on the toolkit.
https://discord.gg/SSQB97U
Thanks for reading, I will frequently update this forum post.
Last edited by Greavesy1899 on Mon Jul 23, 2018 3:47 am; edited 2 times in total |
|
Back to top |
|
 |
Jaqub
Junior Member


Joined: 12 Dec 2017 Posts: 53 Location: idk 2 Bank Notes
Items
|
|
Thank you for all of that and making tools available for Mafia 2. After years of the release and between its unpopularity, you woke Mafia 2 from its big winter nap. The failure of the predecessor Mafia 3 could bring light into Mafia 2. Its still a great optimized game but with a low content in it, thanks to you we can expand its game environment. Its although it has been late since the release.. :/ _________________
 |
|
Back to top |
|
 |
AMadeMan
Senior Member


Joined: 23 May 2017 Posts: 400 Location: United States 565 Bank Notes
Items
|
|
I can already see the unbelievable potential here. This should be made a sticky, because this is BIG. I wish you all the best of luck. |
|
Back to top |
|
 |
Greavesy1899
New Member


Joined: 22 Jun 2018 Posts: 22
80 Bank Notes
Items
|
|
Back to top |
|
 |
Muggy
Site Staff


Joined: 05 Jan 2005 Posts: 1018 Location: Sydenham London 278082 Bank Notes
Items
|
|
AMadeMan wrote: | This should be made a sticky... |
Why? (rhetorical)
There are plenty of other threads with projects and
some are indeed stickies others not and some of
these are just as big.
No doubt this is indeed a very interesting progression
in the area of modding Mafia II; however whether
this will be stickified - it is too early. _________________
 |
|
Back to top |
|
 |
AMadeMan
Senior Member


Joined: 23 May 2017 Posts: 400 Location: United States 565 Bank Notes
Items
|
|
I had a feeling you'd say that. lol! But yeah you're right, its just that this is such a momentous event in Mafia Modding i was tempted.  |
|
Back to top |
|
 |
Muggy
Site Staff


Joined: 05 Jan 2005 Posts: 1018 Location: Sydenham London 278082 Bank Notes
Items
|
|
AMadeMan wrote: | I had a feeling you'd say that. lol! But yeah you're right, its just that this is such a momentous event in Mafia Modding i was tempted.  |
Noted
Once this topic is established and there is enough response
then perhaps it may reach the sticky stage... watch this space! _________________
 |
|
Back to top |
|
 |
Greavesy1899
New Member


Joined: 22 Jun 2018 Posts: 22
80 Bank Notes
Items
|
|
New improvements to the 3DS plugin with mesh and scene importing:
Now imports normals, and the different types of LODs.
For example, a building might have three different types of LODs, a very detailed one, an "okay" one and a really low res one. Now the plugin can read and import all of them
Mesh exporting should be done soon.
Look at the hierarchy view on the left; all meshes have a "_lodX" prefix.
These are the new normals, which are imported into 3DS. You can visibly see that the mesh is smoother than the one above.
 |
|
Back to top |
|
 |
AMadeMan
Senior Member


Joined: 23 May 2017 Posts: 400 Location: United States 565 Bank Notes
Items
|
|
fantastic work! This is gonna be awesome once its at a much more developed state!  |
|
Back to top |
|
 |
Greavesy1899
New Member


Joined: 22 Jun 2018 Posts: 22
80 Bank Notes
Items
|
|
The next part I've been working on is custom models ingame:
As you can see, the fireplace has gone and been replaced with a barrel. The textures are incorrect, but basic meshes can be implemented into the game.
Remember! Don't forget to join the discord if you haven't already: Click for discord link |
|
Back to top |
|
 |
Sliderv2
Junior Member


Joined: 22 May 2014 Posts: 74
703 Bank Notes
Items
|
|
Can't wait to restore beta locations.
Thank you for making this amazing tool.  |
|
Back to top |
|
 |
AMadeMan
Senior Member


Joined: 23 May 2017 Posts: 400 Location: United States 565 Bank Notes
Items
|
|
With this tool, cut locations can actually be fully reimplemented and some areas that were supposed to be bigger can now be expanded like Sicily in the WW2 chapter. We are one step closer! |
|
Back to top |
|
 |
Greavesy1899
New Member


Joined: 22 Jun 2018 Posts: 22
80 Bank Notes
Items
|
|
With the very early release of the new tool, T3mas has been playing around with the editor and has made progress making small alterations to the map. Currently the tool cannot actually delete the objects off the map but rather move them so they cannot be seen.
In the imgur album, the picture of the map shows the area modified. The train tracks on the map has been removed, and is now an unpaved road.
Imgur album link.
A very early version of this tool has been released, but it shouldn't be used to create mods just yet.
Thanks for reading and viewing, more posts soon.  |
|
Back to top |
|
 |
ASM.
Mafiascene Veteran Modder


Joined: 10 Jan 2014 Posts: 335
693 Bank Notes
Items
|
|
Great work there.
Do you have some insight into the purpose of PREFAB, ItemDesc and EntityDataStorage resources? |
|
Back to top |
|
 |
Greavesy1899
New Member


Joined: 22 Jun 2018 Posts: 22
80 Bank Notes
Items
|
|
ASM. wrote: | Great work there.
Do you have some insight into the purpose of PREFAB, ItemDesc and EntityDataStorage resources? |
ItemDesc files store collision data, not sure about the others. |
|
Back to top |
|
 |
|
|