Sme's ASM and Miscellany

#1

Starting to collect a few creations I’d like to make easily accessible and thought to make individual threads for all of them might get a little bit ludicrous so this thread is for whatever I cook up. For now, starting off with this:

[ASM] Escape / Arrive (FE8)

Escape/Arrive

https://i.imgur.com/jaszLuH.mp4

This hack offers two new map objectives, Escape and Arrive, modeled after their Tellius implementation. With Arrive, when any unit reaches the point and uses the command the chapter will end. With Escape, when any non-lord unit reaches the point and uses the command they will leave the map (this uses REMU, you’ll have to use standard event implementations to reveal them again for later chapters). When the lord unit reaches the point and uses the command the chapter will end.

Creating Arrive and Escape points is simple; they use Seize points, but when event ID flag 0x21 is set Seize becomes Arrive and when event ID flag 0x22 is set Seize becomes Escape. NOTE: Event ID flag 0x23 is also used in the process of escaping units, if you set this the next time a unit ends its turn it will vanish. Avoid using these three IDs (there are 24 before this point that you can use + 5 after, there should be plenty still).

Know that this hack is highly integrated with the Skill System and will not work without it. No longer requires Skill System, works standalone, Skill System portion still present if you wish to use it.

Download

Installation

Everything in the Post Combat Skills folder needs to go in Skill System/Post Combat Skills; this piggybacks off of existing post combat things from the skill system to properly let units escape (+ this edits skill system’s canto routines so you can’t canto after escaping)

Everything in the Escape/Arrive folder should probably go in its own folder in Engine Hacks; you’ll want to #include the Escape Installer.event, probably in your Master Hack Installer, which will handle installing everything. Additionally, at the bottom of the skill system’s Master Hack Installer is the unit menu command list; you’ll want to replace the line UM_Seize with the following four lines:

  MenuCommand(0x67A, 0x6CC, BlueText, NewSeizeCheck|IsPointer, $8023021)
  MenuCommand(ArriveName, ArriveDesc, BlueText, ArriveCheck|IsPointer, $8023021)
  MenuCommand(EscapeName, EscapeDesc, BlueText, EscapeLordUsability|IsPointer, $8023021)
  MenuCommand(EscapeName, EscapeDesc, BlueText, EscapeGeneralUsability|IsPointer, EscapeGeneralEffect|IsPointer)

These will make Escape and Arrive show up in the menu and make Seize play nice with them; you can change the menu command colors here if you so desire (the color defines are in _UnitMenuDefs).

[ASM] Magic Sword Rework (FE8)

Magic Sword Rework

Lets you define as many weapons as you’d like as magic swords, so they’ll use Str/2 and hit Res when attacking at 2+ range but act as normal swords in melee. You can set the weapon type the sword uses at 2+ range (Anima/Light/Dark, or something else if you’re feeling crazy) as well as whether or not to use magic damage in melee, like with the Runesword (won’t use magic animations in melee though, but @circleseverywhere did a hack a while ago that takes care of that part: [FE8] Always display ranged animation for some weapons ).

Download

To install, just put MagicSwordRework.event and MagicSwordRework.dmp in the same directory and #include the event file. Within the event file, you can define what items are magic swords. Each entry in the magic sword list is 3 bytes long; first is item ID, the second is weapon type (there are definitions for it as well), and third is whether or not to use magic damage in melee (True to use, False to not). Make sure you set bit 0x40 in the item ability 1 byte for your new magic swords as well, that’s what lets it hit res at range.

https://i.imgur.com/aJRawf2.gif

[ASM] Super Arena (FE8)

Super Arena

Unused in all 3 GBA Fire Emblem games is a setting for the arena that makes the enemies more difficult across the board. With this hack, after winning 2 arena fights Super Arena is turned on for that unit.

Download

The vanilla text will not properly display due to going 3 lines before clearing the text and text scrolling doesn’t work properly in the arena. Here’s a fixed version:

Welcome to the arena.[A][NL]
Oh! It's you again.[A][2NL]
I've lost a lot of gold[NL]
thanks to you...[A][2NL]
If you want to continue,[A][2NL]
we're going to have to[NL]
do things differently.[A][2NL]
I'm going to prepare some[NL]
more challenging foes.[A][X]

Install to text ID 0x8D1 to replace the existing broken version.

[ASM] Separate Shop Music (FE8)

Unique Shop Musics

Ever wanted your secret shops to have unique music? Well, now they can! This hack changes the vanilla check of if armory play armory, else play vendor with a case for all 3 shop types. The song each has is changable from the EA installer as well.
https://youtu.be/7jRlFHf1mrc

Download

[ASM] Save Globals Through Suspend (FE8)

Globals Through Suspend

This hack will write global event flags to the save file whenever the game writes suspend data, which it does after every action a unit takes, as well as when you select Suspend from the menu. It lets you do cool things like this:

https://cdn.discordapp.com/attachments/144670830150811649/609960505758711809/2019-04-20_14-50-41.gif

Note that you’ll need to unset the flag set that tells the game to go to the world map, or you’ll just immediately go to the world map upon reloading:
ENUF $89

Download

Once again to install just #include the .event file.

[ASM] Change Weapon Ranks ASMC (FE8)

Weapon Ranks ASMC

A way to change any unit’s weapon ranks through events, intended to allow giving characters access to weapon types they normally wouldn’t get through story events or likewise, as well as removing weapon ranks so a character can have their access to a weapon type their class would normally get revoked without affecting all units with that class.

Install it to anywhere in free space then call it with ASMC. It takes 3 arguments; character ID in memory slot 1, weapon type in memory slot 2, and weapon rank in slot 3.
A few examples of how it could be used:

Revoke Moulder’s Staff rank:

SVAL 1 Moulder
SVAL 2 4
SVAL 3 0
ASMC ChangeWeaponRankASMC|1

Give Eirika a D lance rank:

SVAL 1 Eirika
SVAL 2 1
SVAL 3 31
ASMC ChangeWeaponRankASMC|1

https://i.imgur.com/rOkhxIG.gif

Download

[ASM] ASMC Check Suite (FE8)

Check Suite

A set of 23 ASMC checks to supplement the existing event commands. The following checks are made available through these macros (thanks to @P33RL355 for writing the macros):

CheckLevel(Character)
CheckExperience(Character)
CheckMaxHP(Character)
CheckCurrentHP(Character)
CheckStrength(Character)
CheckSkill(Character)
CheckSpeed(Character)
CheckDefense(Character)
CheckResistance(Character)
CheckConstitution(Character)
CheckMovement(Character)
CheckInventory(Character,Item)
CheckSwordRank(Character)
CheckLanceRank(Character)
CheckAxeRank(Character)
CheckBowRank(Character)
CheckStaffRank(Character)
CheckAnimaRank(Character)
CheckLightRank(Character)
CheckDarkRank(Character)
CheckStatusEffect(Character)
CheckStatusDuration(Character)
CheckMagic(Character) //needs strmag split

No check for luck, since CHECK_LUCK is a vanilla event command. Note that CheckMagic is commented out by default, you’ll have to uncomment it if you want to use it. All of these can take either a direct character ID or 0xFFFF to use the active character; vanilla commands can also be told to use the character ID in memory slot 0xB, however these checks cannot.

Download

To install just #include the .event file, then you can use the macros in your events.

[ASM] Modular Changing Battle BGM (FE8)

Changing Battle BGM

This hack will let you specify an arbitrary number of character ID + song ID pairs for music to change after fighting the unit once, like the Demon King does in vanilla. Note the song ID you’re specifying is the version without an intro, you should set the version with an intro on the Boss Music List. Additionally, every one of these uses the same global event flag and as such using multiple in the same chapter may be difficult.

https://youtu.be/jt_SIk960ho

Download

[ASM] Arbitrary List of Classes With Dancer Music (FE8)

Dancer Music

This hack allows you to define an arbitrary list of classes for whom the dancer music will play when dancing.

https://youtu.be/ttZT4VlFVM8

Here you can see the various scenarios without this hack vs with this hack.

