Hi. I'm a fan of your rom hack because it actually fixes the game. I'm using it as sort of a building base for some additional modding I'm doing to the game. I'm writing to ask you a favor, or at least a question. How easy is it for you to alter a move's critical hit ratio and priority? The reason I'm asking is because I'm altering moves with a tool and it's unable to do any of these. I'm specifically looking to increase critical hit ratio on Cut and increase move priority on Swift like it does for Slash and Quick Attack respectfully. I understand it might be a hard coding situation, but I don't know how to code, so I can't figure this out myself. Since I'm using your hack as a base I figured this is a good place to start asking for help. If you can, or if you know anyone else who can figure this thing out for me instead, I'd love the assistance either way. Again, I like this mod a lot. Keep up the good work and I hope to see a reply soon.
The code that handled these things use to be kinda messy. I ended up simplifying both these things a bit when fixing issues with critical hits and the move Counter. It is now very easy to do.
Your list of move constants is going to be in "/constants/move_constants.asm", so leave that file open in a side window and use it as a reference.
To set move priority, go to "custom_functions/func_battle.asm" and look at these functions:
Code:
LowPriorityMoves:
cp COUNTER
; ret z
; cp BIND
; ret z
; cp WRAP
; ret z
; cp FIRE_SPIN
; ret z
; cp CLAMP
ret
Code:
HighPriorityMoves:
cp QUICK_ATTACK
; ret z
; cp DUMMY_MOVE1
; ret z
; cp DUMMY_MOVE2
; ret z
; cp DUMMY_MOVE3
; ret z
; cp DUMMY_MOVE4
ret
You'll see there are lines I have removed (aka commented out) by using the ";" character (makes everything after it treated as a comment to be ignored by the compiler). Simply un-comment two lines at a time and replace the move constant with that of your choice. Making Swift a high priority move would look like this:
Code:
HighPriorityMoves:
cp QUICK_ATTACK
ret z
cp SWIFT
; ret z
; cp DUMMY_MOVE2
; ret z
; cp DUMMY_MOVE3
; ret z
; cp DUMMY_MOVE4
ret
As you might be able to guess, you can add as many moves as rom space will permit by copy-pasting lines.
Now for high-crit moves, you want to go to the "engine/battle/core.asm" file and go to this function:
Code:
HighCriticalMoves:
db KARATE_CHOP
db RAZOR_LEAF
db CRABHAMMER
db SLASH
db $FF
As you can see, it's just a list of move constants with FF as an end-of-list signifier. Just add CUT to the list as such:
Code:
HighCriticalMoves:
db KARATE_CHOP
db RAZOR_LEAF
db CRABHAMMER
db SLASH
db CUT
db $FF
Rom space in the core battle file is really tight. You don't have a lot of extra bytes to add moves. You might want to find the "UnusedHighCriticalMoves:" list and comment that whole list out like so:
Code:
;UnusedHighCriticalMoves:
;db KARATE_CHOP
;db RAZOR_LEAF
;db CRABHAMMER
;db SLASH
;db $FF
That should give you a little more wiggle-room.