Users browsing this thread: 1 Guest(s)
Some final code requests (and screenshots)

Posts: 226
Threads: 16
Thanks Received: 10
Thanks Given: 35
Joined: Dec 2017
Reputation: 2
Status
None
(05-11-2019, 07:58 PM)Subtraction Wrote:
(05-11-2019, 04:17 PM)madsiur Wrote: Well in that case, use a debugger and set a breakpoint at C2/566E to see if the code is executed when you use step mine.

To be clear, this code is run at the start of a battle, not when you use step mine.

The reason it didn't work is because you're using a 1.1 ROM, and I gave you the code for 1.0. Searching the 1.1 ROM for "E0 44 00 D0 09", the code I quoted  appears to start at C2/586E in 1.1.

Ahh, you are correct about the code being run at the start of the battle.  I actually did modify the correct code, because I simply searched for the code you gave me rather than look for the address (I prefer doing it that way unless I can't find it in a search).

The really strange thing here is that the MP usage for Step Mine is correct in-battle (54), but when I go through the menu and look at Step mine, it still says 108...  This is why I was confused, and I don't know why the MP usage of Step Mine in the menu is not updating!
  Find
Quote  

Posts: 22
Threads: 3
Thanks Received: 33
Thanks Given: 0
Joined: Apr 2018
Reputation: 2
Status
Shell
(05-12-2019, 01:09 AM)Lightning Wrote: The really strange thing here is that the MP usage for Step Mine is correct in-battle (54), but when I go through the menu and look at Step mine, it still says 108...  This is why I was confused, and I don't know why the MP usage of Step Mine in the menu is not updating!

Ah, that explains it then. I wasn't even thinking about the menu. To make it show correctly in the menu, you have to change a different bit of code.
Code:
Fork: Step Mine
C3/511A:    68          PLA            ; Spell
C3/511B:    C999        CMP #$99       ; Step Mine?
C3/511D:    D00F        BNE $512E      ; Branch if not
C3/511F:    AD1B02      LDA $021B      ; Hours played
C3/5122:    0A          ASL A          ; Double them
C3/5123:    85E0        STA $E0        ; Set MP cost
C3/5125:    AD1C02      LDA $021C      ; Minutes played
C3/5128:    C91E        CMP #$1E       ; Under 30?
C3/512A:    9002        BCC $512E      ; Branch if so
C3/512C:    E6E0        INC $E0        ; MP cost +1
  Find
Quote  
[-] The following 1 user says Thank You to Subtraction for this post:
  • Lightning (05-13-2019)

Posts: 3,615
Threads: 264
Thanks Received: 664
Thanks Given: 270
Joined: Oct 2011
Reputation: 60
Status
Faith
And to be clear, to halve the MP cost in menu and just retain Hours as MP cost, NOP the ASL A at $C35122 and $C35125 to $C3512D.



  Find
Quote  
[-] The following 1 user says Thank You to madsiur for this post:
  • Lightning (05-13-2019)

Posts: 226
Threads: 16
Thanks Received: 10
Thanks Given: 35
Joined: Dec 2017
Reputation: 2
Status
None
I think that did the trick guys, thanks!
  Find
Quote  

Posts: 226
Threads: 16
Thanks Received: 10
Thanks Given: 35
Joined: Dec 2017
Reputation: 2
Status
None
Is there a way to have a weapon randomly cast something else other than basic magic? In FF3USME, it only lets you select magic (other than the specific wind slash effect in the drop down menu). I would like to have something else casted randomly, like sand storm or Aero. Can this be done merely by hacking a byte somewhere, or is there more to it?
  Find
Quote  

Posts: 3,615
Threads: 264
Thanks Received: 664
Thanks Given: 270
Joined: Oct 2011
Reputation: 60
Status
Faith
(05-19-2019, 10:03 PM)Lightning Wrote: Is there a way to have a weapon randomly cast something else other than basic magic?  In FF3USME, it only lets you select magic (other than the specific wind slash effect in the drop down menu).  I would like to have something else casted randomly, like sand storm or Aero.  Can this be done merely by hacking a byte somewhere, or is there more to it?

It only allow 64 choice; player spells and a few Espers spells. The highest two bits are used for something else so you can't have 256 choices of spells or attacks.
If you want a different range of available spells, you could add a ADC #$XX in the code below. If you add $60, you would have access to spells $60 to $9F. Another thing you could do is add exceptions, like if the spell ID is X or Y, load Aero or Sandstorm instead.

Code:
C2/10F4: BF 12 50 D8  LDA $D85012,X  (random weapon spellcast)
// add here ADC #$XX
C2/10F8: 99 B4 11     STA $11B4,Y



  Find
Quote  
[-] The following 1 user says Thank You to madsiur for this post:
  • Lightning (05-20-2019)

Posts: 22
Threads: 3
Thanks Received: 33
Thanks Given: 0
Joined: Apr 2018
Reputation: 2
Status
Shell
(05-19-2019, 10:03 PM)Lightning Wrote: Is there a way to have a weapon randomly cast something else other than basic magic?  In FF3USME, it only lets you select magic (other than the specific wind slash effect in the drop down menu).  I would like to have something else casted randomly, like sand storm or Aero.  Can this be done merely by hacking a byte somewhere, or is there more to it?

I've actually made a patch for this: https://www.ff6hacking.com/forums/thread-3754.html

It's a little awkward to work with in FF3usME, though. The patch makes the game use the two ?s below Swdtech in the properties byte for "randomly cast" and "destroy if used". Then the "randomly cast" and "destroy if used" checkboxes set the top two bits of the break/proc spell. So, for example, if you wanted to make an item break for Aero (spell 0x8f), you have to select the spell Flare (0x0f) and then check the "destroy if used" checkbox to add 0x80 to that.

To use the patch, you would also have to go through all of the items in FF3usME and manually move any checks in those boxes to the ?s in the properties byte.

Oh, also, if you try to make a weapon proc for a Blitz, Swdtech, Bio Blast, Flash, Chocobop, H-bomb, or 7-Flush, it'll not use the correct animation and in some cases softlock. It's fine to make items break for those though.
  Find
Quote  
[-] The following 1 user says Thank You to Subtraction for this post:
  • Lightning (05-21-2019)

Posts: 226
Threads: 16
Thanks Received: 10
Thanks Given: 35
Joined: Dec 2017
Reputation: 2
Status
None
(05-21-2019, 05:14 AM)Subtraction Wrote:
(05-19-2019, 10:03 PM)Lightning Wrote: Is there a way to have a weapon randomly cast something else other than basic magic?  In FF3USME, it only lets you select magic (other than the specific wind slash effect in the drop down menu).  I would like to have something else casted randomly, like sand storm or Aero.  Can this be done merely by hacking a byte somewhere, or is there more to it?

I've actually made a patch for this: https://www.ff6hacking.com/forums/thread-3754.html

It's a little awkward to work with in FF3usME, though. The patch makes the game use the two ?s below Swdtech in the properties byte for "randomly cast" and "destroy if used". Then the "randomly cast" and "destroy if used" checkboxes set the top two bits of the break/proc spell. So, for example, if you wanted to make an item break for Aero (spell 0x8f), you have to select the spell Flare (0x0f) and then check the "destroy if used" checkbox to add 0x80 to that.

To use the patch, you would also have to go through all of the items in FF3usME and manually move any checks in those boxes to the ?s in the properties byte.

Oh, also, if you try to make a weapon proc for a Blitz, Swdtech, Bio Blast, Flash, Chocobop, H-bomb, or 7-Flush, it'll not use the correct animation and in some cases softlock. It's fine to make items break for those though.

By the way, when I compile the code, it says line 16: invalid opcode or command [BMI $274A]".
Is this something I should be concerned about?  The patch seems to work fine, but I don't want any bugs...
  Find
Quote  

Posts: 22
Threads: 3
Thanks Received: 33
Thanks Given: 0
Joined: Apr 2018
Reputation: 2
Status
Shell
(05-21-2019, 04:45 PM)Lightning Wrote: By the way, when I compile the code, it says line 16: invalid opcode or command [BMI $274A]".
Is this something I should be concerned about?  The patch seems to work fine, but I don't want any bugs...
Weird, I thought I fixed that. Maybe I put up an old version. Just change this bit
Code:
org $C22743
BMI load_spell_number

org $C2274A
load_spell_number:
LDA $3410        ; load spell number
  Find
Quote  

Posts: 226
Threads: 16
Thanks Received: 10
Thanks Given: 35
Joined: Dec 2017
Reputation: 2
Status
None
(05-25-2019, 06:14 PM)Subtraction Wrote:
(05-21-2019, 04:45 PM)Lightning Wrote: By the way, when I compile the code, it says line 16: invalid opcode or command [BMI $274A]".
Is this something I should be concerned about?  The patch seems to work fine, but I don't want any bugs...
Weird, I thought I fixed that. Maybe I put up an old version. Just change this bit
Code:
org $C22743
BMI load_spell_number

org $C2274A
load_spell_number:
LDA $3410        ; load spell number

So I am just curious, what does this line do?  I have been using your old code for days now without any issues.  Do I really need to revert back to apply this one line? I already created an .ips patch with some of my changes, after all.
  Find
Quote  



Forum Jump:

Users browsing this thread: 1 Guest(s)


Theme by Madsiur2017Custom Graphics by JamesWhite