Download

[ASM] Biorhythm (FE8)

Biorhythm

This hack puts the Biorhythm mechanic from FE9/FE10 into FE8.

https://cdn.discordapp.com/attachments/144670830150811649/631599651849764917/9bLXb4tJVJ.gif

There are 7 biorhythm effect states: Worst, Bad, Poor, Neutral, Good, Great, and Best. All of these save for Worst and Best can be approached from either direction, making a total of 12 actual states. States begin from Worst, ascending at 0 and progress through to Bad, descending at 11 before looping back to 0. This makes Neutral, ascending be 3 and Neutral, descending be 9. The Hit/Avo bonus/buff you get from each can be defined in Biorhythm.event, as can the text ID of the name for each state. Note that whether the effect is positive, negative, or neutral cannot be edited from the .event file and are hardcoded to each state.

The Biorhythm Table is where you set each character’s biorhythm initial position and rate of progression. This table is indexed by character ID and has two values per entry: initial position and amplitude. The initial position uses the values as laid out above and the rate of progression, or “amplitude” of their biorhythm wave, is number of states to advance per turn / 4. This means an amplitude of 4 will advance 1 state per turn, an amplitude of 1 will advance 1 state every 4 turns, and an amplitude of 12 will advance one full cycle forward to the current position every turn. Using an amplitude of 12 and a neutral starting position will effectively act as if there is no biorhythm for the character you set it on.

Download

This does require Skill System by virtue of using its pre-battle calc loop to apply Biorhythm effects, as well as needing Modular Stat Screen to be on the menu. Included in the download is a readme with install instructions, the above usage explanation, and everything you’ll need to implement biorhythm yourself.

[ASM] Character-Based Animation Forcer (FE8)

Animation Forcer

This uses the vanilla check for the Demon King class to force animations on against the final boss and expands it to an arbitrary user-defined list and also to characters instead of classes, as I figured having to make a unique class for everyone you want to force animations on for would get annoying and space-consuming very quickly.

https://cdn.discordapp.com/attachments/535891396033249330/633539410868043778/LyBUubxBi7.gif

Download

[ASM] Deny Stat Screen Access (FE8)

Deny Stat Screen

In vanilla, you cannot view the stat screen of gorgon eggs with the R button, nor can you scroll to them from another stat screen of the same allegiance. This hack takes that functionality and expands it to an arbitrary list of classes. Unlike the hack below, this one is harder to change the requirements off of anything class-based, as various functions here are only passed the class data and not the character struct.

https://cdn.discordapp.com/attachments/144670830150811649/636048976206102528/Vg75QPICN8.gif

Download

[ASM] Deny Counterattacks (FE8)

Deny Counterattacks

The way gorgon eggs work is they always have the weapon they’ll have once hatched in their inventory. To prevent them from counterattacking when you attack them as an egg, there is a hardcoded check that disables their ability to counterattack. This hack extends that to an arbitrary list of classes. Additionally, this hack may be used as a jumping off point for applying this status in other circumstances.

https://cdn.discordapp.com/attachments/144670830150811649/636038848962625548/EAeLcLannn.gif

Download

[ASM] Dancer Ring Refresh (FE8)

Dancer Ring Refresh

Fairly self-explanatory, lets dancer rings refresh like Dance in addition to applying their effect.

rKgZip0fTc

Download

[ASM] Refuge (FE8U)

Refuge

Something I saw done in the FE8J hack “The Nameless Heroes”, and here it is functionally recreated in FE8U. Refuge allows you to “rescue” yourself into another unit that is capable of rescuing you (if your con is less than their aid, you can Refuge into them).

https://cdn.discordapp.com/attachments/144670830150811649/642835623958282243/KlGVTcqlQ3.gif

Big thanks to @StanH, whose Heroes Movement Skills and general doc were an invaluable resource for seeing how target selection and unit actions work.
This hack requires Skill System for its post-action loop and Stan’s Unit Action Rework for implementing the refuge action itself (Unit Action Rework is included with Skill System).

Download

Installation instructions are included in the download package.

