Users browsing this thread: 1 Guest(s)
Finishing Off The Complete Roster Hack

#21
Posts: 614
Threads: 49
Thanks Received: 0
Thanks Given: 4
Joined: Feb 2017
Reputation: 25
Status
None
I have reached the end of what I am able to do on my own without help, so I figured I'd compile my work and post it here. The patch below contains everything I've detailed on the thread up to this point. The things missing are:
1. Gogo's Submenu being able to handle more commands
2. Shop Menu being able to handle 16 characters

Let's see what you guys can do from here!


Attached Files
.zip  Full Roster Beta v0.8.zip (139.89 KB, 23 downloads)


Projects:
FFVI: Divergent Paths (Completed) - a complete storyline and gameplay hack of FF6 that adds Leo as a playable character
  Find
Quote  

#22
Posts: 377
Threads: 34
Thanks Received: 10
Thanks Given: 7
Joined: Dec 2018
Reputation: 18
Status
Moog
(07-24-2018, 12:54 PM)PowerPanda Wrote:
(07-24-2018, 11:55 AM)Scorcher Wrote: An idea that I've had regarding the shop screen is to simply have Umaro unable to change equipment whatsoever, and to simply make it so Gogo can equip anything, and have the shop screen show the two new characters instead of those two. I feel like Gogo being able to equip anything fits him... her... it perfectly, but I understand that maybe not everyone would know how to balance that properly.

This is more or less what I did in Definitive Edition. Kappa can only equip the Imp Armor and the Genji Armor, and Umaro can only equip a handful of things, none of which can be purchased in shops anyway. I actually moved Umaro over to Profile $0F and swapped his spritesheet with Leo's to get the desired result.

The issue with OAM is that it doesn't reference the SRAM to determine which character it should display in the shop screen. It literally just looks to the sprite sheet. You could load whatever sprite you want into character $00 (Terra), but the shop would always display spritesheet $00, which is Terra. That's why it is, to put it lightly, the pit that the Full Roster Hack died in back in 2016. First, nobody ever figured out how to successfully load 16 characters into the shop. When they did, the characters loaded in were sprite sheets 15 and 16, the Soldier and the Imp. There was talk of a hack synchronizing it with what was in SRAM, but then we needed to figure out how to get the character stats loaded in too. It was a mess. Hatzen finally just eliminated the shop screen altogether and replaced it with the "who can equip?" screen from the item menu. It's a decent workaround, but not a good long-term fix.

I did find a way to trick the game into drawing a different pair... it's still drawn in pairs but you can at least select which pair to use.
Code:
    c3/6da5:
    
    20 f0 f1          JSR C3/F1F0   Change to whatever free space
    80 03             BRA #$03 Skip emptied space
    EA EA EA
    
        c3/f1f0:
        
        A5 E3        LDA $E3   (Current actor index)
        C9 0A        CMP 0A    (Even numbered member of actor pair you wish to change)
        D0 0D        BNE RTS  (If it's not the pair you want to change, exit)
        AD 94 1E   LDA $1E94 (Event bit ram)
        89 10            BIT 4 #$10  ($0A4 set) [This check is removable if you adjust the BNEs]
        D0 04        BNE RTS   (If not the world of ruin, load the original actor index)
        A9 0A        LDA $0A            (in this case, Mog)
        80 02        BRA #$02          (and then skip the next line)
        A9 10        LDA $10            (If it is, load the alternate actor index. In this case, Leo (Current))
        8d 1c 21      (Save it to the OAM tile matrix)
        8d 1c 21      (Twice, like in the original code)
        60            RTS
This chunk of hex changes the OAM, but not the palettes, of Actors $0A and $0B, if the World of Ruin event flag is set.  With a subroutine like this, inserted at C3/6da5, you can change the pair to any pair with a full tileset (your EverybodyGetsAChocobo needs to be applied to properly draw actors higher than Leo), even changing them mid-game (tiles, but not palettes... the draw palette has to be set in the original OAM location).

There's other problems with the shop, though.  I can make room for two new characters on the screen, but the way the equip arrows are drawn perplexes me.  Additionally, upon applying the 0.8 full roster patch to a clean FF3US1.0 I find that the actors do not cheer when an item is equippable to them... I looked in the spot where that animation is set and nothing's changed so I'm not sure what's causing this.

Going to play around with it a bit more while I wrap up QA with my hack.  I think we're close.

EDIT: Yep, got 'em on the shop menu by changing
Code:
C3/C12B:    C90E        CMP #$0E       ; Guest?

to

C910
and making a new X,Y table for character positions. The ^vE= arrows are still a problem, though, I'll see what I can do.

FYI, default OAM palettes for those two slots is 1 for E, and 0 for F.

EDIT EDIT: Hmm... actors E and F will cheer when equippable, but no one else does. There must be something changed for actors $00-$0D that is damaging the shop display, but I've been unable to locate it. It doesn't seem to be the Merit Award change, though, since I tried removing it and it didn't resolve the problem.
EDIT: There's definitely something wrong with the shop determining success/failure with regards to actor equippability. Soldier (Actor $0E) reacts to the former Imp Bit from equip flags AND the new Merit Award bit from equipment special data 4 (even if it is an item he cannot equip). Imp (Actor $0F) reacts to the former Merit Bit from equip flags AND the new Imp Equipment bit from equipment special data 4 (again, even if it is an item he cannot equip).
  Find
Quote  
[-] The following 1 user says Thank You to C-Dude for this post:
  • PowerPanda (01-25-2020)

#23
Posts: 614
Threads: 49
Thanks Received: 0
Thanks Given: 4
Joined: Feb 2017
Reputation: 25
Status
None
Sounds like you are making excellent progress. Keep up the good work! I have some ASM from Beyond Chaos for putting a scroll bar on Gogo's status screen that I have to decode (it's not Xkas ASM, so I need to reverse-engineer it). If we get those 2 things, I think we can actually release a complete full-roster patch!


Projects:
FFVI: Divergent Paths (Completed) - a complete storyline and gameplay hack of FF6 that adds Leo as a playable character
  Find
Quote  

#24
Posts: 377
Threads: 34
Thanks Received: 10
Thanks Given: 7
Joined: Dec 2018
Reputation: 18
Status
Moog
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.
.zip  full roster - v0.88.zip (171.38 KB, 15 downloads)

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:
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.
  Find
Quote  
[-] The following 3 users say Thank You to C-Dude for this post:
  • Gi Nattak (01-25-2020), madsiur (01-26-2020), PowerPanda (01-26-2020)

#25
Posts: 614
Threads: 49
Thanks Received: 0
Thanks Given: 4
Joined: Feb 2017
Reputation: 25
Status
None
Amazing work, and one of the biggest remaining hurdles to releasing a full Complete Roster hack! I tried a couple of different iterations of this, and everything worked except the shop tile override. The shop tile override actually does work for spritesheets 0E and 0F, but all of the other actors end up turning into Locke and Celes*.

I think that it's important this is fixed. Replacing the Soldier and Imp spritesheets is not really an option, as it messes up the Imp status and 1/3 of the NPCs in the game. Pretty much everyone who uses this hack is going to either expand the spritesheets or use a different character.

*EDIT: Terra and Locke


Projects:
FFVI: Divergent Paths (Completed) - a complete storyline and gameplay hack of FF6 that adds Leo as a playable character
  Find
Quote  
[-] The following 1 user says Thank You to PowerPanda for this post:
  • C-Dude (01-26-2020)

#26
Posts: 377
Threads: 34
Thanks Received: 10
Thanks Given: 7
Joined: Dec 2018
Reputation: 18
Status
Moog
(01-26-2020, 07:56 PM)PowerPanda Wrote: Amazing work, and one of the biggest remaining hurdles to releasing a full Complete Roster hack! I tried a couple of different iterations of this, and everything worked except the shop tile override. The shop tile override actually does work for spritesheets 0E and 0F, but all of the other actors end up turning into Locke and Celes.

I think that it's important this is fixed. Replacing the Soldier and Imp spritesheets is not really an option, as it messes up the Imp status and 1/3 of the NPCs in the game. Pretty much everyone who uses this hack is going to either expand the spritesheets or use a different character.

My bad, the notes that ended up in the zip were the wrong copy of the file... the BNE should be D0 02, not D0 08.
What's happening is the last two lines are used to change the tiles off their default calculated position (D5/0000, or the start of Terra's Spritesheet).  Variable A is applied as an offset in multiples of $16A0, or one actor's worth of tiles.  This shift is then saved with the command STA $211C.

The override works by loading a static number instead of the character index stored at $E3.  Because $E3 is never changed, only the character pair in question gets the static number fed to the tile pointer.

The old notes were skipping past that STA, which is why it was showing Locke and Terra instead of the proper actors.  I'll update the file as soon as I've made sure everything's straightened out.
EDIT: Fixed. I'd uploaded the wrong version of the zip file, which is why it didn't even have the riding chocobo patches in it.
The patch is updated in the earlier post. Both versions now have the graphics override routine already applied, it can be found at C3/FDF1 and to change the character pair, the value at C3/FDF8 should be altered (from 0F or 14 to any value 00 to 14).


It is important to note that regardless of the pair you pick, Actor E will have to share a palette with the brown Imperial Soldier. This is because of how the save OAM works, since Soldier's menu palettes are determined by event bit $103 (Stole an officer's uniform as Locke). The only way to separate this and allow free palette selection for Actor E is to move all event calls for bit $103 to another bit [There are 30 such calls during the South Figaro scenario], set $103 AFTER Locke's scenario ends, and change the corresponding OAM palettes of Soldier 2 to whatever palette Actor E is meant to possess. This also means that Locke's soldier disguise will look identical to Biggs and Wedge, necessitating some palette swaps in South Figaro and a dialogue tweak about brown soldiers, or changing Biggs and Wedge to green and setting $103 during the intro, to be cleared when Locke's scenario ends.
Actor F is free to display any palette you please, as Imp does not display in save files.

Palettes for OAM are represented by the following numbers:
Code:
    Palettes are represented by the following numbers, there are 4 per character
    35 (0), 37 (1), 39 (2), 3B (3), 3D (4), 3F (5)

Actor E (Default Soldier)
D8/EE7E:
02 80 01 E0 37 80 11 E2 37 02 80 00 E4 37 80 10 E6 37

Actor F (Default Imp)
D8/EE90:
02 80 01 E8 35 80 11 EA 35 02 80 00 EC 35 80 10 EE 35

If you wanted to change Actor E's palette to 04, you'd replace the four '37's with '3D's, like this:
02 80 01 e0 _3D_ 80 11 e2 _3D_ 02 80 00 e4 _3D_ 80 10 e6 _3D_

--------
EDIT: I took a cursory look at the BeyondChaos Gogo scrolling status menu, and there most definitely is too much code required for the existing freespace available in the game, even if no other free bytes had been used.
Which raises an interesting question... where do you want to go from here?
(1) We could apply BeyondChaos's base game upgrades before the existing full roster patch and check for compatibility problems.
(2) We could scrap the idea of making Gogo's menu scroll and simply remove some abilities from that menu. A good candidate is "Fight". The menu is only one command too long thus far.
(3) We change that menu completely... possibly borrowing code from the RAGE or MAGIC menu.

(1) and (2) I can look into, but (3) is beyond me at present; UI is a weak spot for me.
  Find
Quote  

#27
Posts: 676
Threads: 44
Thanks Received: 26
Thanks Given: 21
Joined: Jan 2015
Reputation: 11
Status
Zombie
The stuff I was looking at back in the day, least as I remember it, either you need to expand the OAM data just like any other list of pointers (yes this list being not very space effecient) or scrap OAM all together.

Easier said than done sure, however, afterooking at Hatzen's palette sync patch (making it load OAM palettes from the Battle palette list rather than OAM data) did work. Required some math edits to teach the code to read from a simple list rather than a bit in that chunk of OAM.

