Sign in to follow this  
Followers 0
Think0028

Elemental mixing patch

31 posts in this topic

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 2 to the resist count.

3) If it's resisted, add 1 to the resist count.

4) If it's one they're weak against, subtract 1 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 2 or greater, take no damage.

3) If the count is 1, take half damage.

 

For some concrete examples:

Fire+wind attack (Merton):

Null fire, neutral wind : resist

Null fire, weak wind : neutral

Absorb fire: absorb

Resist fire resist wind: resist

Resist fire neutral wind: neutral

Null fire resist wind: resist

Code:

;xkas 0.06
hirom
;header
!freespace = $C0FD40 ;patch to this offset

;hook
org $C20BD8
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
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
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
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)
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 #$02 ; if >= 2, we're blocking
BCC resistcheck
STZ $F0
STZ $F1 ; 35
resistcheck:
CMP #$01 ; if == 1, we resist
BNE done2
LSR $F1
ROR $F0
done2:
PLY
RTL

3

Share this post


Link to post
Share on other sites

So, no new weaknesses, and absorbs still happen, but stuff like Merton, Raze, Storm, and Tritoch are less likely to be nulled or resisted.

0

Share this post


Link to post
Share on other sites

Always thought dual elements were in a... bad spot. They are cool and thematic, but, ultimately, really weak.
Personally, I'd like a system that has multi-elements as advantages. Current system, they are more on the disadvantageous side.

0

Share this post


Link to post
Share on other sites
7 minutes ago, Vaylen said:

Always thought dual elements were in a... bad spot. They are cool and thematic, but, ultimately, really weak.
Personally, I'd like a system that has multi-elements as advantages. Current system, they are more on the disadvantageous side.

That is exactly why I requested this patch.

0

Share this post


Link to post
Share on other sites

Posted (edited)

So, giving it some thought, the benefits:

  • Mog's Snowman Jazz will at least do neutral damage to all those Ice weak enemies that null Earth or Wind. (Atma, Behemoth, Brontasaurs, Tyranos, Land Worms, Chickenlip)
  • Mog's Surge (Rondo mostly, but Jazz as well) will now do neutral damage to mechanical foes instead of being nulled
  • Terra's Storm should never be nulled, except by Behemoths and Flans. Mind you, Hot Wheels and Low Riders are the only ones who will take neutral damage.
  • Tritoch summon can work more often, though there's no new boss weaknesses to take advantage of.
  • Celes' Merton can hurt more enemies, though it is still nulled by Ninjas, Flans, Hot Wheels, and Fidor. The enemies it now does neutral damage to are Mammoths, Low Riders, Mantodeas, Bears, Dragonflies, and Rabbits.
  • Raze shouldn't be nulled except by Flans. It now does neutral damage to Tapdancers, Ninjas, Rain Men, Mechanix,  and Lvl.3 Mage.
  • Gau's "Rain" and "Volt" attacks are less likely to be nulled. Didn't evaluate when or where.

Wherever I'm saying "should never be nulled," mind you, it can still be absorbed. Who absorbs it hasn't changed at all.

Is that it for double and triple elemental attacks? (Seems like Mog, at least, used to have more).

On the other hand, equipment that nulls elements (Muffler, Minerva, Jacket, Rage Belt, Blizzard Orb) now may simply resist while equipment that resists elements (Force, Hides, Gold, Diamond, Crystal, Tiger, Gaia) may now do nothing. Important abilities to watch out for are Storm, Merton, Raze, Sand Storm, Rain (Acid, Flash, Firestorm), Volts (Giga, Mega), Virite, Blizzard, and Surge.

**********************
**********************
**********************

Seems like the real winner here is the enemy instead of the player. Gear that merely resists - like all of the Hides, the higher tier heavy armors, and the Force Armor - now does nothing against Storm, Merton, Flash Rain, Giga Volt, Virite, and Blizzard. The null gears at least still provide resistances against those moves.

Also, Merton now has to have 4x Flameguards in order to be usable. Your precious null gear (Jacket, Muffler, Minerva) now merely resists.

The only player character that seems to win at all is Mog.

Edited by thzfunnymzn
2

Share this post


Link to post
Share on other sites

All that and you miss probably the most obvious effect, which is that you can hit Wallchange bosses with multi-element attacks.

2

Share this post


