Snake's Pit of ASM (and Other Stuff)


Modular EXP
This replaces what was Double EXP, which was extremely limited.

What does this do for you? You can define a multiplier or a divisor for EXP based on many conditions, including character, class, enemy’s class, weapon wielded, chapter, and event ID.

How to: Make EXP bend to your will


#inctext lyn "ModularEXP/ModularEXP.elf" "ModularEXP/Hooks.elf"
#define ModularEXPEntry(Character,Chapter,EventID,Multiplier,Divisor) "BYTE Character Chapter EventID Multiplier Divisor 0x00 0x00 0x00"

This table is how you will control EXP by chapter, character, and event ID. For each entry of this table, go ahead and fill those out like so, and specify how much you would like to mulyiply and divide by.
For example…


Here we have an example usage.
The first entry will give Franz doubled EXP in chapter 2.
The second will give Ephraim halved EXP in chapter 8
The third will give Colm tripled EXP in chapter 4 only when event ID 0x12 is set,
The fourth will give seth two-thirds EXP in all chapters.
The fifth will give all units doubled EXP in chapter 5.
The last entry is simply a terminator.

Note that you CAN use fractions by multiplying and dividing together, and also remember that multiplying or dividing by 1 will have no effect.

That was part 1, the second part is a csv that’s indexed by class ID. Go ahead and incorporate Modular EXP Class Table.csv and it’s .nmm.

The first and second columns are the class multipliers and divisors these will always apply. Have a class that’s gaining too much EXP? Add a correctional multiplier and/or divisor.

The next 2 columns are the granting multipliers and divisors. These are the same thing as before except they apply when they grant EXP. If you want enemy soldiers to grant more EXP from combat, for example, add a multiplier here.

The rest of the columns are for weapon types. These will apply when this class is using this weapon type, and they do stack with all other multipliers and divisors. Want great knights to have 4/5 EXP when using axes for some reason? Just apply those to this part.

That’s it. Let me know of course if you find any bugs or problems of if you have any suggestions.

Some other notes

EXP per combat cannot exceed 100 EXP because of level up shenanigans. This routine will cap all EXP gains to 100.

Do not divide by 0. This should go without saying, but I accidentally did it during testing. Bad things happen. :stuck_out_tongue_closed_eyes:

This should be included AFTER the skill system because it conflicts with Paragon. It’ll simply overwrite Paragon’s hook. This shouldn’t be an issue for too long since I plan on integrating my ASM with the skill system to help with these irritating conflicts.


Poison Rework
Tired of how inconsequential poison is? This should allow you to both define it how you wish and make it more meaningful.

This ASM does three things.

  1. Poison applied is additive. This means that any poison applied stacks with any poison that the unit previously had. For example, if a unit has 2 poison and is hit with a weapon that applies 4, the unit will then have 6 poison.
  2. The damage that poison deals each turn equals how much poison the unit has before ticking down. If a unit has 7 poison, it will take 7 damage, then the next turn it will take 6, and so on.
  3. You can define how much poison each weapon should apply including how much poison gas traps apply in each chapter)
How to: Make poison actually do something. I know. Crazy, right?

Again, no installer is necessary. Just download the folder in the Dropbox and use:

#inctext lyn "PoisonRework/PoisonRework.elf" "PoisonRework/Hooks.elf"

Secondly, you’ll also need to incorporate both the Poison Rework Gas Trap Table and the Set Poison Item Table with your csvs. The former is indexed by chapter. It just tells the routine how much poison to apply from gas traps in each chapter. The latter table is indexed by item and tells the routine how much poison to apply per item. You still must use the poison weapon effect in the item table normally for an item to apply poison.

That’s it. The only other thing is that poison will max out at 15 due to RAM space restrictions.

Now go and spread your lethal poison to all corners of Magvel! (or whatever)


Make poison great again.


I feel like Poison should increment after DoT ticks instead of decrement. Or there should be at least a separate Poison that does do that if you feel like there’s a poison that is naturally able to be recovered from without an antidote.

Otherwise, I would think you’d get sicker and weaker if it’s left alone to ravage your body. Plus it makes it waaaay more dangerous. (Bonus points if you can make it so Poisoned units cannot have their HP healed.)

Outside of that, this is super neat.


2 updates:

Fixed a bug in Poison Rework where it would sometimes apply 0 poison and forever deal 0 damage each turn.

I’ve also almost completely overhauled Level Up ASM (no empy level ups) because that shit was BAD. I’ve fixed a bunch of minute bugs in it and heavily optimized it. It still conflicts with the skill system, but I’m planning on fixing that in all of my projects at the same time soon.

Also I haven’t forgotten about this. I’ve just been super busy lately. Are you still wanting this, @chronoquairium ?


Yeah, I’m still hoping for that.


FE7 Anima Triangle
Let’s pretend Fimbulvetr is a wind spell.

Same installation as before. Just use the files in “FE7AnimaTriangle” instead.

#inctext lyn "FE7AnimaTriangle/AnimaTriangle.elf" "FE7AnimaTriangle/Definitions.elf"
BYTE (List of fire tomes terminated with 0x00)
BYTE (List of thunder tomes terminated with 0x00)
BYTE (List of wind tomes terminated with 0x00)


Curious question but could this be done across the board for all tomes to have its own internal triangle on top of standard?




Is the Anima Triangle ASM supposed to clash with the Skill System Patch?

I patched both of them into a clean FE8 rom, but then when I tried to test the new rom, VBA got softlocked because the initial Seth vs. Valter cutscene wouldn’t start (and even if I removed it, trying to start any combat would just softlock the game) and no$gba just crashed.

I tried to patch them both in different orders, but it doesn’t change anything.

Both patches seem to work properly on their own, but combining them seems to just fuck up the rom, which I’m not sure is supposed to happen, since FEBuilder doesn’t list them as conflicting patches and because I’ve seen hacks with both Skill System and Anima Triangle in place.


I believe- actually I know that Anima Triangle conflicts with the somewhat recent skill addition, Tri-Adept. You should be able to get around this by not installing that skill. This is another conflict that I need to handle.

Could you elaborate on this?


My question would be like when you were able to create a triangle within the anima table of magic. Could it also be transplanted into the light magic and dark magic table as well?


Sure. All my ASM does is check if the current weapons used match what’s defined as fire, thunder, or wind based off of lists of item IDs and set WTA accordingly. There’s no reason why this concept couldn’t be applied to different tomes.


Prep Screen Menu Editor


Prep%20Screen%201 Prep%20Screen%202 Prep%20Screen%203 Prep%20Screen%204

This will allow you to easily edit the menu options in the prep screen. In vanilla, these are loaded in a somewhat hardcoded fashion, but this includes some ASM and a CSV that allows you to edit and conditionally change these items.

How to: Spookify your prep screens

Like I said, the first part of this is some ASM. It handles building the menu options that you define in a modular fashion.

#inctext lyn "PrepScreen/PrepScreen.elf" "PrepScreen/Hooks.elf"

I hope this looks familiar by now. Nothing else is required.

The second half is the CSV that defines the conditions, name text, description text, and effects for your menu items. Heap the CSV with your other tables; as is, it is set up to function exactly how vanilla does. This data DOES NOT exist in this way in vanilla. This is a completely new table so the user can more easily define how the menu appears.

Each menu item appears as an entry in the table, and each item will be loaded in the order that they appear in the table. I’ll go through what each column does:

I wouldn’t edit this for vanilla values, but each menu item has an ID associated with it. If you make new menu items, they will need an ID. I suggest using 5 or 6 since those are unused in vanilla. Within this ASM, the ID seems arbitrary as long as you don’t repeat them.

 0 = pick units
 1 = items
 2 = save
 3 = link arena cancel
 4 = support
 5 = ? (one of: fortune, ranking)
 6 = ? (one of: fortune, ranking)
 7 = check map
 8 = start battle?

Credit @StanH doc.

Name Text
Pretty straightforward. This is the text that will appear as the name of the item. (“Pick Units,” “Check Map,” etc.)

Usability (Whether to display)
This is reserved for a usability routine that returns false if you do not want the menu item to display at all (see images 1 and 2 how “Support” is not shown). Return true if you do want this option to appear. A 0x00 entry will always display the menu item.

Usability (Greyed out if false)
You know how in Valni and Lagdou, the “Save” option is greyed out an unusable? Do that to your menu items with this. Point to a routine that returns false to grey out and true to remain normal. Again, 0x00 will always display normally. PrepScreenSaveGreyUsability is included as an example and to emulate what vanilla does to grey out “Save” during the Valni and Lagdou chapters.

Warning for these usability options: Do not forget |IsPointer! It got cut off in my screenshot.

Desc Text
This is the text ID that will be shown when hovering over the menu item as the description text.

Greyed out desc text
Self-explanatory. This is the desc text that will be shown if the menu item has been greyed out.

This is the effect routine for each menu item. To be honest, I haven’t analyzed these a whole lot yet, but that’s what it is.

Finally, a terminator entry of all 0s is necessary as the last entry.

And that’s it really. I hope to have a little more analysis of the effect pointer.
One warning: you CANNOT display more than five menu options at a time. The graphics freaks the fuck out if you try. It’s fine to have more than five items in the CSV, but make sure via usability that more than five never show up simultaneously.

BONUS: Eliminating a Valni/Lagdou headache.

You know how in the top right of a prep screen, it shows “Chapter” followed by the chapter number? This is true except in Valni and Lagdou where it shows “Tower” and “Ruins” instead respectively.

ORG $96B1C
SHORT 0xE00A // Eliminate "Tower" in prep screens
ORG $96B3A
SHORT 0xE003 // Eliminate "Ruins" in prep screens

