Sme’s ASM and Miscellany

all we need is map affinity and bonus exp and we’re set for life for a tellius demake

4 Likes

Now this is Epic

2 Likes

what about biorhythm?

2 Likes

bruh

5 Likes

holy shit

5 Likes

[ASM] Trap Rework & Tellius Torches (FE8)

Trap Rework makes a modular system for adding new traps and letting them display map sprites. The intention is to be user-friendly without needing to touch assembly to define new traps, and as such comes shipped with a number of general-use functions that themselves can be used as a basis for more complex trap cases.

Shipped alongside Trap Rework are conversions of Dragon Veins by Crazycolorz5 and circleseverywhere and Heal Tiles by Snakey1 to use this system, as it is otherwise incompatible with previous versions of these. This also separates the two from one another, as so they don’t have to both be present. It also ships with a new hack, Tellius Torches, for which this system was created. Note that with default settings you will create errors by removing Heal Tiles or Tellius Torches due to the presence of more complex map sprite display checks for each, but Dragon Veins should be entirely removable.

qi5logvbVU

Download

Tellius Torches provide a configurable amount of fog vision and can be toggled on or off by an adjacent unit. They display a map sprite depending on their state (IDs are configurable) and cannot be stood upon. To designate a torch in events, use TelliusTorchOff(x,y,visionRange) for a torch that starts in the off position or TelliusTorchOn(x,y,visionRange) for a torch that starts in the on position. The vision range is retained per-torch when toggled on and off. You can canto out of using a torch, but you cannot use a torch while cantoing. Note that placing torches horizontally, vertically, or diagonally adjacent or along the outside edge of the map is liable to issues. Included torch graphics were made by L95.

Using just EA, you can set up new map sprite traps for purposes such as map indicators, or anything else you so desire. To do so, you just need to use these 3 macros:

SetTrapEventInit(trapID,TrapRework_GenericInitializer) will set a generic function for initialization of the trap from events to memory, allowing you to define your new traps in your events.
SetTrapMapSprite(trapID,mapSpriteID) will set the map sprite to display for your trap at its position on the map. Note that 32x32 map sprites tend not to work well with traps.
SetTrapMapSpritePalette(trapID,paletteWord) will set the palette for the map sprite to use. Don’t worry about the palette word, as you also have the following definitions for each palette:

  • LightRuneTrapPaletteWord will use the Light Rune palette.
  • PlayerTrapPaletteWord will use the player unit palette.
  • EnemyTrapPaletteWord will use the enemy unit palette.
  • NPCTrapPaletteWord will use the NPC unit palette.
  • GreyTrapPaletteWord or GrayTrapPaletteWord will use the greyed out unit palette.

To place a trap on your map, you can use the macro MapSpriteTrap(trapID,x,y) in event trap data to define a trap of the given ID at the given coordinates. Note that trap IDs in use in vanilla run through 0xD, and with default settings here through 0xF

Trap Rework also contains a small library of ASMCs that may be used to manipulate traps mid-chapter. Note that when adding traps through this method, the total limit is 64 at a time, including map changes & breakable walls/snags towards this total. Exceeding this amount is a bad idea, so be wary with how many traps you create. In all cases these macros use memory slot 1 for trap ID, memory slot B for coordinates, and memory slot C for returning values. If you use a macro with these parameters, the previous value in the relevant memory slots WILL be overwritten.

AddTrap(trapID,x,y) will create a new trap of the given ID at the given coordinates.
RemoveTrapAtCoords(x,y) will remove the first trap found at the given coordinates.
GetTrapIDAt(x,y) will return the ID of the trap at the given coordinates.
GetTrapExt1At(x,y) will return the first value of the trap at the given coordinates. What this value is depends on the type of trap, and map sprite traps do not use it at all.

20 Likes

Very very cool! A trap data rework like this has been needed for a while. :+1:

2 Likes

So if we are using the skills system, all we should need to do is disable the dragon veins hack to include this?

yeah, this includes everything in dragon veins anyhow so there’s no need to have it twice (you’d probably get some warnings if you tried to use both but as long as this was installed after dragon veins it would likely still work, not recommended though)

Also I stumbled on a bug where the light rune impassible trap thing doesn’t get updated unless you do one of a few specific things so I added another instance of it to make it so torches are actually impassible and not just impassible as long as you load from suspend, updated download file

2 Likes

[ASM] Breakable Doors (FE8)

continuing my tellius bs

Download

Doors are always set to have 40 HP. Currently, this is entirely standalone and should not conflict with anything, though I do have plans to integrate it into Trap Rework to allow for easy, modular additions of breakable terrain at a later date.

23 Likes

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.

4 Likes

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.

OOYH3a9xxe

This was accomplished with a single line in an EA file:
TrapBreakableTerrain(0x1B,Seth,69)

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.

12 Likes

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:

Enfeeble

gZhcBKeI3h

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

Regen

dHRMybm1dM

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

Haste

ttcXGb7mqx

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

Slow

pgDTAMOAed

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

Download

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.

32 Likes

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.

2 Likes

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)

2 Likes

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:
SkillsTest_001
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:
SkillsTest_003

Project Name Setter will update the project name information:

SkillsTest_004

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:

SkillsTest_005

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

10 Likes