Game - GTA:SA Definitive Edition
The version of the game is 1.0.0.14296 (you can use another version, but this one is desirable)
Unreal Engine version: 4.26 (the game runs on this version, Epic Games offers to download only 4.26.2, this version doesn’t seem to have any significant differences, download the UE 4.26 sources and compile them - I tried, the same behavior)
Description of the problem
The game refuses to open .uasset file with the material (UMaterial or UMaterialInstance), which is created inside the UE editor. At the same time, other types of assets (static mesh, etc.) work fine. When trying to start the game, it will either crash when trying to dereference a null pointer (inside the FD3D11DynamicRHI interface method) (if the material is very simple), or issue a dialog box with something like this content: “It was expected to read X when opening the material file, but Y was read”.
What you should do
Find a way to make the game work with materials created in the UE editor. Any methods are accepted: changing the source code of the UE, patches in the game, a plugin for the UE. Important: the material must be from the UE EDITOR. Other ways of creating the material are not accepted (changing the original file, etc.).
You may want to make a NOP NOP NOP NOP call to the method inside which the crash occurs. This will solve the problem only on “very simple” materials. If you complicate their logic, it will stop helping. I do not advise you to waste time on this.
Demonstration of the problem
Video: ПРОБЛЕМКА - YouTube
Software that can help in solving
FModel: https://fmodel.app/
IDA
Cheat Engine: https://www.cheatengine.org/