Apollo Justice: Ace Attorney Trilogy

Apollo Justice: Ace Attorney Trilogy

Not enough ratings
Framerate mod
By niltwill
A framerate mod that lets you change the FPS in Apollo Justice: Ace Attorney Trilogy.
2
   
Award
Favorite
Favorited
Unfavorite
About
This is a framerate mod that can change the FPS and the animation speed, if that's what you want to do. (That's what it is for now, though the functionality is there to add more useful memory addresses and include other QoL improvements, hence why it's called as "hacks", but for now, it's a framerate mod. If someone else wants to do that, feel free to, as the source code is included.)

Bear in mind that for a stable game experience, it's best to stick with 30 FPS (it's not locked to this value without reason), and experiment with a higher framerate at your own risk.
Getting started
Download the mod from this URL[icedrive.net], and extract the ZIP file. Then copy both the dinput8.dll and the GS456_hacks.ini file to the game's folder. By default, this is located here (on PC):
C:\Program Files (x86)\Steam\steamapps\common\Apollo Justice Ace Attorney Trilogy

For the Steam Deck, change the launch parameter to:
WINEDLLOVERRIDES="dinput8.dll=n,b" %command%

That's all. To remove this mod, simply delete the dinput8.dll file (and the related ini, log file too) from the game's folder.
Configuration
Before running the game, you should take a look in the GS456_Hacks.ini file and change it to your preferences. I will list all the default key-value pairs below and offer some explanation.

LogFile=1
This creates a GS456_hacks.log file in the game directory, so you can see if the mod was successful or not in its operations. If you're not interested in such a log file, set it to 0.

WaitTimeInMsBeforeHook=5000
How much time to wait in milliseconds before the initial memhacks get applied to the game. The minimum value that worked for me was around 3000 (3 seconds), a lower value like 2000 or 1000 was not enough. This might need a higher value if the game doesn't load fast. The default is now set to 5000. If you find that the initial FPS or AnimSpeed is not changing at all, try increasing this value. Maximum is 30000 (30 seconds), any higher will revert to the default value.

FPS=40
As the INI comment explains, this is where it gets confusing. Because the three games handle or react to the framerate changes differently, it's not easy to find a value that would work for all three without issues. 40 seems like a decent compromise. For DD and SoJ, that can be increased: 60 for DD and 45/50 for SoJ. This is my recommendation.

AnimSpeed=0
Considering that a higher value can speed up the game in more complex scenes, it's not a good idea to change the anim speed from the default 30. The only reason to touch this is to change it to 45 for SoJ if you're willing to use 60 FPS for that game.

EnableMultipleValues=0
it's a good idea to turn on the EnableMultipleValues (set it to 1), so you can change the FPS and/or anim speed values ingame later. That is not turned on by default, so that you don't get a surprise by unexpected behaviour ingame for accidentally pressing a defined hotkey or controller button.

FPS_Values={30, 40, 45, 50, 60} AnimSpeed_Values={30, 45}
Change these predefined list of values to your liking. These are all the values that you can cycle through for FPS and anim speed changes with the keyboard hotkeys and/or controller buttons.

SkipFirstValueInLists=0
If "EnableMultipleValues" is enabled, and you're already on 30 FPS/AnimSpeed as default, setting this to 1 will skip the initial 30 (first value) in the lists, and jump to the next one. Otherwise you have to press the hotkey or controller button twice to switch to the next value.

FPS_Hotkey=0x74 AnimSpeed_Hotkey=0x75
If the "EnableMultipleValues" is enabled, you can define which hotkey to use to cycle through those values. The hexadecimal values are available here[learn.microsoft.com]. It's important to use a value, not a constant like "VK_F5" (which does not get recognized). If you do not want to set a hotkey, leave the value empty for it.

FPS_Button=LT AnimSpeed_Button=RT
These are for the XInput gamepads/controllers, to have the same function as the hotkeys: switching the FPS and anim speed values. If you do not want to set them (e.g. no controller/gamepad), leave their value empty or at the default values. You should map a button that's not too frequently used. By default, this is set to the LT and RT buttons. For an alternative, you could also use LS and RS (left and right stick button).

Trigger_Sensitivity=175
The LT and RT buttons react to how lightly or fully pressed they are. 0 means fully released, and 255 means fully pressed. Try to find a good balance between the two, so that it doesn't trigger too many times in a sequence with a single light press of the trigger (low values).
8 Comments
SupaLuigi 6 Sep @ 6:33am 
Note that the default value for WaitTimeInMsBeforeHook wasn't high enough for me after the patch, seems like the packer is kinda slow. Turning it up fixes it (the memory addresses are the same as when denuvo was used actually).
Luna 5 Aug @ 4:20pm 
seems to be broken after patch.
Kudo 28 May @ 7:16am 
The framerate mod almost works well, except some part of animations speeds up in Spirit of Justice like the text dialogue and Witness Testimony/Cross-Examination doesn't sync with the audio perfectly
niltwill  [author] 14 Mar @ 1:37pm 
I added the source code to my Capcom mod repo [github.com].
russbus64 8 Mar @ 1:17pm 
You should consider adding this to a Git project!
niltwill  [author] 2 Mar @ 9:45am 
No idea what causes that, as it works on Windows. Any messages in the log file? I updated the mod and added a new variable called "WaitTimeInMsBeforeHook". The game needs some time to initialize before the memhacks can be applied successfully. For the default value, I increased it from 3000 (which worked as a minimum) to 5000. In the INI config, you could also try to use 6000, 7000 or 8000 or a higher value.
William JCM 23 Feb @ 3:52am 
I mean, I have to start the game, exit it, and start it again.
William JCM 23 Feb @ 3:52am 
Dunno if it's a bug with Proton or the game or the mod, but I noticed I have to start the game twice before it takes effect.