Home Gallery Resources The Team Rules chat Login Register
Pages: [1]
Author Topic: Adding New Action Overrides and Exits  (Read 671 times)
0 Members and 1 Guest are viewing this topic.
Eternal Yoshi
Heroic Kitten
**
Offline Offline

Posts: 2425


Boss? Is that you?

  • Awards KCMM Old Timer Super Saiyan Topic Active Contributor Former PMDT Helping Hand

  • View Profile Awards
    « on: January 21, 2014, 06:08:22 AM »


    I'm not masking that this was discovered and written by Magus and Yeroc. You need Tabuu, PSA, and a Hex Editor.

    1) In PSA create a new subroutine with a fake subroutine command in it (any command will do though, you won't be linking to this subroutine anywhere) with X +1 params (params all pointer type except the last leave as value), where X is the new number of overrides/exits. 00070500 would be if you want 4 overrides/exits, with 4 pointer params and then 1 value. Put whatever value you want for each of the pointers, but make sure they're not just 00000000. What will become action override/exit pointers will now properly get updated as pointers to mem addresses when the pac is loaded. This gets these addresses in the file added to the pac's pointer list, which is a list of offsets the game should add the ram address of the start of the pac onto it, turning a pointer like 1F674 into something usable by the game. Note the address of the params (can be seen in the pop up window while editing the command).

    2) Create a new subroutine with the commands you want to use in the new override/exit. Note the address of the routine. Save.

    3) Open Tabuu and go to "StatusAnimCmdDisguiseList" for override or "StatusAnimCmdExitDisguiseList" for exit. Copy the "DataOffset".

    4) In a hex editor go to the DataOffset found above in Tabuu, and then search for that same offset (add zeros before it so like 25080->00025080 and search for that). It should come up shortly underneath there. Edit this pointer to be the address of the parameters from the fake command. This pointer not found in Tabuu is what matters in game for loading the override/exit list. Note: Pretty sure you can add them if they don't already have any overrides/exits, but locating where to change it from 00000000 to the new list might be difficult.

    5) Right click the list in Tabuu and view the (header). Go to the offset labeled "FileOffset" in Tabuu on the list, then search just below it to locate the contents of the header. Change the pointer (which is the same as the "hidden" pointer you also just changed above) to also direct to the fake command's parameters address. This makes them show up properly in Tabuu, and I would think matters somehow in game (appears to work fine without doing this though).

    6) Go back to the "DataOffset", and go down 0x80 to get to the old override/exit list and pointers. Copy them along with the FFFFFFFF 00000000 at the end of the list, and then go to the address of the fake command's parameters and again go down 0x80 from there to find them. You should see 00000002 xxxxxxxx as many times as you made pointer parameters in the fake command ending with 00000000 xxxxxxxx which was the value parameter. Paste the old override/exit list over it. Copy/paste the FFFFFFFF 00000000 over 8 bytes to the right, and then put the new action ID over the first FFFFFFFF and the address of the subroutine with the new action override/exit coding directly to the right of it. You'll have the old override/exit list, followed by the new override/exit entry and the address for its coding, and then ending with FFFFFFFF 00000000 to terminate the list.

    7) Now that you've copied the the override/exit locations to the new list, you need to update the pointer table to see that list. Do a search for (the location of the first override/exit + 0x04) to find that override's entry in the pointer table. Do a search for the pointers you created in step 1 (again, address + 0x04) to make sure they are also there. They should be close to where you were already but farther down. They will probably be the last ones in the list or close to it. Those can stay where they are, but make sure that they point to your new overrides (the 000XXXXX part, not the 000000XX part!!!).

    Eight) Remove the old override/exit pointer entries from the list. REMEMBER HOW MANY THERE WERE, because you will need to add back that many entries in the table. The table must be in order so that each successive entry is a pointer at a later location in memory. Using the new addresses of your override/exit table (should be right before the pointers you just added) find where that address should go in the table, and insert them. Remember to add 0x04 again.


    Edit: The pointers for overrides and exits are always right next to each other (overrides pointer 1st, exits pointer 2nd), so if they have one but not the other that you want to add to you can locate where to change it from 00000000 to the newly created list offset by going to the type that does exist. If they have neither overrides or exits and they have param___ft nodes look up the one with the lowest DataOffset's pointer location, and look shortly before it for an 00000001 with 00000000 00000000 (empty override and exit pointers) located 0x20 before the 00000001.
    Logged


    KingJigglypuff
    Meme Machine
    Moderator
    ****
    Offline Offline

    Posts: 7197


  • Awards >9000 Hyperactive Contributor Heart Container Troubleshooter Helping Hand

  • View Profile WWW Awards
    « Reply #1 on: January 21, 2014, 02:49:31 PM »


    Setting this to Sticky.

    Is it possible to do the first step in BrawlBox? Also tutorial images would help those who are new to this.
    « Last Edit: January 21, 2014, 03:56:15 PM by HailToTheKingJigglypuff » Logged

    I don't take requests.

    My PSA Thread

    Tabuu Forte Akugun
    Boss Kitten
    ****
    Offline Offline

    Posts: 4400


    Smash 4 Main: Bowser

  • Awards Heart Container Famous Hacker Starstormer Super Saiyan Topic KCMM Veteran

  • View Profile Awards
    « Reply #2 on: January 21, 2014, 03:49:02 PM »


    Adding this to my Brawl hacking bookmarks.
    Logged

    Eternal Yoshi
    Heroic Kitten
    **
    Offline Offline

    Posts: 2425


    Boss? Is that you?

  • Awards KCMM Old Timer Super Saiyan Topic Active Contributor Former PMDT Helping Hand

  • View Profile Awards
    « Reply #3 on: January 21, 2014, 04:31:22 PM »


    If that Brawlbox cannot do all of the steps specified and you can't open the moveset file in PSA, then you have to find a way to do this in a hex editor....

    or do it in a clean VBrawl character file THEN rebuild the rest afterwards.
    Logged


    KingJigglypuff
    Meme Machine
    Moderator
    ****
    Offline Offline

    Posts: 7197


  • Awards >9000 Hyperactive Contributor Heart Container Troubleshooter Helping Hand

  • View Profile WWW Awards
    « Reply #4 on: January 21, 2014, 04:41:35 PM »


    If that Brawlbox cannot do all of the steps specified and you can't open the moveset file in PSA, then you have to find a way to do this in a hex editor....

    or do it in a clean VBrawl character file THEN rebuild the rest afterwards.
    Damn.

    Looks like I can't use this method then. :\

    Do you think copying and pasting from a character with Hex would work?
    Logged

    I don't take requests.

    My PSA Thread

    pikazz
    Heroic Kitten
    **
    Offline Offline

    Posts: 2281


    Machinimator!

  • Awards Good Citizen Pin Collector Helping Hand Super Saiyan Topic Heart Container

  • View Profile Awards
    « Reply #5 on: March 04, 2014, 05:28:04 PM »


    I know this is kinda late (more than 3 weeks) but I am exprementing with this thing with only using Brawlbox! have little problem with action override, but I got glide working along with the PSA (not tested ingame yet, need some Subroutin references before I test it)
    Logged






    KingJigglypuff
    Meme Machine
    Moderator
    ****
    Offline Offline

    Posts: 7197


  • Awards >9000 Hyperactive Contributor Heart Container Troubleshooter Helping Hand

  • View Profile WWW Awards
    « Reply #6 on: December 09, 2018, 06:00:35 AM »


    I'm aware this is a 4 year necropost, but it's rather important. With the release of PSA Compressor, this tutorial has been made obsolete, so I'll be removing the sticky from this thread. I have since made a tutorial with the most up to date information regarding adding Action Overrides.

    http://forums.kc-mm.com/index.php?topic=78868.0
    Logged

    I don't take requests.

    My PSA Thread

    Pages: [1]
    Print
    Jump to: