Modular Stat Getter Example/Feature Request Thread Thing (Skill Ideas Work)


TL;DR Give me some (stupid or not) stat changing mechanic ideas, and I will implement them for you (using MSG). Skill ideas are valid. Feel free to simply ask questions too.

Part 1: Modular Stat Getters

FE8U ONLY. Still WIP (meaning main thread is not updated yet). No README yet. Currently aimed at somewhat experienced users (read: people who know their way around buildfiles and EA macros).


There used to be a doc. But It is outdated. Will update it when am not lazy.

What MSG allows you to do now: define Stat Getters (HP (Max & Current), Power, Skill, Speed, Def, Res, Luck, Mov & Con (thanks Teq), Aid) and computations during Battle Calculations (Attack, Defense, Hit, Avoid, Crit, Dodge and Lethality chance; through integration with some Battle Calc Loop).

What I want MSG to also do in the future: Modify Growth Rates (Apparenly Teq already has done quite a bit of work towards that again, so thanks again), maybe more.

MSG comes with integrated support for Circles’ Skill System (but /!\ an older version of MSG comes with the Skill System, so please be careful until integration is completed both ways).

MSG also comes with a module similar to Venno’s Passive Stat Boost hack (allows items to bring stat boosts even when not equipped).

Part 2: Example/Feature Request Thread Thing

Ok so here’s the part where you come into play! Give me some stupid (or, even better, non stupid) ideas about mechanics that change one unit’s stats in some way, and from your idea will I come up with a way to implement it using only MSG macros.

If you just want to ask a question about this hack you can too, I’d be happy to answer.


For each red unit (1) in 2-5 range of each allied unit in 1-2 range of a unit (2), increase (2)'s luck by (1)'s level.

EA Code
    POIN /* whatever boring modifiers */ prAddLevelOfEachRedUnitInRange2To5OfEachAllyInRange1To2

    rForEachUnitInRange(0, 2) // range 0-2, 0 excluded
            rForEachUnitInRange(1, 5) // range 1-5, 1 excluded

(Ok I know this is quite the complicated example, I just wanted to show off what MSG could do ok?)

Another Example:

Halve Strength & Defense when poisoned

EA Code
    POIN /* whatevs */ prHalveIfPoisoned

    POIN /* whatevs */ prHalveIfPoisoned

    rIfUnitHasStatus(0x01) // 0x01 is poison status

By opening this, I hope two things: for you to understand a bit more how to make dem silly stat modifiers (through the magic of examples), and for me to get ideas and opinions about what I could add in future releases of MSG.

Part 3: (Skill Ideas Work)

As stated before, this integrates well with circles’ skill system. So Skill Ideas as Example Requests are valid.

(I am currently working on integrating new!MSG into Circles’ Skill System. Which means that maybe probably new!MSG will get included in future releases of the Skill System given I donate enough (I mean old!MSG is already in so ¯\_(ツ)_/¯). Which means that to anyone interested into using it (the skill system), this (new!MSG) will probably become relevant)

[FE8U] Stan's ASM Stuff

Funky tile shapes, such as an H shape, an X, an arbitrarily-large + shape, or like

Things like “Mag +2 per enemy in the area”, or “All units in the area gain a base N and an additional X per unit in the area”; “Allies in the area gain Hit/Crit if affected by any status (positive or negative)”

Or, perhaps, a bit more interestingly / complicated / messy “All allies in the area gain stats as if they have an additional support level with all allies in the area”-- which would admittedly require checking the area twice, to make sure that the units are in the area and also that the two allies are within range of eachother for support bonuses.

Are those complex/stupid enough challenge sets
(because those are things I actually was planning on using at at least one point in project refinement)


Note that the results of shape-based range effects can be wierd if the given shape is not symmetrical by central symmetry. 2WB’s shape here is so it’s okay.

[area = The shape in the image]
“Mag +2 per enemy in the area”

I misunderstood that one at first, so I made a version where all enemies in the area would get +2 mag:
(Also there’s an error: Origin of shape should be 2 2, not 3 3, fixed in the other pastes)

The one that actually fulfills what was asked (it’s simpler too):

[area = Same]
“All units in the area gain a base N and an additional X per unit in the area”

“Allies in the area gain Hit/Crit if affected by any status (positive or negative)”

I’m afraid I don’t understand that one.

“All allies in the area gain stats as if they have an additional support level with all allies in the area”

What I needed to add to MSG to make those work:

  • rForEachUnitInRangeTemplate to support wierder range shapes
  • rAddUnitsSupportBonuses to support support-like bonuses
  • Make rForEachUnit work “recursively” (not really actual recursion but ye) (Somehow the hardest one of the three)

I also got to fix some bugs and rearrange some things in the process.
The updated version is not up yet (will do later tonight).

(MSG will be officially updated once I manage to get it fully integrated with the Skill System again)


[quote=“StanH, post:3, topic:2526”]
I’m afraid I don’t understand that one.
[/quote]If affected by Poison / Stone / Dancer Ring.


#define rHalved "rRShiftConst(1)"
This isn’t quite accurate. It’d not an arithmetic right shift for when the stat is negative. The *Proper* Way to Divide By Two
(At the very least, I am experiencing that negative stats function)


But Coloorz! An arithmetic right shift by 1 (which is what this is) is still a division by 2! The one difference with standard signed integer division is that instead of rounding towards 0 it rounds down.

(In all seriousness, it’s probably still not proper behaviour and you’re right in noting that)

(Maybe I should go back to update/rewrite this (and more importantly some doc) at some point)


here you go
// not tested (sorry)

prHalve: {
    rCallSequence(_prAddSign _prShift)

        rRShiftConst(31) // either -1 (neg) or 0 (pos)


#undef rHalved
#define rHalved "rCallOther(prHalve)"

MSG Helpers sure are the embodiment of simplicity and straightforwardness