Users browsing this thread: 1 Guest(s)
Shorter Rage List? (Battle)

#1
Posts: 377
Threads: 34
Thanks Received: 10
Thanks Given: 7
Joined: Dec 2018
Reputation: 18
Status
Moog
Does anybody know how Brave New World's crew went about shortening the scroll on battle's RAGE list?

I was able to follow the C3 menu shortening fairly easily (reduced it to 48 rages), but I can't work out how to shorten the list in battle.  I can get it to list only the first 49 rages (which admittedly is a problem, but not an insurmountable one), but then there's a bunch of dead scrolling space beyond it.

I was hoping to shorten the list to help completionists and to make the Jiujitsu upgrade more powerful (since it would hypothetically draw from all 255 rages instead of the first 48).  I can't figure out what controls the scrollbars in battle, though.
  Find
Quote  

#2
Posts: 676
Threads: 44
Thanks Received: 26
Thanks Given: 21
Joined: Jan 2015
Reputation: 11
Status
Zombie
I used to know something about this... Could have swore battle menu's were drawn in C2 or some such, near the "filling" code (well, in the same bank as the filling code). It has been awhile and despite looking into it, I never went and actually modified any battle windows personally.

Either that or they were somewhere uncommon that nobody ever plays with like CE or G2 . Sorry, my memory only works when IT wants to.

C2/580C involves "constructing" rage menu, but the code looks more like "filling".
"Format for Drawing the Rage Menu (from C1/4CE7)" is at C2/E067

That being said, while it would be pretty well a pipe dream due to the complexity, a battle window of about 10-20 rages that you pick from a list of all known would be (at least I personally think) very cool. Not practical in the doing, but cool yes. Your idea is probably a lot more practical and usable though.

Either way, hope that might help, unless you've already looked there.


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

#3
Posts: 377
Threads: 34
Thanks Received: 10
Thanks Given: 7
Joined: Dec 2018
Reputation: 18
Status
Moog
I think I found it. I had been using C2/580C to shorten the list, but your note that the format came from C1 made me look there.

...Which got me thinking that MMMMMagic must have encountered the same scrollbar issue when they added 10 spells, so I looked at the notes from that patch. The scroll limits and scrollbar animation is handled in the C1 bank, in the 8100s... but my version of the C1 disassembly doesn't have any annotation in that section, so I had to compare my full-rage list scrolling to the BNW2.0 Rom to find out where the scroll settings were being changed.

