Vesly's ASM

It’s the same principle as a staff use or a Dancer ring use. Both give EXP without the need to kill an enemy.

Display Obtainable Item

Building off of the work by @Mkol and @Huichelaar, this adds an icon to display over units that you can steal from (the previous version was only for droppable items).

mGBA_Tdkf09xBXR

Additional Details

It turns out searching through every unit’s inventory for stealable items every frame lags the game, so I had to complicate things and use 8 bytes of ram as a cache to avoid any lag. By default, I’ve used 0x203B1F0 which is also used by the Unit SFX patch:
image

If you use that patch, please find a different ram address to use for this hack. Additionally, if you use Huichelaar’s Danger Radius hack then you’ll want to change this part:
image

The cache is refreshed each phase and after stealing. If you’re loading units and the icon doesn’t show up immediately, you can ASMC SetupCacheForStealableItems to fix it, or just wait until the next phase. The cache is not saved on suspend, so resetting will turn it off for that phase.

Note that the SystemIcon used is based on the current SkillSys default.
image

Enjoy!

Edit: Emmett brought it to my attention that this wasn’t working with non-skill sys. The issue is that most builds of SkillSys change the function IsItemStealable to be given r0 = unit, r1 = item slot instead of r0 = item id.

My solution is to check if the bytes at 0x8017054 are the vanilla ones of 0x1C01B500 and if not, give the function the skillsys parameters. This feels very much like a cursed solution. Oh well, if it works, it works.

14 Likes

Tile Call Event

When pressing A on specific terrain, unitID, classID, or trapID, call some event. It can be set by chapter ID and the event can have a completion flag for convenience.

mGBA_1LTzpGRJ93

The events are up to you. Enjoy.

Edit:
Added CharID, ClassID, and TrapID as possible usabilities, too.

mGBA_meZcqbaoNB

In case you wanted to press A on a tent or whatever.

15 Likes

Cannot Die Updates

  • Added “Near Death” quotes (that resets the unit to full hp and immediately ends the battle)
  • Added flag to be set upon someone being saved
  • Old functionality of just dodging lethal attacks still works
  • (Battle and death quotes are unaffected)

mGBA_DVll8XgxBH

It turns out the way vanilla displays death quotes is very complicated. This was a lot harder than I thought!

Having bosses immediately revive when the player kills them is akin to using ambush spawns if you don’t give the player any notice of this. I highly recommend you use my IconDisplay patch to show a special icon on any units that do this. I think FE: Engage does something like this.

You can give a unit however many extra lives you want by having multiple entries for the same unit but with different flags.

Edit: It now works with SkillSystems, too. Please note that after installing/updating SkillSys, you must re-install this hack. I am fighting over the efxHPBar routine, which SkillSys needs for healing effects, while I need it for the near death quote (yes, vanilla death quotes are in the battle hp bar routine).

22 Likes

Update Fog

mGBA_9CGkVKNw1c

This just hooks the vanilla VCWF (change fog level) command to immediately update. If you try it on vanilla, the fog won’t actually update until the next turn.

Ominous countdown using @Contro’s modular objective window lol

mGBA_U1HyPSD2Qa

4 Likes

Generic Portrait Fixes

A playable unit is “generic” if it has no portrait (in this context).
image

When using these units, you’d normally encounter this sort of graphical issue:

image

Gamma made a fix while attacking, which you likely have installed already:
image

But this also happens while:

  • healing
  • in the item menu
  • leveling up
  • trading
  • promoting

image

I’ve fixed it in the above places, but there are likely more that have been missed. But it’s a start, at least. This is compatible with SkillSystem and its 32 hooks related to loading mugs. (Yes, I counted.)

12 Likes

Hi. I’ve been using this feature in my hack and a player recently provided some feedback I thought you would like to hear.

Apparently, yellow/green is not a good combination for colorblind people, so maybe it would be better to use one of the colors they suggested? Not imposing or anything, just relaying the info.

1 Like

It’d probably be ideal to have an artist create alternate graphics for the icons instead of just a recolour.

Your system icon uses this palette:
image

Here’s a simple recolour:
SystemIcon2

You can edit it here:

Hope that helps.

3 Likes

I’ve added a 2nd ASMC for the Draw Anim patch. This version does not pause your event while the animation plays, so it should be useful for some cases.

