Finishing Off The Complete Roster Hack
#56
(06-14-2022, 08:22 PM)PowerPanda Wrote: Whoa. You cracked the code on displaying 16 characters on the shop screen?

That was part of version 0.88 of the Full Roster hack.  I wrote that code.
[spoiler]
(01-25-2020, 04:56 PM)C-Dude Wrote: Shop's working!  It was mostly a matter of finding the table pointers, making bigger tables for the new actors, and then putting them in.  The menu pointers also needed to be fixed; most of the characters didn't have their fanfare options set.
Attached is v0.88 of the full roster hack... it's JUST the patch and my additional hex notes, so be sure to grab PowerPanda's v0.8 as well if you want to read up on the other stuff (or if you want the test save).  Two versions are included, one with EveryChocobo applied (had to fix some pointers for it, hence its inclusion) and one without.

Note that like I said in the earlier post, the shop OAM will default to using Imperial Soldier and Imp as actors E and F.  The EveryChocobo version includes the subroutine to change the tiles on actors E and F; if you launch it with PowerPanda's save you should see Brown Leo and Green Banon in the shop menu.
This pair can be changed by changing the hex value in the subroutine, see the included notes.

Sorry this isn't in ASM format, I do pretty much everything in direct hex.  It should be fairly easy to convert, though, as it is rigorously documented.

Hex notes:
[spoiler]
Code:
Full Roster v0.88 (Shop Functionality)
Patches included:
    Those without PowerPanda's "Everybody Gets a Chocobo"
    v0.88 noBoco UH (for unheadered v1.0 FF3US)
    v0.88 noBoco H (for headered v1.0 FF3US)
    Those with PowerPanda's "Everybody Gets a Chocobo"
    v0.88 Boco UH (for unheadered v1.0 FF3US)
    v0.88 Boco H (for headered v1.0 FF3US)



[Hex Changes]
Fork: Compile gear's compatible actors
C3/853E:    E00E00      CPX #$000E     ; Done all 14?    ====> To E0 10 00        [Includes actors E and F]




Shop, Actor draw coordinates
C3/C0CB:    BFEDC0C3    LDA $C3C0ED,X  ; X position     ====> To BF E0 FF C3    [Points to new table]
...
C3/C0D2:    BFFBC0C3    LDA $C3C0FB,X  ; Y position        ====> To BF F0 FF C3    [Points to new table]



Compile actors for Buy menu
C3/C12B:    C90E        CMP #$0E       ; Guest?            ====> To C9 10            [Includes actors E and F]



Create equip sign by each actor in Buy menu
C3/C24D:    C00E00      CPY #$000E     ; Done all 14?    ====> To C0 10 00        [Includes actors E and F]



Shop, Equip Sign draw coordinates
C3/C278:    BFB1EBD8    LDA $D8EBB1,X  ; X position        ====> To BF C0 FF C3
...
C3/C27F:    BFBFEBD8    LDA $D8EBBF,X  ; Y position        ====> To BF D0 FF C3



Coordinate Tables in Freespace
c3/FFC0 Table (Shop Sign X,Y) [To c3/ffdf]
10 2B 48 64 80 9B B8 D4 10 2B 48 64 80 9B B8 D4
AC AC AC AC AC AC AC AC C8 C8 C8 C8 C8 C8 C8 C8

c3/FFE0 Table (Shop X,Y) [To c3/FFFF]
14 30 4C 68 84 A0 BC D8 14 30 4C 68 84 A0 BC D8
9C 9C 9C 9C 9C 9C 9C 9C B8 B8 B8 B8 B8 B8 B8 B8




    Shop Tile Override
    c3/6da5:
    
   20 f1 fd          JSR C3/FDF1       Adjacent predecessor space to C3 space used by Full Roster hack
   80 03             BRA #$03             Skip emptied space
   EA EA EA          NOP NOP NOP
   
        c3/fdf1:
        A5 E3        LDA $E3               (Current actor index)
        C9 0E        CMP 0E                (Even numbered member of actor pair you wish to change)
        D0 02        BNE #$02              (If it's not the pair you want to change, exit)
