[FE8U] Aura Wolf's ASM or something

Not sure how much I’ll end up putting here, but I’ll keep this post as a table of contents I guess ¯\(ツ)

If you aren’t using the Buildfiles method, you’ll have to either assemble through Event Assembler (recommended) or use a hex editor to apply any changes.

Long-Lost Friends Buildfile

Standalone Assembly

Toggle Deployment Swapping

Updated L Button Cycling

Shopping Edits

Definable Bags of Gold

Supply View

Set Name Fixes

Minimum Deployment

Help Text

14 Likes

Toggle Deployment Swapping

#include “ToggleDeploymentSwapping/ToggleDeploymentSwapping.event”

Being able to reposition your lord by a few tiles can be convenient. However, the previous method of allowing this came at a gameplay and narrative cost. If the developer wanted a certain unit to be separated from the main group, the player could completely ignore that by either switching that unit with one of their choosing, or not deploy the maximum number of units so that the spots could be left empty (i.e. no one would be separated).

This modification provides control over scenarios like this without sacrificing the previously mentioned bonus. Whether the forced unit is locked into their position or not isn’t on just a chapter-by-chapter basis, but per unit as well. The first applicable entry in the forced deployment list will be used, so for any unit that’s forced deployed for the entire game, exceptions for particular chapters should come earlier in the list before their rule of thumb.

However, there is some new middle ground between being locked into place and being able to freely change. Certain units in a chapter can now be limited in who they can swap with. A separate group of units could reposition amongst themselves, but not with anyone else.

An example of setting up for a specific chapter has been provided in the download in case the macros that are included don’t example the method very well.

17 Likes

This is super cool - looking forward to trying it out. Thanks for figuring this out.

2 Likes

Updated L Button Cycling

In vanilla FE8, pressing “L” during normal gameplay will move the cursor to the next ally unit that can act, regardless of where the cursor currently is. In FE11, if the cursor is on an enemy unit, the cursor will instead go to the next enemy unit. This modification brings that change to FE8.

Example

UpdatedLButtonCycling

14 Likes

I porting your UpdatedLButtonCycling to FE8J FE7U FE7J FE6.
https://cdn.discordapp.com/attachments/725478895226191892/922452569526239232/UpdatedLButtonCycling.7z

4 Likes

Thank you!

I now have an updated version of the mod. The functionality should still be the same, but instead of branching into free space, it now fits entirely inside the space the original routine (missed these optimizations due to rushing the release last night :no_mouth:).

1 Like

Heya!

I’ve been making use of this neat mod for a personal FE6 project. Though after playing through chapter 9, the first fog of war chapter, I noticed a bit of a bug. The cursor will go from a visible enemy to a space in the fog when I press L, where the next enemy on the list would be, and then pressing L from there takes the cursor to Roy. Because I’m not supposed to be able to act as though I know the enemy is there.

I would have no idea how to tell you to fix it, but I’m wondering if maybe you could see what’s done individual enemy menu cycling in FoW? And how it knows then to skip over enemies the player can’t see. But otherwise I can’t help!

Regardless, this is a fun extra tool for me to use as the player.

1 Like

Thank you for the report! I don’t normally deal with FE6, but thanks to @7743 's port, I was able to more easily make an update for the FE6 version. The following hex dumps should fix the issue.

FE6 hex dumps

0x1C070

00 4B 18 47 [PointerToFreeSpace|1 in little endian (e.g. free space is 0x1000000, do 01 00 00 09)]

0x1C0DC

F0 B5 14 4A 12 68 89 00 51 58 08 5C 05 1C 80 26 30 42 05 D1 40 26 30 42 04 D1 00 26 3E 27 02 E0 B2 27 00 E0 54 27 01 35 2C 1C BD 42 0B DC 20 1C FF F7 B0 FF 00 06 00 28 09 D1 01 34 BC 42 F6 DD BD 42 04 D0 2F 1C 01 24 A4 19 AC 42 EF DD F0 BC 01 BC 00 47 04 D2 02 02

FreeSpace

F0 B5 05 1C 1E 49 8E 46 00 F8 04 1C 00 2C 32 D0 20 68 00 28 2F D0 87 20 A1 89 08 42 2B D1 0E 26 A6 57 0F 27 E7 57 17 48 00 68 B9 00 41 58 88 5D 00 28 21 D0 AD 09 00 2D 05 D1 20 1C 2E 30 00 78 0F 21 01 40 04 29 16 D0 02 29 14 D0 0E 48 0F 4D AE 46 00 F8 00 28 02 D1 0D 48 AE 46 00 F8 31 1C 3A 1C 0C 4B 9E 46 00 F8 30 1C 39 1C 0A 4A 96 46 00 F8 01 20 00 E0 00 20 F0 BC 02 BC 08 47 C0 46 0C 86 01 08 14 D2 02 02 A8 56 5C 08 7C 3E 00 08 44 7E 5C 08 C0 61 01 08 0C 60 01 08

FE8U Updated Download

  • Free space is required again due to making a jumpToHack at 0x1DADC, which was previously left alone
  • The cursor should no longer cycle to units hidden by fog or roof tiles
  • Enemies or NPCs with Berserk/Sleep will be cycled to

If 0x59DBBC is repointed (e.g. you’re using the 3 House style Skill System) and the repointed proc isn’t defined as “gProc_PrepScreen”, you’ll want to change the definition on Line 3 of UpdatedLButtonCycling.Event:

FE8 hex dumps

0x1DADC

00 4B 18 47 [PointerToFreeSpace|1 in little endian]

0x1DB4C

F0 B5 14 4A 12 68 89 00 51 58 08 5C 05 1C 80 26 30 42 05 D1 40 26 30 42 04 D1 00 26 3E 27 02 E0 B2 27 00 E0 54 27 01 35 2C 1C BD 42 0B DC 20 1C FF F7 AE FF 00 06 00 28 09 D1 01 34 BC 42 F6 DD BD 42 04 D0 2F 1C 01 24 A4 19 AC 42 EF DD F0 BC 01 BC 00 47 D8 E4 02 02

FreeSpace

F0 B5 05 1C 1E 49 8E 46 00 F8 04 1C 00 2C 32 D0 20 68 00 28 2F D0 E0 68 1A 49 08 42 2B D1 10 26 A6 57 11 27 E7 57 18 48 00 68 B9 00 41 58 88 5D 00 28 21 D0 AD 09 00 2D 08 D1 20 1C 30 30 00 78 0F 21 01 40 04 29 16 D0 02 29 14 D0 0F 48 10 4D AE 46 00 F8 00 28 02 D1 0E 48 AE 46 00 F8 31 1C 3A 1C 0D 4B 9E 46 00 F8 30 1C 39 1C 0B 4A 96 46 00 F8 01 20 00 E0 00 20 F0 BC 02 BC 08 47 C0 46 30 94 01 08 87 00 01 00 E8 E4 02 02 D8 AA 59 08 9C 2E 00 08 BC DB 59 08 0C 5E 01 08 BC 5B 01 08

If gProc_PrepScreen (0x59DBBC) is repointed, change BC DB 59 08 (towards the end of FreeSpace chunk) to [PointerToNewLocation in little endian]

2 Likes

Long-Lost Friends Buildfile

This is my first time using github to share files, so please feel free to let me know if there’s something I should adjust.

Not all of the included code is in the planned final state (in particular, Supports and StatusDebuffs). There also may be bugs lurking around, so keep that in mind if you intend on using any of this. There’s a README included that is almost identical to the information below, except for the inclusion of gifs and images in this post. As I did with my project’s post, I won’t cover literally everything included, but I’ll go a bit more indepth on stuff compared to that post.

HelpText

HelpText_1HelpText_2

This assembly changes how information accessed through helptext can be viewed. There’s two main things to note here:

  • You can add additional elements to how a text id is displayed. In vanilla, weapons have shared characteristics such as might and weight, but they also have values in those elements. You can use the way the game presents these variables for other information.
  • More than one text id can be assigned to a single thing. During gameplay, the player can press “A” to access the next text id. I didn’t get around to doing every time the player can view helptext for items, but I got the more essential times covered.

