FF6 Hacking
New Skill ASM help - Printable Version

+- FF6 Hacking (https://www.ff6hacking.com/forums)
+-- Forum: Discussion Forums (https://www.ff6hacking.com/forums/forum-5.html)
+--- Forum: Magitek Research Facility (https://www.ff6hacking.com/forums/forum-9.html)
+--- Thread: New Skill ASM help (/thread-2173.html)



New Skill ASM help - Gi Nattak - 05-26-2013

Old Mantra to New Skill

First of all I have little to no skill with assembly, but what I'm trying to do here is have a skill that damages equal to the users current HP like Mantra, and also throws out a random status ailment out of the ones checked like the Evil Toot skill does, basically combine the two.

In other words, for my Shock skill I have it using the Mantra extra effect set via usme and I want to make a jump now in the Mantra code to do the Evil Toot extra effect as well.

My code:
C2/4263: A9 60 LDA #$60
C2/4265: 9C 14 34 STZ $3414 (Set to not modify damage)
C2/4268: C2 20 REP #$20 (Set 16-bit Accumulator)
C2/426A: B9 18 30 LDA $3018,Y
C2/426D: 20 CB 3B JSR $3BCB (Sets a random status from attack data)
C2/4270: CA DEX
C2/4171: B9 F4 3B LDA $3BF4,Y
C2/4274: 8D B0 11 STA $11B0 (Set damage)
C2/4277: EA EA EA EA EA EA EA EA NOP
C2/427F: 60 RTS

The damage part works fine, the problem I'm having is that the Evil Toot random status is attacking the user/character instead of the monster... It seems to be jumping to the code okay and doing it, but switching the target or getting confused or something.

Any ideas?


RE: New Skill ASM help - Ghost XIII - 05-27-2013

I haven't taken a look at this portion of code myself yet -- just read the topic, and so this suggestion may be wildly unhelpful and painfully obvious -- but have you considered writing your own condition in an unused byte that combines both of these aspects into one function? That would definitely solve your targetting issues.


RE: New Skill ASM help - madsiur - 05-27-2013

The thing is that from what I have seen, no targeting is set in neither of the two skills, so jumping to one skill to another shouldn't make any difference, but maybe you are right Tin Man.

Just an update, I removed the useless code and this would be left (problem still persist):

Code:
C2/4263: 9C 14 34 STZ $3414    (Set to not modify damage)
C2/4266: 20 CB 3B JSR $3BCB    (Sets a random status from attack data)
C2/4269: B9 F4 3B LDA $3BF4,Y  (Load HP)
C2/426C: 8D B0 11 STA $11B0    (Set damage)
C2/426F: 60 RTS