English (American)  中文(简体)
This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm whether you accept or reject these cookies being set.

A cookie will be stored in your browser regardless of choice to prevent you being asked this question again. You will be able to change your cookie settings at any time using the link in the footer.

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[Spt] Tutorial: Allow Raye's Lightning attack to turn direction
In HF v0.7, Raye's lightning attack (G → A)  cannot turn around.

[Image: raye2.png]

In this tutorial, we will be fixing that!

I will assume that the reader is already familiar with the HF Workshop tool, if he is not, he is advised to go to the linked thread, read it and watch the tutorial video.

Ok, so, the file where the data that we need to change is, is called Spt file. In HF v0.7, Raye's Spt file has ID=316. Extract that file with HFW, extract the JSON file from the ZIP file, and open it with your favorite text/code editor. This file is huge, so I recommend you to collapse all attributes in order to get an overview of the file's contents, as shown in the image:

[Image: spt.png]

Here I'm using VS Code, and the shortcut to fold all is Ctrl+K Ctrl+0.

You can see in the image the lines that have an arrow and are highlighted in blue, these are arrays and you can expand to view, in case you have collapsed them as suggested. Our relevant data for this tutorial is in the action array (line 2346), which contains all of the actions related to our character.

The property we need to change for our action is called allowTurnFace, and we should set it to true. The problem now is finding which action corresponds to Raye's lightning move.

Update: The array keyTgr is actually useless, gem from older versions, and the below explanation only works by chance. The actual way to find the action we want is more complicated, and this thread can shed some light.

The array keyTgr contains the key sequences for performing our actions. We know as a matter of fact that our sequence is G → A, and that is translated to gra (guard, right, attack) in the keys property. We find gra in position 2 and 6 of the keyTgr array (lines 891 and 951), and they are associated to actions attack4 and attack3 respectively, so now we know what actions to look for.

Going back to our action array (line 2346), we will now search in it for the string array4. In VS Code, you can select the collapsed array, then press Ctrl+F, and select the icon to Find in selection (Alt + L), as shown in the picture below.

[Image: spt2.png]

The first action we found is in the 75th position of the action array, and has name _RID_ATTACK4. Because it has the _RID_ prefix, this probably refers to the attack while riding, which is not what we're looking for right now, so we press the down arrow or enter to keep looking. We then find the action with name ATTACK4 in position 82, this is what we want, and we change the attribute allowTurnFace to true.

"82": {
    "HFW_classNameXXX": "Data.Action",
    "allowTurnFace": true,
    "selfLoop": false,
    "nextAgi": -1.0,
    "aiz2": 0.0,
    "aix1b": 0.0,
    "landAti": -1.0,
    "frame": null,
    "mpBurn": 0.0,
    "nextAti": -1.0,
    "landActionName": null,
    "aix2b": 0.0,
    "landAgi": -1.0,
    "name": "ATTACK4",
    "nextActionName": null,
    "special": -1.0,
    "aix2": 0.0,
    "aiz1": 0.0,
    "index": 82.0,
    "nextAi": -1.0,
    "aix1": 0.0,
    "a_keyTgr": {
        "HFW_ArrayLenXXX": 1,
        "0": {
            "HFW_classNameXXX": "Data.A_KeyTgr",
            "kl": 1.0,
            "ati": 3.0,
            "pollhp": 0.0,
            "agi": 0.0,
            "atf": false,
            "ai": 2.0,
            "k": "a",
            "hp": 0.0,
            "rkt": true,
            "mp": 0.0,
            "kr": "a"
    "type": -1.0,
    "landAi": -1.0,
    "frameIndex": 222.0

After trial and error attempts, I found that changing this property only for attack4 was enough, and no need to change it for attack3. I have not spent enough time figuring out the difference between these 2 attacks, but this completes our tutorial. All you have to do next is to replace the JSON file in the ZIP file, replace it in HFW, and export  the new EXE. Cheers!

Special thanks to @不饿白帝BEBD, @Runningcake and @Lee Catalpa Tien
[Image: random.php?pic=random]
The meaning of life is to give life a meaning.
Stop existing. Start living.
[+] 1 user says Thank You to MangaD for this post

Forum Jump:

Users browsing this thread: 1 Guest(s)