Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Graces f PC] Request: Make character switching via the d-pad always available in battle. #86

Open
Monkeor opened this issue Jan 21, 2025 · 4 comments

Comments

@Monkeor
Copy link

Monkeor commented Jan 21, 2025

I don't know how possible this would be, but I'd love it if you could "fix" the d-pad character switching feature. There are many times, especially during certain arte animations, where you can't use the D-pad to swap characters. I'd prefer to swap as close to the beginning of an arte as possible to give the second character time to follow-up the combo, especially considering the AI might have moved them far back from my target, but the beginning of an arte gives seemingly the highest chance of having the swap fail.

I don't know why the game is this way, or how difficult it would be to change it, but I feel like combat would be a lot more fun if I didn't have to worry about accidentally hitting some mysterious, invisible frame windows where my input is just straight up dropped.

@Sora3100
Copy link
Owner

I don't believe there is anything actually stopping you from switching characters.
What I believe you're experiencing is hitstop dropping your inputs, which I do have an experimental code to disable.

@Monkeor
Copy link
Author

Monkeor commented Jan 22, 2025

Oh geez, you may be right. Of the 5 dropped inputs I recorded, all 5 seemed like they could have been made while the currently controlled character was experiencing hitstop, though it also seemed like the input was held even after the hitstop ended. Does hitstop normally cause dropped inputs?

I'm looking at the table right now and not seeing a code to disable hitstop. Am I missing it, or have you not released it?

@Sora3100
Copy link
Owner

In Tales of games, generally they do yeah as they are badly implemented.
It is not yet released yet, but you can try it by copy pasting this:

<?xml version="1.0" encoding="utf-8"?>
<CheatTable>
  <CheatEntries>
    <CheatEntry>
      <ID>4327</ID>
      <Description>"No hitstop"</Description>
      <LastState/>
      <VariableType>Auto Assembler Script</VariableType>
      <AssemblerScript>{ Game   : Tales of Graces f Remastered.exe
  Version: 
  Date   : 2025-01-20
  Author : thing

  This script does blah blah blah
}

[ENABLE]

aobscanmodule(hitstop,GameNative.dll,F3 0F 58 CA F3 0F 11 8B A0 00 00 00) // should be unique

hitstop:
xorps xmm1,xmm1
nop

registersymbol(hitstop)

[DISABLE]

hitstop:
  db F3 0F 58 CA F3 0F 11 8B A0 00 00 00

unregistersymbol(hitstop)

{
// ORIGINAL CODE - INJECTION POINT: 7FFAF98A131F

7FFAF98A12FA: 74 0C                    - je 7FFAF98A1308
7FFAF98A12FC: 83 F9 3C                 - cmp ecx,3C
7FFAF98A12FF: 75 07                    - jne 7FFAF98A1308
7FFAF98A1301: F3 0F 10 40 18           - movss xmm0,[rax+18]
7FFAF98A1306: EB 05                    - jmp 7FFAF98A130D
7FFAF98A1308: F3 0F 10 40 14           - movss xmm0,[rax+14]
7FFAF98A130D: 41 0F 57 C4              - xorps xmm0,xmm12
7FFAF98A1311: 0F 2F C7                 - comiss xmm0,xmm7
7FFAF98A1314: 0F 28 C8                 - movaps xmm1,xmm0
7FFAF98A1317: F3 0F 11 83 A4 00 00 00  - movss [rbx+000000A4],xmm0
// ---------- INJECTING HERE ----------
7FFAF98A131F: F3 0F 58 CA              - addss xmm1,xmm2
// ---------- DONE INJECTING  ----------
7FFAF98A1323: F3 0F 11 8B A0 00 00 00  - movss [rbx+000000A0],xmm1
7FFAF98A132B: 73 0C                    - jae 7FFAF98A1339
7FFAF98A132D: 0F 2F CF                 - comiss xmm1,xmm7
7FFAF98A1330: 73 07                    - jae 7FFAF98A1339
7FFAF98A1332: 4C 89 BB A0 00 00 00     - mov [rbx+000000A0],r15
7FFAF98A1339: F3 0F 10 8B A8 00 00 00  - movss xmm1,[rbx+000000A8]
7FFAF98A1341: 0F 2E CF                 - ucomiss xmm1,xmm7
7FFAF98A1344: 74 7E                    - je 7FFAF98A13C4
7FFAF98A1346: 8B 48 08                 - mov ecx,[rax+08]
7FFAF98A1349: 83 F9 1E                 - cmp ecx,1E
}
</AssemblerScript>
    </CheatEntry>
  </CheatEntries>
</CheatTable>

NOTE: game becomes extremely fast, especially Mystic Artes ending abruptly.

@Monkeor
Copy link
Author

Monkeor commented Jan 22, 2025

I love you and I'm going to kiss you directly on the mouth. I haven't had any switching inputs dropped since enabling this, and moreover, other inputs which I assumed had dropped due to me misunderstanding buffer windows are now no longer dropping. I guess it really is the case that Graces simply ignores inputs during hitstop. Either way, thank you big for this.

I assume I should make another issue if I find any problems with this code rather than add to this issue, but for now it seems to work perfectly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants