Affinity-based combat?

So I had an idea for a thing I might want to do in VX Ace:
Pretty standard fantasy RPG on the surface, but the mechanics are going to be different.
  • Instead of each character having unique stats, they have elemental Affinities, reaching from zero to ten. With each level up, the player can increase one Affinity by one point.
  • Spells and abilities can only be used by characters with the right Affinities(for example at least 3 Fire and 2 Dark Affinity for a low-tier hellfire spell).
  • All abilities do x damage multiplied by the affinities of the character using them. So a fireball cast by someone with 8 Fire Affinity will do twice the damage of a Fireball cast by someone with only 4 Fire Affinity. The idea would be to give higher-tier spells higher base damage to make them worth using over spells with lower requirements.
  • Affinity also grants resistance to attacks, but it's a flat value, so if you have 6 Fire Affinity, you will take 6 less damage from any fire-based attacks. Yes, this means that a resisted spell or ability can do no damage at all. BUT! If you have, for example, 4 nature Affinity, fire-based damage against you will increase by 4. Elemental interplay can be seen in the attached picture I quickly sketched up in MS Paint.
  • Equipment and status effects can affect affinities, in both directions. So for example a "fatigue" status might lower all affinities by 1, or your armor might give you +2 Fire Affinity and -1 Water affinity.
  • Regular attacks can not be resisted, but cannot be effective either, and can be blocked. Might also make it so certain enemy types(slimes, ghosts and such) are entirely immune to non-elemental damage.
Thoughts and/or ideas how I could make this function under the hood? My main issue is that I am mainly used to C#, and my knowledge of Ruby is at best rudimentary.

Advice on how this could be implemented, and how to add more strategy and depth to it without making the base mechanics too complex would be appreciated.
@Cloud_Striker94 Hi and welcome to the forums! It can be a bit confusing as Game Mechanics Design is not intended to be a place to get help implementing a mechanic but to do discuss mechanics ideas in a more broad/game making sense. For example, if you were to outline your ideas and then ask for a discussion on how affinity based combat works in gaming in general, that could be a thing.

That being said, it's not what you're doing and this needs to be moved, but I'm not sure where. You seem to want help approaching this from a coding standpoint (not sure that it can be done any other way), but are you looking for someone to do the coding for you or are you wanting to try coding it but need help on how to get started?
@Cloud_Striker94 Hi and welcome to the forums! It can be a bit confusing as Game Mechanics Design is not intended to be a place to get help implementing a mechanic but to do discuss mechanics ideas in a more broad/game making sense. For example, if you were to outline your ideas and then ask for a discussion on how affinity based combat works in gaming in general, that could be a thing.

That being said, it's not what you're doing and this needs to be moved, but I'm not sure where. You seem to want help approaching this from a coding standpoint (not sure that it can be done any other way), but are you looking for someone to do the coding for you or are you wanting to try coding it but need help on how to get started?
Both actually. I am looking for help getting this to work mechanically, and for feedback in regards to how it could be balanced and how I might add more depth to it without making the base mechanics too complex. I would want to do the actual coding myself.
Fights will be heavily stacked towards whoever can draw a high level spell and get it off before debuffs can lower affinities. Debuffs and conditions that lower affinities enough to block high level spell requirements are essential. Strongly consider some kind of ramp-up resource similar to existing card game mechanics.

Fatigue sounds good, I also recommend something like "lower highest affinity by 3" to encourage hybrid elements.

How non-attribute attacks work needs to be defined, seeing how spells are hard capped to Basex10 damage.

Building decks for multiple characters is a pain. What's the turn economy look like?

Just as a general feel, the inherent swinginess to the design seems to fit a more constrained action game like Megaman Battle Network. That way elemental advantage isn't an immediate and unreachable gap.
Fights will be heavily stacked towards whoever can draw a high level spell and get it off before debuffs can lower affinities. Debuffs and conditions that lower affinities enough to block high level spell requirements are essential. Strongly consider some kind of ramp-up resource similar to existing card game mechanics.

Fatigue sounds good, I also recommend something like "lower highest affinity by 3" to encourage hybrid elements.

How non-attribute attacks work needs to be defined, seeing how spells are hard capped to Basex10 damage.

Building decks for multiple characters is a pain. What's the turn economy look like?

Just as a general feel, the inherent swinginess to the design seems to fit a more constrained action game like Megaman Battle Network. That way elemental advantage isn't an immediate and unreachable gap.
Those are a lot of really good questions and honestly ones I hadn't considered yet.
I really like the idea on how Fatigue could work, definitely putting that into my notes.
The idea with non-elemental attacks is basically that they should be good enough to deal with mook enemies, but not really worth using against harder opponents and bosses.
Turn economy is another thing I hadn't put much thought into yet. The idea would be that you pull cards until you have X in your hand at the start of each "round", and have to make do with those until all characters have done something. Not really sure how any initiative or speed mechanic might fit into my Affinities.
Some "swinginess" is what I was aiming for, yes. As in, "you can handle anything with the right tools, but if you are unprepared, even basic enemies can still kick your butt".
The notable problem here is in your planning stage - your numbers.
  • All abilities do x damage multiplied by the affinities of the character using them. So a fireball cast by someone with 8 Fire Affinity will do twice the damage of a Fireball cast by someone with only 4 Fire Affinity.
The issue is that you're talking about pitting multiplicative against additive. In that system, Affinity quickly becomes useless as a defensive stat. Take a low level spell that does, say, 3 damage.

Two characters with 3 Fire Affinity will result in 6 damage ((3*3)-3).

If they stay equally skilled and gain just one more point, it's now 8 damage ((3*4)-4).

If you're not using a basic Fire spell and you're doing something more powerful (let's say it has 6 base damage), the defending mage with 4 Affinity is taking a massive 20 damage, down from 24 - a pretty poor defense.

And, of course, if you're trying to spread out some points to dabble in other Affinities for a bit of resistance, that's the next thing to worthless.

You probably want both offense and defense to be additive or both multiplicative, even if it's at different rates.
The notable problem here is in your planning stage - your numbers.

The issue is that you're talking about pitting multiplicative against additive. In that system, Affinity quickly becomes useless as a defensive stat. Take a low level spell that does, say, 3 damage.

Two characters with 3 Fire Affinity will result in 6 damage ((3*3)-3).

If they stay equally skilled and gain just one more point, it's now 8 damage ((3*4)-4).

If you're not using a basic Fire spell and you're doing something more powerful (let's say it has 6 base damage), the defending mage with 4 Affinity is taking a massive 20 damage, down from 24 - a pretty poor defense.

And, of course, if you're trying to spread out some points to dabble in other Affinities for a bit of resistance, that's the next thing to worthless.

You probably want both offense and defense to be additive or both multiplicative, even if it's at different rates.
A very good point, and actually one somebody on Discord already pointed out. My initial solution was to have the damage cap for the highest-level spells/abilities be fairly low, so at 10 affinity, it would be like (4x10)-10 damage, which would still be a 25% damage reduction. So yeah, not 100% sure on that yet.
Update: After some consideration, I am discarding the deckbuilding component, since it just adds unnecessary complexity and RNG to the system.

Original thread: https://forums.rpgmakerweb.com/threads/affinity-based-combat.149914/