[ASM] Holy Blood (FE8)

Holy Blood

Akin to FE4/FE5 and FE16’s systems comes holy blood. For each blood type, you can define:

  • Name
  • Description
  • Growth boosts for each stat
  • Whether or not it allows access to dragon veins
  • Holy Blood locks per weapon

You can give units major or minor blood, major blood causing an icon to appear on their status screen, doubling growth bonuses, and granting access to weapons locked to that blood type.

https://cdn.discordapp.com/attachments/535891396033249330/644439871540428819/pSQ9arv6vR.gif

As an example, Iron Sword is set to be locked to Donate blood.

Download

Requires skill system’s weapon usability calc loop (this hack is the reason I made that calc loop in the first place), MSS, and dragon veins (which all come with skill system) to be fully featured.

[NMM] FE6/7/8 Sound Room Nightmare Modules

Sound Room Modules

Saw this didn’t exist and needed to edit Sound Room for a project, so I wrote nightmare modules for FE7 and FE8’s sound rooms.

FE8 Module
FE7 Module
FE6 Module

[NMM] FE8 Boss Music Editor

Boss Music Editor

Couldn’t find this one anywhere so I did it myself

Download

24 Likes
[FE8] Skill System v1.0 - 254 skills done, more on the way
#2

One word.

AWE-SOME.

1 Like
#3

Fixed an issue with Escape where any unit that ends their turn is set to undeployed; if you notice in the gif in OP Eirika is absent from the Unit list, due to having moved the previous turn.

Praise Teq

1 Like
#4

Added Separate Shop Music hack to OP (editing OP doesn’t bump post so I have to oof)

4 Likes
#5

Discourse rework when

Separate shop music. Jaw drops. Epic QoL ASM Sme, hat’s off to you!

1 Like
#6

[NMM] Boss Music Editor

Couldn’t find this one anywhere so I did it myself

Download

Wait discourse update broke my OP reeeeee

3 Likes
#7

add to OP please

1 Like
#8

Well I’m fucked

1 Like
#9

[ASM] Change Weapon Ranks ASMC (FE8)

A way to change any unit’s weapon ranks through events, intended to allow giving characters access to weapon types they normally wouldn’t get through story events or likewise, as well as removing weapon ranks so a character can have their access to a weapon type their class would normally get revoked without affecting all units with that class.

Install it to anywhere in free space then call it with ASMC. It takes 3 arguments; character ID in memory slot 1, weapon type in memory slot 2, and weapon rank in slot 3.
A few examples of how it could be used:

Revoke Moulder’s Staff rank:

SVAL 1 Moulder
SVAL 2 4
SVAL 3 0
ASMC ChangeWeaponRankASMC|1

Give Eirika a D lance rank:

SVAL 1 Eirika
SVAL 2 1
SVAL 3 31
ASMC ChangeWeaponRankASMC|1

Download

12 Likes
#10

Super Arena Is it always open? I installed it and tested it. It started with that conversation.

#11

dude this is amazing i will definatly use it in my PoR hack i already planed to give you the credid for that Soren portrait but this is even beter

#12

[ASM] Magic Sword Rework (FE8)

Lets you define as many weapons as you’d like as magic swords, so they’ll use Str/2 and hit Res when attacking at 2+ range but act as normal swords in melee. You can set the weapon type the sword uses at 2+ range (Anima/Light/Dark, or something else if you’re feeling crazy) as well as whether or not to use magic damage in melee, like with the Runesword (won’t use magic animations in melee though).

Download

To install, just put MagicSwordRework.event and MagicSwordRework.dmp in the same directory and #include the event file. Within the event file, you can define what items are magic swords. Each entry in the magic sword list is 3 bytes long; first is item ID, the second is weapon type (there are definitions for it as well), and third is whether or not to use magic damage in melee (True to use, False to not). Make sure you set bit 0x40 in the item ability 1 byte for your new magic swords as well, that’s what lets it hit res at range.

2019-03-05_21-17-55

9 Likes
#13

I’ve been waiting about a decade for someone to tackle this, but I am super happy that it is finally a thing.

