About Hack Support

Synopsis

This hack manages and co-ordinates all other hacks, provides shared patches/functionality to hacks, loads mods and provides the underlying virtual file system used by Mods and Hacks.

While Hack Support provides shared patches to other hacks, it only patches the game with the ones that are necessary for the loaded hacks as of version 1.22.

Features

These are features and changes provided by this hack.

  • Adds various debug pages to Debug Text (if it's enabled).
    • The "hacks", "shared hacks" and "hack events" debug pages are added when using the -testing command line argument.
      • "shared hacks" shows a list of which of the aforementioned shared patches are enabled.
    • The "mods" debug page is always added.
  • Changes the game's file not found message to show a path and a retry button instead of just a file name.
    • This can be opted out of through a couple different means:
      • As of version 1.23, you can use the -nohandlefilenotfound command line argument.
      • Enabling Debug Test and then enabling its "No Handle File Not Found" setting on the "Miscellaneous" page of its Mod Settings.
  • Changes the title of the games window and the icon based on enabled mods.
    • The icon is changed to that of the current Main mod (if it has an icon) or if to the icon of a mod with an Edition specified (if there's no Main mod with an icon).
    • The title is prefixed with the title of the current Main mod (unless it also specifies an Edition).
    • The title is suffixed with an Edition in brackets if there's a mod enabled with one specified.
  • Makes messages shown by the game and hacks support visual styles (if enabled on the game tab of Launcher Settings).
  • Makes the game DPI Aware (if enabled on the game tab of Launcher Settings).
  • Makes the game show a message on startup if there are no audio devices or the Windows Audio service is not running instead of crashing.
  • Makes the game show an assertion failed dialog if the loaded save file has more rewards unlocked than are defined in the rewards file instead of the game crashing.
    • You can use the "Ignore" button to continue the game. Saving the game after doing so will cause the fact that the reward was unlocked to disappear from your save data.
  • Makes the game get terminated if it takes more than 1 second to exit.
    • This is to stop the game from hanging in the background indefinitely hogging CPU which sometimes happens in this game. 
    • This will show an assertion failed message if you're using the -testing command line argument.
  • Makes the game reload car camera data when a car gets loaded (such as when calling it from the phone booth).
    • The game normally loads this data again but throws it away instead of keeping the new data.
    • This can be opted out of through a couple different means:
      • As of version 1.23, you can use the -noreloadcarcameradata command line argument.
      • Enabling Debug Test and then enabling its "No Reload Car Camera Data" setting on the "Vehicles" page of its Mod Settings.
  • Saves crash dumps when the game crashes (if enabled on the game tab of Launcher Settings).
  • Terminates the game when it crashes (if enabled on the game tab of Launcher Settings).
  • Shows a message when the game crashes (if enabled on the game tab of Launcher Settings).

Configuration

This is an example configuration for this hack with comments explaining how it works.

This configuration goes into HackSupport.ini in the root of your mod.

Note: Despite Hack Support being always enabled, a mod must explicitly require it to configure it.

We do not recommend copying this entire example into your mod. We recommend only using what is necessary.

; HackSupport.ini
	; Configure obscure features in HackSupport

; [Miscellaneous] Section
	; OverrideTexture: Specify a texture name that will be forced for every non-animated shader.
	
[Miscellaneous]
OverrideTexture=Texture.png

Command Line Arguments

This hack is affected by certain Command Line Arguments for the Mod Launcher.

History

This hack changes in practically every version of the Mod Launcher to accommodate other hacks. Only some specific changes are listed here.

1.23

  • Added the "-hookd3d" command line argument.
  • Added the "-nohandlefilenotfound" command line argument.
  • Added the "-nohardwareskinning" and "-hardwareskinning" command line arguments.
  • Added the "-noreloadcarcameradata" command line argument.
  • Fixed an issue where the Direct3D hook in this hack caused the game to reset the Direct3D device redundantly once at startup.
  • Made this hack block the game from resetting the Direct3D device when it's not nessecary.
    • Also added the "-noblockredundantreset" command line argument to opt of this.
  • Made the game terminate abruptly with no message or crash dump in the case that an exception occurs in the hack window procedure event (instead of letting Windows swallow it and likely cause corruption).

1.18

Added support for configuring this hack and the "OverrideTexture" to preemptively support Australian Edition.


Revision #12
Created Sun, Feb 17, 2019 8:03 AM by Loren Goodwin
Updated Thu, May 16, 2019 5:22 AM by Loren Goodwin