c3/fdf7: A9 0F        LDA $10                (If it is, load the alternate actor index. In this case, Imp (Current))
        8d 1c 21     STA $211C             (Save it to the OAM tile matrix)
        8d 1c 21     STA $211C             (Twice, like in the original code)
         60           RTS

    [Without "Everybody Gets a Chocobo", the highest value applicable to line c3/fdf7 is A9 0F.]
    [With it, the highest value applicable is A9 14]


Determine whether shop actor should wave its arms [Needed to be restored to Vanilla, will disregard Merit Award]
...
C3/C1BC:    BF0150D8    LDA $D85001,X  ; Compatibility
C3/C1C0:    25E7        AND $E7        ; Actor can use?
C3/C1C2:    E220        SEP #$20       ; 8-bit A
C3/C1C4:    F003        BEQ $C1C9      ; Fail if not
C3/C1C6:    AB          PLB            ; Restore DB
C3/C1C7:    38          SEC            ; Mark success
C3/C1C8:    60          RTS            ; Exit
C3/C1C9:    AB          PLB            ; Restore DB
C3/C1CA:    18          CLC            ; Mark failure
C3/C1CB:    60          RTS


    
OAM Pointers
D8/E945
-- -- -- -- -- E3 EA 10 E3 EA 10 E3 EA FF E3 EA
10 EC EA 10 E3 EA FF F5 EA 10 F5 EA 10 F5 EA FF
F5 EA 10 FE EA 10 F5 EA FF 07 EB 10 07 EB 10 07
EB FF 07 EB 10 10 EB 10 07 EB FF 19 EB 10 19 EB
10 19 EB FF 19 EB 10 22 EB 10 19 EB FF 2B EB 10
2B EB 10 2B EB FF 2B EB 10 34 EB 10 2B EB FF 3D
EB 10 3D EB 10 3D EB FF 3D EB 10 46 EB 10 3D EB
FF 4F EB 10 4F EB 10 4F EB FF 4F EB 10 58 EB 10
4F EB FF 61 EB 10 61 EB 10 61 EB FF 61 EB 10 6A
EB 10 61 EB FF 73 EB 10 73 EB 10 73 EB FF 73 EB
10 7C EB 10 73 EB FF 85 EB 10 85 EB 10 85 EB FF
85 EB 10 8E EB 10 85 EB FF 97 EB 10 97 EB 10 97
EB FF 97 EB 10 A0 EB 10 97 EB FF 48 EE 10 48 EE
10 48 EE FF 48 EE 10 51 EE 10 48 EE FF 5A EE 10
5A EE 10 5A EE FF 5A EE 10 63 EE 10 5A EE FF 6C
EE 10 6C EE 10 6C EE FF 6C EE 10 75 EE 10 6C EE
FF 7E EE 10 7E EE 10 7E EE FF 7E EE 10 87 EE 10
75 EE FF 90 EE 10 90 EE 10 90 EE FF 90 EE 10 99
EE 10 90 EE FF -- -- -- -- -- -- -- -- -- -- --
[/spoiler]

EDIT: I'm a flake, I uploaded the wrong ZIP file; it had out-of-date notes and it didn't even have the EveryChocobo version!  The file should be correct now, and now includes all of PowerPanda's notes and the test save from v0.8.

[/spoiler]
Reply


Messages In This Thread
RE: Finishing Off The Complete Roster Hack - by C-Dude - 06-14-2022, 08:29 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Roster, Party Select, Graphics OAM Catone 2 2,675 09-04-2022, 05:41 AM
Last Post: Catone
  Roster palettes HatZen08 7 7,561 01-04-2016, 12:31 PM
Last Post: Catone

Forum Jump:


Users browsing this thread: 2 Guest(s)