Edit - Also, not sure that math is working correctly? If Eirika has 8 Str, then she should have 16 Attack with the Steel Sword with vanilla values. Taking off the 5 Defense would make it 11 damage, +1 to 12 via Weapon Triangle at Range 1. As a Magic Sword, it’d be 4+8 = 12 Attack - 2 Res for 10, non-WTA damage. (GIF shows 14 at range, 15 with WTA at melee.)

Similarly, Slim Sword is 3 Mt at vanilla, which would make it 7 damage at melee with WTA and 5 at range (no WTA), but the GIF is showing 9 at range and 10 at melee with it…

1 Like
#14

I did actually forget to migrate to my new function the part that halves str, so the only difference is the +1 from WTA in the above gif.

2019-03-05_21-17-55

As you see here now, damage at range is less but still not correct (8/2 Str + 8 Mt - 2 Res should be 10 damage, not 8). However, nothing I touched gets run unless the weapon has the hit res ability bit set due to where it’s hooked and every weapon seems to be slightly off what you would expect; Ephraim with 23 Atk Iron Lance is hitting for 22. Therefore, I’m fairly confident the part messing up the numbers is something to do with the skill system and not my fault (or if my fault, not within anything to do with magic swords).

I’ve updated the download link for the version that remembers to halve strength.

3 Likes
#15

When the magic sword is in range 1, the enemy always uses magic defense. Can’t he use physical defense?

#16

If this is the case, that’s probably why Eirika’s attack is showing up as a higher-than-it-should be 15 in that second GIF above. 8 Str + 8 Mt + 1 bonus for WTA - 2 Res = 15. Sme did note that you can set whether it targets Resistance at melee range via the 3rd byte of the “struct”, which must have been the case in the GIF for the Steel Sword.

(Still doesn’t solve why the Range 2 one is hitting for 8 instead of 10… unless something is backwards on the Steel Sword and it’s hitting Defense at Range 2 and also factoring in the Weapon Triangle Advantage at the same time, even though it doesn’t display it? (4+8+1-5 would be 8…))


