Users browsing this thread: 1 Guest(s)
Mug command change

#1
Posts: 315
Threads: 50
Thanks Received: 7
Thanks Given: 25
Joined: Feb 2012
Reputation: 4
Status
None
So some of you may have seen the Locke to gogo thread I made a while back. This is somewhat related, But a different topic.

I'm gonna make "Mug" into Locke's "Fight" and change it's animation. Here's my 2 issues. 1st off, I don't want a notice when I can't steal anything. Is that possible? Like, I just attack and get back in line if nothing is stolen, but it tells me when I steal if I steal?

2nd problem, concerning Locke to gogo, playes can still get rid of the Fight command. Is there a way to make it so Gogo/Locke Can't change "Fight" or "Item"?

Thanx ahead of time for any help! I predict Madsiur will comment 1st xD

Roy-boy
  Find
Quote  

#2
Posts: 3,970
Threads: 279
Thanks Received: 236
Thanks Given: 58
Joined: Oct 2011
Reputation: 65
Status
Tissue-aware
(03-17-2012, 11:34 PM)Roy-boy Wrote: I'm gonna make "Mug" into Locke's "Fight" and change it's animation. Here's my 2 issues. 1st off, I don't want a notice when I can't steal anything. Is that possible? Like, I just attack and get back in line if nothing is stolen, but it tells me when I steal if I steal?

You can attempt to steal any monster if I'm right. The only thing that can happens is that your attempt failed, the monster has nothing or you succeed in your attempt. Do you mean to remove the message if it failed? Or make mug have a fight animation when you fail at stealing and the default animation when it succeed?

In both case it's assembly hacking. Removing the message is possible I think but having a different animation depending if Locke succeed or fail in stealing is only possible if the attempt is calculated before the animation, and that I don't know.

(03-17-2012, 11:34 PM)Roy-boy Wrote: 2nd problem, concerning Locke to gogo, playes can still get rid of the Fight command. Is there a way to make it so Gogo/Locke Can't change "Fight" or "Item"?

This is, once again, related to how that menu behave. Originally, the only skill Gogo can't switch is Mimic but he has access to any other command that the other characters have, including Fight and Item. It could be possible to make Fight and Item like Mimic in a way that it can't be switched. It's assembly hacking.

Edit: Maybe you could try to remove the "Can be mimicked" state (with FF3usME) from fight and Item, but I don't know if that is enough to make them non-switchable or if it's related to that.

I guess I don't bring a lot of answers to your questions but all these things are possible, but the question is how to do it, and that require at the very least to be able to understand a bit assembly and be able to search for the code to change in the dissasemblies. I don't have time to look personally into these things. You can always try Slick Productions, they know at lot of stuff there and you might get a better answer.



  Find
Quote  

#3
Posts: 315
Threads: 50
Thanks Received: 7
Thanks Given: 25
Joined: Feb 2012
Reputation: 4
Status
None
(03-18-2012, 12:13 AM)Madsiur Wrote: Do you mean to remove the message if it failed?

Yes. And if there's nothing to steal. I want fight animation period. Trouble is, I can't find where the fight animation is, nor where the capture animation is...

(03-18-2012, 12:13 AM)Madsiur Wrote: Maybe you could try to remove the "Can be mimicked" state (with FF3usME) from fight and Item, but I don't know if that is enough to make them non-switchable or if it's related to that.

I tried this just now and no, it doesn't make it none switchable.
  Find
Quote  

#4
Posts: 3,970
Threads: 279
Thanks Received: 236
Thanks Given: 58
Joined: Oct 2011
Reputation: 65
Status
Tissue-aware
(03-18-2012, 05:22 AM)Roy-boy Wrote: I want fight animation period. Trouble is, I can't find where the fight animation is, nor where the capture animation is...

That is taken care in C1 from what I've checked. Why don't you change the Capture animation pointer to the same value as the fight animation pointer. The fight animation is sort of the default animation. Most of the command animations jump to that routine eventually but for fight it's a direct jump.

Code:
Function Pointers based on parameter 1 of Battle Dynamics Command 06
(That is, which command will be animated)

        (function)    (value)
