Boomerang & Sniper 75% - 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: Boomerang & Sniper 75% (/thread-3959.html) Pages:
1
2
|
Boomerang & Sniper 75% - doofenH - 02-17-2020 Anyone know how to change these above weapon from 50% chance of 300% dmg to floating targets to 75%? Or 400-500% dmg instead? Or remove the 150% to non-floating effect, and instead 100% chance to inflict high dmg if target is floating? RE: Boomerang & Sniper 75% - Subtraction - 02-18-2020 Here's the code for Sniper/Hawk Eye: Code: C2/38FE: 20 53 4B JSR $4B53 (random: 0 or 1 in Carry flag) If you want to change the odds, write a subroutine similar to C2/4B53 that sets the carry 75% of the time instead of 50%. If you want it to do more damage, you could add more "INC $BC"s, but that'd take up more space and you'd have to move some or all of the code to a subroutine. It's probably better to just replace the "INC $BC"s with something like "LDA $BC, ADC #$05, STA $BC" If you want to remove the effect for non-floating enemies but give a 100% on floating enemies, remove "LDA $3EF9,Y BPL $38FD" and move the first INC $BC down below the floating check, like this (I haven't tested it, but it should work.): Code: hirom RE: Boomerang & Sniper 75% - doofenH - 02-18-2020 (02-18-2020, 04:07 AM)Subtraction Wrote:Do you happened to know the header !freespace = ********** It seem like I need this part above the asm. RE: Boomerang & Sniper 75% - madsiur - 02-18-2020 (02-18-2020, 09:28 AM)doofenH Wrote: It seem like I need this part above the asm. "header" instruction is only needed at the top if you ROM has a header. "!freespace" is only a tag used to specify an offset, you don't need it here since there is no other offset to specify, the code doesn't take extra space and is all contained within the "org $C238FE". RE: Boomerang & Sniper 75% - doofenH - 02-18-2020 (02-18-2020, 09:34 AM)madsiur Wrote:(02-18-2020, 09:28 AM)doofenH Wrote: It seem like I need this part above the asm. Still have problem & this is the result. error.patch.asm: Invalid opcode or command BPL $38FD ; (Exit if not target not Floating) BNE $38FD ; (Exit if command not Fight?) RE: Boomerang & Sniper 75% - madsiur - 02-18-2020 You need to add tags and label your branches: Code: org $C238FD RE: Boomerang & Sniper 75% - doofenH - 02-18-2020 (02-18-2020, 09:58 AM)madsiur Wrote: You need to add tags and label your branches:Now the error are the BPL branch1, BNE branch 1, JMP branch2. header org $C238FE org $C238FD branch1: org $C235BB branch2: LDA $3EF9,Y BPL branch1 $38FD ; (Exit if not target not Floating) INC $BC ; (Add 1 to damage incrementor; this keeps the behavior the same for cases where you attack ; a flying enemy with a command other than fight, but you can move it down with the others ; if you don't care about that. LDA $B5 CMP #$00 BNE branch1 $38FD ; (Exit if command not Fight?) INC $BC INC $BC INC $BC ; (Add another 3 to damage incrementor) LDA #$08 STA $B5 ; (Store Throw for *purposes of animation*) LDA $B7 ; (get graphic index) DEC STA $B6 ; (undo earlier adjustment, save as Throw parameter) JMP branch2 $35BB ; (Update a previous entry in ($76) animation buffer ; with data in $B4 - $B7) (02-18-2020, 04:07 AM)Subtraction Wrote: If you want to change the odds, write a subroutine similar to C2/4B53 that sets the carry 75% of the time instead of 50%. I don't get the "ADC #$05", I assume the 05 is the dmg x5, but what is "ADC" in hex? Which game spec docs do I find this? RE: Boomerang & Sniper 75% - madsiur - 02-18-2020 You need to remove the "$35BB" and "$38FD" from the lines and just leave the "branch1" and "branch2" like my example above. You also need to leave the "org $C238FE" above the LDA $3EF8,Y. Edit: Just use this: Code: hirom RE: Boomerang & Sniper 75% - doofenH - 02-18-2020 It work. Tq madsiur & subtraction. This one below is without checking the floating tgt & max dmg all the time. header org $C238FD branch1: org $C238FE INC $BC ; (Add 1 to damage incrementor; this keeps the behavior the same for cases where you attack ; a flying enemy with a command other than fight, but you can move it down with the others ; if you don't care about that. LDA $B5 CMP #$00 BNE branch1 ; (Exit if command not Fight?) INC $BC INC $BC INC $BC ; (Add another 3 to damage incrementor) LDA #$08 STA $B5 ; (Store Throw for *purposes of animation*) LDA $B7 ; (get graphic index) DEC STA $B6 ; (undo earlier adjustment, save as Throw parameter) JMP $35BB ; (Update a previous entry in ($76) animation buffer ; with data in $B4 - $B7) (02-18-2020, 04:07 AM)Subtraction Wrote: If you want it to do more damage, you could add more "INC $BC"s, but that'd take up more space and you'd have to move some or all of the code to a subroutine. It's probably better to just replace the "INC $BC"s with something like "LDA $BC, ADC #$05, STA $BC".It work Subtraction, it hit "floating" atk with I assume x6 dmg all the time. And now it is too OP, lol. Now I'm going to test 50-50 on 600% dmg, but correct me if I'm wrong below. "ADC #$05" is x6 dmg (I think), but what about "LDS $BC" & "STA $BC"? RE: Boomerang & Sniper 75% - madsiur - 02-18-2020 (02-18-2020, 10:44 AM)doofenH Wrote: "ADC #$05" is x6 dmg (I think), but what about "LDS $BC" & "STA $BC"? You'll need to replace this: Code: INC $BC by this: Code: LDA $BC ; load damage incrementor in accumulator |