Zeta's ASM/C Spellbook

Everything here is free to use and modify.
Credit is not mandatory, just don’t take my stuff and claim you’re the one that made it.
Everything here is for FE8.
With the exception of MurderSticks, every hack here was written in C with Stan’s FE-CLIB and converted to EA format with lyn. If you want to modify/recompile a hack here you’ll need both.

Ever wanted to include arenas in your hack, but didn’t want people abusing them to max units out?

Arena Limits + Non Lethal Arena



Download Here - Version 1.1

This hack allows does two things:

  • Allows you to set limits on arena usage. You can set a level limit, a turn limit, both or neither.
  • Allows you to optionally make arenas nonlethal - lose, and you’ll just lose your gold and be spit out of the arena at 1HP.

Installing it is relatively simple:

  • Go into installer.event and change the ArenaLevelLimitTextID define to whichever textID you want to replace. The text itself is built in RAM, so you don’t have to do anything further to have it display.
  • Edit the ArenaLimitTable as desired.
  • If you want lethal arenas back, change the _NonLethalArena define to 0x0 instead of 0x1.
  • If you use a higher maximum level than 20, change the related #define.

It should be compatible with anything that doesn’t alter the arena command usability routine (or the routines I hooked to make arenas nonlethal). Though this hack does store its text in RAM - if you find that this does conflict with another hack, just go and change the FreeSpaceRAM define to a different free RAM location.

Tired of empty level ups/lords getting stat screwed? Want to change maximum levels or maximum luck?

Level Up Rework


Download Here - Version 2

This hack allows you to set a few things:

  • Minimum stats gained per level up
  • Minimum stats gained per level up for characters with the Lord ability
  • The maximum level for all units, and the maximum level for specific classes. So you could have all classes max out at level 15, or some classes max out at level 30, or both.

There’s nothing special to do to install it - just change the settings in Installer.event to suit your needs and then #include it.

It should be compatible with anything that doesn’t modify the same routines. This hack is compatible with the SkillSystem’s Str/Mag split.

Ever wanted to include offensive staves in your hack?

Murder Sticks

Download Here - v1.0.1

Normally, offensive staves won’t display their statistics in the attack/item windows (since the game expects staves to display an item use description instead). This hack fixes that problem.

Note that unless you modify the default priest/cleric animations (they need to have the right code to wait for the enemy’s HP to deplete), trying to play attack animations for them softlocks the game. So I’ve included fixed versions of those animations in the zip (made with Animation Assembler). Just #include those ontop of the Installer.event and you’re good to go.

Ever wanted to change a chapter’s objective or its turn limit through events?

ChangeChapterObjective


Download Here - Version 2

This hack allows you to change chapter objective text through events. Installation is simple - just #include the Installer.event, then use the provided SetChapterObjectiveText(textid, textid2) macro in your events as necessary. The first text ID is the short objective (the one shown on the map itself), the second one is the longer objective text (shown in the prep screen and status screen).

This stores the new textIDs to be read in trap data. It shouldn’t conflict with any other hacks, unless they also use trap type ID 0xEF. And if that does happen, I can just change the id to something else. If you don’t use SetChapterObjectiveText, it just reads the values from chapter data like in vanilla.

New in version 2 - this hack can how change turn limits:

  • SetTurnLimitText(number) will change the turn limit display.
  • CHECK_TURNLIMIT will return 1 in event slot 0xC if the current turn limit has been exceeded.

It stores the new turn limit in a trap with Trap ID 0xEE, and like the original functionality, it just reads the values from chapter data like in vanilla if the trap isn’t present.

Special thanks to Leonarth for providing multiple suggestions (storing the new textIDs in trap data), and Stan for catching a bug before I posted this.

Ever wanted a little more 776 in your 8? Or just liked the idea of leadership stars?

LeadershipStarsFE8

This hack brings the ‘leadership stars’ mechanic to FE8. Units with leadership stars grant a (configurable) Hit / Avoid bonus to all units of the same allegiance. Installation is now very easy, since this hack has been merged with the Skill System.

  • Go to Engine Hacks/_MasterHackInstaller.event and uncomment the #include “LeadershipStars/LeadershipStars.event” line.
  • Edit LeadershipStars.event to change settings as you wish.

By default this replaces the affinity/element icon on page 1. If you don’t like that, it’s not too hard to whip up your own MSS settings. This changes the unit count on the ‘Status’ screen to instead display the total amount of leadership stars for ally and enemy units, so players can have a quick way to view total leadership.

As usual, this hack (well, LeadershipFunctions.c at least) was written in Stan’s FE-CLIB and converted to EA format by lyn.

Wouldn’t it be nice if you could just type like normal and the game would insert newlines for you? What if it could calculate how long sentences are, and intelligently place newlines and A presses to keep them together on the same text box?

AutoNewline


https://www.dropbox.com/s/itkejzd7xybjq43/AutoNewline.7z?dl=0

This hack intelligently inserts [A] and [NL] codes in text, as well as handling multiple other text codes automatically (for example, turning … into [Beat]). Installation is fairly simple:

  1. #include the Installer.event. It has to be included after Anti-Huffman (usually included in the essential fixes). This hack hooks into Anti-Huffman.
  2. Read the README.txt to get an idea of how to use the hack. It even comes with some example text entries you can insert to get a feel for how the hack works.
  3. Adjust the options in Installer.event… or leave them at defaults, either works.
  4. Have fun writing text without the hassle of manual newlines.