C1/B775:    CDBE        (00)         (Fight)
C1/B777:    41BC        (01)        (Item)
C1/B779:    EBAB        (02)        (Magic)
C1/B77B:    E7BB        (03)        (Morph)
C1/B77D:    DCBB        (04)        (Revert)
C1/B77F:    87BB        (05)        (Steal)
C1/B781:    A5BB        (06)        (Capture)
C1/B783:    8DB9        (07)        (SwdTech)
C1/B785:    C5B9        (08)        (Throw)
C1/B787:    13BC        (09)        (Tools)
C1/B789:    1AB9        (0A)        (Blitz)
C1/B78B:    AABA        (0B)        (Runic)
C1/B78D:    E5B8        (0C)        (Lore)
C1/B78F:    E8B9        (0D)        (Sketch)
C1/B791:    54BB        (0E)        (Control)
C1/B793:    00B9        (0F)        (Slot)
C1/B795:    2BBB        (10)        (Rage)
C1/B797:    76BB        (11)        (Leap)
C1/B799:    88BC        (12)        (Mimic) (exits)
C1/B79B:    12BB        (13)        (Dance)
C1/B79D:    0AB8        (14)        (Row)
C1/B79F:    88BC        (15)        (Def.) (exits)
C1/B7A1:    F7B9        (16)        (Jump)
C1/B7A3:    EBAB        (17)        (X-Magic)
C1/B7A5:    EDBB        (18)        (GP Rain)
C1/B7A7:    EBAB        (19)        (Summon)
C1/B7A9:    62BB        (1A)        (Health)
C1/B7AB:    49BB        (1B)        (Shock)
C1/B7AD:    9CBA        (1C)        (Possess)
C1/B7AF:    C3B7        (1D)        (Magitek)


I found something for your message display. $3401 holds in C1 the text number to display. If the text number is #$FF, it will not display a message. The routine is called every time an action is made by a character or a monster:

Code:
C2/3248: E2 20        SEP #$20
C2/324A: 20 91 43     JSR $4391  
C2/324D: 20 3E 36     JSR $363E  
C2/3250: AD 01 34     LDA $3401        (load message to display)
C2/3253: C9 FF        CMP #$FF        (compare to #$FF)
C2/3255: F0 0B        BEQ $3262        (branch if equal to #$FF)
C2/3257: EB           XBA
C2/3258: A9 02        LDA #$02
C2/325A: 20 BF 62     JSR $62BF        (Display message)  
C2/325D: A9 FF        LDA #$FF        
C2/325F: 8D 01 34     STA $3401        (set message number to nothing after display)
C2/3262: AD A7 11     LDA $11A7        (you jumped here if you message equaled #$FF)
C2/3265: 89 02        BIT #$02
C2/3267: F0 0C        BEQ $3275  
C2/3269: E0 08        CPX #$08
C2/326B: 90 08        BCC $3275
C2/326D: A5 B6        LDA $B6
C2/326F: EB           XBA
C2/3270: A9 02        LDA #$02
C2/3272: 20 BF 62     JSR $62BF
C2/3275: A9 FF        LDA #$FF
C2/3277: 8D 14 34     STA $3414
C2/327A: 8D 15 34     STA $3415
C2/327D: 8D 1C 34     STA $341C
C2/3280: AD 83 3A     LDA $3A83
C2/3283: 30 03        BMI $3288
C2/3285: 8D 16 34     STA $3416
C2/3288: FA           PLX
C2/3289: CE 70 3A     DEC $3A70
C2/328C: 30 03        BMI $3291
C2/328E: F4 7A 31     PEA $317A
C2/3291: 60           RTS

So if we take the steal function (which is called for capture as well I think), message number 01 is "Doesn't have anything", 02 is "Couldn't steal" and 03 is "Stole something" . So you you start with a LDA #$FF instead of the LDA #$01 at C2/39A1 and keep that #$FF at C2/39B4 by simply removing the INC and put a LDA #$03 followed by a STA $3401 instead of the INC at C2/39FD to have 03 as the text to display value if you succeed in stealing. You have enough place to make the code changes and nothing else needs to be modified. Note that it will affect the steal command too because the two commands are tied together.

Code:
Steal function

C2/399E: A3 05        LDA $05,S
C2/39A0: AA           TAX
C2/39A1: A9 01        LDA #$01
C2/39A3: 8D 01 34     STA $3401   (=1)
C2/39A6: E0 08        CPX #$08    (Check if monster)
C2/39A8: B0 5F        BCS $3A09   (Branch if monster)
C2/39AA: C2 20        REP #$20    (Set 16-bit accumulator)
C2/39AC: B9 08 33     LDA $3308,Y (Target's stolen item?)
C2/39AF: 1A           INC
C2/39B0: E2 21        SEP #$21    (Set 8-bit Accumulator)
C2/39B2: F0 4D        BEQ $3A01   (Fail to steal if no items)
C2/39B4: EE 01 34     INC $3401   (now = 2)
C2/39B7: BD 18 3B     LDA $3B18,X (Attacker's Level)
C2/39BA: 69 32        ADC #$32
C2/39BC: B0 1A        BCS $39D8   (Automatically steal if level > 205))
C2/39BE: F9 18 3B     SBC $3B18,Y (Target's Level)
C2/39C1: 90 3E        BCC $3A01   (Fail to steal if target level > attacker level + 50)
C2/39C3: 30 13        BMI $39D8   (Automatically steal if attacker level + 50 - target level >= 128)
C2/39C5: 85 EE        STA $EE     (Attacker's level + 50 - target's level)
C2/39C7: BD 45 3C     LDA $3C45,X
C2/39CA: 4A           LSR
C2/39CB: 90 02        BCC $39CF   (If no sneak ring)
C2/39CD: 06 EE        ASL $EE     (Double value)
C2/39CF: A9 64        LDA #$64
C2/39D1: 20 65 4B     JSR $4B65   (0 to 99)
C2/39D4: C5 EE        CMP $EE
C2/39D6: B0 29        BCS $3A01   (Fail to steal)
C2/39D8: 5A           PHY
C2/39D9: 20 5A 4B     JSR $4B5A   (0 to 255)
C2/39DC: C9 20        CMP #$20
C2/39DE: 90 01        BCC $39E1
C2/39E0: C8           INY
C2/39E1: B9 08 33     LDA $3308,Y (Target's stolen item? (second byte))
C2/39E4: 7A           PLY
C2/39E5: C9 FF        CMP #$FF    (If no item)
C2/39E7: F0 18        BEQ $3A01   (Fail to steal)
C2/39E9: 8D 35 2F     STA $2F35   (Item stolen)
C2/39EC: 9D F4 32     STA $32F4,X
C2/39EF: BD 18 30     LDA $3018,X
C2/39F2: 0C 8C 3A     TSB $3A8C
C2/39F5: A9 FF        LDA #$FF
C2/39F7: 99 08 33     STA $3308,Y  (Set to no item to steal)
C2/39FA: 99 09 33     STA $3309,Y  (in both slots)
C2/39FD: EE 01 34     INC $3401    (now = 3)
C2/3A00: 60           RTS

Edit: It works!
For your second problem I found the code to change. The next part of code make a command to not appear in Gogo's special menu. It'S from the routine that build the menu. So you could change the CMP #$12 to CMP #$00 to not display fight in the special menu. You could have another set of CMP followed by the same BEQ to remove another command. The problem is that there is not enough place to write extra code so you would need to jump at the end of C3 with a JMP to add any other command to the non displayable ones in the special menu.

Code:
C3/5E44:    BF099E7E    LDA $7E9E09,X  (load command?)
C3/5E48:    3016        BMI $5E60
C3/5E4A:    C912        CMP #$12       (is command Mimic?)
C3/5E4C:    F012        BEQ $5E60      (branch if so)
C3/5E4E:    85E0        STA $E0
C3/5E50:    0A          ASL A
C3/5E51:    AA          TAX
C3/5E52:    BF00FECF    LDA $CFFE00,X  (load command info)

The next portion of code make Mimic non switchable. Same thing here: You could add another CMP with another BEQ for any additional command but there is no place where the code is now. There is free space at the end of C3. You need to change the 2 portions of code I'm showing you because you could end up with the four same non switchable command in your character menu if you can select that command in the special menu. You can always transfer a command from the special menu to the character menu but not the opposite if the command is "non switchable". That's why that command needs to not appear in the special menu.

Code:
C3/2282:    E220        SEP #$20      (8 bit memory/accum.)
C3/2284:    B91600      LDA $0016,Y    (unmodified commands)
C3/2287:    C912        CMP #$12       (is command Mimic?)
C3/2289:    F028        BEQ $22B3      (branch to RST)
  Find
Quote  

#5
Posts: 315
Threads: 50
Thanks Received: 7
Thanks Given: 25
Joined: Feb 2012
Reputation: 4
Status
None
Wow Madsiur! Thanx again! I'' test it out the moment I get a free minute. Thanx for always being so helpful!

EDIT: I'm having some trouble here...

(03-18-2012, 06:33 AM)Madsiur Wrote: That is taken care in C1 from what I've checked. Why don't you change the Capture animation pointer to the same value as the fight animation pointer. The fight animation is sort of the default animation. Most of the command animations jump to that routine eventually but for fight it's a direct jump.

Code:
Function Pointers based on parameter 1 of Battle Dynamics Command 06
(That is, which command will be animated)

        (function)    (value)
C1/B775:    CDBE        (00)         (Fight)
C1/B777:    41BC        (01)        (Item)
C1/B779:    EBAB        (02)        (Magic)
C1/B77B:    E7BB        (03)        (Morph)
C1/B77D:    DCBB        (04)        (Revert)
C1/B77F:    87BB        (05)        (Steal)
C1/B781:    A5BB        (06)        (Capture)
C1/B783:    8DB9        (07)        (SwdTech)
C1/B785:    C5B9        (08)        (Throw)
C1/B787:    13BC        (09)        (Tools)
C1/B789:    1AB9        (0A)        (Blitz)
C1/B78B:    AABA        (0B)        (Runic)
C1/B78D:    E5B8        (0C)        (Lore)
C1/B78F:    E8B9        (0D)        (Sketch)
C1/B791:    54BB        (0E)        (Control)
C1/B793:    00B9        (0F)        (Slot)
C1/B795:    2BBB        (10)        (Rage)
C1/B797:    76BB        (11)        (Leap)
C1/B799:    88BC        (12)        (Mimic) (exits)
C1/B79B:    12BB        (13)        (Dance)
C1/B79D:    0AB8        (14)        (Row)
C1/B79F:    88BC        (15)        (Def.) (exits)
C1/B7A1:    F7B9        (16)        (Jump)
C1/B7A3:    EBAB        (17)        (X-Magic)
C1/B7A5:    EDBB        (18)        (GP Rain)
C1/B7A7:    EBAB        (19)        (Summon)
C1/B7A9:    62BB        (1A)        (Health)
C1/B7AB:    49BB        (1B)        (Shock)
C1/B7AD:    9CBA        (1C)        (Possess)
C1/B7AF:    C3B7        (1D)        (Magitek)

I get to C1/B781, I find function A5BB, but I can't find the value 06. Do I just change the function?

EDIT 2: Got it, now just trying to solidify it in the menu

EDIT 3: I did it! Changed name of "Capture" to "Fight" so you don't know the difference, set the animation to fight, took off the displayed messages of didn't steal or couldn't steal, and Capture/Fight is now locked in the menu! This solves my Locke to Gogo issue completely and will now allow me to get past the Figaro scenerio!
  Find
Quote  

#6
Posts: 315
Threads: 50
Thanks Received: 7
Thanks Given: 25
Joined: Feb 2012
Reputation: 4
Status
None
Not sure about the double post rules, I mean It's been a while since I posted my message here xD.

Basically I was hoping I could kinda get a refresh on this. I'm reading it but I'm not getting it right. I can't seem to find out what it was I did last time that got me to understand. I think I may be putting things in the wrong spot or not understanding as well as I had before Madsiur. Any help?

EDIT: This is what I am "getting"

C2/39A1: A9 01 --> A9 FF
C2/39B4: EE 01 34 --> EA A9 03 or A9 03 EA
C2/39FD: EE 01 34 --> 99 01 34 or 8D 01 34

So far nothing has worked and I feel I am more than likely doing something wrong here :/


[Image: 5452812CeqVF.png]
[Image: RoyakenGif_zpsacedef24.gif]
  Find
Quote  

#7
Posts: 398
Threads: 49
Thanks Received: 15
Thanks Given: 11
Joined: Jan 2012
Reputation: 12
Status
Mental-Break
Sorry to necro an old thread but wanted try this capture out n see what it looks like..  I am confused in what to put into hex

C1/B781 A5 BB  -> CD BE  (capture to regular attack pointer)
C2/39A1 A9 01 -> A9 FF
C2/39B4 EE 01 34 -> EA? A9 03
C2/39FD EE 01 34 -> 99 01 34

Do you remove the INC by putting EA?



retesting this way

C1/B781 A5 BB  -> CD BE  (capture to regular attack pointer)
C2/39A1 A9 01 -> A9 FF
C2/39B4 EE 01 34 -> FF A9 03
C2/39FD EE 01 34 -> 8D 01 34
  Find
Quote  

#8
Posts: 676
Threads: 44
Thanks Received: 26
Thanks Given: 21
Joined: Jan 2015
Reputation: 11
Status
Zombie
I can't make any sence of it right now, but I do have this working code in my notebook that is not with me right now. If it hasn't been straightened out by the time I get back to my notebook I'll see whqt I've got.


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



Forum Jump:

Users browsing this thread: 1 Guest(s)


Theme by Madsiur2017Custom Graphics by JamesWhite