Dragz’s Backstage

Hi there! My name’s Dragz, and this is a dedicated thread for any ASM/C hacks I make.

Master Github link: GitHub - GigaExcalibur/asm

Hidden Stat

Hey guys! Nothing strictly new tonight, just a polish for an ancient hack I made.

One of the first hacks I ever made was the “Age Getter,” an extraordinarily simple hack allowing users to create a new table of unsigned bytes in ROM indexed by unit id and get the value at a given index. This original version was:

  1. Inflexible. The table was read as unsigned bytes, and thus only values from 0-255 were supported.
  2. Shallow in functionality. While the table and getter did work, you couldn’t get a unit’s age in events, only from the direct function.
  3. Poorly documented. Anything written in assembly is unreadable by default and I put no effort into making it easy to read or edit.
  4. Improperly flavored. It was pointed out to me that character ages are an extremely niche use case and people could use this for any extra character byte they wanted.

My new version fixes all of these flaws. The code is now flavored as “Hidden Stat,” it’s been rewritten in C, includes the ASMC GetUnitHiddenStatASMC that returns a unit’s hidden stat in sC, and now supports values from -128 to 127.

Download link: asm/HiddenStat/HiddenStat.c at main · GigaExcalibur/asm · GitHub

#include HiddenStat.event in a buildfile or Insert EA with FEBuilder. The original version of Age Getter will stay up for the sake of archival but is now considered deprecated.

That’s all, have a wonderful night!

Forging (INCOMPLETE)

Introducing Forging. This code repurposes a weapon’s durability byte in RAM as its forge count, giving it stat bonuses depending on forge effects in a user-defined table. As a lover of unbreakable weapons, I’ve never felt more vindicated to have a practical application for removing durability.
ezgif-4-77d5ee6d09

Installation and Configuration:

  • Installation is incredibly simple this time around! Just #include Installer.event anywhere in your buildfile, or Insert Installer.event with EA if you’re an FEBuilder user.
  • Within Installer.event are the configuration options. There are two EA tables that you have to fill in: ItemForgeTableEntries and ForgeEffectTable.
  • ItemForgeTableEntries is a table that determines which forging path that item goes down, indexed by item id. Use the macro ItemForgeTableEntry() to avoid having to keep track of the index yourself.
  • ForgeEffectTable is a table that determines the stats boosts of an item per forge level. You can boost (or lower) Might, Hit, Weight, Crit, and even Max Range! Just be aware that every value in the table has to be multiplied by 2 (or 6 in the case of max range), as that’s the easiest way to do increments of 0.5 in the code.
  • Once the tables are set up, make sure to set every forgeable item as unbreakable in the item table. If you try to add a breakable item to the forge table, it will treat the item as being forged the number of times equal to its durability. Which could be fun as a mechanic of like, weapon rusting, but it’s not intended usage of this hack. Normal breakable weapons should otherwise function normally.
  • Alright this is where the fun ends. While the forging architecture is pretty much complete, I don’t even know where to begin creating an interface ingame to allow the player to forge their items in. Currently the only way to forge items ingame is with the SetStatus patch, which is very clunky and not something I’d ever force on a user. My initial idea was to integrate this hack with Sme’s More Shop Types hack, although I’m nowhere near that skill level yet.

I wouldn’t recommend using this hack until the necessary interfacing is complete, which could be anywhere from next week to next decade. But still, I hope you like the architecture of forging! Thank you to the usual wizards for helping me out with this.

Edit: forgot download link, whoops. It’s the same Github as usual: https://github.com/GigaExcalibur/asm/tree/main/Forging

PMD2 Midis (not coding)

Hey guys, slightly different content I have for you all today. I was sick in bed this past week and didn’t really have the energy for hacking, so I fiddled around with some Pokemon Mystery Dungeon: Explorers of Sky midis, formatting them for GBA insertion.

Included in this first set is:

  • Chasm Cave
  • Ending Theme (main story)
  • One for All, All for One!
  • Random Dungeon 3
  • Sky Peak Prairie
  • Temporal Tower
  • Time Gear

I don’t feel comfortable putting them in the Music Repo, but they are all F2U/F2E. You can find the midis, .s files, and .event files (for buildfile users) all in their respective folders on my regular Github: asm/PMD2Midis at main · GigaExcalibur/asm · GitHub

That’s all, have a great day!

Player-Exclusive Class Descriptions

Introducing Player-Exclusive Class Descriptions. This is a small hack that allows you to set different text ids for a class description depending on whether the unit in question is a player or not a player.

ezgif-4-2fbfee8b93
You’re just gonna have to trust me that these two units have the same class ID.

There’s no real mechanical purpose for this hack, it’s only used for flavor. But as someone who greatly enjoys flavor, I certainly am going to put it to good use.

Installation and configuration are so simple I’m not even going to write a bulleted list. Just #include Installer.event anywhere in your buildfile / Insert it with EA for FEBuilder users, and follow the macro defined in Installer.event to set your player class descriptions. Shouldn’t conflict with anything either, but be aware of any future hacks that change class description.

Download link: asm/PlayerClassDescs at main · GigaExcalibur/asm · GitHub

Thank you as always!

Miscellaneous Inlines

No major release today, just a collection of miscellaneous inline changes.

Battle crit threshold
PUSH
ORG 0x02ACC0
BYTE 0xA // battle crit below this number becomes set to 0
POP

Comment should be self-explanatory.

BWL Position
PUSH
ORG 0x870B8
WORD 0x020040F4 // I can't entirely explain it but the last two bytes here determine position
POP

Self-explanatory once again, the default value moves the BWL display down one tile to fit another line of stats there.

Remove prep support room theme
PUSH
ORG 0x951FC
SHORT 0x46C0 0x46C0 // nop out function call to change music
POP

Literally the simplest hack here, this makes it so the prep theme keeps playing when in the Support submenu there.

Stat Screen Map Sprite Y-Pos
#define MapSpriteYPos 0x97 // pixels, not tiles

PUSH
ORG 0x0886EC
BYTE MapSpriteYPos

ORG 0x087CE6
BYTE MapSpriteYPos

ORG 0x087DBC
BYTE MapSpriteYPos

ORG 0x087E34
BYTE MapSpriteYPos

POP

Self-explanatory (wow, there sure were a lot of these). Moves the unit’s moving map sprite in the stat screen down to the defined pixel, mostly useful if expanding the class name. You can see how it looks with the default value in the BWL position image.

Support screen positions
PUSH
// X-Offset of the support partner name in list
ORG 0x87722
SHORT 0x3104

// X-Offset of the support rank in list
ORG 0x87748
SHORT 0x340D
POP

For the first time in this list, not self-explanatory. This changes how far to the right each element of a support line is drawn to the affinity. This is really only useful if you’re doing what I did and split page 3 of the stat screen up into two columns.

Movement Cost Table Terrain Display
PUSH
ORG 0x8CA5C
POIN 0x80BB96 // address of the flying move cost table
POP

In vanilla, whether or not a given terrain type displays its hit and avoid bonuses is determined by its movement cost in the Berserker’s movement cost table (located at 0x80B90C). IS decided to tie this to the Berserker’s movement costs because it’s the vanilla class that can cross the most terrain types while still receiving terrain bonuses from them, but hackers could have a few edge cases where that’s not the case.

Namely I’ve seen a few hacks that make some classes (but not Berserkers) able to cross Thickets, so if you wanted to make the terrain window display Thickets’ Def/Avo bonuses you’d have to make Berserkers able to stand on them too. If that’s not something you want, point to a different movement cost list at the address above. It defaults to writing terrain bonuses for all terrain that fliers can cross, but if you only want this for thickets I recommend writing a new custom movement cost instead of using a vanilla one.

Infinite Status Duration
PUSH
ORG 0x188F8
SHORT 0x46C0 // status duration no longer ticks down
POP

PUSH 0x873F8
SHORT 0x46C0 0x46C0 // status duration no longer displays in statscreen
POP

Do you like Thracia 776? No? Well uh, in that case please avert your eyes. This was a funny idea I had during a status discussion in FEUcord and realized I could make it a reality by just noping out the line of code that ticks status down (and the line that displays status duration in the stat screen). Note that this doesn’t change the flickering status duration in the vanilla MMB, although nobody uses the vanilla MMB so I’m comfortable leaving that as is.

If anyone actually plays a hack that uses this, I’m sorry in advance.

Stats Box Class Name Width

We all love long, cool class names but if a class name goes beyond vanilla length it will cut off in the level up/promotion screen. But there’s a lot of space between the Lv label and the level number, so moving that one tile right allows for that extra tile of juicy flavor text.

Before:


After:


There are two cases for the stats box: one for when battle animations are on and one where battle animations are off. This hack covers both cases. Also if you notice incongruities between the two stat boxes, those are there in vanilla. I can’t explain them either.

Content
PUSH
ORG 0x73848 // case for battle animations on
BYTE 0xE8

ORG 0x9A3ED4 // case for battle animations off
BYTE 0x0A
POP

Insert with EA in FEBuilder or #include with a buildfile. It should cover both level ups and promotions but if I missed any other case please let me know and I should be able to add it.

Remove Armory/Shop BGM

Good evening everyone! Quick inline change that makes it so the map or preps theme is not interrupted by visiting armories or shops. This change has always been on my to-do list but I only recently learned how to parse proc code.

PUSH

