Users browsing this thread: 1 Guest(s)
It is the apocalypse after all.
07-20-2021, 01:43 PM
(07-19-2021, 07:44 PM)C-Dude Wrote: Here's the tedious way, which requires only a hex editor and reckless abandon of optimization:Man, you guys are wizards.
Code:CA530C: {88-06-00-00} Remove the following status ailments from character $06 (CELES): Float, Dog Block, Hide, Chant (Casting Spell), Morph (Esper-form), Instant Death Protection, Frozen, Rage, Death (Wound), Petrify (Stone), Imp, Vanish (Clear), M-Tek, Poison, Zombie, Dark
Replace the above with a jump to freespace subroutine....
CA/530C:
B2 01 AF 24 [Go to subroutine EE/AF01 (which is unused space in Vanilla)]
RAW HEX FOR CA/530C HOOK
B2 01 AF 24
Which itself consists of the following: the original code that was displaced, the unequip function, and then a massive subroutine that removes all items and gil from the inventory
EE/AF01:
88 06 00 00 [Clean Celes's statuses (displaced vanilla code)]
8D 06 [Unequip Celes]
B2 0C AF 24 [Go to subroutine EE/AF0C which flushes inventory]
FE [Return to sender]
RAW HEX FOR EE/AF01 SUBROUTINE
88 06 00 00 8D 06 B2 0C AF 24 FE
Inventory Flush Event Subroutine
EE/AFOC:
B0 64 [Execute the following commands until B1, 100 times]
81 00 [Remove Item 0x00 from inventory]
81 01 [Remove Item 0x01 from inventory]
81 02 [Remove Item 0x02 from inventory]
...
81 FE [Remove Item 0xFE from inventory]
85 FF FF [Remove LOTS of gil from the inventory]
B1 [End repeating commands]
FE [Return to Sender]
RAW HEX FOR INVENTORY FLUSH (517 bytes!)
B0 64
81 00 81 01 81 02 81 03 81 04 81 05 81 06 81 07
81 08 81 09 81 0A 81 0B 81 0C 81 0D 81 0E 81 0F
81 10 81 11 81 12 81 13 81 14 81 15 81 16 81 17
81 18 81 19 81 1A 81 1B 81 1C 81 1D 81 1E 81 1F
81 20 81 21 81 22 81 23 81 24 81 25 81 26 81 27
81 28 81 29 81 2A 81 2B 81 2C 81 2D 81 2E 81 2F
81 30 81 31 81 32 81 33 81 34 81 35 81 36 81 37
81 38 81 39 81 3A 81 3B 81 3C 81 3D 81 3E 81 3F
81 40 81 41 81 42 81 43 81 44 81 45 81 46 81 47
81 48 81 49 81 4A 81 4B 81 4C 81 4D 81 4E 81 4F
81 50 81 51 81 52 81 53 81 54 81 55 81 56 81 57
81 58 81 59 81 5A 81 5B 81 5C 81 5D 81 5E 81 5F
81 60 81 61 81 62 81 63 81 64 81 65 81 66 81 67
81 68 81 69 81 6A 81 6B 81 6C 81 6D 81 6E 81 6F
81 70 81 71 81 72 81 73 81 74 81 75 81 76 81 77
81 78 81 79 81 7A 81 7B 81 7C 81 7D 81 7E 81 7F
81 80 81 81 81 82 81 83 81 84 81 85 81 86 81 87
81 88 81 89 81 8A 81 8B 81 8C 81 8D 81 8E 81 8F
81 90 81 91 81 92 81 93 81 94 81 95 81 96 81 97
81 98 81 99 81 9A 81 9B 81 9C 81 9D 81 9E 81 9F
81 A0 81 A1 81 A2 81 A3 81 A4 81 A5 81 A6 81 A7
81 A8 81 A9 81 AA 81 AB 81 AC 81 AD 81 AE 81 AF
81 B0 81 B1 81 B2 81 B3 81 B4 81 B5 81 B6 81 B7
81 B8 81 B9 81 BA 81 BB 81 BC 81 BD 81 BE 81 BF
81 C0 81 C1 81 C2 81 C3 81 C4 81 C5 81 C6 81 C7
81 C8 81 C9 81 CA 81 CB 81 CC 81 CD 81 CE 81 CF
81 D0 81 D1 81 D2 81 D3 81 D4 81 D5 81 D6 81 D7
81 D8 81 D9 81 DA 81 DB 81 DC 81 DD 81 DE 81 DF
81 E0 81 E1 81 E2 81 E3 81 E4 81 E5 81 E6 81 E7
81 E8 81 E9 81 EA 81 EB 81 EC 81 ED 81 EE 81 EF
81 F0 81 F1 81 F2 81 F3 81 F4 81 F5 81 F6 81 F7
81 F8 81 F9 81 FA 81 FB 81 FC 81 FD 81 FE
85 FF FF
B1
FE
With these two subroutines, that's 528 bytes of freespace used total, which have to exist AFTER the $CA bank in the ROM. The addresses I provided are the only ones big enough in an unexpanded ROM that aren't being used by other stuff (at least, unless you're using the full roster hack, and then they're gobbled up by a Gogo menu patch by the user m86)
Keep in mind that a hex editor like hXd will not have the hirom addresses, but rather traditional file offsets. This requires subtracting $C00000 from all of the listed addresses.
So CA/530C is actually A530c, EE/AF01 is actually 2EAF01, and EE/AF0C is actually 2EAF0C
Equipped gear will be protected from this purge (which may irritate players since the general move is to UNEQUIP everybody before they leave the party).
By the way, I didn't test this. There's no reason I can think of that it wouldn't work, but don't ship a hack until you've played through this code bypass (which occurs right after the Blackjack gets ripped in half).
Madsiur's approach is more elegant; if you want more than a quick fix I recommend learning some assembly to use that approach. After all, that might only take 20 bytes as opposed to over 500.
Bangin' out code like there's no tomorrow. I have a lot to learn, I've never used Hxd, and I've never assembled anything either. Like I said, I've just used the beginner level editors. But I will jump on the bloated option as I'm anxious to playtest this and see it in practice. And then pursue the much more efficient option, if the need were to ever arise. (It probably will.)
But this is amazing to know it can be a reality! It's going to be so epic! The player will now feel what the main cast feels, at least… a little bit anyway.
This is my first time opening HxD, and doing something like this, so bare that in mind.
First noob question:
I plugged in the numbers no sweat, but on the final offset I entered the code as laid out
so I now have:
B0 64 FF FF
with the rest of the dump item code below that. Should I have 1 continuous string? Or is it okay to have those couple of FF FFs there?
Second noob question:
At the bottom remove lots of gil from the inventory, should I enter that in more than once? - 85 FF FF - do that x3 maybe?
Third noob question, which is kind of like the first:
At the very bottom you have:
B1
FE
Which are of course new commands, but again, continuous string? Or Do I need those spaces?
« Next Oldest | Next Newest »
Users browsing this thread: 1 Guest(s)