Giter Club home page Giter Club logo

mafiatoolkit's People

Contributors

deewarz avatar farivarfarsian avatar greavesy1899 avatar kamzik123 avatar moddingcode avatar nptr avatar roadtrain avatar tadghh avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

mafiatoolkit's Issues

Complete EntityActivator

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)

  • Deserialization
  • Serialization
  • Editor
  • Polish
  • Optimization

Localize

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.

Fix major bug when parsing collisions.

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.)

Editor for format "Animated Textures"

Produce an editor for the "AnimatedTextures" format. Very simple format, Basically a large array of different textures including flags, hash and a name.

Implement Gizmos in Map Editor

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.

  • Translation
  • Rotating
  • Scaling

Complete SDSConfig

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.

  • Deserialization
  • Serialization
  • Editor
  • Polish
  • Optimization

Unify SDSContent and SDS Packing/Unpacking Resources

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.

Unidentified hash characters

**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.

Complete AnimalTrafficPaths

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.

  • Deserialization
  • Serialization
  • Editor
  • Polish
  • Optimization

Saving SDS text doesnt change

Describe the bug
Once SDS is packed, the bottom left text still says "saving sds"

To Reproduce
Steps to reproduce the behavior:

  1. Repack any SDS file

Expected behavior
After it is done saving, it should say something like "SDS successfully saved"

Screenshots
https://imgur.com/a/FwlGXYi

  • Version 1.12.13082018

Attempting to repack a sds with a file removed results in an error

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.

Characters animations export in fbx and/or preview

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.

Unpacking multiple SDS at once

It would be nice to be able to unpack multiple sds files at once, just by highlighting multiple files, right clicking and selecting unpack

Complete Prefabs

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.

  • Deserialization
  • Serialization
  • Editor
  • Polish
  • Optimization
  • Big-Endian Support?

Reverse file type "Patches"

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.

Joe adventures dlc not open error

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)

Reverse file type "Cutscene"

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?

Mafia 1: DE tables\ingame.sds\config\human2config.xml does not convert correctly

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.

config.zip

The problem occurs identically with version 2.21 and 2.13 of the toolkit.

Complete AnimatedTexture

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.

  • Deserialization
  • Serialization
  • Editor
  • Polish
  • Optimization

import/export .pck files

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

Improve conversion between Euler/Quaterion/Matrix

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.

Would be nice if the HKX files could be edited or read

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.

Reverse file type "Animation2"

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.

Improve SDS Packing

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.

.NET 5.0 Runtime can no longer be downloaded.

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)

Screenshots
image

image

Desktop (please complete the following information):

  • OS: [ Windows 10 Home]
  • Browser [ Microsoft Edge ]
  • Version [ I don't quite understand this, 10 Home? ]

Additional context
I wanted to extract the Policeman sounds for something, but I cannot access the toolkit since NET 5.0 is retired.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.