Link to post
Share on other sites

Ah, forgot that they were null instead of absorb. Oops. >_<

Still no new weaknesses, they just act like neutral elemental attacks on certain phases, though I guess they won't trigger counterattacks.

Enemies still seem like the big winner here.

0

Share this post


Link to post
Share on other sites

And claiming that Merton needs 4 Flameguards to be usable is a bit of a stretch since it assumes that nobody is willing to damage their teammates. If players don't mind that Celes hurts herself to use Shock, it makes no sense to assume the contrary about another attack.

0

Share this post


Link to post
Share on other sites

Posted (edited)

"Have to have Flameguards" was hyperbole. It is technically still usable. But Merton is losing more than its gaining, since team set-up becomes even stricter while who it gains damage against isn't the greatest list on the planet. Neverminding that Flameguard x4 is one of the, if not the, best way to use Merton anyways.

Also, Merton hurts a lot more than Shock.

Not saying I dislike the patch. I was excited at first too. I'm just uncertain of the benefits after looking over everything.

Edited by thzfunnymzn
0

Share this post


Link to post
Share on other sites

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.

0

Share this post


Link to post
Share on other sites

Thing is, the main randoms where you'd want to be using Merton, those in Kefka's, still resist Merton while having weaknesses to Ice and Bolt. It mostly gets benefits earlier in the WoR, where its MP cost and your own equipment still make it difficult to use (if you have it).

Also makes it harder to defend against enemy Merton, like those Hell Angel randoms in Kefka's.

Mog's really the only winner here. Rondo and Jazz work more often in important areas.

I still like the concept.

Also, Merton's a whole 'nother story from making multi-elemental attacks more useful.

0

Share this post


Link to post
Share on other sites

If possible, perhaps have it still respect resist if you only resist a single element and neutral the other, only going to neutral damage if you resist one/ weak the other.
And maybe also keep Null one/Resist other to null the damage rather than resist.

Or I guess maybe a more direct way of putting it, maybe have it be:
Fire Resist + Wind Neutral = Resist
Fire Null + Wind Resist = Null

1

Share this post


Link to post
Share on other sites

Another idea is to introduce:

Absorb + Resist = Null

Absorb + Neutral = Resist

Absorb + Weak = Neutral

More enemies can be hit by multi-elementals now. Otoh, elemental shields work less often. Most importantly is that Merton is only resisted by Flameguards without also equipping Wind resistance, making Merton even more very difficult to use with an even more questionable reward (good luck getting the team healed while you use Merton).

A patch like this might require re-thinking elemental resists on gear, possibly re-evaluating what magics have what elements (looking at you, Merton).

0

Share this post


Link to post
Share on other sites

Sorry for double post.

'Nother idea is to have weaknesses, resists, and nulls directly affect the damage multiplier in the damage formula. So, weakness is +2 multiplier, resist is -1, and null is -2. (Absorb doesn't fit here and we still need logic for having each element affect the damage multiplier). Now, all other damage multipliers (Morph, Jump, Berserk, Auto-Crit, Throw, Back Attack) also effect elemental damage.

...

I'll shut up now.

0

Share this post


Link to post
Share on other sites

If I’m interpreting the logic correctly, Tritoch will be resisted by wall change bosses (two nulls, one weakness, totaling 3, divide by two and round down to get 1).  I guess this is fair accounting for the two nulls, just a bit underwhelming.  

6 hours ago, A Dummy said:

Or I guess maybe a more direct way of putting it, maybe have it be:
Fire Resist + Wind Neutral = Resist
Fire Null + Wind Resist = Null

To get Null + Resist = Null, you could change the divisor from 2 to 1.5, and no other 2-element combinations would change, as far as I can tell.  However, if this were done Tritoch would be nulled, rather than resisted, by wall change bosses.  Tritoch vs wall change bosses is pretty niche, so this tweak is probably warranted as it at least gives players a chance to Null Merton with proper gear if Flameguard x4 is not the desired approach.

Note, if dividing by a non-integer is a problem, just double all the counts and make the new divisor 3.

5 hours ago, thzfunnymzn said:

Another idea is to introduce:

Absorb + Resist = Null

Absorb + Neutral = Resist

Absorb + Weak = Neutral

Way too complicated.  Let elemental shields do what the player thinks they will do.  Plus, this would causes major problems for strats with a hidden relic.

