it would be trivial to extend it to an entirely new menu option by comparison
well, should be
it would be trivial to extend it to an entirely new menu option by comparison
well, should be
In FE7 the corresponding check it at 0804A354. r7 tells the command itâs checking for, out of a total of 0x1A commands.
r7 =
0x8 -> Steal
0xD -> Door
0x16 -> Item
0x17 -> Trade
0x1A -> Wait
So I did some investigating [FE8] and documented a few of the routines governing checking whether various options can be done.
231A0 checks the dancing option and starts out with seeing whether the character has the dancing ability marker. Removing this comparison basically means anyone can use rings and dance in the right context. Thereâs a line that stores â0xA5â somewhere - 0xA5 is the item number of an otherwise useless item called âDanceâ. The item itself doesnât do anything and the âsome adjacent player unit has movedâ check is not in the item usability table - itâs instead located at 25B6C. If we dummy this section out then dancing can happen regardless of whether adjacent units have moved (if they havenât, then the dance does nothing). (If you want to make someone unable to refresh units, hijack this and feed it bogus coordinates.)
Meanwhile 230F0 has the overall check, containing both refreshing and using rings. Thereâs a line comparing r0 to 0xC, which is the weapon type âRingsâ. Changing this can create things like vulnerary dances.
(Note that if you try to make, say, a Paladin do a dance, the game will freeze up presumably due to animation issues.)
Look, Iâm gonna dance with all my weapons!
Wait, I forgot how to actually danceâŚ
A nightmarish dance⌠(Note: This actually just refreshes units normally.)
I also found some other routines that happen when you try to get to the menu:
249AD: is inside ballista?
24A29: is inside ballista?
23A55: checks if has item
248C5: checks if can use ballista
2494D: is inside ballista?
23159: checks playing
23195: checks dancing
2418D checks to display âstealingâ
243D8 checks summoning
244FC: if class # = 66 (Demon King) do things
23E7D: if class #=33 (Rogue) do things //presumably related to picking locks
23C81: do unknown things
23D15: do unknown things
23041: if class #=51 (Phantom) do things (well, more like donât do things)
23E1D: do things
23DB5: do things
23FE2: if class = phantom donât do things
24035: more phantom stuff
24091: more phantom stuff
240ED: more phantom stuff
228A5: do stuff
22911: if status not 0x10 (rescuing?)
2298D: do stuff
229F5: do stuff
232B9: if not already moved, not a phantom, and has an item
22F35: not already moved, and⌠hmm supply?
23F65: do unknown things, and not a phantom
4F449: branch back to 4eda1
273a5:
Most of these routines seem to return 3 if the thing shouldnât be done and 1 if it can be.
Also note that phantoms canât rescue, be rescued, use items, or trade. Presumably one (or a few) of the ones checking whether people are phantoms can allow us to restrict trading. A couple of the routines also seem to check the âsupply depotâ ability on a character, but afaik that ability doesnât really work.
Also, I wonder if the summoning code can be used to create an Aum staffâŚ
Pointer table continues after a spacer of zeroes with pointers for the âUnitâ, âStatusâ, etc. menu options. The stuff contained within seems to be of a similar format.
(I wonder if this means we can change the Retreat command�)
Man, this place is a gold mine of asm hack possibilitiesâŚ
FE7 has an equivalent table at B95314. Note that this table also contains text IDs for the commands in question: partial nightmare modules
In particular, there seems to be a command titled âSallyâ in FE7, in a category of its own, with unknown usage.
Edit: Just realized the reason FE7 has two âStatusâ commands might be to disable the R button for Natalie and fainted Nils in the respective Protect chapters.
cough I mean, it was right here. Look around there for the constant loaded.
Also, Hex haxâd that.
Okay, so, this was never fully answered. How do we edit who becomes the supply? Iâm assuming thereâs an ASMC command on Eirika/Ephraimâs routes that determine which of them becomes the supply but I dunno what to look for/how to edit it.
There isnât actually an ASMC directly changing it. Thereâs an instruction at 23F80 that determines who the command âSupplyâ shows up for based on whether the mode number is 1 (Eirika pre-split), 2 (Eirika post-split), or 3 (Ephraim).
Havenât tested to make sure changing it doesnât break anything, though.
Oh ok, I see what I missed now. If you can figure out how to change character/class ID, let me know please. Thanks
23F88 and 23F94 have the relevant character IDs (0x1 = Eirika, 0xF = Ephraim).
Oh shit! So I just change those to my desired character? I love you!
Tested this today and had Eirika summon back a dead Seth as a Phantom. Summon requires you to specify a specific character ID to bring back though.
On byte 0x8 in the struct:
00 = normal
01 = greyâd out
02 = blue
03 = yellow
04 = green flashing
05 = black
06 = green flashing with glitchy background
After this it just has gross colors that probably arenât meant to be used.
Byte 0x9 seems to just count up the commands.