Proposition for a "Skills" system

Yo. I started thinking this up when I was writing a post on @Crazycolorz5’s topic. After he said that chance-based item effects are possible, it got me to thinking: what if we can have these weapon effects given passively by items held in the user’s inventory? And then what if those “items” were actually skills? It’s a bit of a clunky workaround, I realise, but I think it’d be quite novel to have skills as items (and we’d have the added bonus of being able to give them icons and descriptions). All that we’d need to do is make them untradeable/undroppable and you could even view it as a sort of “balancing” mechanism i.e. units with skills get less inventory space.

Mockup of the proposed skills system

The sorts of skills I’d have in mind would be basic skills seen in FE4 such as Wrath (increase critical when HP under a certain amount), Adept (Brave effect when Skill%), Nihil (disable special weapon effects) and the like.

Is something like this possible? Am I crazy for thinking of this? Do you think something like this would be a good idea? etc. It’s an open discussion, and certainly I don’t want to force something like this on people, but it would seem relatively easy to me–the only difficult part I’d imagine would be changing calculations mid-battle and POSSIBLY having a skill activation effect like in FE8.

i actually have a pretty drawn-out plan for skills (i suggested part of this to CC for modular battle but i think he went a different route with it)

[code]// there’s an array of these somewhere in the ROM and classes have some value
// that corresponds to an entry
struct Skill {
int type; // enum determining whether it’s passive, %activation, etc
func effect; // function that takes generic parameters depending on the above “type” enum
// % chance effects would probably be handled in the function themselves, it’s trivial to
// do something like “if this rng value is lower than this next one then multiply might by
// 5 or something”

// battle routine, probably the one that would also call the routine status swords hijacks
void calcRound(ptr att, ptr def) {
for (Skill sk : att.jobSkills()) {
// this would include things like passive might boosts
if (sk.type == PASSIVE) sk.effect(att, def);
// repeat for defender

// BattleData would ideally be a struct that contains the damage, final hit, crit, etc for
// everything that takes place in a single "round" (aka one attack)
BattleData bd = calcDamage(att, def);

for (Skill sk : att.jobSkills()) {
	// this would adjust the damage, final hit, etc
	if (sk.type == BATTLE) sk.effect(bd);


the difficulty would be in making things that contradict each other (like a flat boost vs a multiplication modifier) stack properly


(from a PM to CC)

[code]struct BattleData {
// These are calculated the normal way
int attHit, attCrit, attDmg;
int defHit, defCrit, defDmg;

func[] getEffects(UnitData att, UnitData def) {
func[] ptrs;
if (att.eqItem.hasEffect()) {
*ptrs = eqItem.getEffect();
// repeat for defender
for (ItemData item : att.inventory) {
if (item.hasPassiveEffect()) {
*ptrs = item.getPassiveEffect();
// repeat for defender
if (att.job.hasBattleEffect()) {
*ptrs = job.getBattleEffect();
// etc

// "long_call" means
// > param stuff
// ldr rn, FUNC_PTR_TARG
// bx rn
// that way the user can just "bx lr" out of it
// Optional routine handling effect priority
long_call(handlePriority, ptrs);


void runBattle() {
// this function just does things the normal way
BattleData data = calculateBattleData();
func[] battleEffects = getEffects(attackerData, defenderData);
for (func eff : battleEffects) {
eff(attackerData, defenderData, data);
runBattle(attackerData, defenderData, data);
// probably can do something similar to the above to handle post-battle effects

E2: wow there’s gotta be a way to collapse this stuff

The reason I abandoned the thing you put in the edit is because of the order things are calculated; it restricts the user having to recalculate everything at the end.

Any idea what Nintenlord’s issue was like with having a ton of attacks on the buffer? I think if I can pin that down, this is implementable.
Would it be better for Skills to be character skills or weapon effects?

… Even both would be good. But in the system that I described, item effect would be ideal (to work the same as Hoplon Guard/Delphi Shield etc.). I guess this is separate to weapon effect so I won’t say weapon effect.

Edit: Sorry @Crazycolorz5, can I specify that I’d like the following, and for you to tell me which are doable and which aren’t? Also just need an answer on whether or not the “skills as items” thing is possible or not.

Wrath: Increase critical rate by 50 when HP is under 50%. (Always)//not sure if HP conditions are doable, and whether or not this would actually display outside of combat.
Nihil: Negate all combat skills. (Always)//low priority, but would be cool to have.
Parity: Negate triangle bonuses/disadvantages and weapon effectiveness. (Always)//we know that both these things are possible, but as a passive item?
Adept: Grants another attack (same as Brave effect). (Speed%)//temporarily give the weapon a Brave effect, I guess?
Resolve: When under 50% HP, Skl & Spd x 1.5 (Always)// same as Wrath; not sure if HP conditions are doable, and whether or not this would actually display outside of combat.
Imbue: Every turn the user recovers HP = Magic/Resistance stat. (Always)// perhaps can use @Crazycolorz5’s Renewal source?
Renewal: Every turn the user recovers 10% max HP. (Always)// this has been done, apparently, though not through items, as I understand it?
Paragon: Doubles gained EXP.// low priority again, can always just make a custom class for a unit with a lower Class Relative Power and have a “fake” Paragon skill.
Vantage: User attacks first when under 50% HP//again not sure if HP conditions are possible
Miracle: Increases Avoid by 50 (for one turn?) when HP under 30%.//again AGAIN not sure if HP conditions are possible
Luna: Luna effect (Skill%)//@Crazycolorz5 has already stated this is possible
Sol: Nosferatu effect (Skill%)//@Crazycolorz5 has already stated this is possible
Charisma: Grants Avo/Hit+10 to units of the same allegiance within 3 spaces//hijack support bonuses?

Man, I’d be interested in just the “untradeable, undroppable items” part…

In my experience the hardest part of adding skills is properly adjusting the turns of the units so that skills like Vantage, Adept and Astra work with the right number of attacks for the victim (e.g. victim, skill bearer, victim rounds should become vantage->victim->victim instead of being reduced to vantage->victim…although I might have fixed that, I don’t even remember how the FE8 skills I added work).

Of course, that’s just the hardest part of the stuff I’ve actually tried. I haven’t tried making skills able to be added with items, but I imagine it’s trivial compared to a much larger issue, which is actually getting the activation of the skills to be visibly and audibly indicated during battles. This could probably be handled by fiddling with the animation processing engine to simulate the injection of such indicators in the midst of whatever animation was already occurring.

Turns of battle? Here’s where it’s determined (Oh, edit, brave effect is determined inside the subroutine calls, fyi). The animating, though, takes place somewhere else. I assume it just animates based off of the battle buffer.

I edited this routine to write the numbers to use in the battle screen in the display hack part of my Modular Battle project, but I could probably rewrite this system to be a bit more adaptable as well. Or check for vantage/provoke specifically. It doesn’t seem too bad. Though keep in mind that the Battle Buffer is limited to 7 slots(without repointing the battle buffer pointer), with the last having to be 00 00 80 00, so I’d imagine that would have to be reallocated/the &pointer repointed.

you could probably have it re-update the buffer array as the actual battle processing progresses (although getting the timing right so as not to fuck with animations is probably more trouble than it’s worth)

Suriously guys, it sounds like Cam has a plan. It’d be cool to see skills applicable to class, character, or items.

I guess I’d consider a basic skill set to be something like: Adept, Wrath/Resolve, Nihil (with a cancelling out for two Nihilists fighting), Fortune/Fortify (basically apply Iron Rune/Delphi to a character), Charisma/Daunt, Vantage, Sol, Astra, Luna, Paragon, Blossom, Renewal, Pavise (Great Shield), Parity (as a WTA/WTD negation?), Armsthrift, Cancel, Focus (+2 MT when standing still), Pass. For a total of 20.

And then there’d have to be some skill display with icons and R-button descriptions on the stat screen, possibly over the battle win/loss bar thing. And the ability to just mock up some dummy skills to assign icons to things that are already features in the game like Steal, Canto, etc…

1 Like

I’d love to implement Sol, but I really want this edit to the native animation routine: FEditor Adv

Basically, Always update both person’s HPs at the end of the animation.

Um, I could implement Fortune, probably. And Vantage (switch the position of the two units on the top of the stack if just the defender has vantage). Luna is trivial. Paragon is trivial (I messed around in the exp routines a bit), Blossom is… simple enough. Renewal has been done, several times. Pavise… is also doable. Parity as is, always experience no WTA/D? I can do that by modifying where WTA/D is calculated. Armsthrift should be easy? Ask Cam, who has done the starsphere thing. Just base it on a roll and not the item. Cancel … Check the roll after a round of battle and if it activates, skip the next turn. Focus is simpler than you’d think because there’s a byte in memory measuring how much you moved.

The difficult ones are Adept, Resolve, Charisa/Daunt, Astra and Pass.

Note, nothing would have a special animation, though. Maybe I can mess around with the animation loading routine to load an alternative animation whenever a skill activates?

Edit: Resolve might be easy if we load it when the characters are having their data loaded… then again, it’s difficult if we need to make it kick in on the second round of combat.

O.o How did I miss this post for two months?
Sorry, Agro.

Anyway, I answered most of these with @Arch’s post, but Imbue should be easy as well. Miracle might be fairly simple, might be difficult. I could just implement Miracle FE9 style. Charisma is really difficult. But if you say Hijack support bonuses… it might be possible (except the way support bonuses are coded it’s really reallly hard to decipher >.<)

I feel like probably the “easiest” way to implement a skill animation is simply to call a spell animation somehow and then just have that spell animation play out similarly to FE8’s little “sparkle” thing. Then of course we’d be able to call different spells depending on the skill, change the colour, etc.

Thank goodness we’ve got a starting point on that one (it’s pretty staple). Would a temporary override of the weapon’s properties to apply the brave effect make Adept any easier? This was the skill Nintenlord attempted, so there’s probably some source in his doc that’d be useful surrounding the FE4A attempt at a skills system.

For Pavise I was thinking of splitting it into Pavise (chance to negate physical damage) and Aegis (chance to negate magical damage). Does that complicate it terribly?

Then I guess a Dominion (double WTA) would be similarly easy to Parity.

With Focus, would it also be easy to do a Charge (add +1 MT for every two tiles moved)?

I’m kinda just fiddling with ideas if I were ever to do this in FE1.

Overriding the brave effect is easy… but doesn’t work when you are using a brave weapon.

Pavise/Aegis split is easy; just check type of opponent’s weapon.

Charge should be doable.

Surely we could just say that Brave weapons give a 100% activation rate of Adept, no? :stuck_out_tongue:

I’m wondering if a Counter skill couldn’t be easily achieved by applying the devil effect to an enemy (forked to be activated dependent on the unit with the skill at (Skill+Speed/2)% and dealing half of the unit’s Atk).

And in my boredom, I made a mockup2gethyped4. A nigga can dream, can’t he?

Most OP Lord in history.

And then it’ll eventually have to be moved down to accommodate an Str/Mag split.

FE8 skill hack from 2006 (no idea how people still don’t remember that it exists) has Adept and still works with Brave weapons

Seriously, get around the attack buffer limit (if there even is one) and find a way to do activation animations (probably by using spells) and the rest is trivial

In FE7, at least, the pointer to the current entry of the battle buffer is 8 entries deep into the buffer. Meaning we have 6 to play with and a 7th for the “end” sequence. At least, before we repoint that.

If it’s really that simple (and activation animations might be too because of the spell idea) then just ~do it already~

You’re a smart guy so you probably know what I have in mind already, but for the rest of you I am hinting that someone (not me because lol) should hijack the animation processing code and have it “read a hidden spell call” (I think it’s 0x85 command #5, and by “hidden” I mean “not there at all”) and execute a spell animation, when it otherwise wouldn’t have, to indicate, very obviously, that a skill has activated. Doing it this way would also make it easy to have particularly unique activation animations as well as chain more than one for multiple skill activations. This is also similar to my other suggestion for how to condense (and account for the unique animation there should be for) Astra/Adept attacks, which would minimize or remove the need to extend the battle buffer in the first place.

Taking a look at Hextator’s extensive doc on how 8’s skills work wouldn’t be a bad idea. For displaying skill icons I’d imagine you can insert them as item icons and see how the game displays affinity icons and mimick that