Gau's Rage 75%
01-21-2020, 01:33 AM
Do you know how to edit Gau's Rage from 50-50 to 75-25?
The odd 50% suck but I do not want 100% because it kinda fit the theme from other characters command chances like Umaro, Relm & Mog.
The odd 50% suck but I do not want 100% because it kinda fit the theme from other characters command chances like Umaro, Relm & Mog.
01-23-2020, 05:49 PM
Yes, if you know ASM, you can do it by rewriting this section of code, which is basically a coinflip.
Code:
C2/0600: 20 53 4B JSR $4B53 (random: 0 or 1 in Carry flag)
C2/0603: C2 30 REP #$30
C2/0605: 2A ROL
C2/0606: AA TAX (X: 0 or 1)
C2/0607: E2 20 SEP #$20 (Set 8-bit Accumulator)
C2/0609: BF 00 46 CF LDA $CF4600,X (load Rage move)
C2/060D: 28 PLP
C2/060E: FA PLX
C2/060F: 60 RTS
If you have no idea how to do it you can test this code with xkas 0.06. Note that you'll need to change the org $C26469 to actual free space in bank $C2 if that space is occupied by patches. This code is untested.
Code:
hirom
;header
org $C20600
jsr sub_rage ; get good index
tax ; transfer rage/attack index to X
sep #$20 ; 8-bit accumulator
lda $CF4600,X ; load rage/attack
plp
plx
rts
org $C26469 ; change to free space in bank $C2
sub_rage:
pha ; save monster index
jsr $4B5A ; random number between 0 and 255
cmp #$40 ; compare to 64
bcc is_attack ; branch if smaller than 64
; rage (75%)
pla ; restore monster index
rep #$30 ; 16-bit accumulator/index
asl a ; multiply by 2
inc a ; increment by 1
bra exit
is_attack:
; attack (25%)
pla ; restore monster index
rep #$30 ; 16-bit accumulator/index
asl a ; multiply by 2
exit:
rts
01-23-2020, 09:04 PM
(01-23-2020, 05:49 PM)seibaby Wrote: Yes, if you know ASM, you can do it by rewriting this section of code, which is basically a coinflip.And to not make it a coin flip but 75-25?
Code:C2/0600: 20 53 4B JSR $4B53 (random: 0 or 1 in Carry flag)
C2/0603: C2 30 REP #$30
C2/0605: 2A ROL
C2/0606: AA TAX (X: 0 or 1)
C2/0607: E2 20 SEP #$20 (Set 8-bit Accumulator)
C2/0609: BF 00 46 CF LDA $CF4600,X (load Rage move)
C2/060D: 28 PLP
C2/060E: FA PLX
C2/060F: 60 RTS
01-23-2020, 09:07 PM
Put two coinflips in. Flip coin: if 0, pick move 1. If 1, flip coin: if 0, pick move 1, if 1, pick move 2. Not sure if that's the *easiest* way to go about it because I'm not familiar with assembly, but I suspect the building blocks are already there to make 75/25 happen.
The only thing harder than finding a needle in a haystack is finding a haystack in a needle.
The easiest way is to replace the coin flip with a call to the RNG function at $C24B5A to draw a random number 0..255, then compare it to 64 for a 75% chance to set the carry flag.
Edit: just do this
Copy the above code into notepad, save it as something.asm and look up on Youtube how to apply an ASM patch using xkas.
Edit: just do this
Code:
;header
!freespace = $c2a65a
org $c20600
jsr newfunc
org !freespace
newfunc:
sep #$20
jsr $4b5a
cmp #$40
rep #$20
rts
Copy the above code into notepad, save it as something.asm and look up on Youtube how to apply an ASM patch using xkas.
The following 3 users say Thank You to seibaby for this post:
• doofenH (01-29-2020), madsiur (01-24-2020), Robo Jesus (01-27-2020)
• doofenH (01-29-2020), madsiur (01-24-2020), Robo Jesus (01-27-2020)
01-29-2020, 11:12 PM
(01-24-2020, 04:46 PM)seibaby Wrote: The easiest way is to replace the coin flip with a call to the RNG function at $C24B5A to draw a random number 0..255, then compare it to 64 for a 75% chance to set the carry flag.Rage does become 75-25 happened. However Gau keep using different attacks. Did you notice? And any idea why it happened?
Edit: just do this
Code:;header
!freespace = $c2a65a
org $c20600
jsr newfunc
org !freespace
newfunc:
sep #$20
jsr $4b5a
cmp #$40
rep #$20
rts
Copy the above code into notepad, save it as something.asm and look up on Youtube how to apply an ASM patch using xkas.
01-30-2020, 02:53 AM
ah, A needs to be preserved surrounding the "jsr $4b5a / cmp #$40".
and can the "sep #$20" and "rep #$20" be chucked to save space?
and can the "sep #$20" and "rep #$20" be chucked to save space?
01-30-2020, 08:57 AM
(01-30-2020, 02:53 AM)assassin Wrote: ah, A needs to be preserved surrounding the "jsr $4b5a / cmp #$40".Sorry but I don't get it. What do you mean "Preserved" and "chucked"?
and can the "sep #$20" and "rep #$20" be chucked to save space?
You mean like this?
header
!freespace = $c2a65a
org $c20600
jsr newfunc
org !freespace
newfunc:
jsr $4b5a
cmp #$40
rts
or like this?
header
!freespace = $c2a65a
org $c20600
jsr newfunc
org !freespace
newfunc:
sep #$20
jsr $4b5a/cmp #$40
rep #$20
rts
I think he meant something like this:
Code:
org !freespace
newfunc:
pha
jsr $4b5a
cmp #$40
pla
rts
« Next Oldest | Next Newest »
Users browsing this thread: 1 Guest(s)