greavesy1899 / mafiatoolkit Goto Github PK
View Code? Open in Web Editor NEWOpen source toolkit for Mafia games. (Mafia II, Mafia III, Mafia DE)
License: MIT License
Open source toolkit for Mafia games. (Mafia II, Mafia III, Mafia DE)
License: MIT License
Currently unknown. All we know is that it includes hashes using FNV64 and engine code may suggest that it could be linked to areas. Deserialization has been started but not completed.
(See Mafia2Libs/ResourceTypes/FileTypes/EntityActivator.cs)
Remove windows Forms in favour of WPF. Big task but might look and make development faster and easier on the UI front.
Hi, I'm trying to translate Mafia DE to Arabic and I extracted sds to xml and translated the file but when I click import it shows me an error "Object reference not set to an instance of an object" but if I import the original XML it will import without any problem, so what I have to do?
Sorry for bad English, I think.
If the collision object has over 512 triangles, then the parser "overflows" past the OPC chunk starting point; we need to use this line as a temp fix for the issue:
reader.BaseStream.Position += (nTriangles * 3);
This must mean the "section" data, (this data is still unknown) is using nTriangles but for some reason, the "section" data is using more than nTriangles.
(Confused? Thats 2K for you.)
Produce an editor for the "AnimatedTextures" format. Very simple format, Basically a large array of different textures including flags, hash and a name.
For Mafia II, the dream has always been to have a gizmo which handles translation, rotation and scaling. See Unreal Engine 4 or Unity gizmo for an example.
The Toolkit has lots of attempts of this, and ideally needs to be removed and replaced with a working solution. For future reference, we should make sure this is also suitable for Fusion games.
It is assumed to be used for memory allocation for slots, as it includes very familiar slot names including a number of integers which look like sizes. For the Toolkit, investigations into this format are still very early.
Currently, when handling SDSContent and manging SDS files, each action has its own way of handling the XML file which should really be unified for easier editing, management and just because its cleaner than the current implementation.
**Is your feature request related to a problem?
I tried to edit human_dmgzones.tbl but it has unidentified hash from tables rows on .tbl file.
Describe the solution you'd like
Convert the unidentified hash to readable string.
Not fully completed; cannot fully parse or save yet.
(Oleg has documented this in his plugin)
Handles the spawning, movement and despawning of Pigeon and Rats in Mafia II and Mafia II DE.
Note - Code was written a very long time ago, so the code may need to be rewritten to be more efficient and look nicer.
Describe the bug
Once SDS is packed, the bottom left text still says "saving sds"
To Reproduce
Steps to reproduce the behavior:
Expected behavior
After it is done saving, it should say something like "SDS successfully saved"
Screenshots
https://imgur.com/a/FwlGXYi
The library can parse this file format, but not save.
The invite link is not working.
If you remove a file from an unpacked sds and attempt to repack it it gives an unhandled exception error. This is inconvenient as I'm attempting to use a car replacement mod with the original car name by deleting tables/TextDatabase.dat and PREFAB_17.prf but the tool is preventing me.
Reverse ApexSDK's "AEA" file type. Documentation for the latest version of the SDK:
https://docs.nvidia.com/gameworks/content/gameworkslibrary/physx/apexsdk/
(Note: The link above might include stuff which isn't included in the older APEX version which Mafia II runs on.
Ok, i am totally new to mafia modding, and i already explored the toolkit a bit, i was already able to preview and export characters, but i haven't found any way to preview and/or export game animations (which i think it's the an2 files, which i have no idea how to load them in 3d modelling software), from what i seen in closed issue #6 apparently the animation format is completly reversed/figured since its marked as completed in 2021, but i am unable to find anywhere a place to export them along the character, and the game explorer doesn't even open the an2 files, just extracts them from the sds containers.
In case this feature is already implemented i would like to know where is it, but in case it's not implemented, i would like to request to be able to export animations alongide the fbx that is exported with the character we load, in all currently supported games, i have no idea if this is viable or not or if its something too hard to implement, but i am suggesting it as a new feature since i think there isnt any tools to import/export animations from any the mafia games anywhere on the internet.
It would be nice to be able to unpack multiple sds files at once, just by highlighting multiple files, right clicking and selecting unpack
Prefabs are used for objects like vehicles, boats, destructible objects, doors, windows and wagons (yes, subway.) They are stored as a BitStream, meaning it's a little harder to debug. A private Toolkit branch has the ability to deserialize and serialize them, but requires editor improvements to support XML to allow modders to edit the data faster. We're still in the stage of making sure we can read and write all files, but the Toolkit is currently at a good stage where it can edit data without crashing the game (Excluding attempts where we add or delete significant amounts of data.)
Fusion games also have Prefabs, but no longer in a seperate file and may not be using a BitStream. Future work may end up meaning we have two separate pieces of code to handle Illusion and Fusion Prefabs.
Is Mafia 2 classic supported or is it only the definitive version of the game?
Reverse ApexSDK's "ACA" file type.
Documentation for the latest version of the SDK: https://docs.nvidia.com/gameworks/content/gameworkslibrary/physx/apexsdk/
(Note: The link above might include stuff which isn't included in the older APEX version which Mafia II runs on.
Was started. The library can decompress the data, read the header data, and try and pin point each file; but this format is different to the "SDS" format.
There is no xml to this file. At runtime, the game reads the SDS before this and then reads the patches data. The data from patches then overwrites the data in the memory by indexing. There is a chance that files can be added into the SDS, but that is unknown.
VitoA3City is the only patches file that we can fully reverse, as this archive holds only DDS.
With the data which only overwrites partial information, this is the biggest issue, and a solution I cannot figure out.
MafiaIIDE\pc\dlcs\cnt_joes_adventures\sds_en\gui\ingame_gui_ja.sds
ingame_gui_ja.sds file cannot be opened
Error message
Message:
Attempted to read past the end of the stream.
Target Site:
Byte[] ReadBytes(System.IO.Stream, Int32)
Callstack:
at Gibbed.IO.SmallWorkBuffer.ReadBytes(Stream stream, Int32 count)
at Gibbed.IO.StreamHelpers.ReadValueU8(Stream stream)
at Gibbed.Mafia2.ResourceFormats.TableData.Deserialize(UInt16 version, Stream input, Endian endian)
at Gibbed.Mafia2.ResourceFormats.TableResource.Deserialize(UInt16 version, Stream input, Endian endian)
at Gibbed.Mafia2.FileFormats.ArchiveFile.ReadTableEntry(ResourceEntry entry, XmlWriter resourceXML, String name, String tableDIR)
at Gibbed.Mafia2.FileFormats.ArchiveFile.SaveResourcesVersion19(FileInfo file, List`1 itemNames)
at Gibbed.Mafia2.FileFormats.ArchiveFile.SaveResources(FileInfo file)
at Core.IO.FileSDS.Open()
at Mafia2Tool.GameExplorer.OpenFile(FileBase asset)
at Mafia2Tool.GameExplorer.HandleFile(ListViewItem item)
at Mafia2Tool.GameExplorer.listView1_ItemActivate(Object sender, EventArgs e)
at System.Windows.Forms.ListView.OnItemActivate(EventArgs e)
at System.Windows.Forms.ListView.WmReflectNotify(Message& m)
at System.Windows.Forms.ListView.WndProc(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, WM msg, IntPtr wparam, IntPtr lparam)
Currently the library can only parse and read the 3 types of chunks in a Cutscene file. No data is known yet, except what each chunk holds.
GCS = Camera, Geometry, movement, etc.
SPD = Speech data, talking, sounds, etc.
UNK = Unknown name, but possible holds path data for cars? peds?
I have Mafia 1: DE from the Epic Games Store, unmodded and updated to the current version. When unpacking tables\ingame.sds, no errors are reported by the tool, but tables\extracted\ingame.sds\config\human2config.xml remains in a binary format. The other .xml files in the same directory are converted correctly. I'm attaching a zip archive containing the problematic file, together with another converted file from the same folder to show that the problem is limited to human2config.xml.
The problem occurs identically with version 2.21 and 2.13 of the toolkit.
Used for neon lighting in Midtown in Mafia II and Mafia II DE. Referenced by Materials located in the games MTL (Material Library). The file has a list of textures to iterate through when animating. The format also includes a fair amount of unknown values which should be investigated.
Note - Code was written a very long time ago, so the code may need to be rewritten to be more efficient and look nicer.
The ApexSDK's "IOSFX" format requires saving functionality, this should be relatively easy to do, just need to add functionality to all the modifiers for this format.
Thanks for your wonderful program!
Do you have any plans to reverse .pck file format for Mafia 3 DE / Mafia DE?
This would be a very useful feature, since, unfortunately, several songs were cut in Mafia 3 DE, also many people would like to add classical music from original game to Mafia DE
Conversions between Euler, Quaternion and Matrix has been reported to not work properly, especially in the Toolkit. It seems like most situations is resulted by gimbal locking on multiple axis.
The Map Editor is a good tool to use when testing these conversions.
Reverse ApexSDK's "ARM" file type.
Documentation for the latest version of the SDK:
https://docs.nvidia.com/gameworks/content/gameworkslibrary/physx/apexsdk/ (Note: The link above might include stuff which isn't included in the older APEX version which Mafia II runs on.
Was started, but focus towards model importing/exporting meant this format was pushed aside. Current progress is unknown.
Sure, this tool decompiles sds files, but 99% of the files cannot be edited, especially the HKX files, and them being the only files I actually wanted to edit since Kamzik123 is a selfish piece of shit and wont tell how to edit the files, even though he knows exactly how to do it, but only wants their close friends to use it... but who in their right mind would or could be friends with an dishonored prick.
Progress had been made. The basic header information and root bone can be read, ending with the two numbers. The two numbers are total keyframes and total bones. Just need to figure out with one is which. The rest of the information seem to be each bone, and the keyframe data afterwards. The ending of the file could possibly be the hierarchy of the bones.
SDS packing seems to not be as I expected - It is not a simple 'if compression enabled - every block is compressed'. Even compressed SDS have blocks which are uncompressed. For example, Fusion games, usually have their Wwise or texture data not compressed, and Illusion games do not compress FSB or texture data.
However, It has been noticed that some blocks which include two files (eg. ending a generic file, starting a texture file) still may be compressed until the next block. This is one of the possibilities which have been causing packing issues across all games, and needs to be investigated and fixed asap.
A good example of this is any vehicle SDS from Mafia 3 or Mafia DE, and chinatown.sds from Mafia II DE.
Describe the bug
I cannot run the application due to .NET 5.0 no longer being downloadable.
Expected behavior
When I try to launch MafiaToolkit.exe, a popup will appear "To run this application, you must Install .NET. Would you like to install it?"
I pressed yes and I'm greeted with this screen (Shown down below in Screenshots)
Desktop (please complete the following information):
Additional context
I wanted to extract the Policeman sounds for something, but I cannot access the toolkit since NET 5.0 is retired.
Reverse ApexSDK's "IOS" file type.
Documentation for the latest version of the SDK: https://docs.nvidia.com/gameworks/content/gameworkslibrary/physx/apexsdk/
(Note: The link above might include stuff which isn't included in the older APEX version which Mafia II runs on.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.