ORG 0xB4C06 // no longer start armory bgm on initializing armory
SHORT 0x46C0 0x46C0
ORG 0xB4C10 // no longer start shop bgm on initializing all other shops
SHORT 0x46C0 0x46C0

ORG 0xA391A8 // no longer fade map music out on entering shop
BYTE $0E $00 $01 $00 $00 $00 $00 $00

ORG 0xA39430 // no longer fade shop music out on exiting shop
BYTE $0E $00 $01 $00 $00 $00 $00 $00

ORG 0xA391E8 // no longer restart map music from the top on exiting shop
BYTE $0E $00 $01 $00 $00 $00 $00 $00

POP

#include in a buildfile or Insert EA with FEBuilder. Let me know if there are any cases I neglected to consider, and have a great day!

These won’t go in the GitHub, so just copy the text from here and paste it wherever.

Base Theme by Chapter

Introducing Base Theme by Chapter. Another very simple hack, this allows you to customize the theme that plays in the Support / Base Convo menu in the prep screen by chapter.

A gif won’t do anything here so you’re just gonna have to trust me that it works. I called it “Base” theme by chapter because if you’re not using Snek’s base convos there’s no reason to use this. Hell, I’m not even using this myself, a friend requested it for their hack and I figured it was within my skill level. Regardless, there’s no reason not to make this public and if someone else has a use for it, all the better.

The usual simple installation: #include Installer.event in your buildfile, or Insert EA with FEBuilder. Use the defined macro ChaptersWithBaseThemeEntry to set the base theme for that specific chapter, and leaving a chapter out or setting the base theme to 0 will make the prep theme continue playing in the menu. This hack doesn’t require SkillSys and shouldn’t conflict with anything else.

Download link: asm/BaseThemeByChapter at main · GigaExcalibur/asm · GitHub

That’s all for this time, have a great day as usual!

Weapon Triangle Coefficients

Introducing Weapon Triangle Coefficients. This hack lets you set coefficients that multiply the weapon triangle hit/mt bonuses per difficulty. I actually made this hack several months ago but it wasn’t compatible with SkillSys and the code in general was just very shoddily-written. Now that I have more experience I figured I’d rewrite it to be SkillSys-compatible and better.

ezgif-5-2d1328198e

You can make the weapon triangle bonuses higher on a lower difficulty to help newer players learn the mechanic, remove the weapon triangle on the hardest difficulty a la Radiant Dawn, or even reverse the triangle on a specific difficulty for a special “Reaver Mode”. Weapon triangle coefficients can be any multiple of 1/12.

Included in the download link are two folders: one for SkillSys users and one for non-Skillsys users. Installation and configuration steps for each:

SkillSys Users:
  • #include Installer.event anywhere in your buildfile.
  • To make these functions run when calculating weapon triangle bonuses, add POIN IgnoreTriangle and POIN WtByDifficulty to the bottom of the WTA calc loop (EngineHacks/Necessary/CalcLoops/WTACalcLoop/WTACalcLoop.event).
  • To change the coefficients per difficulty, alter the bytes within the labels in Installer.event. Make sure the values in each byte are multiplied by 12 in order to support coefficients that are multiples of 1/12. If you have a negative coefficient, make sure you enclose the entire value in parentheses.
  • To designate items as ignoring the weapon triangle entirely, add their weapon ids to IgnoreTriangleList.
Non-SkillSys Users:
  • #include "Installer.event" anywhere in your buildfile, or Insert Installer.event with EA if you’re an FEBuilder user.
  • To change the coefficients per difficulty, alter the bytes within the labels in Installer.event. Make sure the values in each byte are multiplied by 12 in order to support coefficients that are multiples of 1/12. If you have a negative coefficient, make sure you enclose the entire value in parentheses.
  • To designate items as ignoring the weapon triangle entirely, add their weapon ids to IgnoreTriangleList.

If you read the installation/configuration options, you’ll recognize that this hack also comes with an updated version of my Ignore Triangle hack. My previous Ignore Triangle hack was functional, but involved repurposing an item ability bit when it wasn’t necessary. It also required SkillSys to work, which the new version does not.

The old version of Ignore Triangle will still be available on my GitHub, albeit with (DEPRECATED) in the folder name.

Download link: asm/WeaponTriangleCoefficients at main · GigaExcalibur/asm · GitHub

Thank you for reading, and have a great day!

Increase Weapon Level ASMC

Two releases in one day? Unheard of. Anyway, introducing Increase Weapon Level ASMC. Exactly what it says on the tin: it gives you an event command that increases a unit’s weapon exp to the next rank. Technically different from Set Unit Status because it bumps your unit up to the next rank instead of setting it to an absolutely value, hopefully that’s enough justification for it to exist.

ezgif-1-f814995d13

Installation is simple: #include Installer.event anywhere in your buildfile, and for FEBuilder users wait until 7743 adds this as a patch.

Structure and parameters in the example event:

ALIGN 4
ASMCTest:
SVAL s1 Klaudia   // s1 = unit to increase rank for
SVAL s2 Light     // s2 = weapon type to increase rank of
SVAL s3 0x0       // s3 = whether to give E rank if unit doesn't have any rank
ASMC IncreaseWLvl|1
NoFade
ENDA

Comes with the macro IncreaseWeaponLevel(unit, type, restriction) for your convenience.

Download link: asm/IncreaseWLvlASMC at main · GigaExcalibur/asm · GitHub

Stat Screen Terrain Bonus

Hey there! Been a little while. Introducing Stat Screen Terrain Bonus. Have you ever been annoyed that terrain bonuses don’t show up on the unit’s stat screen? Well this is because terrain bonuses are only applied to the unit’s “battle defense” stat instead of their base defensive stat, which makes it very difficult to check. This hack changes it so terrain bonuses are applied to the base stat, which doesn’t change anything practically but allows the true value to be more directly conveyed to the player.



Finally, everyone will see Thrones’ hidden resistance bonus for how bullshit it truly is (under normal circumstances, the Def/Res bonus wouldn’t show up in the MMB either).

This hack was directly inspired by Catball doing the same thing, but their version is incompatible with SkillSys. In contrast, my version is exclusive to SkillSys, so please seek them out if you’re not using SkillSys and would like this quality of life.

Installation instructions:

  1. #include "Installer.event" anywhere in your buildfile.
  2. Add POIN TerrainDefenseBoost to EngineHacks/Necessary/StatGetters/Defense.event
  3. Add POIN TerrainResistanceBoost to EngineHacks/Necessary/StatGetters/Resistance.event

The stat getter does all the heavy lifting on its own, all we’re really doing is moving the terrain bonus there from the battle stat calculation. As such, the only place this hack can potentially conflict with others is if they hook ComputeBattleUnitDefense. Aside from that, this hack should not conflict with anything.

Download link: asm/StatScreenTerrainBonus at main · GigaExcalibur/asm · GitHub

As usual, let me know if there are any bugs or things that can be improved! Thank you Catball for letting me steal your idea, and everyone please have a good day!

-Dragz

Auto-Refreshing Weapons

Presenting: Auto-Refreshing Weapons

Strictly speaking this hack is out already, first introduced in campaigns like Cerulean Crescent and The Morrow’s Golden Country, but never had a public release before now. Hopefully this makes the code more accessible for anyone interested in its functionality!

This hack allows you to define a list of items that are “Auto-refreshing.” Auto-refreshing items do not disappear when their durability reaches 0 and have their durability drawn in gold in all instances. When the ASMC RefreshItemsASMC is called, all instances of auto-refreshing items in units’ inventories and the convoy are set to maximum durability.

Installation (NO Skillsys):

  1. Download the folder here: asm/AutoRefreshingWeapons/NoSkillSys at main · GigaExcalibur/asm · GitHub
  2. Configure the list and definitions in AutoRefreshingWeapons.event to your project’s specifications.
  3. #include AutoRefreshingWeapons.event in your buildfile or Insert EA it with FEBuilder.

Installation (Skillsys)

  1. Download the folder here: asm/AutoRefreshingWeapons/SkillSys at main · GigaExcalibur/asm · GitHub
  2. Configure the list and definitions in AutoRefreshingWeapons.event to your project’s specifications.
  3. Add POIN ZeroDurabilityWeaponUsability to the END of the weapon usability calc loop. In theory it doesn’t have to be at the end for it to work, but in my testing it only works at the end so put it there.
  4. #include AutoRefreshingWeapons.event in your buildfile or Insert EA it with FEBuilder.

This hack would absolutely not be possible without the assistance of Retina, who helped me bug fix and provided inspiration for the original version’s implementation in TMGC. Shoutout to the usual group of wizards who assisted me in this endeavor as well: Vesly, Contro, and Shuusuke.

If there are any bugs please bring them to my attention!

Class-locked Weapon Ranks

Small thing tonight. Introducing Classlocked Weapon Ranks.

Made at the request of Citrus, this hack slightly changes how weapon usability works. With this system you can now only use a weapon if your class has a base rank in that weapon type. You can see here that Eirika has the rank to use the Iron Lance but can’t because Lord doesn’t have base lance access. Her lance rank is grayed out to reflect this.


The two big use cases for this hack are dismounting and free reclassing, since both systems involve allowing and prohibiting a unit’s weapon type based on their class. I don’t predict people will use this but I wanted to put it out there anyway.

Skillsys-exclusive because I don’t particularly feel like touching CanUnitUseWeapon more than I already have. Download link: asm/ClasslockedWeaponRanks at main · GigaExcalibur/asm · GitHub