Relevant addresses:
Code:
[C3]
    Initialize Rage menu
    C3/21A6:    644A        STZ $4A        ; List scroll: 0
    C3/21A8:    201F09      JSR $091F      ; Create scrollbar
    C3/21AB:    C220        REP #$20       ; 16-bit A
        C3/21AD:    A9CC00      LDA #$00CC     ; V-Speed: 0.8 px            [Changed to A9 94 05]  {Scroll speed $594}
                                            {The shorter the list, the faster the arrow needs to scroll and the higher this number will need to be.)
                                            {Take the ratio of OLDCOUNT/NEWCOUNT, multiply it by the value here, and round up}
    C3/21B0:    9F4A357E    STA $7E354A,X  ; Set scrollbar's
    C3/21B4:    A96800      LDA #$0068     ; Y: 104
    C3/21B7:    9FCA347E    STA $7E34CA,X  ; Set scrollbar's
    C3/21BB:    E220        SEP #$20       ; 8-bit A
    C3/21BD:    204C4C      JSR $4C4C      ; Load navig data
    C3/21C0:    20554C      JSR $4C55      ; Relocate cursor
        C3/21C3:    A978        LDA #$78       ; Top row: Tap Dancer        [Changed to h10]
                                              {The scroll limit is set by the first item on the screen, so the value here...}
                                              {...will be 16 less than the last rage # actually displayed}
[C1]
C1/84F9:    C97C        CMP #$7C            BNW changes this...            [Make #$14 for 48 rages]
                                              {Again, scroll limit represents the upper left element in the menu...}
                                              {...so the last rage displayed will be 8 higher than this}
...
C1/854A:    A97C        LDA #$7C        BNW changes this...                [Make #$14 for 48 rages]
                                              {If this doesn't match the number in 84F9, you're gonna have a bad time}
...
C1/854E:    A24B00      LDX #$004B        BNW changes this...                [Make #$01F2 for 48 rages?]
                                              {The shorter the list, the higher this number must be.  Again, get a multiplier from OLD/NEW and round up}

By coupling this information with Assassin's alphabetical rage patch, I was able to create a sorted list of 48 rages arranged by rough level of power (rather than alphanumerically). With a bypass, this list could be made to read from a different spot depending on a variable of your choice, allowing you to change which rages Gau lists and has access to on command. I didn't mess with muddled/berserk rage selection, though; it still draws from the full count. Anyway, that's not QUITE picking your rages, but you could in theory set up rage sets that are changed by relics or an event (something Gau lets you pick on the airship, maybe?).
  Find
Quote  

#4
Posts: 676
Threads: 44
Thanks Received: 26
Thanks Given: 21
Joined: Jan 2015
Reputation: 11
Status
Zombie
Interesting, yeah that part of my disassembly is unmarked as well. AND for some reason I don't have the alphabetical rage patch in my files(wtf). Going to have to fix that.

Good researching, writing character fitting dialog to choose which group of rages to use while staying in game might be tricky (how would Gau say "I can only have x rages at a time which ones? Without breaking 4th wall?) But yeah, if Most powerful an option, and maybe type/element or by area(based on monster ID value maybe?) Is possible, then personally Rage would be a bit more user friendly.

While cool, rage just never seemed worth it to me. The power wasn't great enough to justify going through the entire list, losing control, and the random nature. Even with control, not worth going through the entire menu for 1 rage, for 1 or 2 rounds of combat (the reason some RPGs had the "auto battle" option for junk grind battles.

Dialog on the airship would be a good method, but based on equipped relic would probably be the most versital, don't know if it would be worth it to dedicate relics specifically to Gau's rages (like "Grass Necklace for a set, Wind amulet for another, etc) However, having normal relics or armor change the list somehow if he's equipped... Maybe based of element of weapon/shield determines which rages are shown?

Good info regardless of what it turns into.


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

#5
Posts: 377
Threads: 34
Thanks Received: 10
Thanks Given: 7
Joined: Dec 2018
Reputation: 18
Status
Moog
I was figuring something like "I fight like monsters, how should I fight?" with options like "Aggressive, Support, Defensive" or perhaps calling to FFXIII "Ravager, Saboteur, Sentinel, Commando, Synergist, Medic", each with perhaps 12 Rages.

Having Gau change them on the airship lets the player make sure the option they've selected has the Rages they want (or has more than one rage, if they've spent little time filling them in), and it lets us control the rage list with an event bit... a task I have achieved fairly easily with regards to the Shop menu.

Alternatively, my thought was that the ReEquip routine triggered by the Relic menu could be extended to change the rage list by again setting event bits... though that approach changes the list if ANYONE equips the relic, not just Gau (a half-problem; the relic could be set to Gau only or could specify that it affects rages).

I'm toying with delving into this to set up a Recall style menu for Tellah or a similar character, wherein the player could select a spell and hope it casts (Rage with dummy spell and desired spell) and change which spells are listed with a relic or event. I'll play with it some more when I get around to battle hacking again, and let you know if I come up with anything cool.
  Find
Quote  

#6
Posts: 676
Threads: 44
Thanks Received: 26
Thanks Given: 21
Joined: Jan 2015
Reputation: 11
Status
Zombie
I remember looking into using Rare Item Bits, last time I looked at the guest added patch. Didn't get far enough to check the fine details, such as is there ANY benefit to using Rare Item bit vs true event bits at all, Or if they were the same thing effectively. Can't really use, equip, or trigger rare item bits much different than normal event range, less I'm forgetting something, which is why I mention it at all.

Wait, why couldn't you just add an "is Gau?" Check to the relic menu routine when it checks if the relic is equipped? If the relic is equipped, check is Gau, if not ignore.


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

#7
Posts: 377
Threads: 34
Thanks Received: 10
Thanks Given: 7
Joined: Dec 2018
Reputation: 18
Status
Moog
The only advantage Rare item bits have over regular event bits is that they turn on a display in the item menu... which IS advantageous but maybe not for this.

As for testing for Gau, the spot in question is less complex than I remembered.

Code:
Test Reequip activation, select menu commands accordingly
C3/9EEB:    201091      JSR $9110      ; Get gear effects
C3/9EEE:    20F293      JSR $93F2      ; Define Y
C3/9EF1:    B90000      LDA $0000,Y    ; Actor
C3/9EF4:    C90D        CMP #$0D       ; Umaro?
C3/9EF6:    F007        BEQ $9EFF      ; Branch if so
C3/9EF8:    205C9F      JSR $9F5C      ; Test Reequip
C3/9EFB:    A599        LDA $99        ; Triggered it?
C3/9EFD:    D007        BNE $9F06      ; Branch if so
C3/9EFF:    A904        LDA #$04       ; C3/1A8A
C3/9F01:    8527        STA $27        ; Queue main menu
C3/9F03:    6426        STZ $26        ; Next: Fade-out
C3/9F05:    60          RTS
And
Code:
Determine whether to trigger Reequip in Relic menu
C3/9F5C:    20F293      JSR $93F2      ; Define Y...
C3/9F5F:    B92300      LDA $0023,Y    ; Relic 1
C3/9F62:    C5B0        CMP $B0        ; Unchanged?
C3/9F64:    D009        BNE $9F6F      ; Branch if not
C3/9F66:    B92400      LDA $0024,Y    ; Relic 2
C3/9F69:    C5B1        CMP $B1        ; Unchanged?
C3/9F6B:    D002        BNE $9F6F      ; Branch if not
C3/9F6D:    803A        BRA $9FA9      ; Reequip: No

Fork: Compare old and new relics
C3/9F6F:    A5B0        LDA $B0        ; Old relic 1
C3/9F71:    C9D1        CMP #$D1       ; Genji Glove?
C3/9F73:    F037        BEQ $9FAC      ; Trigger if so
C3/9F75:    C9D0        CMP #$D0       ; Gauntlet?
C3/9F77:    F033        BEQ $9FAC      ; Trigger if so
C3/9F79:    C9DA        CMP #$DA       ; Merit Award?
C3/9F7B:    F02F        BEQ $9FAC      ; Trigger if so
C3/9F7D:    A5B1        LDA $B1        ; Old relic 2
C3/9F7F:    C9D1        CMP #$D1       ; Genji Glove?
C3/9F81:    F029        BEQ $9FAC      ; Trigger if so
C3/9F83:    C9D0        CMP #$D0       ; Gauntlet?
C3/9F85:    F025        BEQ $9FAC      ; Trigger if so
C3/9F87:    C9DA        CMP #$DA       ; Merit Award?
C3/9F89:    F021        BEQ $9FAC      ; Trigger if so
C3/9F8B:    B92300      LDA $0023,Y    ; Relic 1
C3/9F8E:    C9D1        CMP #$D1       ; Genji Glove?
C3/9F90:    F01A        BEQ $9FAC      ; Trigger if so
C3/9F92:    C9D0        CMP #$D0       ; Gauntlet?
C3/9F94:    F016        BEQ $9FAC      ; Trigger if so
C3/9F96:    C9DA        CMP #$DA       ; Merit Award?
C3/9F98:    F012        BEQ $9FAC      ; Trigger if so
C3/9F9A:    B92400      LDA $0024,Y    ; Relic 2
C3/9F9D:    C9D1        CMP #$D1       ; Genji Glove?
C3/9F9F:    F00B        BEQ $9FAC      ; Trigger if so
C3/9FA1:    C9D0        CMP #$D0       ; Gauntlet?
C3/9FA3:    F007        BEQ $9FAC      ; Trigger if so
C3/9FA5:    C9DA        CMP #$DA       ; Merit Award?
C3/9FA7:    F003        BEQ $9FAC      ; Trigger if so
C3/9FA9:    6499        STZ $99        ; Reequip: No
C3/9FAB:    60          RTS

Fork: Set to open Equip menu
C3/9FAC:    A901        LDA #$01       ; Reequip: Yes
C3/9FAE:    8599        STA $99        ; Set indicator
C3/9FB0:    60          RTS
The Gau rage bypass could modify a copy of this second code block, making it set event bits (rare item or otherwise) to indicate to the alphabetical rage patch that a different list location should be referenced (effectively loading a different list).
It looks like the code loads data from a character array. In the code itself I see documented relic 1 ($0023 relative to character address) and relic 2 ($0024 relative to character address), but I also found Helmet ($0021) and Armor ($0022). That means you could set it to check an armor type and pick rages accordingly... only problem being that the insertion point I've picked is triggered IN the relic menu... I'd need to see if there's another suitable point to make a check and bypass.
  Find
Quote  

#8
Posts: 175
Threads: 11
Thanks Received: 10
Thanks Given: 8
Joined: May 2013
Reputation: 13
Status
Well-Fed
Oh, hey, I have notes on this!

You've found the appropriate addresses, but I can offer a little more clarity on the values. Here's the snippet I did up for BNW:

Code:
; Rage menu length
org $C184F9
        CMP #$1C        ; Total rages /2 - 4


; Rage scrollbar
org $C1854A
        LDA #$1C        ; # of scrollbar rows (see above)
        STA $36
        LDX #$0140        ; (pixels?) per scrollbar row
        STX $2E            ; Adjust as necessary so scrollbar end-point is where you want it. This should be appropriate-ish, but can definitely be fine-tuned.


For each battle menu, the value you're looking for is "number of total rows - number of initially displayed rows". Since the menus display four rows to start with, the second value is always 4. The first value varies based on a few things. Rages (and magic) are divided by two because there are two columns, and interestingly there's actually a minor bug in the in-battle Lore menu, because despite the menu being converted to one-column in the English version, it still halves the base-value based on it being a two-column menu in Jp. The value is the correct #14 at C1/8336 (for menu length), i.e. 20d = 24 - 4, but is the original Jp #08 at C1/838F (24 / 2 - 4), causing the scrollbar to act improperly.


Current Project: FF6: Tensei | Discord ID: TristanGrayse
  Find
Quote  
[-] The following 1 user says Thank You to GrayShadows for this post:
  • C-Dude (02-21-2020)



Forum Jump:

Users browsing this thread: 1 Guest(s)


Theme by Madsiur2017Custom Graphics by JamesWhite