Mafia: Toolkit

1 / 5
A portion of game assets loaded into the map editor.
2 / 5
The same area, visualising collisions.
3 / 5
An example of another editor for Mafia II.
3 / 5
Skinned Car development.
4 / 5
Liberty City from GTA III.

Overview

This project was initially started in 2018 with the aim of achieving improved modding capabilities for the 'Mafia' series, which was developed by 2k Czech and Hangar 13. The tools were written in C# or C++, depending on the functionality. Back in 2018, the modding abilities for this game was limited. Modders were able to modify game archives and replace game assets such as textures or sounds. By the end of 2018, this tool had the ability to modify game archives, and had a very limited map editing tool which enabled the importing/exporting of custom assets and collisions.

In 2019, I focused on learning graphics and subsequently developed a renderer using DirectX11, by using SharpDX. Throughout the development of these tools, I further developed an understanding and the ability to reverse engineer file formats; as well as using APIs and Middleware to develop a custom pipeline to assist other developers to import user-generated content into the game. This pipeline uses FbxSDK and PhysX SDK (2.8.3) with multiple modeling packages in mind, such as 3ds Max, Blender and Maya. The way the pipeline works is by exporting the game asset out of the modelling package as an FBX, The Toolkit will then utilise FbxSDK to then serialize the asset into a format the game can deserialize. With the introduction of this pipeline, it has provided a new ability to create custom content such as cities and interiors.

Between 2020 and 2023, the Toolkit started to support other games within the Mafia franchise, such as Mafia: Definition Edition and Mafia III: Definition Edition. While this program is no longer in active development, it still receives frequent updates to fix the most reported community issues. Now, the aim is to eventually develop a 're-imagined' tool using the new Cauldron modding framework, to further improve the quality of the tools available.

Before the pipline for models was established, another idea was to develop a plugin for both 3DS Max and Blender. For 3DS Max, a plugin was developed using the SDK - it managed to import areas of the map but this idea was scrapped because of the desire to keep a wide amount of accessibility and avoiding limiting modding to just one version of a modelling package.

Current State

(As of November, 2023)

  • Map Editor powered by DirectX11/SharpDX.
  • A Pipeline which provides the ability to convert FBX assets (using FbxSDK) to game-ready assets.
  • Utilising the PhysX library to generate more 'complete' collisions, further improving the quality of user-generated assets.
  • More minor programs for editing proprietary data such as: tables, materials, speech and more.

Developed Skills

  • Good understanding of both C++ and C#
  • Graphics Rendering: Utilised SharpDX to develop a Dx11 renderer, for the map editor.
  • Reverse Engineering: Developed an understanding of proprietary binary formats and produced individual tools (compiled into the Toolkit).
  • Tool Development: Using C# and WinForms/WPF, many tools have been developed to adjust the majority of the game assets.
  • Communication: Constantly communicating with members of the Community to address issues, listen to feedback and produce further updates to generally improve the quality of the Software.
  • Asset Pipeline: Developed an 'interchangeable' Asset Pipeline with the ability to convert game-ready formats to FBX thus allowing users to modify the content in Modelling Packages such as 3DS Max, Blender and Maya.
  • Dedication: Was the sole developer of this project for almost 5 years.

This project can be found on my GitHub, which can be found below. More information can be found on the GitHub page, albeit rather outdated.

Links