My point, your loading the same data in all these places changing only where exactly the data is loaded to. Coding Time aside, why couldn't these several list of pointers be condensed into one list (as in one list of pointers to sprite sheet and palatte) and then the code to load it be mathed to read the required data from that?

Not only would you save space by reducing the number of pointer list (like 2 in CO, 2 in CF, another 4 byte list somewhere else) but there wouldn't be any list needing to be expanded (list in CO already include every map sprite anyway.) As for THE OAM data, direct it to a new list that only holds positioning data for 16 visable/usable actors, regardless of what skin or color they are.

Yeah, might be a dumb idea... "Simply just write new loading code, easy peasy!" But really, OAM data has been cussed for years now as a limiting factor, "simple" solution is to get rid of it (take note I said simple solution, not simple task.) Might result in a little slower loading, maybe.

But if your that close to cracking it after all this time, please do! Would be nice to see it broke finally, in which case ignore this idiot and continue, best of luck to ya's either way.


The only true wisdom is knowing you know nothing.
  Find
Quote  

#28
Posts: 377
Threads: 34
Thanks Received: 10
Thanks Given: 7
Joined: Dec 2018
Reputation: 18
Status
Moog
(01-30-2020, 09:20 PM)Catone Wrote: My point, your loading the same data in all these places changing only where exactly the data is loaded to. Coding Time aside, why couldn't these several list of pointers be condensed into one list (as in one list of pointers to sprite sheet and palatte) and then the code to load it be mathed to read the required data from that?

Alas, I'm king of the cheap shortcut bypass.  Even what I did with the shop code was a quick cheat; I injected a subroutine that tells the game "Is this the thing?  Hey, don't draw from that location, draw from here instead!".  Heck, if character E's shop palette being locked to Imperial Soldier is an insurmountable problem, I'd rather swap Locke to actor slot $0E than sort it out (and don't think I wouldn't... in ReCast I moved Strago to actor slot $0C and adjusted EVERY instance of his action in the event script accordingly... just to move up his position in the ending).
  Find
Quote  

#29
Posts: 676
Threads: 44
Thanks Received: 26
Thanks Given: 21
Joined: Jan 2015
Reputation: 11
Status
Zombie
Don't get me wrong, "work around" ARE the interesting part of hacking. Gotta get creative to be "lazy" when it comes to this sort of stuff. Not to mention dismantling the OAM gate is far from neccessary for the scope of this patch (least I would hope it doesn't require that much).

It would make alot more projects like this more obtainable though, I'm not math-ical enough to do it though, and not really contributing here either so let me see myself out. Still interesting to see though so keep us all posted on progress, and may the ASM be with you.


The only true wisdom is knowing you know nothing.
  Find
Quote  

#30
Posts: 614
Threads: 49
Thanks Received: 0
Thanks Given: 4
Joined: Feb 2017
Reputation: 25
Status
None
(01-26-2020, 08:48 PM)C-Dude Wrote: EDIT: I took a cursory look at the BeyondChaos Gogo scrolling status menu, and there most definitely is too much code required for the existing freespace available in the game, even if no other free bytes had been used.
Which raises an interesting question... where do you want to go from here?
(1) We could apply BeyondChaos's base game upgrades before the existing full roster patch and check for compatibility problems.
(2) We could scrap the idea of making Gogo's menu scroll and simply remove some abilities from that menu.  A good candidate is "Fight". The menu is only one command too long thus far.
(3) We change that menu completely... possibly borrowing code from the RAGE or MAGIC menu.

(1) and (2) I can look into, but (3) is beyond me at present; UI is a weak spot for me.

I actually have the ASM that was written, and it's not that extensive. I don't think finding free space will be too much of an issue. I just need TIME to look at it. If you want to check it out, I can send the ASM file to you when I get home from work.


Projects:
FFVI: Divergent Paths (Completed) - a complete storyline and gameplay hack of FF6 that adds Leo as a playable character
  Find
Quote  



Forum Jump:

Users browsing this thread: 1 Guest(s)


Theme by Madsiur2017Custom Graphics by JamesWhite