Sme's Thread of 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).

(This hasn’t been incredibly rigorously tested, so let me know of any issues you find with it!)

[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] 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] 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).

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

[Mapping] Improved FE8 Desert Tileset

Desert Tileset

Improved FE8 Desert Tileset
(will prolly merge into thread eventually but for now just a link)

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

Sound Room Modules

Sound Room Nightmare Modules
(will prolly merge into thread eventually but for now just a link)

[NMM] FE8 Boss Music Editor

Boss Music Editor

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

Download

21 Likes
#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

11 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

7 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.

2 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