[FE8U] Stan's ASM Stuff

:wave:

I have here a thing I made for a potential april fools thing that didn’t end up getting very far (it was supposed to be a hack mimicking berwick saga mechanics).


Lazberian Mercenaries

(browsable source here).

This hack allows some units to cost money to deploy… like Berwick Saga mercenaries! Hence the lazberian part of the name (however, this is much simpler than what that game would offer (no permanent recruitment mechanics or things like that)).

Even if this was kind of made in a rush, I’m fairly happy with the result which is why I am releasing this here.

HACK-12

how2:

  • A Unit with CAttribute (Class/Character Attributes/Abilities, this field goes by many names) CA_LM_MERCENARY (defined by default as 0x40000000, which is bit 30) will be considered as a mercenary, and will require to be hired to be deployable.
  • On the prep screen unit selection screen, mercenaries are marked with a blinking coin icon. You can hire mercenaries on that screen by attempting to deploy them.
    • Feel free to edit the coin graphics, restrictions are 8x8 pixels 15 colors. You may want to change the insertion method.
  • This hack changes auto-deploy to only deploy force-deployed units (this is because I was lazy and didn’t feel like changing the thing to deploy units that specifically aren’t mercenaries).
  • Force-deployed mercenaries don’t need to be hired.
  • You will be silently refunded any mercenary you hired but didn’t end up deploying upon starting the chapter.
  • A Mercenary’s cost is computed by one simple function. This is the only function provided as pure ASM (GetUnitDeployCost.s) to allow its modification to perhaps be more accessible.

/!\ This requires a save unit expansion that saves the entirety of the unit state bits:

  • The latest github version of the skill system comes with a EMS (see previous post for details) setup that includes such expansion. It is, however, disabled by default (reasoning behind it is: it will break existing saves), you need to enable it by defining USE_SAVE_EXPANSION in Custom Definitions (or somewhere else included early in the build).
  • FEBuilder ships that very same EMS-based save unit expansion as a standalone patch under the ExModularSave name (I think).

If you don’t have such expansion installed, the hired status of units will be lost on chapter restart (and your money won’t come back!).


I said that I was happy enough with this to release it here, but there’s also a bunch of other things that I was a bit less satisfied with. I’m not releasing them here but sources are nevertheless available in my CHAX repository (look for LazberianBattleFlow and LazberianWeaponry specifically).

Lazberian Turn Flow (see a few posts above) also got a small bugfix update (fixing some relatively minor AI related issues).

Report bugs or request features by submitting an issue on CHAX, or by contacting me directly here or on discord.

21 Likes