[FE8] So I made a new second Libro staff and

…it heals for 1HP. As much as the caster’s MAG is (in this case, 1).
Also, the game doesn’t play the healing music. Just the normal unit one.

The edited item is the 0x81. The ShadowKiller.

Copied the original Libro’s stats (Nightmare) and condition/ target/ effect offsets in the 3 tables
and pasted them over where the info for Shadowkiller is.
(For the condition table, pasted the libro condition offset on 0x28988 which corresponds to the shadowkiller.
For the target table, pasted the libro target offset on 0x28F64
For the effect table, pasted the libro effect offset on 0x2FD68)
Also made the ShadowKiller’s spell animation to be the same with Libro’s spell animation.

The result is the healer to heal at range (same range with libro as I carried both of them so I could check the range)
but only for the amount equal to the casters MAG,
like the the actual base values of each staff’s healing are not within the staff effect but elsewhere and tailored to each staff specifically.
Also the combat music was playing, not the healing one.

Any way we can make any item’s healing act like the vanilla ones?

Healing amounts in FE8:
Note the 0xA and 0x14. Those are the base amounts for Heal/Physic/Fortify and Mend, respectively. They are shared across the staves. Ignore the comments; I wanted to change healing to Festal amounts.

08016FB8 B510     push    {r4,r14}
08016FBA 1C03     mov     r3,r0             @r0 = User?
08016FBC 1C0A     mov     r2,r1             @r1 = Item ID?
08016FBE 2400     mov     r4,#0x0
08016FC0 20FF     mov     r0,#0xFF
08016FC2 4010     and     r0,r2
08016FC4 1C01     mov     r1,r0
08016FC6 284F     cmp     r0,#0x4F          @Fortify
08016FC8 DC08     bgt     #0x8016FDC        @Greater than the normal healing staves
08016FCA 284E     cmp     r0,#0x4E          @Physic
08016FCC DA0F     bge     #0x8016FEE        @Physic/Fortify
08016FCE 284C     cmp     r0,#0x4C          @Mend
08016FD0 D00F     beq     #0x8016FF2
08016FD2 284C     cmp     r0,#0x4C          @Mend
08016FD4 DC0F     bgt     #0x8016FF6        @Recover
08016FD6 284B     cmp     r0,#0x4B          @Heal
08016FD8 D009     beq     #0x8016FEE
08016FDA E00D     b       #0x8016FF8
08016FDC 286D     cmp     r0,#0x6D          @Elixir
08016FDE D00A     beq     #0x8016FF6
08016FE0 286D     cmp     r0,#0x6D
08016FE2 DC02     bgt     #0x8016FEA        @Only one greater than Elixir is Latona?
08016FE4 286C     cmp     r0,#0x6C          @Vulnerary
08016FE6 D002     beq     #0x8016FEE
08016FE8 E006     b       #0x8016FF8
08016FEA 29A2     cmp     r1,#0xA2          @Another vulnerary
08016FEC D104     bne     #0x8016FF8
08016FEE 240A     mov     r4,#0xA           @Change to 7
08016FF0 E002     b       #0x8016FF8
08016FF2 2414     mov     r4,#0x14          @Change to E
08016FF4 E000     b       #0x8016FF8
08016FF6 2450     mov     r4,#0x50
08016FF8 21FF     mov     r1,#0xFF
08016FFA 4011     and     r1,r2             @Effect number
08016FFC 00C8     lsl     r0,r1,#0x3
08016FFE 1840     add     r0,r0,r1
08017000 0080     lsl     r0,r0,#0x2
08017002 4909     ldr     r1,=#0x8809B10
08017004 1840     add     r0,r0,r1
08017006 6880     ldr     r0,[r0,#0x8]      @Weapon Ability
08017008 2104     mov     r1,#0x4           @Staff
0801700A 4008     and     r0,r1
0801700C 2800     cmp     r0,#0x0
0801700E D006     beq     #0x801701E        @Don't add on magic
08017010 1C18     mov     r0,r3
08017012 F002F8CD bl      #0x80191B0        @Get magic
08017016 1824     add     r4,r4,r0          @Add to heal amount
08017018 2C50     cmp     r4,#0x50
0801701A DD00     ble     #0x801701E
0801701C 2450     mov     r4,#0x50          @Cap healing at 80d.
0801701E 1C20     mov     r0,r4
08017020 BC10     pop     {r4}
08017022 BC02     pop     {r1}
08017024 4708     bx      r1
08017026 0000     lsl     r0,r0,#0x0
08017028 9B10     ldr     r3,[sp,#0x40]
0801702A 0880     lsr     r0,r0,#0x2
1 Like

Very late response, but I haven’t seen anyone give an answer to the second problem (healing music doesn’t play).

(Apologies if any of my terminology is used incorrectly)

At 0x72594, there’s a table of offsets for each item id starting at 0x4B (similar to the tables for item condition, item target, and item effect). An item id has one of 3 offsets, and each of those 3 offsets changes r0 to “guide” the game to the intended music. The following outcomes appear to be:

  • Healing Staff Music

  • Status Staff Music

  • Default Music/Do Not Adjust

What to change:

  • At 0x72590, you’ll need to point to the table’s new location if there are item ids outside of 0x4B - 0x8C that you want healing or status music to play for
  • At 0x7257E:
    • Change the byte to LastItemID - FirstItemID (for checking in the range of 0x4B to 0xFF, this would be 0xB4)
  • At 0x7257C:
    • Change this byte to FirstItemID (if the first item id that needs staff music is 0x4B, leave this as 0x4B)

Idk how to use FEBuilder, so the following spoilers are just how I did this with buildfiles:

Definitions and Repointing
#define ItemMusic(itemID,routineOffset) "ORG 4*(itemID-75)+ItemMusicTable; POIN routineOffset"
#define Healing_Music_Routine 0x7269C
#define Status_Music_Routine 0x726A0
#define Default_Music_Routine 0x726A4

PUSH
ORG 0x7257E
BYTE 0xB4 //additionally allows items from 0x8D to 0xFF to not default to phase battle music (vanilla byte is 0x41)
  
ORG 0x72590
POIN ItemMusicTable
POP

//somewhere in freespace
ItemMusicTable:
#include "ItemMusicTable.event"
ItemMusicTable.event
  ItemMusic(Heal,Healing_Music_Routine)
  ItemMusic(Mend,Healing_Music_Routine)
  ItemMusic(Recover,Healing_Music_Routine)
  ItemMusic(Physic,Healing_Music_Routine)
  ItemMusic(Fortify,Healing_Music_Routine)
  ItemMusic(Restore,Healing_Music_Routine)
  ItemMusic(Silence,Status_Music_Routine)
  ItemMusic(Sleep,Status_Music_Routine)
  ItemMusic(Berserk,Status_Music_Routine)
  ItemMusic(Warp,Default_Music_Routine)
  ItemMusic(Rescue,Default_Music_Routine)
  ItemMusic(TorchStaff,Default_Music_Routine)
  ItemMusic(Hammerne,Healing_Music_Routine)
  ItemMusic(Unlock,Default_Music_Routine)
  ItemMusic(Barrier,Healing_Music_Routine)
  ItemMusic(DragonAxe,Default_Music_Routine)
  ItemMusic(AngelicRobe,Default_Music_Routine)
  ItemMusic(EnergyRing,Default_Music_Routine)
  ItemMusic(SecretBook,Default_Music_Routine)
  ItemMusic(Speedwings,Default_Music_Routine)
  ItemMusic(GoddessIcon,Default_Music_Routine)
  ItemMusic(Dragonshield,Default_Music_Routine)
  ItemMusic(Talisman,Default_Music_Routine)
  ItemMusic(Boots,Default_Music_Routine)
  ItemMusic(BodyRing,Default_Music_Routine)
  ItemMusic(HeroCrest,Default_Music_Routine)
  ItemMusic(KnightCrest,Default_Music_Routine)
  ItemMusic(OrionBolt,Default_Music_Routine)
  ItemMusic(ElysianWhip,Default_Music_Routine)
  ItemMusic(GuidingRing,Default_Music_Routine)
  ItemMusic(ChestKey,Default_Music_Routine)
  ItemMusic(DoorKey,Default_Music_Routine)
  ItemMusic(Lockpick,Default_Music_Routine)
  ItemMusic(Vulnerary,Default_Music_Routine)
  ItemMusic(Elixir,Default_Music_Routine)
  ItemMusic(PureWater,Default_Music_Routine)
  ItemMusic(Antidote,Default_Music_Routine)
  ItemMusic(Torch,Default_Music_Routine)
  ItemMusic(DelphiShield,Default_Music_Routine)
  ItemMusic(MemberCard,Default_Music_Routine)
  ItemMusic(SilverCard,Default_Music_Routine)
  ItemMusic(WhiteGem,Default_Music_Routine)
  ItemMusic(BlueGem,Default_Music_Routine)
  ItemMusic(RedGem,Default_Music_Routine)
  ItemMusic(Gold,Default_Music_Routine)
  ItemMusic(Reginleif,Default_Music_Routine)
  ItemMusic(ChestKey_5,Default_Music_Routine)
  ItemMusic(Mine,Default_Music_Routine)
  ItemMusic(LightRune,Default_Music_Routine)
  ItemMusic(HoplonShield,Default_Music_Routine)
  ItemMusic(FillasMight,Default_Music_Routine)
  ItemMusic(NinissGrace,Default_Music_Routine)
  ItemMusic(ThorsIre,Default_Music_Routine)
  ItemMusic(SetsLitany,Default_Music_Routine)
  ItemMusic(ShadowKiller,Default_Music_Routine)
  ItemMusic(BrightLance,Default_Music_Routine)
  ItemMusic(FiendCleaver,Default_Music_Routine)
  ItemMusic(BeaconBow,Default_Music_Routine)
  ItemMusic(Sieglind,Default_Music_Routine)
  ItemMusic(BattleAxe,Default_Music_Routine)
  ItemMusic(Ivaldi,Default_Music_Routine)
  ItemMusic(MasterProof,Default_Music_Routine)
  ItemMusic(MetissTome,Default_Music_Routine)
  ItemMusic(HeavenSeal,Default_Music_Routine)
  ItemMusic(SharpClaw,Default_Music_Routine)
  ItemMusic(Latona,Healing_Music_Routine)
  ItemMusic(DragonSpear,Default_Music_Routine)
  ItemMusic(Vidofnir,Default_Music_Routine)
  ItemMusic(Naglfar,Default_Music_Routine)
  ItemMusic(WretchedAir,Default_Music_Routine)
  ItemMusic(Audomra,Default_Music_Routine)
  ItemMusic(Siegmund,Default_Music_Routine)
  ItemMusic(Garm,Default_Music_Routine)
  ItemMusic(Nidhogg,Default_Music_Routine)
  ItemMusic(HeavySpear,Default_Music_Routine)
  ItemMusic(ShortSpear,Default_Music_Routine)
  ItemMusic(ConquerorsProof,Default_Music_Routine)
  ItemMusic(MoonBracelet,Default_Music_Routine)
  ItemMusic(SunBracelet,Default_Music_Routine)
  ItemMusic(Item1G,Default_Music_Routine)
  ItemMusic(Item5G,Default_Music_Routine)
  ItemMusic(Item10G,Default_Music_Routine)
  ItemMusic(Item50G,Default_Music_Routine)
  ItemMusic(Item100G,Default_Music_Routine)
  ItemMusic(Item3000G,Default_Music_Routine)
  ItemMusic(Item5000G,Default_Music_Routine)
  ItemMusic(WindSword,Default_Music_Routine)
  ItemMusic(Concoction,Default_Music_Routine)
  ItemMusic(Greennote,Default_Music_Routine)
  ItemMusic(Rednote,Default_Music_Routine)
  ItemMusic(Dance,Default_Music_Routine)
  ItemMusic(Nightmare,Default_Music_Routine)
  ItemMusic(DemonShard,Default_Music_Routine)
  ItemMusic(DemonLight,Default_Music_Routine)
  ItemMusic(Ravager,Default_Music_Routine)
  ItemMusic(HolyDragonStone,Default_Music_Routine)
  ItemMusic(DemonSurge,Default_Music_Routine)
  ItemMusic(Shadowshot,Default_Music_Routine)
  ItemMusic(RottenClaw,Default_Music_Routine)
  ItemMusic(FetidClaw,Default_Music_Routine)
  ItemMusic(PoisonClaw,Default_Music_Routine)
  ItemMusic(LongPoisonClaw,Default_Music_Routine)
  ItemMusic(FireFang,Default_Music_Routine)
  ItemMusic(HellFang,Default_Music_Routine)
  ItemMusic(EvilEye,Default_Music_Routine)
  ItemMusic(BloodyEye,Default_Music_Routine)
  ItemMusic(Stone,Default_Music_Routine)
  ItemMusic(Aircalibur,Default_Music_Routine)
  ItemMusic(JunaFruit,Default_Music_Routine)
  ItemMusic(150G,Default_Music_Routine)
  ItemMusic(200G,Default_Music_Routine)
  ItemMusic(BlackGem,Default_Music_Routine)
  ItemMusic(GoldGem,Default_Music_Routine)
4 Likes

Do you think with a bit of tweaking you could achieve something like FE7’s holy weapons having unique battle music?

You could probably make it happen with some more work. However, in the process of finding the above information, I found something else you can edit instead (if you just want more weapons to play the sacred weapon music).

At 0x58B08, it checks if the item id is Sieglinde or Siegmund to decide if it should play the sacred weapon music. This is how I changed that routine:

PUSH
ORG 0x58B12
SHORT 0x0000
jumpToHack(SacredWeaponReader)
POP

//free space
SacredWeaponReader:
#incbin "SacredWeaponReader.dmp"
POIN SacredWeaponTable

SacredWeaponTable:
BYTE Sieglinde Siegmund //add more entries here
BYTE 0x00 //end of table
ALIGN 4

Side note: this won’t cause the white line to appear before the units start fighting.

Download for SacredWeaponReader
Source for SacredWeaponReader

I believe the white line function is just above that, at 58AC8.

2 Likes