Saints Row 2 Monkey Patch Project

The ad and telemetry removal results in the game no longer fetching generic Ultor billboards to paste on the relevant areas' textures, which leads to them becoming bizarre windows into the game's skybox. I'm sure there's a performance boost as a result, but it might be considered ugly for some (I don't personally mind, but I'm also the sort of person that likes trying to peek out of bounds so I'm biased).
Maybe this doesn't happen to Gentlemen of the Row players, or on some other devices? Feels weird nobody's mentioned it.
The same thing happens with GotR installed. It's only for a few of those billboards though. It's a small price to pay for noticeably improved performance. (Thanks, scanti!)

These are the only ones I've found:
Billboard_1.pngBillboard_2.pngBillboard_3.png
 
It looks like the game doesn't load a generic default texture when the DFEngine.dll returns an error code. I thought I got away with doing it the easy way.

It looks like changing the code is going to be a lot harder than I thought. The engine is missing code for the stuff that the engine isn't supposed to do, if that makes sense.

For example, the c++ object for a file can be compressed data in a vpp_pc archive or a normal file (it's a single object) but, the engine doesn't contextually switch according to the data type (archive or raw) stored in the object. So you can open a file as a normal file but if the engine expects it to be a compressed file it will try to load it as a compressed file even when it not, leading to the engine crashing.
 
Could you guys that have the missing billboards post some screenshots of their positions on the game map? I have been driving around in the game for an hour and I haven't located any missing billboards.
 
Thank you for helping me find the billboards. Yep, they are super glitchy.

Screenshot 2024-06-15 040406.png


Getting the DFEngine.dll to return an error code skips a lot of code in the engine (to do with the add stuff). I guess that some of the code sets up a default texture for the billboards if no advert is available. I'll have to examine the code that is skipped, it has references iga1.tga to iga5.tga.
 
I've done a quick update of the mod to allow the user to use the original DFEngine.dll file by passing through to it. To do this, rename the original DFEngine.dll file that came with the game to pass_DFEngine.dll. This will fix the broken ad billboards, but you will lose the benefits of not using the ad engine.

This is a temporary fix while I try to come up with a better fix.

At the moment I'm migrating to Ida Pro Free instead of Ghidra. Ghidra is a great decompiler, but I'm hitting its limitations. The debugger keeps giving errors with the game, whereas Ida Pro works perfectly fine. Ghidra does do things better than Ida Pro, such as the ability to have structure definitions with gaps in them, so you can build them as you decipher the structure. Ida Pro needs the whole structure to be defined and bugs out if you start changing stuff in the middle of the structure.
 

Attachments

  • Saints Row 2 Monkey Patch v0.2.zip
    35.2 KB · Views: 92
Back
Top