If you want to make a new module, I recommend looking at the Skills module for reference, as that’s the latest one that I’ve done. Before I end this section, shoutouts to Vesly for his ExtendWeaponDescBox assembly.

Planning

Plan_1Plan_2

Shoutouts to Vesly once again for his DebugPlaceUnits assembly, which is used as a base and also gave me inspiration for this idea. When the player turns planning on with the map menu command Plan, they can now also move and act with enemies, NPCs, and grayed out units. You can go to spots that units wouldn’t normally be able to go to as well. The Future command is also accessible. This command plays the next closest turn event(s). The player can’t win or lose while planning. Attempting to resume the game will bring the player to the point before selecting Plan, but selecting Act will also do this.

In its current version, the chapter events need some “edits” to fully utilize this/avoid the free win exploit. Feel free to take a look at the events in LLF if you are considering including this mechanic.

Other QoL

PublicBuildfileQoL_1aPublicBuildfileQoL_2
PublicBuildfileQoL_3PublicBuildfileQoL_4

Help Text Modifications and Planning are probably the two biggest things included (which is why they have their own folders), but there’s plenty of smaller additions as well.

Items

PublicBuildfileItem_1PublicBuildfileItem_2
PublicBuildfileItem_3PublicBuildfileItem_4

There’s a few new items in here. Yep.

One thing I want to actually note is that I changed the debuff system that comes with SkillSystem for new stuff. There are a few items that are made with those changes in mind, so they can’t be separately ported without either further edits or completely adopting the debuff system used by LLF.

Supports

LLF isn’t a particularly long hack at this point, but I wanted to tinker with the GBA system in advance.

  • Support points are gained at the end of the chapter. Regardless of if the units are deployed or not, each pair will gain progress to the next rank, but they get 50% more if they’re both undeployed OR 100% more if they’re both deployed.
  • You can reach A rank with all partners, but only 1 support can be “active” at a time. Once you’ve unlocked a second partner, you can switch the active partner during preparations in the Supports screen by selecting the unit and pressing “A” on the new partner you want active.
  • I sacrificed the 7th support partner slot for saving which partner is active.
  • Since the “Remaining x” text isn’t useful, I changed it for displaying whether or not a unit is “set” to have a paired ending with someone or not. If a unit has an A-rank support with their current active partner, you can press “A” on that same screen to “set” the ending to be paired. I keep saying “set” because there currently isn’t anything that actually checks for this in the credits (i.e. it’s not an actual feature yet), but if there’s someone that wants to look into it, there’s at least a baseline for it to exist. Or something.
  • Affinity bonuses can now provide 1/10 of a point instead of 1/2 of a point in any stat. I wanted all affinities to have at least +1 Atk and Def by A rank, but I also wanted them to have unique bonuses, so…yeah.
Non-LLF code

Finally, I also want to note some edits I made to engine hacks that aren’t in the _LLF folder. I didn’t want to add them into the _LLF even if they were externally downloaded and added in because I didn’t make them, but I still wanted to list any changes of the top of my head in case someone randomly uses this as a base for their own stuff.

ExternalHacks

  • EscapeArrive: Commented out some inline edits (related: _LLF/QoL/EscapeTheEscapeSoftlock)
  • Fatigue: Does not affect ability to deploy a unit, undeploying restores some fatigue and gives units extra exp (and temporary stats if fatigue is low enough)
  • PreventTrade: Added a check specifically for HeavyHoveringBoots
  • RandomizeRNs: Added ExpandedModularSave module
  • UnitStatOffsets: Changed where it hooks, now reads off of a table indexed by chapter ID

Necessary

  • Antihuffman: In AntihuffmanString_GetFromIndex, added comparison to see if r5 is 0 before doing a comparison between r0 and r5
  • CalcLoops: BattleProcCalcLoop/ProcStart/proc_start has added functionality for Perfectus, Glancing Blows, and Skl advantage guaranteeing crits with Killer weapons; WeaponUsabilityCalcLoop/CanUnitWieldWeapon will prevent items with 0 uses on ItemResetList from being wielded; WeaponUsabilityCalcLoop/DoesUnitHaveWRank will go to WeaponRankModifierLoop to determine unit’s current Weapon Rank
  • ExpandedModularSave: Suspend data won’t update if planning, save more bytes for non-player units, save 4 bytes intended for managing two currencies, save rns before beginning battle
  • GrowthGetters: Added check for Learning Ring
  • IconRework: Something about fixing a sword being displayed instead of a mounted icon when rescuing units
  • ItemRangeFix: Added check for LastLegs. For a previous project, I think I had some weird issue with Capture, so there’s some change related to that in here
  • MSS: Adjusted formats for Page 1 and 3, replaced “Equipment” with AS on Page 2, added some stuff to work with helptext changes
  • StatGetters: Commented some getters (only one worthing noting is hp from equipped items), added new ones
  • SuspendDebuffs: Replaced existing format with a new format specifically for LLF (related: Mechanics/StatusDebuffs)
  • UnitMenu: Added Draw Back, Split Up, Cross, and Advance; changed entry for Wait

QualityOfLife

  • BattleStatsWithAnimsOff: New icons by Alusq
  • HpBars: New bars by Alusq, removed two of the hp bars (adjusted calculation with this in mind), added buff & debuff arrow displays
  • ModularMinimugBox: AI can be displayed over Name (related: _LLF/QoL/AiToggle), added check for Prime Five being active
  • ShowHealAmount: Added passing the target unit for calculation (mostly for a gimmick staff healing formula that is userLuck + targetLuck)

SkillSystem

  • Commented a lot of unused skills, added some skills (see _LLF/Skills)
  • Commented Acrobat for a new version that cooperates with _LLF/Mechanics/TerrainMovementCost
  • Commented out SkillDescGetter for a new version in HelpText
  • Edited RTextLoop to make helptext cursor flow more smoothly
  • GetSkill: If units have Canto as class skill, they do not get access to personal skill; Enemies/NPCs will read Fatigue byte as an additional skill
18 Likes

Some really cool stuff in here! Well done.

I like this, but I think it needs to be communicated to the player when there are multiple pages. Eg. with 1/2 or a flashing A for example. Could appear beside Help if that’s easiest or maybe in the bottom right. I am kinda kicking myself like “it probably would’ve been easier to make it have multiple pages and it would look better than oversized boxes, too” :sweat_smile:

1 Like

Thank you!

I agree. At first, I wanted to use the A button prompt that dialogue already uses (the flashing arrow). It didn’t show up or something, and I didn’t feel like looking into it. I at least have a vague idea on making page x of y show up, but I didn’t want to pursue both of those methods, so I ended up doing neither :no_mouth:

If I revisit that assembly in the future, I would probably give the flashing arrow a much more persistent attempt and then only settle for page x of y thing if I couldn’t make it work.

The ExtendWeaponDescBox hack is still really useful! There’s definitely times where it’s nice to just have a slightly larger page instead of splitting into two.

1 Like

I recently participated in the MARTH contest. Now that I no longer need to work on Trader Raiders, I’ve been looking at not only porting stuff over, but also some general updates. For one thing, I added PROTECT to my hooks and inline code, which is why a lot of files have changed. Apparently, I have also been ignoring the opening pair of apostrophes, so any text with apostrophes should have both sets now. Lastly, I uploaded the LLF buildfile for sharing the code within, but not for any of the aesthetic assets. To clarify this, the following has been added to the README:

The license for this project (CC0-1.0) only applies to the code within. To use assets not made by me, please check with their author (unless a public resource states what the usage rights are or something).

With those out of the way, here are the actually substantial changes to the buildfile:

Further update details

MultiplePageUpdate

Thanks to Vesly, this flashing arrow will appear for anything that has multiple pages of help text! A less obvious thing shown by the gif is that multiple item page functionality is now universal. No matter how you’re accessing the helptext for an item, you should always be able to press “A” to advance to the next page.

DynamicCharDescExample

Entries are CharDescList now 8 bytes long; the last 4 are used for taking a routine as a parameter. You can create and use such a routine for showing that a character has aged (whether that’s simply a birthday or a 10-year gap in your story) and/or a character’s journey of self-discovery. There are some example modules included in HelpText/OtherModules/Character/asmModules