While all code in this hack is original, credit for the concept/idea goes to laqieer ( https://github.com/laqieer/FE7CNLOL/blob/master/src/FE7CNText.c ). I certainly would not have thought to do this on my own.

Note that this hack assumes your Anti-Huffman is installed in the standard location (specifically the " ORG 0x464470; AntiHuffmanFreeSpace:" bit.) If your Anti-Huffman is elsewhere for some reason, just drop me a line and I can make you another hook.

As usual, this hack was written in C with Stan’s FE-CLIB and converted to EA format by lyn.

Ever wish you could make enemy autolevels less random? Ever wondered why promoted enemies have way higher stats in hard mode?

AutolevelTweaker


https://www.dropbox.com/s/b8ysk9hxh1wb5w4/AutolevelTweaker%20v1.1.7z?dl=0

This hack gives you multiple options to tweak how autoleveling works.

  • Normally, the game adds an extra random bonus to autoleveled growths, which makes enemy stats more variable. You can reduce, eliminate, or even increase this bonus.
  • You can specify the amount of ‘bonus’ levels a promoted unit gains. In vanilla, on normal mode this is +9 levels (as if the unit had promoted at level 10)… but on Hard, it’s +19 (as if every enemy unit promoted at level 20)
  • There’s an option to further reduce variance by calculating all growths at once using the promoted class’ growths (instead of autoleveling twice, once for ‘before promotion’, once for ‘after promotion’). See the readme for more details.
  • Finally, it turns out that the difficulty level bonus/penalty is applied separately from autoleveling. There’s an option that does them both at once, to further reduce randomness.
  • Oh, and I threw in the ability to disable level bonus/penalty being applied to bosses. Might be useful.

Installation is simple: #include the Installer.event, change options as desired.

Credits to decomp ( https://github.com/FireEmblemUniverse/fireemblem8u/blob/master/src/bmunit.c ) for making it far easier for me to understand how autoleveling works.

28 Likes

Quick questions, can the level of the arena limit chapters?

Arena level limits are separate per chapter. You can have different chapters with different level limits.

1 Like

It’s just like fe4. It’s wonderful.

With the Arena Limit hack, the limit is the same for unpromoted and promoted units?

Currently yes, though I might change that later. Not 100% sure how I’d want to handle promoted units yet.

Most things regarding level treat promoted as a static +20

I could do something like: A level limit of 25 would equal ‘all non promoted units and level 5 promoted units’

But I’m not sure how you’d communicate that information to the player. Shame the brown text box is so limited.

How about that check promoted unit ability of class?

Checking if a unit is promoted or not is easy, yeah.

Hmm, if I switch over to using this text box I should have a lot more room.

Then I could say something like:
Arena Level Limit: 6
Promoted units not allowed.

Arena Level Limit: 6
No limit for unpromoted units.

(or whatever, the strings would be changeable to your liking)

1 Like


New version soon.

1 Like

New version now. Installation is the same as before, just a couple new text strings that you can change if you feel like it.

1 Like

Normally, offensive staves won’t display their statistics in the item/attack menus…


This hack fixes that problem.

Note that unless you modify the default priest/cleric animations (they need to have the right code to wait for the enemy’s HP to deplete), trying to play attack animations for them softlocks the game. So I’ve included fixed versions of those animations in the zip (made with Animation Assembler). So just #include those ontop of the Installer.event and you’re good to go.

9 Likes

Hey. How would I go about adding the additional animation events to FEBuilder?

I do not use FEBuilder (at least in the sense of modifying ROMs with it), so I don’t know.

Fortunately it’s a simple fix, and I assume FEBuilder can just edit the animations itself. Go to 0x7F and 0x80 of the battle animations, and insert the ‘wait for HP to deplete’ code before the ‘begin opponent’s turn’ code (I put it one frame before). Do this for every ‘attack’ mode (you don’t have to change the dodges).

Thank You so much! Been wondering how to add staff attack animations for Priests and Clerics for the longest.

Murder sticks working like fe9-10 stick?. That’s awesome.

Ever wanted to change a chapter’s objective through some event, and been told you had to make a copy of the map and use LOMA? Well, that’s too clunky for me and I have the power to fix it, so…


Requires lyn.

This hack allows you to change chapter objective text through events. Installation is simple - just #include the Installer.event, then use the provided SetChapterObjectiveText(textid, textid2) macro in your events as necessary. The first text ID is the short objective (the one shown on the map itself), the second one is the longer objective text (shown in the prep screen and status screen).

This stores the new textIDs to be read in trap data. It shouldn’t conflict with any other hacks, unless they also use trap type ID 0xEF. And if that does happen, I can just change the id to something else. If you don’t use SetChapterObjectiveText, it just reads the values from chapter data like in vanilla.

This was written in C with Stan’s FE-CLib. Special thanks to Leonarth for providing multiple suggestions (storing the new textIDs in trap data), and Stan for catching a bug before I posted this.

10 Likes

Thank you for making this, it’s amazing.

1 Like

Don’t like the music changing when there’s only one enemy left? Well, I know I don’t.

Does nop-ing a single opcode count as a hack? I don’t know, but either way, here you go:

PUSH
ORG 0x1609E
SHORT 0x0
POP

2 Likes