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)
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).
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
A playable unit is “generic” if it has no portrait (in this context).
When using these units, you’d normally encounter this sort of graphical issue:
Gamma made a fix while attacking, which you likely have installed already:
But this also happens while:
healing
in the item menu
leveling up
trading
promoting
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.)
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.
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.
@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
*/
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
// 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)
The “cmp r1, #0x4” in 080405B8 is known as the lowest hit rate for staff.
Is there any way to avoid overwriting this?
It conflicts with the patch and is difficult to use as is.
After pulling my hair out for a couple dozen hours, I did it! This allows for an extra 97 saved player units than before by killing the link arena, or an extra 51 if leaving the link arena alone.
When the player has >45 units in their party, additional units are sent to storage upon saving. They can be accessed through the preparations menu. This is compatible with or without SkillSys, and it does not touch your EMS configuration. (Conveniently, EMS does not touch the last 5,860 bytes of SRAM.) It also uses the 0x2028 bytes in the debug printing buffer at 0x2026E30 during the prep screen.
This uses global flag 0xEB to init SRAM used. This way I can ensure old save files won’t try and show any junk data as units. I also added an ASMC: EnsureUnitInParty(unitID). This needs to be used in your cutscenes that use that unit ID once your party has >45 units, as otherwise they could be hidden away in storage and common commands like GetUnitStatus or LOAD wouldn’t find them.
Shoutouts to @Eebit, @Mokha, and anyone else who helped decompile various preparations menu functions. I couldn’t have done this without their amazing work.