-
Content count
18 -
Joined
-
Last visited
-
Days Won
6
Posts posted by Think0028
-
-
21 hours ago, thzfunnymzn said:So, mostly just "nulling one element won't completely nullify a multi-elemental attack"?
Dead on the money.
-
Updated with a different math and resistance interaction at BTB's request. Basically, most of the time resist + not being weak = resist.
- 2
-
Updated with a fix for petrification crashing the game.
- 2
-
It's not impossible, but the more complex the logic the harder it'll be to implement. This is by far the easiest way to handle multiple elements that isn't picking most-resistant, since it only uses addition/subtraction/dividing by 2. The instant we start dividing by other numbers, things get messy.
-
Y'all arguing about how exactly the code works without... actually looking at the code. If you did, you would see that I cheated and I don't divide in the case that it's negative, and instead always treat it as a weakness if it's negative. I was very precise in my wording when I explained the algorithm as half rounded down. (Fuck Microsoft's implementation of down as to-zero). The term y'all are thinking of is round-to-zero.
As for splitting it in pieces, I intentionally didn't implement it that way so that 1) I didn't have to make calls out to the expensive division function 2) I didn't add new layers of weakness/resistance to the game.
- 1
-
It's weird, because on one hand it makes Merton worse in the battle it's really good in (unfreezing people against whichever goddess that was again) but it makes it way more usable in regular-ass randoms. I did it mostly because BTB asked me to, and as a proof of concept alternate resistance systems are possible without too much overhaul.
-
Pretty much, yep.
-
https://drive.google.com/file/d/1uTrUOsoFmSDj6OEUV4SbCEUFPw1N5SRE/view?usp=sharing
Here's a new beta patch. All I've verified right now is that it doesn't crash immediately, so heads up. The goal of this patch is to shuffle around how resistances are calculated with attacks with multiple elements. Basically what it does is look at each element and do a rolling sum:
1) If it's absorbed, the attack is absorbed and the rest skipped.
2) If it's nulled, add 3 to the resist count.
3) If it's resisted, add 2 to the resist count.
4) If it's one they're weak against, subtract 2 from the resist count.
Then, if 2 or more elements were used in the attack, the resist count is cut in half, rounded down. Then:
1) If the count is negative, take double damage.
2) If the count is 3 or greater, take no damage.
3) If the count is 1 or 2, take half damage.
For some concrete examples:
Fire+wind attack (Merton):
Null fire, neutral wind : resist
Null fire, weak wind : resist
Absorb fire: absorb
Resist fire resist wind: resist
Resist fire neutral wind: resist
Null fire resist wind: resist
Code:
;xkas 0.06
hirom
;header
!freespace = $C0FD40 ;patch to this offsetorg $C20B9D
JML newfunc2
returnfromnewfunc2:
NOP
NOP;hook
org $C20BD3
LDA $11A1
BEQ done
LDA $3BCC,Y ;(Absorbed elements)
BIT $11A1
BEQ nullstart ;(branch if none are used in attack)
LDA $F2
EOR #$01
STA $F2 ;(toggle healing flag)
BRA done
nullstart:
PHX ; 17 bytes so far
LDX #$00
LDA $3BCD,Y ;(Nullified elements)
AND $11A1
null:
BEQ resiststart ;(branch if none are used in attack or left to check)
LSR
BCC null ;(move to next ele if this one isn't nulled)
INX
INX
INX
BRA null ;(counted this nulled element, 34 bytes so far)
resiststart:
LDA $3BE1,Y ;(Resisted elements)
AND $11A1
resist:
BEQ weakstart ;(branch if none are used in attack or left to check)
LSR
BCC resist ;(move to next ele if this one isn't resisted)
INX
INX
BRA resist ;(counted this resisted element, 48 bytes)
weakstart:
LDA $3BE0,Y ;(Weak elements)
AND $11A1
weak:
BEQ damage ;(branch if none are used in attack or left to check)
LSR
LSR
BCC weak ;(move to next ele if this one isn't weak)
DEX
BRA weak ;(counted this weak element, 62 bytes)
damage:
JSL newfunc
PLX
done:
LDA $11A9 ; (get attack special effect, 69 (nice) bytes)
CMP #$04
BNE skip ; (Branch if not Atma Weapon)
JSR $0E39 ; (Atma Weapon damage modification)
skip:
JSR $0C2D
PLP
RTSorg !freespace
newfunc:
PHY ; (stack is y)
LDY #$00
LDA $11A1
elecount:
BEQ continue ;(no eles left, 8 bytes)
LSR
BCC elecount ;(this ele isn't used)
INY ; (12 bytes so far)
BRA elecount
continue:
TXA
BPL proper ; if it's negative, we're takin double
ASL $F0
ROL $F1
BRA done2
proper:
TYA ; at this point, A is the element count, X is the resistance total. We are gonna do some bullshit
CMP #$02 ; compare to 2, carry is set if element count >= 2
BCC elehandled
TXA ; A and X are resistance totals now
LSR
TAX ; finished manipulating
elehandled:
TXA ; :^) 21 bytes
CMP #$03 ; if >= 2, we're blocking
BCC resistcheck
STZ $F0
STZ $F1 ; 35
resistcheck:
CMP #$02 ; if == 1, we resist
BNE done2
LSR $F1
ROR $F0
done2:
PLY
RTLnewfunc2:
LDA $3EE4,Y
ASL
BMI petrified
JML returnfromnewfunc2
petrified:
STZ $F0
STZ $F1
JML done- 5
-
-
That's weird. Hopefully I don't have to reverify that RNG patch.
-
What emulator are you using?
-
I've never had a problem with Gau being overpowered with Learnable Rages in the IMTRF. He was rocking Fighter the whole time anyways (aha). Defender and Onion Knight weren't that useful against the bosses, all told. Maybe Defender on Number (whatever, the mage one) is better than what he could have, but Tek Armor worked perfectly fine for me on that fight anyways.
-
The code doesn't affect Gau's rejoin code for when he's out of the party - just modifies what happens when you Leap him. Shouldn't break the Gau rejoin at all. And it uses the same byte I checked back in my Learnable Rage patch that checks if a formation can appear on the Veldt, which is set for regular encounters so that it knows to enable the formation on the Veldt.
-
They're the only reliable way to get to 50 if that's something you want to do. (It isn't something you want to do.)
-
Another patch from the old forum - I got mad that Terra and Celes didn't have pants. Here are alternate sprites that have pants. Two versions of each - one my own, one with extra modifications from Bauglir.
https://drive.google.com/drive/folders/0B1p7kkoK6jG-eHVqSWpMbk40YjQ?usp=sharing
- 8
-
Still got those, I'll make another thread for that.
-
One of my last patches that hasn't been either integrated to mainline or made irrelevant: Learnable Rage! It makes it so Gau learns rages as long as the encounter can possibly show up on the Veldt and Gau is present.
https://drive.google.com/drive/folders/0B1p7kkoK6jG-dHpBOTJ1a28tbk0?usp=sharing
Headered and unheadered patches.
- 3
Code repository for 2.0
in Final Fantasy VI: Brave New World
Posted · Report reply
Elemental fixing - DONE
;xkas 0.06
hirom
;header
!freespace = $C0FD40 ;patch to this offset
; change to 2/3 and resist at 1 null at 3
org $C20B9D
JML newfunc2
returnfromnewfunc2:
NOP
NOP
;hook
org $C20BD3
LDA $11A1
BEQ done
LDA $3BCC,Y ;(Absorbed elements)
BIT $11A1
BEQ nullstart ;(branch if none are used in attack)
LDA $F2
EOR #$01
STA $F2 ;(toggle healing flag)
BRA done
nullstart:
PHX ; 17 bytes so far
LDX #$00
LDA $3BCD,Y ;(Nullified elements)
AND $11A1
null:
BEQ resiststart ;(branch if none are used in attack or left to check)
LSR
BCC null ;(move to next ele if this one isn't nulled)
INX
INX
INX
BRA null ;(counted this nulled element, 34 bytes so far)
resiststart:
LDA $3BE1,Y ;(Resisted elements)
AND $11A1
resist:
BEQ weakstart ;(branch if none are used in attack or left to check)
LSR
BCC resist ;(move to next ele if this one isn't resisted)
INX
INX
BRA resist ;(counted this resisted element, 48 bytes)
weakstart:
LDA $3BE0,Y ;(Weak elements)
AND $11A1
weak:
BEQ damage ;(branch if none are used in attack or left to check)
LSR
BCC weak ;(move to next ele if this one isn't weak)
DEX
DEX
BRA weak ;(counted this weak element, 62 bytes)
damage:
JSL newfunc
PLX
done:
LDA $11A9 ; (get attack special effect, 69 (nice) bytes)
CMP #$04
BNE skip ; (Branch if not Atma Weapon)
JSR $0E39 ; (Atma Weapon damage modification)
skip:
JSR $0C2D
PLP
RTS
org !freespace
newfunc:
PHY ; (stack is y)
LDY #$00
LDA $11A1
elecount:
BEQ continue ;(no eles left, 8 bytes)
LSR
BCC elecount ;(this ele isn't used)
INY ; (12 bytes so far)
BRA elecount
continue:
TXA
BPL proper ; if it's negative, we're takin double
ASL $F0
ROL $F1
BRA done2
proper:
TYA ; at this point, A is the element count, X is the resistance total. We are gonna do some bullshit
CMP #$02 ; compare to 2, carry is set if element count >= 2
BCC elehandled
TXA ; A and X are resistance totals now
LSR
TAX ; finished manipulating
elehandled:
TXA ; :^) 21 bytes
CMP #$03 ; if >= 2, we're blocking
BCC resistcheck
STZ $F0
STZ $F1 ; 35
resistcheck:
CMP #$02 ; if == 1, we resist
BNE done2
LSR $F1
ROR $F0
done2:
PLY
RTL
newfunc2:
LDA $3EE4,Y
ASL
BMI petrified
JML returnfromnewfunc2
petrified:
STZ $F0
STZ $F1
JML done