Users browsing this thread: 1 Guest(s)
Disable Jump command if character has Dark status
@Kugawattan requested this, so here goes.
This code is easily extendable to check more commands. It likely conflicts with assassin's Brushless Sketch patch, since they muck with the same tables.
Use xkas 0.06 to assemble this patch.
Update 0.2
Dark sets Fight to spread aiming.
Release 0.1
Dark disables the Jump command.
This code is easily extendable to check more commands. It likely conflicts with assassin's Brushless Sketch patch, since they muck with the same tables.
Use xkas 0.06 to assemble this patch.
Update 0.2
Dark sets Fight to spread aiming.
Release 0.1
Dark disables the Jump command.
Code:
;xkas 0.06
hirom ;don't change this
;header ;uncomment this if your ROM has a header
!freespace = $C2A65A ;change this to where you have free space in C2
!howmanycommands = #$0008
;****************************************************************
;Relocate and expand the command table and function pointer table
;****************************************************************
org !freespace
;(Data - commands that can potentially get grayed out on the menu in battle,
; or have a property like their aiming altered.)
table_Commands:
db $03 ;(Morph)
db $0B ;(Runic)
db $07 ;(SwdTech)
db $0C ;(Lore)
db $17 ;(X-Magic)
db $02 ;(Magic)
db $06 ;(Capture)
db $00 ;(Fight)
;Add commands here... don't forget to update !howmanycommands. For reference:
;00 = Fight 01 = Item 02 = Magic 03 = Morph 04 = Revert
;05 = Steal 06 = Capture 07 = SwdTech 08 = Throw 09 = Tools
;0A = Blitz 0B = Runic 0C = Lore 0D = Sketch 0E = Control
;0F = Slot 10 = Rage 11 = Leap 12 = Mimic 13 = Dance
;14 = Row 15 = Def 16 = Jump 17 = X Magic 18 = GP Rain
;19 = Summon 1A = Health 1B = Shock 1C = Possess 1D = Magitek
db $16 ;(Added command - Jump)
;(Data - addresses of functions to check whether above command should be
; enabled, disabled, or otherwise modified on battle menu)
table_Functions:
dw $5326 ;(Morph)
dw $5322 ;(Runic)
dw $531D ;(SwdTech)
dw $5314 ;(Lore)
dw $5314 ;(X-Magic)
dw $5314 ;(Magic)
dw $5301 ;(Capture)
;dw $5301 ;(Fight)
dw function_Fight ;(Fight)
;Add function pointers here...
dw function_Jump:
;****************************************************************
;Add functions here. If Carry is set, command is disabled.
;For examples, see C2/5301, C2/5314, C2/531D, C2/5322, and C2/5326.
;****************************************************************
;(New function - disable Jump if character has Dark status)
function_Jump:
macro checkDark()
LDA $3EE4,Y ;(Status byte 1)
LSR ;(If Dark is set, disable command slot)
endmacro
%checkDark()
.exit
RTS
;(New function - make Fight spread-aim if character has Dark status)
function_Fight:
%checkDark() ;(or JSR function_Jump if already using that)
BCC .noDark
JMP $5307 ;Skip to set Spread Aim
.noDark
JMP $5301 ;Check for Offering
;****************************************************************
;Modify some function calls to use the new tables' location
;****************************************************************
;Redirect the calling function's pointers to the new tables
org $C252C6
LDX !howmanycommands
CMP table_Commands,X ;(Does our current command match one whose menu
; availability or aiming can vary?)
org $C252D2
JSR (table_Functions,X) ;(Call special function for command)
;****************************************************************
;Update command availability upon setting Dark
;****************************************************************
;Set status pointers ("side effects" to perform upon setting of a status):
org $C246B0
dw $4649 ;(Dark) (Update command availability)
;Clear status pointers ("side effects" to perform upon clearing of a status):
org $C246F0
dw $4649 ;(Dark) (Update command availability)
11-28-2016, 10:09 AM
This is a really cool concept. Great work!
Let's Hack FF6 Stream: https://www.twitch.tv/b_run_
FFVI - Children of Vector: http://www.ff6hacking.com/forums/showthr...p?tid=2386
Monster AI Upgrade Patch: http://www.ff6hacking.com/forums/showthr...p?tid=2673
MMMMMagic 2.0: http://www.ff6hacking.com/forums/showthr...p?tid=3330
11-30-2016, 01:46 PM
Yeah, a lot more can be done with this code than what was intended, I believe. The unmodified game only use functions to change targeting or enable/disable commands, but it should be possible to do a lot more.
12-01-2016, 08:51 AM
I like your structure. flexible code is the best.
Let's Hack FF6 Stream: https://www.twitch.tv/b_run_
FFVI - Children of Vector: http://www.ff6hacking.com/forums/showthr...p?tid=2386
Monster AI Upgrade Patch: http://www.ff6hacking.com/forums/showthr...p?tid=2673
MMMMMagic 2.0: http://www.ff6hacking.com/forums/showthr...p?tid=3330
12-04-2016, 01:03 PM
I've added some functionality to this to further showcase what can be done - Dark status now forces the Fight command to use Offering-style spread aiming. You still only get one attack though!
12-09-2016, 05:23 PM
very impressive
"Sometimes ninjas do wrong to each other, and in dat way the force of tha earf' comes around da moon - and at that presence, da dirt, it overshadows the grass, so you're like, I can't cut dis grass, there's no sun comin' through. So in order to enable each other the two fruits have to look each other in da eye and understand we can only be right, as da ripe is wrong, you know what I mean?"
-HNIC
« Next Oldest | Next Newest »
Users browsing this thread: 1 Guest(s)