07th-mod / higurashi-assembly

9 stars 8 forks source link

Force-run with Steam, but only in Steam versions #35

Open andOlga opened 5 years ago

andOlga commented 5 years ago

Currently, the Higurashi mod does not force the Steam version of the game to run through Steam, effectively breaking integration with Steam if the game is not ran from inside the Steam UI. We have a way in the installer to check whether the game is the Steam version or not. This code should be either ported to C# and added as a conditional check to the Steam API calls, or the installer should assist the game with Steam detection (e.g. by creating a file that informs the game whether or not this is the Steam version of the game).

ghost commented 5 years ago

Can I ask you to describe the installer's mechanism for this and link the relevant code?

andOlga commented 5 years ago

Sure, the implementation is really basic here, though despite that I am not sure if it's possible to do within the Higurashi scripting system. What the installer does is check for the presence of steam_api.dll (for Windows), libsteam_api.so (for Linux) or Contents/Plugins/CSteamworks.bundle (for macOS) in the game folder. If any of these are found, the installer will assume that this is the Steam version of the game, otherwise, it will assume this is a DRM-free copy. The relevant code can be found here.