Installation instructions:

  1. #include "ClasslockedWeaponRanks.event" anywhere in your buildfile.
  2. Add POIN ClasslockedWeaponUsability to the end of the weapon usability calc loop. It doesn’t strictly have to be at the end but I’ve experienced weirdness with prior hacks and have felt putting it at the end saves some headaches.
  3. Enjoy! There’s not much to configure at the user end for this one.

That’s all, really. Have a fantastic night!

Fourth Weapon R-Text Column

Introducing Fourth Weapon R-Text Column.


Exactly what it sounds like, this hack expands a weapon’s R-text labels to display either passive avoid/dodge or def/res bonuses. Passive avoid/dodge isn’t a vanilla mechanic so this hack also includes pre-battle routines for increasing or decreasing those stats by a specific amount for each item.

Download link: asm/FourthWeaponRTextColumn at main · GigaExcalibur/asm · GitHub

Installation and configuration details:

  1. The avoid/dodge variant of this hack is Skillsys-exclusive. The defense/resistance variant works with or without Skillsys.
  2. #include FourthWeaponRTextColumn.event anywhere in your buildfile or Insert EA with FEBuilder. If using the def/res variant, that’s all the installation you need.
  3. If using the avoid/dodge variant, create two text ids in your text folder named AvoName and DodName.
  4. Add POIN AddWeaponAvoidDodge to the end of the prebattle calc loop. It should go after every other skill that affects avoid and dodge since the end of the function floors each stat at 0.
  5. Configure WeaponAvoidTable and WeaponDodgeTable to your specifications. Each are indexed by item id and any entry not set defaults to 0 avoid and 0 dodge. If both a weapon’s avoid and dodge bonuses are 0, the extra column in the weapon description is not drawn.

Credit to Ysor and Aura Wolf: the former for providing the first implementation of passive weapon avoid/dodge and the latter for their massive body of work on R-text. This hack is probably incompatible with their new R-text modules, unfortunately, though I encourage everyone to check them out! Thank you very much for reading! Have a wonderful day.

Growth Grades

Hello everyone, happy International Hack Release Day!

I’ve been thinking a lot about UI lately. Part of game design involves what information the game tracks is conveyed to the player, and this is vital in Fire Emblem where combat can be headcalced and small variations in numbers make a huge difference. Intelligent Systems knows this and presents Attack, Hit, Avoid, Crit as solved battle stats in the equipment box in GBAFE, and future entries will display Attack Speed, Dodge, and Protection/Resilience as well.

But one stat IntSys never chooses to display is growth rates. They never want players to know how likely their units are to increase a stat on level up. This drastic yet consistent policy has forced our hands, or so is implicitly argued by the nigh-ubiquitous inclusion of growth display in hacks. With a press of a button we can peer at the underlying growth rates of our units and know exactly how on par with their averages they are or which of them are secretly lacking in potential.

I consider this a gross overreach on the part of hackers. Growth rates are supposed to be suspenseful and fun, and knowing exactly how a unit grows ruins the mystique of it. “Ah, my romhack soldier gained a point of skill and defense on this level up; that puts her on average in skill while now -1.5 on strength-” Statements dreamed up by the utterly deranged. Yet IntSys’s position on growth rates is also wrong. When you don’t know how a unit growths, how can we be accurately amazed when they hit their 5% resistance growth?

Presenting Growth Grades.


No longer will pressing Select display a unit’s exact growth rates, it will display a grade corresponding to how high the unit’s growth in that stat is. It removes the knowledge of exactly how a unit stacks up to their contemporaries while retaining the hype around unexpectedly hitting a low-graded growth. In other words, a cooler and more aesthetically pleasing version of color-coded growths.

Download link: asm/GrowthGrades at main · GigaExcalibur/asm · GitHub.

Setup and configuration (if for some godforsaken reason you want to use this):
0.Use SkillSys. This hack is only remotely possible because of MSS and will not work without it.
1.Go to EngineHacks/Necessary/ModularStatScreen/pages. If not using the strength/magic split, open mss_defs.s. If using the strength/magic split, open strmag/mss_defs.s.
2.Scroll down to the draw_growth_at macro and replace it the macro written below.

.macro draw_growth_at, bar_x, bar_y, list
  mov     r14, r0        @r0 = growth getter to bl to
  mov     r0, r8
  .short  0xF800        @returns total growth in r0, base growth in r1
  
  mov	  r1, \bar_x
  mov 	  r2, \bar_y
  mov	  r3, \list
  
  blh	  DrawGrowthGrade
.endm

3.Open the proper page1_____.s file for your project configuration.
4.Scroll down to the ShowGrowths label and replace it the section written below. The contents assume you’re using the strength/magic split and have not changed the stat positions; tweak the numbers in each draw_growth_at call if need be.

