Sme’s ASM and Miscellany

This is the part where I say “Here’s Johnny” and then everyone says oh I know that reference it’s from that funny little movie.


Trap Rework Update

is this long enough after the last post to actually be a later date
Update for Trap Rework, integrating breakable terrain things but also a few more features.

Here, you see normal walls are attackable.


This was accomplished with a single line in an EA file:

By utilizing this macro within a list in TrapRework.event, you can designate as many terrain ID/char ID/max HP settings as you wish. Note you can only have a maximum of 50 total traps before the game will not initialize any further ones, this extending to breakable terrain; make sure you don’t make an obnoxious amount of breakable terrain, or some of it will not actually be breakable. Incidentally, this makes trap rework incompatible with the above breakable doors, which is remedied by also a single line, included in this file and labeled as such. To disable breakable doors, just remove this one line.

This update also includes a modular system for setting light sources and impassable traps. Included is an updated version of Tellius Torches that utilizes both of these. You can set a trap as either thing using SetLightSourceTrap(trapID) and SetImpassableTrap(trapID) respectively. For light source traps, the strength of the light is read from the trap’s ext1 byte.

The last piece I’m looking into for this beyond its current state is a way to set a function for conditionals on loading map sprites, but I’m running into issues with this at the moment and as such specific checks for specific modules are still done in the main Trap Rework assembly source, rather than done modularly via EA. There are unimplemented pieces of this included in this version, but they are not yet implemented properly.

Lastly, the Trap Rework folder was reorganized as the clutter started to get out of hand.

Updated download link is the same one as before.


I’m trying to mess around with this but whenever I run my makehack it throws this error back:
Unrecognized code: FILL

Is there something else I need to install or define?

get most updated ColorzCore

Ah ok, thanks

[ASM] Status Expansion (FE8)

Status ID and Status Duration values are both stored in the same byte. Normally, these are given equal space for storage; 4 bits for ID, and 4 bits for duration. Both can therefore store a value from 0-15. Status durations never exceed 5, but status IDs use 13 of the 15 available values and prevent using any higher status IDs, which is inconvenient for adding new statuses. There is exactly 1 unused status ID which is historically what has been replaced when new status effects are implemented. This then means you cannot have more than 1 of these non-vanilla statuses at once.
By changing how the game reads and writes status IDs and durations, this hack makes it so there are twice as many status IDs available to work with without needing to save any more data. Given the vanilla statuses, this leaves room for 18 new status effects. By default, this doubles the number of available statues from 15 to 31 by cutting the maximum status duration from 15 to 7, as it never goes above 5 anyhow.
If you wanted to, you could very easily make this cut it further to a maximum of 3 turns and have 63 total valid status IDs; this is not done by default to preserve vanilla status effect lengths.

This adds the ability to define new status effects by setting their name, their description, and what icon to show on the unit’s map sprite when the status is applied. The best part is, this system is entirely modular! You can add and remove statuses at will, and set their status IDs to whatever you want (though note redefining vanilla status IDs will not change their effects, only their display).

Additionally, this comes with integrations of the Freeze status by Colorz and the Hexing Rod status by Datagne integrated with this new system, as well as a handful of brand-new status effects:



When a unit is Feeble, their (non-HP) stats are all cut by the remaining status duration.



When a unit has the Regen effect, they will recover 25% of their max HP each turn that the status lasts.



When a unit has the Haste effect, they can take 2 actions per turn.



When a unit has the Slow effect, enemies will always double attack them.


Nothing within this system inherently gives you a way to apply status effects, but there’s a few ways with other hacks you can apply statuses. You can use Status-Inflicting Weapons to inflict upon a weapon you set landing a hit, or you can use Item Effect Revamp to very easily create brand-new status staves and dancer rings.

Due to the wide breadth of the status system, it’s entirely possible I missed something somewhere. Please let me know if you run into status-related issues when using this.


Will this be integrated to come with the skill system? Seems like the kind of thing that would since freeze is in. Regardless, this is amazing!

1 Like

Amazing. I thank the ASM wizards for their gifts to us mortals.


Maybe Eventually :tm: after some other things I’ve done get merged in there, since they’ll conflict with how Regen is implemented here (same for trap rework)


finally circling back to the “miscellany” part of the thread title

[EA] Debug String Setters (FE8U)

This is a pair of EA tools for setting the debug date/time string and the debug project name string automatically to data relevant to a buildfile (separated into two different programs because date/time is potentially useful outside of a buildfile and project name has very specific buildfile use cases). These serve no non-cosmetic purposes but are neat.

In vanilla, the debug menu looks something like this:
In the top left, you can see the project name _2003 and the date & time at which the game was built.

Date Time Setter will update the date & time information to the system date & time when it was invoked:

Project Name Setter will update the project name information:


The project name is changed to the first 7 letters of the name of the directory that the file passed into EA is located in. This is generally the root folder of a buildfile, but not particularly useful in any other environment.

And of course, you can use both at once:


This information is only displayed on this one screen, so again, a largely pointless thing to change.

Download: Date Time Setter

Download: Project Name Setter


For curiosity’s sake, the pointer to the project name is at 0xB30, and the pointer to the date is at 0xB2C, in case you want to expand either of the strings.

1 Like

