sneakyevil / SD-ModMenu

Mod Menu for Sleeping Dogs: Definitive Edition
38 stars 5 forks source link

Add support for GOG Definitive Edition #29

Closed punchabunch35 closed 1 year ago

punchabunch35 commented 1 year ago

I have the GOG version of Sleeping Dogs: Definitive Edition.

https://www.gog.com/en/game/sleeping_dogs_definitive_edition

From looking at both the Steam and GOG versions, they contain the same content since they are the definitive editions. When putting the mod files in the game directory for the GOG version, this caused the game to crash on startup. I tried to use the provided Steam executable with the GOG version, but this caused the following error: "The code execution cannot proceed because steam_api64.dll was not found. Reinstalling the program may fix this problem."

What would need to be modified in the code in order to get the GOG Definitive Edition to run the mod?

If this requires @sneakyevil to buy the GOG version, I am willing to pay you including the cost of the game in order to get this to work. Please provide an email so we can discuss payment options if possible. Thank you.

sneakyevil commented 1 year ago

There isn't much to get this thing to work besides re-writing whole SDK, the SDK is written only for Steam Version 1.0 release because it is based on debug symbols that were provided with the game which heavily helps to get any modding done. All addresses are hardcoded for that version to ensure minimal build logic and it would require to manually finding each individual new address for the GOG version which is no go to. The only option I can imagine is to use steam emulation more info here: https://mr_goldberg.gitlab.io/goldberg_emulator/ I might provide Non-Steam version soon but I'm bit scared that this would involve piracy. Your best option is to buy the game on steam when its on sale for 3$.

sneakyevil commented 1 year ago

Also I forgot to mention that this is like similar to the GTA SA modding where 1.0 has most supported modding when other versions have bare minimum. I might try write smaller nonsteam api emulation designed for sleeping dogs only and post it here when I finish that.

punchabunch35 commented 1 year ago

Thank you for the information. I will look into the steam emulator and memory addresses for the GOG version. My main goal is to swap Wei's model with Sandra or Vivienne Lu like you did in the Steam version on YouTube.

Example: https://www.youtube.com/watch?v=cTYI58yOrTo

sneakyevil commented 1 year ago

I just wrote small dll that act as steamapi so you could try use it: https://github.com/SDmodding/SteamAPI_Offline/releases/latest/download/Release.rar

punchabunch35 commented 1 year ago

I used your SteamAPI offline program and this fixed the issue for the GOG version. I appreciate you also providing the source code, I like learning this stuff. I sent money to your PayPal account as well. Thank you! SD1 SD2

sneakyevil commented 1 year ago

Glad it works fine, also thanks for supporting me via PayPal. I invited you to sponsored mod menu repository where I publish newer/pre-releases of the Mod Menu.