7743’s port loads the unit the frame after the animation ends, causing it to look like the unit has disappeared for a frame or two. But by loading the unit 23 frames after the animation has started, it now looks smooth.

mGBA_f3S2sMecWm

mGBA_V3Ue1Bwi0p

7 Likes

@Contro never got around to releasing his ai3 fix to make it account for doubling, so I made my own inline edit. It turns out the AI does account for doubling when granting a bonus for lethal damage and for bonus points when getting the opponent below 20 hp, but not for regular damage. Since opponent’s remaining hp is already calculated as part of a simulated battle which includes doubling, this fix uses that data to determine total damage dealt. (Eg. Opponent’s Initial HP - Opponent’s Expected HP After Battle). This is only multiplied by accuracy % once regardless of doubling, but it is an improvement at least.

// AI to account for doubling 
PUSH 
ORG $3DF4A
BYTE $72 $22 $D2 $18 $12 $78 $D8 $7C $12 $1A $C0 $46 $C0 $46 $C0 $46 $C0 $46
POP 
/*
mov r2, #0x72; add r2, r3 @ dfdr + 0x72 (initial hp) 
ldrb r2, [r2]; ldrb r0, [r3, #0x13] @ curr hp after battle 
sub r2, r0 @ dmg dealt; nop; nop; nop; nop 
*/
4 Likes

make prep screen scroll right instead of left (idk if it affects anything else)

// Make things that normally scroll left instead scroll right (such as the prep screen bg) 
ORG $86B84 
SHORT $3801 
ORG $86B8C
SHORT $46c0 $46c0 $46c0 
ORG $86BA2 
SHORT $46C0 $46c0 $46c0 

mGBA_orqUDpuADC

9 Likes

image
thanks to decomp goal window src

// make goal window text slightly longer 
ORG $8D2A6 
BYTE 10 // Width of line 1 (Vanilla is 8)
ORG $8D2B2 
BYTE 10 // Width of line 2 (Vanilla is 8)
ORG $8D2F6 
BYTE $48 // length in pixels for centering? (Vanilla is 0x40)
ORG $8D3E8 
BYTE $48 // length in pixels for "Last turn" (Vanilla is 0x40)
3 Likes

Hi, I’m struggling to make this work. I installed it via EA, but I don’t see where I can edit events for specific items. Where do I do this?

This is available as a patch within builder, I feel that would be easier than trying to modify the EA installer.

2 Likes

Thank you i managed to find it.

Hi. I’m trying to install the modular summoning, but it says there’s a .txt file missing?

https://github.com/FireEmblemUniverse/SkillSystem_FE8/blob/master/EventAssembler/Extensions/ProcDefinitions.txt

Feb folder includes this file but with a space iirc “Proc Definitions.txt”

1 Like

Ok, I managed to get it installed. As per your instructions, I still need to create a menu entry for it. I assume this is done from here, right?


What exactly do I type in “Usability routine” and “Effect when selected”?

Use the info from the .sym file febuilder made

Fix for the vanilla bug where the ai basically always targets the last deployed unit of yours with sleep/berserk:

https://github.com/FireEmblemUniverse/fireemblem8u/blob/master/src/cp_staff.c#L636-L645 has a line of
best = unit->level;
while they obviously meant to do
best = unit->level + accuracy;

Inline ea edit
PUSH
ORG $405B4 
SHORT $2804 // cmp r0, #4 
SHORT $D92C // bls 0x8040612 
SHORT $2108 // mov r1, #8 
SHORT $5671 // ldsb r1, [r6, r1] 
SHORT $1809 // add r1, r0 
SHORT $4551 // cmp r1, r10 
SHORT $DB27 // blt 0x8040612 
SHORT $B401 // push {r0} 
SHORT $46c0 // nop 

ORG $405F2 
SHORT $BC02 // pop {r1} 
ORG $405F8 
SHORT $7A33 // ldrb r3, [r6, #8] 
SHORT $185B // add r3, r1 
ORG $40606
SHORT $5E22 // ldsh r2, [r4, r0] 
SHORT $9206 // str r2, [sp, #0x18] 
SHORT $7Af6 // ldrb r6, [r6, #0xB] 
SHORT $469A // mov r10, r3 
SHORT $46C0 // nop 
POP 
5 Likes