no need to repoint the date & time string since that’s always the same length, but updated Project Name Setter to repoint the name string so it can do longer names now
it could also go anywhere before since it fit inline but now needs to go in free space
also made both downloads be release builds instead of debug builds oops


fixed a few things

Previously with Laguz Bars, your class would not be reverted between chapters but the transformed flag would be, leading to weirdness.
Fatigue has been updated to add an ASMC & macros for setting fatigue value to alleviate any issues with units starting with fatigue when it would not make sense to as well as to be functional with being able to easily set any unit’s fatigue.

Fixed Damage Weapons used to ignore effectiveness, but now will recalculate it and apply effects accordingly.
(It does glow to show effectiveness, just only on the Strat window and not the Detail one)

Shop Unit has been completely rewritten, and now allows you to properly handle multiple shop units.

Download links are all the same as before.


Walking Shops?! I’m totally down dude!!! But… Ain’t that broken like the weapons with skills like I said in my topic few days back before?
I mean, what’s the point of existence of the shops now in rom hacks if you can have the prep screen and a walking shop?
Or let’s put it in other way. Will this mean the ruin of shops!?

If there’s one thing to learn from Assembly for Dummies


[ASM] Status Immunities (FE8)

In vanilla, the Demon King is immune to status effects inflicted via a weapon by just not getting statused if hit and via status staves by just setting their hitrate to 0. This takes both of these immunity cases and applies them to a list of classes instead of just the one. This way, you can set as many classes as you’d like that are immune to status effects applied in each of these ways.



Just #include StatusImmunities.event, this file contains the class list as well.


It’s pretty much there to support the game design for those who want to use them. I don’t think I’m going to be using walking shops anytime soon, but it’s still neat and I’m sure someone is going to get a kick out of it, which is probably most important.

1 Like

[ASM] Free Movement (FE8)

This allows you to freely control a character on a map in lieu of traditional cursor-based gameplay.

Of course, if the only thing you could do is move around it would be pretty useless. You can also interact with the map using the A button.

This means you can do shops as well.

Shops aren’t the only thing you can interact with. Interacting with a door or chest will open it.

You can also have events that run when you enter a certain area or every time you take a step.

You can also interact with other units on the map.

Lastly, you have a menu, which you can do anything you want with content-wise. By default, it contains some map menu commands specifically the ones that I tested and didn’t crash the game.

Movement collision is based upon whether or not the tile is passable by the unit you’re controlling, or if there is a unit in the space you’re attempting to move onto. You are always in control of the first player unit (to let the player choose who this is, make a prep screen with 1 deploy slot; otherwise, this will usually be your lord if they are force-deployed on every map). Move around with the D-pad as you would expect, and press A to interact with the tile you’re standing on. If you hold a direction and press A, you interact with the tile next to you in that direction; standing next to a unit, holding towards them, and pressing A will interact with them. The L button opens the menu.

Events for this are set up largely the same way that you would normally do events for a chapter. AFEVs and AREAs will run the step after the condition to run them is met, largely analogous to them running after each unit’s action in normal gameplay. Chests and doors are defined the same way as they are normally, but you don’t need a key/lockpick/etc to open them in free movement mode. You can place chest events anywhere, but note that if there is not a tile change at that position the chest won’t work properly (the tile change can be a single tile of the tile that denotes “don’t change this tile”). Talk events are defined in the same place as normal, but note that the only thing read is the second character and the event pointer, so you can’t have multiple talk events with one unit from different initiators set up in the normal way. You can do checks within the event called by talking to determine character-specific interactions, however. There’s an input for char ID that lets you use the first player unit, but the unit you’re controlling is set to the active unit as well for ease of use. Shops do not work as normal, but instead require the use of an ASMC to call the shop, included with Free Movement (but not installed in its installer). To use it, put a pointer to the shop list in s2 and the shop type ID in s3, then ASMC MakeShopASMC.

To enable Free Movement mode, call the EnableFreeMovementASMC. This comes with the definition EnableFreeMovement for ease of use. As this works by hijacking the phase controller, this will only go into effect at the next phase change. As such, the ideal place for this is in a chapter start event. There’s no way to normally end phase while already in Free Movement mode, and enabling it mid-chapter can lead to some weirdness. There’s also a DisableFreeMovementASMC, but as before there’s no way to normally end phase while in free movement mode and disabling it mid-chapter will break things, so I would not recommend using this. Note that the game does not suspend automatically while in Free Movement mode. You can call the make suspend save ASMC ASMC 0xB5D5D to make one at points within your events that you want to save the player’s progress. Of course, manual suspend saves from the menu do function as well. If you have debuffs installed, free movement mode will be automatically turned off between chapters. Otherwise, you’ll need to turn it off manually.


Installing is just #includeing FreeMovement.event. To save the state of being in Free Movement mode through suspend, you’ll need Expanded Modular Save (its default configuration should be fine). The command list for the menu is near the bottom of FreeMovement.event. This will conflict with anything that affects the phase controller function, as it rewrites it. For the shop ASMC, #include "MakeShopASMC.lyn.event".

Map used for demonstration here was made by @ZoramineFae with minor edits for the purpose of showing off doors and chests.


oh hey its me

My only complaint is that the game doesn’t immediately break after the Gilliam line, tbh.

I can already hear vesly’s approval from a mile away.


Amazing stuff as usual!