This’ll ensure that it always shows “Chapter” even in chapter IDs that were Valni/Lagdou.

No go and make a base convo system… or maybe prevent the player from viewing the map in a prep screen for a chapter. :thinking: Spread your evil!


Two things:

Firstly, I’ve updated ModularEXP to support EXP from staves. The way staff EXP is handled is completely different from combat, so another routine has been added to handle that. No need to change the installation method whatsoever, just redownload the .asm and .elf files.

Also, I’ve slightly modified how 0 EXP is handled. The routine will always output a number between 1 and 100 inclusive… UNLESS you multiply by 0 at some point. This means that if you want to conditionally eliminate EXP gain, you can multiply by 0.
Let me know if you find any bugs!

Secondly, I figured I may as well post something I’ve been sitting on for a while.
Do you use buildfiles? Do you detest PFinder?
Well I’ve uploaded “Repointers.event” which can be #incuded to repoint all of the major data tables… or use it as documentation or something.

Currently Supported Tables

Item Table
Item Target Table
Item Usability Table
Item Effect Table
Class Table
Character Table
Spell Association Table
Promotion Branch Table (This was a pain tbh)
Chapter Data Table
Standing Map Sprite Table
Moving Map Sprite Tables
Death Quote Table
Battle Quote Table
Spell Table
Summon Character Table (Also kind of a pain)
Text Table
Character Forcer Table
Sound Room
Portrait Table

Let me know if there are tables I’m missing.
This is very similar to the file I use to repoint everything for LoA, so it’s pretty well tested. If it does cause problems, however, don’t hesitate to let me know!


Another update: (Shoutout to @7743 for a tip) StairsASM (FE7 and FE8) no longer requires bl range. This doesn’t alter its functionality in any way; it just means fewer headaches when installing it. Just redownload the installer files, and you’re good to go!


@Snakey1, could I get some help with those instructions for the FE8 Stairs? I know nothing about EA, and am using the Skill System buildfile instructions.

First I put the “Stairs” folder into the Skill Systems “Engine Hacks” folder, ensuring the files are placed into the root “Stairs” folder and not the “FE8” folder that comes with it. (I’m guessing this is what I’m supposed to do since I have to add the definition ‘#include “Stairs/Stairs.event”’ and not #include ‘“Stairs/FE8/Stairs.event”’)

Then I add #include “Stairs/Stairs.event” to _MasterHackInstaller.event which I think is where it’s supposed to go:

Okay, so then I have to "Add
MenuCommand(StairsNameText,StairsDescText,GreenText,StairsUsability,StairsEffect)” to wherever you’re installing the action menu like how it is in “Stairs.event” (The skill system’s is at the bottom of
“Engine Hacks/_MasterHackInstaller.event”.)

At the bottom of _MasterHackInstaller.event it says this:

But that doesn’t look like where it goes. So I open up UnitMenu.event instead, which does resemble the Stairs.event.
And I place the line here, because in the Stairs.event the command was just below “UM_Visit” as well.

Then, I have to “delete everything under “//Repoint Unit Menu” in “Stairs.event””, so I delete all of this, since I assume it doesn’t mean just everything below that one subsection:

I add the mentioned lines to text_buildfile.txt. And I think I have to re-run this, so I delete the _textentries and drop “text_buildfile.txt” on to “textprocess_v2.exe”, which does indeed place the entries into “Text Definitions.event”.

But then it gets really dicey, because I have no idea what any of this means:

Lastly, you need to know how to use them in events. They’re not linked to the stair tiles, they’re location events.
#define Stairs(StairID,X1,Y1,X2,Y2) “LOCA StairID [X1,Y1] 0x22 ; LOCA StairID [X2,Y2] 0x22”
Just use the Stairs macro under LocationBasedEvents where (X1,Y1) are the coordinates of one end of the
staircase and where (X2,Y2) are the coordinates of the other end. StairID is the ID of this staircase.
Never reuse IDs between multiple staircases!

After searching through the files, LocationBasedEvents seems to be found in “Expanded FE8 Template.txt”. So I place that whole “#define Stairs…” portion there and also in “Expanded FE8 Template.event”, but I have no clue if that’s correct or not, or if I’m supposed to rebuild something here after doing that.

After all that, I run it and it technically works, though I have no idea if I did everything right:


But how do I access this Stairs macro/event from FEBuilderGBA? I don’t see any new Events. Is it not in the Event Editor?

Thank you!


Not snakey, but this is made with buildfiles in mind. I don’t think 7743 has added any support for this system via FEBuilder, though you could ask him about it.


What’s the ideal thread or process needed to use it? What thread has the procedure? If you happen to know.

Ideally, the procedure, because I feel like utilizing this probably doesn’t require an overall knowledge of EA/ASM or whatever’s needed.


Now I am making it, so please wait.

There are still a lot of things we have to do for integration.
It takes time to make routines and stabilize them.