That last question of yours does bring up a thought or two that I have for Sme, though - I feel like, to fully empower creators, the system should account for the following if it doesn’t already (and can be done):

  1. Exportable to non-Sword physical weapons (though Axes would potentially be a problem, unless it defaults to the Hand Axe “spell” at range - I know you can assign magic animations to Bows and Lances by default, but they wouldn’t have the actual magic properties like the OG Light Brand, etc. have and that this replicates)
  2. Ability to customize which stat an individual weapon hits at a given range, including an option for targeting the lower of the two Defenses (i.e. you could set a Bow weapon to hit the lower of Def or Res when attacking or could make something like the Bolt Axe where it hits Def at Range 1 and Range 2, but still counts as Thunder magic when in combat with magic (see #3))
  3. Weapons that always have the property of their assigned Magic type - if you attack a Light Mage (if Anima/Dark/Light) or a Fire Mage (if Fire/Wind/Thunder) with a Levin Sword at Range 1, would it count as a Sword or does it count as Thunder magic in terms of Weapon Triangle interaction? Similarly, what if it was a Bolt Axe instead and you were attacking a tome-user at Range 2 - would it count as a Hand Axe or Thunder magic (discounting the aforementioned animation problem with ranged Magic Axes)?
2 Likes
#17

Since magic swords are now just an arbitrary list of item IDs you can already make any weapon act like a magic sword, and because of how all ranged weapons work you just need to give them an actual spell animation instead of the arrow/javelin/hand axe spell animation (though it may look a bit weird if the ranged animation is made expecting the javelin/hand axe/arrow spell).

There is a bit in item data that if set makes the weapon hit Res instead of Def, for magic swords in vanilla there’s a check to see the current range and if it’s not 2 it unsets that bit where it’s stored in the attacker struct; I changed that to if it’s less than 2 to unset it and also skip the entire check if you specify to hit Res at both range and melee.

If you’re working with Snakey’s anima triangle and you specify a magic sword as a specific anima type, it will be considered so at any range; if you wanted to make a Bolt Axe, put it on the thunder magic list there and keep it a normal 2-range axe and it will be considered thunder magic at both melee and range while being an axe, completely doable outside of magic sword rework.

That being said, the ability to instead of just 0=1-range Def, 2+range Res; 0=1+range Res to have the ability to set what it targets at melee and at range with options like higher of Def and Res, lower of Def and Res is an interesting idea and doesn’t sound that hard to do, so I may add it would probably push each entry to 4 bytes which would sit nicer with me anyhow. Giving the magic at any range behaviour to anima, light, and dark magic also seems pretty doable and if I stopped being lazy and stored information more efficiently I could probably keep it in 4 bytes still.

2 Likes
#18

Alright, after a lot of tweaking and testing I’ve changed how entries in the magic sword list are laid out, as well as added a macro to the event file for an entry, and updated everything in the download. Now instead of specifying whether or not it hits for res at 1-range, you specify what it hits in melee and what it hits at range. Additionally, you can choose whether or not it stays as the weapon type you assign to it in melee.

Entries are now laid out like this:

MagicSwordEntry(itemID,weaponType,alwaysMagic,meleeBehavior,rangeBehavior)

There are examples in the updated event file for the vanilla magic swords and how their behaviour looks in this format.

For melee and range behaviour, you have 4 options; hit defence, hit resistance, hit the lower of the two stats, or hit the higher of the two stats. Melee behaviour covers 1 range and range behaviour covers 2+ range.

A very big caveat at the moment is that no matter what you set, no magic swords that are in item slots besides the vanilla magic swords can hit defence ever; this is due to, when getting enemy’s defence for the battle and deciding if you’re going to hit defence or resistance, it checks the item table for the magic damage flag on the item and not the location in memory that is edited to remove that flag. Since somehow vanilla magic swords do work, there’s something somewhere that determines otherwise on just those weapons that I’ve yet to find. Once I do I will update again to add a fix for this. I shouldn’t need to update the rework code again, just add a fix for this when I find where it needs to go. I’m starting to see why nobody had attempted this for a decade.

1 Like
#19

Entirely unrelated to magic swords, but I’ve also updated Escape/Arrive. Now a non-lord unit cannot escape when rescuing another unit. Additionally, the vanilla lord check was exchanged for a lord bit in character data check.

However, the big thing I’ve done with it is divorce it from the skill system; as long as you repoint the unit menu (example included in download) then skill system should not be required. It’s also possible it’s not required already as-is but haven’t looked enough into it and it’s been long enough that I’m not 100% on how it all works anymore.

#20

Ah, since you listed it as “Magic Sword Rework” and specifically said “act as normal swords at melee”, I didn’t even process that you could just use any item ID and it wouldn’t matter.

Just to make sure I’m understanding, let me make sure my question came across correctly - my point was, let’s say you had a Bolt Axe and there were two enemies with a tile open in between them, both in your unit’s range. One enemy has a Steel Sword and the other has a Shine tome.

If it fought the sword user at Range 1, you’d expect WTD (Axe). If it fought the sword user at Range 2, you’d expect no WT effect (Thunder magic). (Though a case could be made for some weapons to need to be thrown and hit for their magic to activate, not like most Swords do it, so you could also reasonably expect WTD as well.) If it fought the unit with Shine you’d either expect WTA at Range 1 (Thunder-enchanted) or no WT effect (Axe), and at Range 2, you’d expect WTA (Thunder) or no WT effect (Throwing Axe, like the alternate take for Swords). Basically, it would count simultaneously as both an Axe AND Thunder magic.

(Maybe this is what you’re meaning by “Additionally, you can choose whether or not it stays as the weapon type you assign to it in melee.” ?)

I wish I could help on the memory location aspect - I do have some notes on Magic Sword stuff from Hextator/whatever he’s going by these days (the file is dated 2007, oh lord), but they’re from FE7 so the locations in the assembly likely don’t match up to FE8. (There was one function that he documented that “seems to do nothing”, but who knows what it actually does.)

1 Like