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

#4
Posts: 3,971
Threads: 279
Thanks Received: 238
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  



Messages In This Thread
Mug command change - by Royaken - 03-17-2012, 11:34 PM
RE: Mug command change - by madsiur - 03-18-2012, 12:13 AM
RE: Mug command change - by Royaken - 03-18-2012, 05:22 AM
RE: Mug command change - by madsiur - 03-18-2012, 06:33 AM
RE: Mug command change - by Royaken - 03-18-2012, 06:17 PM
RE: Mug command change - by Royaken - 03-12-2014, 01:55 AM
RE: Mug command change - by Badass - 02-12-2016, 04:44 AM
RE: Mug command change - by Catone - 02-12-2016, 07:09 AM

Forum Jump:

Users browsing this thread: 1 Guest(s)


Theme by Madsiur2017Custom Graphics by JamesWhite