ShowGrowths:
ldr		r0,[sp,#0xC]
ldr		r0,[r0,#4]		@str growth getter
draw_growth_at #17, #3, #0
ldr		r0,[sp,#0xC]
ldr		r0,[r0,#8]		@mag growth getter
draw_growth_at #17, #5, #1
ldr		r0,[sp,#0xC]
ldr		r0,[r0,#12]		@skl growth getter
draw_growth_at #17, #7, #2
ldr		r0,[sp,#0xC]
ldr		r0,[r0,#16]		@spd growth getter
draw_growth_at #17, #9, #3
ldr		r0,[sp,#0xC]
ldr		r0,[r0,#20]		@luk growth getter
draw_growth_at #17, #11, #4
ldr		r0,[sp,#0xC]
ldr		r0,[r0,#24]		@def growth getter
draw_growth_at #17, #13, #5
ldr		r0,[sp,#0xC]
ldr		r0,[r0,#28]		@res growth getter
draw_growth_at #17, #15, #6
draw_textID_at 13, 17, textID=0x4E9, growth_func=1 @hp name
ldr		r0,[sp,#0xC]
ldr		r0,[r0]			@hp growth getter (not displaying because there's no room atm)
draw_growth_at #17, #17, #7
b		NextColumn
.ltorg

5.Save the file and drag it over AssembleLynEvent.bat. You should encounter no errors in assembling, ask me for help if you do error.
6.Place the growth grade files elsewhere in your buildfile and #include GrowthGrades.event. This file contains a copy of these instructions and the growth grade thresholds for you to customize.
7. Each stat has a corresponding list. If the growth for that stat if less than or equal to the first column, it will draw the ui symbol whose index is in the second column and the ui symbol whose index is in the third column one tile to the right. There are included definitions for the vanilla weapon rank labels and plus/minus signs, but it supports all ui symbols if you want to get goofy with it. ❥❥ for growths over 100%, anyone?

The default thresholds are based on vanilla growth rates. The highest non-Myrrh growth in the stat is assigned a grade of A+ and the grade goes down one rank every 5%. If you do intend to use this system, I highly encourage you to find an interesting grade scale for your project’s growth rates.

That should be all! Please ask me questions about the system if needed, as this is the most involved installation process for any of my hacks. Have a wonderful International Hack Release Day.

Fixed Soft Weapon Locks

I’m back for the third time in a row with a small feature made at the request of a friend. Introducing Fixed Soft Weapon Locks.

FEBuilder’s version of Skillsys is supposed to come with the Soft Weapon Locks system, which allows for weapons like DSFE Excalibur where its required rank to use differs depending on whether its wielder matches the weapon’s lock. But the system is bugged and no one’s really had the use case to want it to be fixed.

I have not fixed the bug in FEBuilder Skillsys but I did write the feature independently. My version comes with a table indexed by weapon id that determines how much weapon exp is needed to wield that weapon when a unit has the matching lock. An entry of 0 wexp in this table means that the weapon’s lock remains “hard” like vanilla.

Download link: asm/SoftWeaponLocks at main · GigaExcalibur/asm · GitHub

Notes:

  1. This hack is INCOMPATIBLE with Skillsys, Auto-Refreshing Weapons, Weapon Lock Array, and any other hacks that hook the function CanUnitUseWeapon.
  2. Use the macro SoftWeaponRankEntry in SoftWeaponLocks.event to set wexp requirements for each weapon id. The proper weapon lock(s) must still be toggled in the item attributes field for this hack to do anything.
  3. Insert SoftWeaponLocks.event with EA when done. You can use this in a buildfile too but I believe there are no bugs with soft weapon ranks in Skillsys master (and if there were, this wouldn’t be an adequate replacement).

That should be all. Let me know if there are any bugs, and have a wonderful day!

Lord Split Menu Plus

Good evening everyone! Tonight’s kind of a big one that I’m really excited to share.

Introducing the Lord Split Menu Plus.

The Lord Split Menu is one of the most powerful tools hackers have access to in unique campaigns, entirely due to Nat’s excellent documentation on and modularization of the mechanic. But while Nat’s thread is a godsend, it’s not quite as comprehensive as it could be:

  1. The thread leaves out several elements of menu options that could be useful to a modular Lord Split Menu, namely R-text for menu options and the ability to make some options unselectable under certain conditions.
  2. The end of the thread presents all of the code as assembled hex data, which is completely unreadable and discourages users from potentially editing the source code.
  3. Each menu defined through Nat’s method requires a unique ASMC to call it. They recognized this and left generalizing the ASMC as an exercise for the reader at the end of the thread, an exercise I’m sure no one but me has done.

My version opts to fix each of these. It includes functionality for R-text and conditional usability, it’s entirely written in C, and all menus are called using the same CallMenu() event macro.

Download link: asm/LordSplitMenuPlus at main · GigaExcalibur/asm · GitHub

Usage notes:

  1. This hack does not hook any existing functions and is thus inherently compatible with everything!
  2. Define menu structure with the macro MenuDefinition() under a label. You can define a menu’s x-position, y-position, width, height, tileset, and its set of menu options.
  3. Define menu options with the macro MenuOption() all under one label. You can define an option’s name, description, and the flag that must be set for the option to be selectable. A flag of 0 will make the menu option always enabled.
  4. Call your new menu with the event macro CallMenu(menu), where menu is the label defined in step 2. FEBuilder users will likely need to substitute CallMenu(menu) with SVAL s1 menu|0x8000000; ASMC CallChoiceMenuASMC|1.
  5. When done, #include LordSplitMenuPlus.event in your buildfile or Insert EA with FEBuilder.

That should be all! I’m actually really proud I was able to do this and hope someone makes use of its extra features and streamlined elements. Thank you so much for reading, and have a wonderful night!

Ultimate Modular Item Healing

Introducing Ultimate Modular Item Healing.

You’ll uh, forgive me the hyperbole here. Item healing values are notoriously hardcoded in vanilla GBAFE: healing staves have hardcoded bases further hardcoded into specific item id bundles; vulneraries have a special execution function with an extra parameter specifying the healing amount… but this function is only ever called with the hardcoded value of 10 instead of a variable.

There have been many efforts and patches to change this over the years. There are inline changes for the heal amounts of vulneraries and staff groups, there are patches that allow for the creation of new vulneraries or staves in a list, and the Item Effect Revamp modularizes the system of item usage and effects allowing for easy completely custom item routines. But despite all of these new bells and whistles, item healing formulas have always felt so rigid to me. Specifically, I hated that all staves linearly scaled with the cleric’s magic, as it meant a competently-statted cleric could usually coast through the entire game restoring enough HP with just Heal or Mend.

I was initially going to release this hack as just “all staves use Mt + Mag/2,” but that felt just as rigid to me as the 1 * Mag system I disliked. I didn’t want this hack to exist a potential option for alternative item healing formulas, I wanted this to be all the options for item healing formulas. What does this mean?

With this hack, every healing item in the game can be assigned a unique formula for determining its healing amount. This lets you do silly stuff like make staves fixed-mt or vulneraries scale off of magic, as well as removing all hardcoding from vanilla healing systems. The functions HealFixedItemMt, HealItemMtPlusMag, and HealItemMtPlusHalfMag are included as default options but this table supports any custom routine that fits a specific function header (more on that below).

Download: asm/UltimateModularItemHealing at main · GigaExcalibur/asm · GitHub

Installation and Usage Notes:

  1. This hack works with or without Skillsys! If you are using the Str/Mag split you will need to go to EngineHacks/Necessary/MSG/Extensions/Strmag.event and change line 17 to PUSH; ORG currentOffset+1;prMagGetter:; POP.
  2. Use the macro HealFunctionEntry() to assign an item a specific healing function. If an item does not have an associated function it will heal 1 HP as a default case.
  3. Assigning an item a healing function here does NOT give that item a healing effect if it previously did not have one. It will only work for recovery staves, consumable heals, and any custom healing items defined through IER (if in use).
  4. Adding custom routines is very easy! The header for all healing functions here is int MyHealingFunction(struct Unit* unit, int item) where unit is the healer and item is a healing item.
  5. When done, #include UltimateModularItemHealing.event in your buildfile or Insert EA with FEBuilder.

Thanks to Zane, Cam, and Huichelaar with help on the specifics of typecasting functions. And that should be all! Let me know if there are any bugs, and have a wonderful day.

38 Likes

Ya know, now that I think about it, I don’t really get why some games even have that thing. Nice to see it.

2 Likes

Okay now I’m sold

4 Likes

Advanced Editors → Insert EA → Select the main .event file, often named “Installer.event”.
It’s good practice to try this before releasing your hack, as your installer may have used definitions that are included only in the buildfile part. Common ones to include for me are eastdlib.event, the procs file, and callHackNew. For example, if you type “Eirika” in your ea, it will work in a buildfile (as “1”) because it already includea eastdlib.event. From glancing at your buildfile, I’d also encourage you to install custom things to a separate folder than skillsys things as this will make updating skillsys easier.

2 Likes

Got it! Thanks for the tips.

2 Likes

Would you mind adding the source code to the download link too? There is something I’d like to try.

Edit:
Also, it still displays -- for the durability of unbreakable weapons/items in menus.

1 Like

Thank you for the feedback! I’ll add the source code to the download link once I fix several bugs, including the -- display in the item menu you mentioned.

5 Likes

11 days later and I’ve addressed your feedback! --/-- no longer displays in any item menu for unbreakable weapons, and the source code has been added to the download link.

What did you want to try with this, if I may ask?

Edit: right after posting this it turns out durability still displays in the supply menu. I’ll look into fixing that later.

2 Likes
This:

As a side note, the patch now seems to mess with the HP cost display of GaidenMagic 2.0 spells.

3 Likes

Oh, I see, I see. I really like this idea!

I’ll look into fixing this patch’s compatibility with Gaiden Magic, though it will likely be a much larger undertaking.

1 Like

So, is the current version on github the latest one? Did you manage to hide the durability in the supply menu?

Man how crazy would it be if someone ported the scrolling marquee from the bottom-screen-tutorial-text-thingie to menu text strings in general? To fix the supply/trade screen cutoff

Not as of yet, but I am still working on it! Various circumstances have slowed my progress but I haven’t forgotten about it.

1 Like

That would be really cool! Unfortunately I don’t think anyone has looked into the scrolling marquee routine yet, and even if they did I’m not at the skill level to adapt it to a trade/supply menu.

1 Like

It’s been several months since I started this hack but at long last I’ve removed the -- display in all game menus. If any other issues still persist please let me know!

3 Likes

Thanks, will try it out and let you know how it goes.

1 Like

I’ve been testing this for several days now and didn’t come across any issues. Thanks again!

1 Like

Introducing the Item Name Expansion! This is a hack that allows weapon names to go longer than their vanilla length in the status screen, item select screen, and shop screen. I initially did this for my MARTH entry several months ago, and now it’s time to give it a public release.



More details and the download link can be found in the first post in this topic. If you have any questions, please feel free to ask. Have a fantastic day!

14 Likes

Introducing Age Getter. Character ages used to only be flavor text that detail-obsessed designers would place in personal info boxes, but no longer! Age Getter allows you to define a table for character ages, which you can then read from in events or code. Realistically I’m the only person who has a use case for this but there’s no reason for it not to have a public release.
ezgif-3-840925dbf3
Eirika’s age here is 17. 12 STR + 5 Iron Sword Mt + 17 years old = 34 attack.

Installation and Customization:
-For buildfile users, #include Installer.event anywhere in your buildfile. Character ages are set in CharacterAges.event using the simple macro CharacterAgeTableEntry macro.
-For FEBuilder users, hold tight. If at all possible, I’ll try to get this implemented as a configurable patch.
-Important note 1: character ages are stored as a byte, so individual ages can’t be greater than 255. Sorry manaketes, your age will have to be stored in dragon years.
-Important note 2: character ages are static and the age for a given character id can never change. If you were thinking of using this hack and celebrating a character’s birthday, maybe think again.
-Edit: Important note 3: after I finished typing this up, I was shown that this hack can add an extra byte of character data for any arbitrary purpose, not just age. This greatly expands the possible use cases, but AgeGetter is the name I put when I wrote this so I’m sticking with it.

Special thanks to Contro, Vesly, Sme, and Pik for help in setting up the getter and making it read from a table. Nothing I ever do would be possible without them, really.

Download link (mirrored in top post)

11 Likes

Introducing Ignore Triangle. This is probably the least flashy hack I’ll ever make, evidenced by the fact that I whipped it together in like 15 minutes. This code zeroes out both combatants’ weapon triangle bonuses if at least one of them has the second bit on the last byte of the weapon ability word set. I could’ve done this a number of ways but I needed the weapon’s skill slot for something else and this was the most eloquent solution I came up with.

What that means in practice is that you can create weapons that belong to an existing type, but don’t have any weapon triangle matchups. For example, you could implement knives as a subgroup of swords that aren’t weak to lances or strong against axes (a la FE9).

Bit not set vs. bit set. Exciting, I know. But I’m using this in my own hack, and as such there’s no reason not to release this on its own.

Installation and Configuration:

  • Important: This hack MUST be used with Skillsys since its routine is added to the WTA calc loop. I may make a standalone version someday, but that’ll have to wait.
  • Furthermore If you use this hack you have to use consolidated advanced weapon locks. This is because the normal version uses the entire last byte of the weapon ability word, while the consolidated version only uses the last bit.
  • Because of this hack’s recency, it may not work with Custom Builds.
  1. #include Installer.event anywhere in your buildfile.
  2. Copy POIN IgnoreTriangleRoutine into WTACalcLoop.event (found in EngineHacks/Necessary/CalcLoops/WTACalcLoop)
  3. Copy #define IgnoreTriangle 0x02000000 into TableDefinitions.event (or anywhere before tables are inserted, really). I don’t think this bit conflicts with anything, but if you’d like to change it you can do so changing the definition here and the number of shifts done in line 10 of IgnoreTriangle.s.
  4. Designate weapons being outside the triangle the same way you would if they were a reaver or doubled the triangle.

Download link

As usual, let me know if you encounter any errors or have any questions. Have a wonderful day!

13 Likes