1

Share this post


Link to post
Share on other sites

Posted (edited)

I'd suggest stepping away from the fixed weak/resist/null/abosrb categories and instead using a "affinity score" as the next damage multiplier;
reasoning behind this being that I know a lot of games treating multi-element attacks as several smaller attacks with one element each and then adding the result.
Also with the current model, getting weakness damage is only possible if the target is weak to ALL included elements.

Some pseudo-code:

Quote

if (non-elemental) return;
m = 0;
for each element {
    if (target is weak to element) m += 4;
    if (target is neutral to element) m += 2;
    if (target is resistant to element) m += 1;
    if (target is immune to element) m += 0;
    if (target absorbs element) m -= 2;
}
if (m < 0) {
   m = -m;
   set absorb flag;
}

damage = damage * m / 2;
damage = damage / number of elements;

 

Edited by praetarius5018
4

Share this post


Link to post
Share on other sites

I quite like Praetarius's version, if it's easily implementable. Each element contributes its share of the damage sort of independently this way.

0

Share this post


Link to post
Share on other sites

I second that. Praetarius's idea sounds spot on.

The idea of each of the elements standing on their own in a multielemental attack is genius.

Does that mean that the power of these attacks will have to be divided by the amount of elemests in the attack, if all the elements act independently.

I.e. if Merton is a 100 power spell. Is that 50 for wind and 50 for fire. Or is it a 100 pwr spell with some elements added on.

0

Share this post


Link to post
Share on other sites

Posted (edited)

4 hours ago, praetarius5018 said:

Also with the current model, getting weakness damage is only possible if the target is weak to ALL included elements.

Hmm... somehow I was assuming that the resist count wouldn't be cut in half if it was already negative. It definitely shouldn't be.

Edited by BTB
0

Share this post


Link to post
Share on other sites
5 hours ago, praetarius5018 said:

I'd suggest stepping away from the fixed weak/resist/null/abosrb categories and instead using a "affinity score" as the next damage multiplier;
reasoning behind this being that I know a lot of games treating multi-element attacks as several smaller attacks with one element each and then adding the result.
Also with the current model, getting weakness damage is only possible if the target is weak to ALL included elements.

Basically the pokemon formula, correct?

0

Share this post


Link to post
Share on other sites
1 hour ago, BTB said:

Hmm... somehow I was assuming that the resist count wouldn't be cut in half if it was already negative. It definitely shouldn't be.

As long as an enemy is weak to one element and neutral to all others, then the weakness should still apply.  Weak (-1) + Neutral (0) = -1, then divide by two (-1/2), and round DOWN (back to -1).

And I’ll chime in voting nay against the option that would potentially negate absorb (at least without a major overhaul to the elemental properties of spells and equipment).  As I said, this would have a major impact on the utility of various hidden items.

0

Share this post


Link to post
Share on other sites

Yeah, you're thinking like a human, not a computer. Rounding "down" in this case means dropping the remainder, which would be negative 0.5. Dropping that remainder gives us zero, not negative 1.

0

Share this post


Link to post
Share on other sites
1 hour ago, Vaylen said:

Basically the pokemon formula, correct?

Not in the slightest.
If you have 1 element voided and 1 neutral, my suggestion gives you 0.5 times base damage, pokemon would give you 0 since they multiply everything.

1 hour ago, F-Bomb said:

Does that mean that the power of these attacks will have to be divided by the amount of elemests in the attack, if all the elements act independently.

I.e. if Merton is a 100 power spell. Is that 50 for wind and 50 for fire. Or is it a 100 pwr spell with some elements added on.

The power of spells wouldn't have to be changed, it would be taken care of in the formula via:
damage = damage / number of elements;

Though it would indeed be a simply 50:50 split.
If you'd want something like 70:30 it gets much more complicated.

12 minutes ago, BTB said:

Yeah, you're thinking like a human, not a computer. Rounding "down" in this case means dropping the remainder, which would be negative 0.5. Dropping that remainder gives us zero, not negative 1.

Actually, that depends on how the negative is handled.
I've seen our -1 displayed as $FF and other times as $81 ($80 as negative bit),
for those it could go either way depending on implementation.

1

Share this post


Link to post
Share on other sites

Posted (edited)

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.

Edited by Think0028
0

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0