Shock Ability
#51
Lightning, GREAT find! Now that you know exactly what's happening, someone with a bit of coding knowledge should be able to help uncover the source. Unfortunately, I'm just not good enough at ASM to be able to fix it from here. I don't know how to switch between upper and lower nibbles.

I still think the ASM code is odd. It seems to jump between $3F2E and $3F2F at random. There might be a reason for this. Madsiur, think you could do a quick code review on this for typos? Here's what the code logic should be: Any time a character's battle menu comes up, check the upper nibble of $3F2F to see if their character slot has already used Shock. If so, gray it out. If not, then using Shock should write their slot's bit. The Final Battle Tier Transition can be ignored for the time being. The problem is not there.
Projects:
FFVI: Divergent Paths (Completed) - a complete storyline and gameplay hack of FF6 that adds Leo as a playable character
Reply
#52
Here's the problem:
Code:
newShock:  LDA $3018,Y             ; Get character bit
          ASL #4                  ; and shuffle it into the high nibble
          TSB $3F2E               ; Set bit 7 of $3F2E to show that Shock has been used
          PHX : TYX
          INC $2F30,X             ; Set character's menu to be redrawn

At this point Y, and therefore X, is not the character slot, but 2 * the character slot.
In character slot 0, 2*0 = 0, so it does the right thing.
In slot 1, it sets the menu of slot 2 to be redrawn instead of slot 1.
In slot 2, it increments $2F34: menu window graphics index (wallpaper)
In slot 3, it increments ++$2F35 variable 0 for battle message display

The fix is to change it to:
Code:
newShock:  LDA $3018,Y             ; Get character bit
           ASL #4                  ; and shuffle it into the high nibble
           TSB $3F2E               ; Set bit 7 of $3F2E to show that Shock has been used
           PHX : TYA
           LSR
           TAX
           INC $2F30,X             ; Set character's menu to be redrawn
Reply
#53
You rock, Subtraction! So far that seems to completely fix the bug! As another added benefit, the Shock code now works with Gogo as I suspected it would. Gogo can use Shock once per battle, and Leo can use shock once per battle. They don't seem to conflict with each other at all. I have decided to go ahead and allow Gogo to use the shock ability. The only downside to this is that Gogo's ability menu is full, so I have to remove another ability to make space. I tried to think of the most useless ability, and I sort of concluded that Runic would be that candidate (the other option is throw, which I kind of like even without Ninja Stars and Skeans in my mod). Would anyone care if I removed Runic for Gogo? I personally have never given it to him.
Reply
#54
(09-11-2018, 02:16 AM)Subtraction Wrote: The fix is to change it to:
Code:
newShock:  LDA $3018,Y             ; Get character bit
          ASL #4                  ; and shuffle it into the high nibble
          TSB $3F2E               ; Set bit 7 of $3F2E to show that Shock has been used
          PHX : TYA
          LSR
          TAX
          INC $2F30,X             ; Set character's menu to be redrawn

Thanks Subtraction for your input. To those that try to understand and learn ASM, would you mind giving some documentation for the lines you added? (much like the other unmodified lines, just SOME information of what it does would be enough). Thanks!

Reply
#55
Expanding Gogo's menu is one of the line items left for the Full Roster hack. Someone developed add-on code for Beyond Chaos that allowed his menu to scroll, so we know it's possible. It was something GrayShadows was working on before he got too busy.

An alternative is to change the code of HatZen08's "Extra Mimic Slot" hack. That's going to be my backup option.
Projects:
FFVI: Divergent Paths (Completed) - a complete storyline and gameplay hack of FF6 that adds Leo as a playable character
Reply
#56
(09-11-2018, 08:39 AM)Warrax Wrote: To those that try to understand and learn ASM, would you mind giving some documentation for the lines you added?

The original code was doing a TYX (transfer Y to X). Now instead it's a TYA (put Y in A), LSR (shift A to the right (divide A by 2)) and finally transfering A in X (TAX).
Reply
#57
(09-11-2018, 09:15 AM)PowerPanda Wrote: Expanding Gogo's menu is one of the line items left for the Full Roster hack. Someone developed add-on code for Beyond Chaos that allowed his menu to scroll, so we know it's possible. It was something GrayShadows was working on before he got too busy.

An alternative is to change the code of HatZen08's "Extra Mimic Slot" hack. That's going to be my backup option.
A patch already exists that gives Gogo one extra slot?  Where might I find it?
Reply
#58
A patch exists that allows Mimic to be swapped out for another command, and adds Mimic to the list of selectable commands. It also comes with extensive documentation. If you dummy out the half of it that allows Mimic to be swapped out, then you are left with a hack that allows you to add exactly 1 more command to the list. It will take some work though.

The patch can be found here:
https://www.romhacking.net/hacks/1315/
Projects:
FFVI: Divergent Paths (Completed) - a complete storyline and gameplay hack of FF6 that adds Leo as a playable character
Reply
#59
(09-11-2018, 06:28 PM)PowerPanda Wrote: A patch exists that allows Mimic to be swapped out for another command, and adds Mimic to the list of selectable commands. It also comes with extensive documentation. If you dummy out the half of it that allows Mimic to be swapped out, then you are left with a hack that allows you to add exactly 1 more command to the list. It will take some work though.

The patch can be found here:
https://www.romhacking.net/hacks/1315/

Hah, I actually kind of like the idea of being able to swap out mimic - but perhaps that would make Gogo a little bit TOO useful!
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Sabin kick ability Seifer 16 10,166 08-24-2022, 04:00 PM
Last Post: Seifer
  [From Discord] Shock step back C-Dude 0 1,194 01-11-2022, 08:49 PM
Last Post: C-Dude
  Replacing Runic with Shock Jeff 3 3,408 06-09-2021, 09:15 PM
Last Post: PowerPanda
  Shock/Health: Hardcoded animation? Kugawattan 6 6,523 05-16-2017, 06:14 PM
Last Post: Tenkarider
  Runic to Shock PowerPanda 6 7,989 02-20-2017, 06:09 PM
Last Post: Turbotastic
  Shock Location Snap006 3 3,842 06-23-2015, 07:31 AM
Last Post: SSJ Rick
  Runic AND SwdTech to Shock? Royaken 3 3,862 04-06-2014, 12:17 PM
Last Post: Xenovant
  Slot ability modification madsiur 6 9,072 02-17-2012, 08:39 PM
Last Post: madsiur

Forum Jump:


Users browsing this thread: