Users browsing this thread: 1 Guest(s)
What makes Spears do double damage on Jump?

#1
Posts: 378
Threads: 94
Thanks Received: 17
Thanks Given: 26
Joined: Jul 2013
Reputation: 11
Status
Charmed
Basically what the title says. I turned a few Kunai into Spears, but I can't find what makes a Spear do double damage on jump, at least on FFusME, as on the item editor there doesn't seem to be any option checked that is different from the non-spear weapons.

Also, I'm making half of the recent threads here :D


Step forward, spriters! We are also responsible to make hacks look new and fresh, we are no less important than code or ASM hackers! CHARGE!!
Quote  

#2
Posts: 2,549
Threads: 98
Thanks Received: 147
Thanks Given: 159
Joined: Aug 2009
Reputation: 52
Status
Nattak\'d
Anything in-battle related is handled in the C2 bank, so I'd look in the C2 disassembly first.
Searching for 'spear' brought up this:

Set $BD to 2 if A is between #$1D and #$24 (inclusive)
Increment damage if weapon is spear

C2/1512: C9 1D CMP #$1D
C2/1514: 90 08 BCC $151E (Exit)
C2/1516: C9 25 CMP #$25
C2/1518: B0 04 BCS $151E (Exit)
C2/151A: A9 02 LDA #$02
C2/151C: 85 BD STA $BD
C2/151E: 60 RTS

Then you can see from more instances of 'spear' searching that the STA $BD (the stored incremental damage) is placed in the Jump code:

C2/1817: 20 12 15 JSR $1512 (Set $BD to 2 if spear)
C2/181A: BD A9 3C LDA $3CA9,X (Weapon in left hand)
C2/181D: 20 12 15 JSR $1512 (Set $BD to 2 if spear)

So that's basically how it's done. How to go about changing it to another weapon though, I'm not exactly sure except some value in the 'Increment damage if weapon is spear' code must be set to spear. Maybe someone else can help clarify this more.

EDIT: What are you trying to do though exactly, change it to another weapon? Remove it?
If you want to just remove it, I'd imagine just NOP (EA byte) the two JSR there in the jump code would do that.

Oh and in case you are not sure where to find these disassemblys, you can find them on Slick Productions site here:
http://www.slickproductions.org/docs.php?id=FF6


We are born, live, die and then do the same thing over again.
Quote  
[-] The following 1 user says Thank You to Gi Nattak for this post:
  • Robo Jesus (07-10-2015)

#3
Posts: 1,633
Threads: 56
Thanks Received: 13
Thanks Given: 84
Joined: Apr 2014
Reputation: 12
Status
Atma
Just saying... any chance the game detects if in the first character of weapon's name there's Spear icon?


THE GREATEST CHALLENGE OF ALL TIMES AWAITS:
http://www.ff6hacking.com/forums/showthr...p?tid=2593
DO YOU HAVE WHAT IT TAKES TO SLAY A GOD?
------------------------------------------------------------------------
Tenkarider's project #2 is started: FF6 Curse of the Madsiur Joke (CotMJ)
http://www.ff6hacking.com/forums/showthr...p?tid=2755
What happens when Madsiur tweaks your account? This full game hack will show that!
  Find
Quote  

#4
Posts: 52
Threads: 5
Thanks Received: 24
Thanks Given: 0
Joined: Jun 2010
Reputation: 6
Status
None
What the game is doing at C2/1512 is checking the actual item number of your equipped weapon to see if it's in the range that the spears fall in; items 29-36.
If you want to have more weapons count as spears for jumping, it would be easiest if all of them were still lumped in one continuous section of the item list so that you could simply change the values in the function to match the new range.

Code:
C2/1512: C9 1D CMP #$1D   <-item number of first spear
C2/1514: 90 08 BCC $151E (Exit if item number less than first spear)
C2/1516: C9 25 CMP #$25   <-item number of last spear +1
C2/1518: B0 04 BCS $151E (Exit if item number greater than last spear)
C2/151A: A9 02 LDA #$02
C2/151C: 85 BD STA $BD
C2/151E: 60 RTS
Quote  
[-] The following 3 users say Thank You to Drakkhen for this post:
  • Gi Nattak (07-09-2015), Kugawattan (03-14-2016), Robo Jesus (07-10-2015)



Forum Jump:

Users browsing this thread: 1 Guest(s)


Theme by Madsiur2017Custom Graphics by JamesWhite