ItemAddition1_IneptItemAddition2_AgileEdge

Two new items have been added: the Inept staff and the Agile Edge (both icons by Lord Glenn). The Inept debuff already existed, but you would have to call an ASMC or memory hack to see it in action. While I had already brainstormed them during LLF’s development, I never needed to make them a reality until I got farther along into making Trader Raiders.

Lastly, I fixed two bugs that were “introduced” on the final day of my process of reviewing/updating the buildfile. I didn’t notice them until sometime recently.

Bug #1: Besides the first item entry in ItemHealingList, items wouldn’t properly heal the user.
Bug #2: Viewing the helptext for level would show garbled text where the class cap value should be.

8 Likes

Standalone Assembly
This repository was created to distributing LLF’s assembly in a more user friendly way. I started this particular project with the SkillSystem available on August 10th, 2023, so there may be some adjustments because of this new base (for comparison, the SkillSystem LLF used was probably from around May 2020). The README in the repository has some more information on using/reading the repository.

Currently, it’s very small compared to everything that LLF has, but what it does contain should hopefully be a lot easier to use/insert into your own projects. Right now, I’ve ported over the two previously released modifications (ToggleDeploymentSwapping and UpdatedLButtonCycling) and have a new version of…

Shopping Edits

I’ll include the description below, but for a quick tl;dr, see the gif below (the Iron Sword is supposed to disappear; it’s acting as a coupon)

Example

ShoppingEdits

Changes from the LLF version
  • Scraiza’s shop list expansion assembly is now included. This has been modified to work with both ShoppingEdits and IconRework.
  • Is now compatible with DurabilityBasedItems. Instead of reading the byte after item id as the event ID for bargains, shops that have bargains will need to be “paired” with pointers to their bargains. While this is more inconvenient, it’s now possible to set the base price of each bargain.
  • Related to the above point, PriceModifiersMainLoop will now start its process by reading from PriceBaseModifierFunctions before moving onto multipliers.
  • If a player unit with a full inventory and a coupon purchases something, the shopkeeper will first ask if you want the new item in the unit’s inventory before asking to send to convoy.
Description (from main file)

This changes how shops normally work in a few different ways. While several of these changes are mandatory (unless you take it upon yourself to make that not the case), there are a few optional changes that you can toggle below this large commented section.

Forced Modifications

  • Adds functionality for reading price multipliers and discounts off of easily accessible lists. Also allows defining set values for variables such as price minimums and discount maximums.
  • Changes the prep shop loading so that the shop list is determined by the current chapter.
  • Installs a modified version of Scraiza’s ShopListExpansion asm. You can still have up to 255 items, but due to the increased complexity that ShoppingEdits brings, you may notice more lag in larger shop lists.

Optional Modifications

  • Bargain functionality: By allowing an event ID to be set if the player purchases a specific item, you can have one-stock items. If you want to reuse an event ID, you will have to do that yourself in that chapter’s events. To make this limited stock effect possible, items with a price of 0 cannot be bought from the shop. This assembly was originally intended to be used with the prep shop only, but it can also be used for shops the player will access during the chapter itself. Keep in mind that events are usually included in a scope (“{#include …}”), so you will need to have the shop included outside of the scope if you want it to be on ShopBargainPairingList.
  • Coupon functionality: Lower next purchase’s price by a set percentage, then disappear from the unit’s inventory. If a unit has a full inventory, but a coupon would be removed due to the purchase, the shopkeeper will ask the player if they want the purchased item with the unit before asking to send to convoy. To see the coupon functionality without having the actual item in your hack, IronSword will function as a Coupon if Coupon is not defined.

Edit: Updated ShoppingEdits.

  • If ItemTable is repointed, ItemClearer should now correctly find it
  • Renamed RemoveItem to RemoveItemFromUnit and added a message if RemoveItemFromUnit is already defined
11 Likes

Pronouns? Now THIS is cool!

1 Like

Made a small update to standalone releases. All I did was add #include EAstdlib.event and #include "Extensions/Hack Installation.txt" to the installers. If you already have the assembly working in your buildfile or whatever, you shouldn’t need to download anything; this is just for future users that may actually be installing it on its own.

I wanted to have a bigger thing ported over, but I haven’t gotten around to it yet. However, I do have a much smaller thing ready to go.

Definable Bags of Gold

Obtaining a bag of gold from stealing or an enemy drop will directly give the player money instead of the actual item. The way vanilla FE8 normally does this is by checking specific item id ranges. With this assembly, the game will now read from BagsOfGoldList to determine if the newly acquired item is a bag of gold. If you need to free up more item ids for new items that can actually be stolen or dropped from enemies, this is a nice modification to have.

…I suppose you could also make more bags of gold if you really wanted to.

Description (from main file)

Definable Bags of Gold
This assembly changes hardcoding that checks when an item is obtained from stealing and from an enemy dropping it. Instead of checking for ids written directly in the code, it will read off of a shared list of item ids. As long as the acquired item isn’t on the list, the unit will actually receive that item.

Optional Modification:
HALVE_BAG_OF_GOLD_COST: In vanilla, once the bag of gold is “found”, 100% of its item cost is used for calculating how much gold the player gets. A bag of 3000 gold that was stolen or dropped by an enemy will directly give the player 3000 gold. If a player unit somehow had that same bag of 3000 gold and went to a shop, it would sell for 1500 gold. If you need all 3 of these values to match and aren’t already using assembly that can change how selling is calculated, you can make them match by uncommenting the definition on line 15 (“#define HALVE_BAG_OF_GOLD_COST”). Afterwards, you’ll also need to make sure each bag of gold has its item cost be name*2 in your item editor. Using the 3000 gold example again, that particular bag would need an item cost of 6000.

6 Likes

Supply View

Example

SupplyView

Description (from main file)

Supply View
This assembly makes it so units can always freely look into the Convoy without being locked into their current position/into acting now. This is done by replacing the “Take” supply command with a new “View” supply command if the current unit has a full inventory.

Set Name Fixes

Example

SetNameFixes

Description (from main file)

Set Name Fixes
[SetName] is a command for cgs generally used to indicate a speaker, but it has a few limitations. The length of the name must be an even number, and [SetName] only takes effect at the very beginning of the text. You can already work around these two issues by using [.] and multiple text ids, respectively, but this assembly’s modifications edits the textcode itself to solve those problems.

Optional Modifications
SET_NAME_ODD: This fixes problems with attempting to set a name that has an odd-numbered character length.

SET_NAME_MULTIPLE: This makes [SetName] replace the most recent name set by [SetName]. There is a pause variable that you can modify below. If you want a different pause for different situations, you will have to do that on your own (I would set the variable below to 0 and then either use whatever textcodes deal with pausing or use [LoadOverworldFaces] and then add whatever STAL feels right)

Note: When using [SetName] multiple times, use textcode [0x2] or [2NL] before all but the first one. This will make the next speaker’s dialogue begin from where you’d expect it to, rather than picking up from the previous speaker. I recommend making a new definition in ParseDefinitions.txt for this purpose, such as the one below.

[SetNewName] = [0x2][0x80][0x23]

13 Likes

How about durability based gold amounts? That’d be neat.

You don’t have to lol :sweat_smile:

1 Like

I probably won’t do it haha
The wizard’s creed has led to me making some…interesting choices, but I don’t think it’s enough to motivate me for that particular idea

1 Like

Minimum Deployment

Example

MinimumDeployment

Description (from main file)

Minimum Deployment
This allows a minimum deployment count to be set on a chapter-by-chapter basis. If the player tries to undeploy units below a chapter’s set amount, the game won’t allow them to.

Optional Modifications
MINIMUM_DEPLOYMENT_PREP_UNIT_SELECT_HEADER: This changes the text above the unit list from “Pick [max-current] Units Left [current]/[max]” to “Min. [min] Current [current]/[max]”.

MINIMUM_DEPLOYMENT_UNDEPLOY_ERROR_MESSAGE: If undeploying the currently selected unit would drop the deploy count below the minimum, text will appear to explain why the command didn’t go through.

15 Likes

Hey. By any chance, do you take suggestions for new ASM or item ideas?