Users browsing this thread: 1 Guest(s)
Just a thought

#1
Posts: 324
Threads: 25
Thanks Received: 13
Thanks Given: 15
Joined: Oct 2013
Reputation: 2
Status
X-Zone
While playing RotDS, I randomly started to think of the Tintina Bar. Would it be possible to alter its coding to where instead restoring HP with every step, it restores your MP. Because I never really had Problem of using Potions or magic to Heal, so I never really used that Relic. I just think it would be more useful if it restored MP instead. Though it would have the potential of breaking the game if you really want to walk that much for free MP restore.


Shine 
  Find
Quote  

#2
Posts: 2,548
Threads: 98
Thanks Received: 147
Thanks Given: 156
Joined: Aug 2009
Reputation: 52
Status
Nattak\'d
It looks like there is actually an unused function that works just like the HP healing Tintinabar, but for MP.
At C0/4A6F it checks for the Tintinabar, and if it is equipped it branches to a jump that goes to C0/AEE8, which is the routine to heal HP (I think).

C0/4A6C: B92316 LDA $1623,Y (Load character's relic 1)
C0/4A6F: C9E5 CMP #$E5 (Is it Tintinabar?)
C0/4A71: F007 BEQ $4A7A (Branch if it is)
C0/4A73: B92416 LDA $1624,Y (Load character's relic 2)
C0/4A76: C9E5 CMP #$E5 (Is it Tintinabar?)
C0/4A78: D019 BNE $4A93 (Branch if it's not)
C0/4A7A: 20E8AE JSR $AEE8
etc.

So I'm guessing that maybe changing that JSR to
$A3AF (C0/AFA3) so it jumps to what looks like the same routine but for MP healing might just work... Or it might not work the same at all, considering it's MP, I'm really not sure. Might fill it to max or something on one step. I should test this before even posting...

EDIT: Okay sadly there must be more to it than this, it doesn't seem to do anything for MP and still heals HP, changed two other instances of $AEE8 but no dice. *slaps self for attempting to answer an assembly-related question*


We are born, live, die and then do the same thing over again.
Quote  

#3
Posts: 149
Threads: 21
Thanks Received: 40
Thanks Given: 3
Joined: Dec 2013
Reputation: 9
Status
Auto-life
You need to change the code related with the healing of the Tintinabar relic. For the Tintinabar, the relevant code for its healing is from C0/4A7A to C0/4A92. It is executed by each step.

I was curious and did a smal code for it. I tested it (rom: English, 1.0, with header) and it apparently works. You can compile it with asar. The code is:

Code:
header
hirom

org     $C04A93
        continue_address:

org     $C04A7A
mp_heal_by_step:
        JSR $AFA3               ;stores max mp at $1E        
        REP #$21                ;set C, clear carry
        LDA $160D,Y             ;current mp
        ADC #$0001              ;add 1
        CMP $1E                 ;check max MP
        BCC .skip               ;set current MP if below max MP
        LDA $1E                 ;load max MP
.skip
        STA $160D,Y             ;save as current mp
        TDC                     ;clear C
        SEP #$20                ;set A
        BRA continue_address    ;continue normal code
warnpc  $C04A93
  Find
Quote  



Forum Jump:

Users browsing this thread: 1 Guest(s)


Theme by Madsiur2017Custom Graphics by JamesWhite