Users browsing this thread: 1 Guest(s)
Shock Ability

#51
Posts: 614
Threads: 49
Thanks Received: 0
Thanks Given: 4
Joined: Feb 2017
Reputation: 25
Status
None
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
  Find
Quote  

#52
Posts: 51
Threads: 5
Thanks Received: 2
Thanks Given: 0
Joined: Apr 2018
Reputation: 8
Status
Shell
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
  Find
Quote  
[-] The following 1 user says Thank You to Subtraction for this post:
  • PowerPanda (09-11-2018)

#53
Posts: 311
Threads: 20
Thanks Received: 0
Thanks Given: 0
Joined: Dec 2017
Reputation: 2
Status
None
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.
  Find
Quote  

#54
Posts: 208
Threads: 3
Thanks Received: 0
Thanks Given: 8
Joined: May 2013
Reputation: 0
Status
None
(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!



  Find
Quote  

#55
Posts: 614
Threads: 49
Thanks Received: 0
Thanks Given: 4
Joined: Feb 2017
Reputation: 25
Status
None
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
  Find
Quote  

#56
Posts: 3,966
Threads: 279
Thanks Received: 234
Thanks Given: 56
Joined: Oct 2011
Reputation: 65
Status
Tissue-aware
(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).
  Find
Quote  
[-] The following 1 user says Thank You to madsiur for this post:
  • Warrax (09-11-2018)

#57
Posts: 311
Threads: 20
Thanks Received: 0
Thanks Given: 0
Joined: Dec 2017
Reputation: 2
Status
None
(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?
  Find
Quote  

#58
Posts: 614
Threads: 49
Thanks Received: 0
Thanks Given: 4
Joined: Feb 2017
Reputation: 25
Status
None
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
  Find
Quote  

#59
Posts: 311
Threads: 20
Thanks Received: 0
Thanks Given: 0
Joined: Dec 2017
Reputation: 2
Status
None
(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!
  Find
Quote  



Forum Jump:

Users browsing this thread: 1 Guest(s)


Theme by Madsiur2017Custom Graphics by JamesWhite