It is the apocalypse after all. - Printable Version +- FF6 Hacking (https://www.ff6hacking.com/forums) +-- Forum: Discussion Forums (https://www.ff6hacking.com/forums/forum-5.html) +--- Forum: Magitek Research Facility (https://www.ff6hacking.com/forums/forum-9.html) +--- Thread: It is the apocalypse after all. (/thread-4130.html) |
RE: It is the apocalypse after all. - fw4210 - 07-20-2021 (07-20-2021, 07:49 PM)C-Dude Wrote: Okay, I think I know why the money dump didn't work. That event code is designed for things like buying Rust Rid. If the player doesn't have enough funds, it sets a bit that the event script can check for and branch with, and the funds are not deducted. I actually don't mind the pause as its worth the trade-off for me. My concern is the money issue. In terms of a different approach, I think shortening it could work. The player won't have all 255 item slots filled in the WoB, maybe that is a possible solution? 255 -> 200? But yeah, I'll try out that B0->10 trick and see if it works. *EDIT* it got rid of the pause issue, but Cid now floats off into the ether, it didn't remove any money, and of course didn't dump my inventory. RE: It is the apocalypse after all. - Gi Nattak - 07-20-2021 (07-20-2021, 08:19 PM)fw4210 Wrote:(07-20-2021, 07:49 PM)C-Dude Wrote: Okay, I think I know why the money dump didn't work. That event code is designed for things like buying Rust Rid. If the player doesn't have enough funds, it sets a bit that the event script can check for and branch with, and the funds are not deducted. Check/compare the hex again, something got messed up - I suspect the B0 64 to B0 10 change was not done correctly. Cid's ID is $10 on the map, so it seems to be now reading to do some action for him. Probably you got 10 10, instead of B0 10? Anyways, that was more just a test to see if the pause is lessened, which it will be, but will only deduct 16 of each item from the inventory, which would be enough for equipment but not for regular items I'd imagine... I mean you'd probably want to have 64 to clear it all, despite the lag. I'll just state the obvious that the more challenging assembly route to make use of an unused event command to do this would be more practical, especially considering how gold is deducted by event code as there's no way to ensure removing the exact amount/all of GP the player has. BUT, this remains a valid option! RE: It is the apocalypse after all. - C-Dude - 07-20-2021 Yes, Gi is correct, a custom event that triggers some assembly code would work much better. I shouldn't have sent you astray the way I did, Masiur was right to begin with. I've never coded something like that before, so you're going to be the guinea pig. Code: Custom Event $A4 (Inventory Flush) [This custom event command takes no arguments] You'll want to blank the rest of the 500-some bytes from the previous post's event code. Better yet, go back to a version of the file before you tried this and just do these changes with the hex editor. If you didn't make a backup, well, thankfully it was just freespace and it's relatively easy to repair (just hold down the F key after typing FE in the $EE bank until you reach another block of FFs), but make sure to make a backup now! Everything above should make $A4 in the event script flush both inventory and GP. Because it's a custom event command, older programs like Zone Doctor won't be able to parse it and thus won't be able to give you accurate event text dumps (the only thing that editor is good for since its save corrupts ROMs). Luckily, we're putting it in a bank that Zone Doctor doesn't check. RE: It is the apocalypse after all. - fw4210 - 07-20-2021 C-DudeYes, Gi is correct, a custom event that triggers some assembly code would work much better. I shouldn't have sent you astray the way I did, Masiur was right to begin with. I've never coded something like that before, so you're going to be the guinea pig. Code: Custom Event $A4 (Inventory Flush) [This custom event command takes no arguments] I am definitely going to use a fresh rom. But before I do, I just want to make sure I am processing the information correctly. Step 1: C0/99A2 - $C00000 = 99A2 = write the new pointer change: (WAS 1A B9, NOW IT'S 83 DF) Step 2 C0/DF83 - $C00000 = DF83 = write the new raw hex code in that offset. Step 3: Re-write the A530C & 2EAF01 code as they remain unchanged. Correct? RE: It is the apocalypse after all. - C-Dude - 07-20-2021 Yes, the new pointer goes at 99A2 in HxD. It's 83 DF because pointers are little-endian (so the high part goes first. That's that DF83 you've got in Step 2). When you write the new raw hex code at DF83 it should end at the very end of the (second) line, with original vanilla code immediately following it. RE: It is the apocalypse after all. - fw4210 - 07-21-2021 Celes is now permanently stuck. I can't get her to move and check the item menu to see if the dump worked. RE: It is the apocalypse after all. - Gi Nattak - 07-21-2021 Something must've been inputted wrong, testing it out here it seems to be working as intended - all inventory cleared and GP as well, no stuck Celes (nice work C-Dude!). Double check everything. If still no luck maybe post a pic(s) of your edit if possible so we can spot a potential error. RE: It is the apocalypse after all. - fw4210 - 07-21-2021 (07-21-2021, 12:21 AM)Gi Nattak Wrote: Something must've been inputted wrong, testing it out here it seems to be working as intended - all inventory cleared and GP as well, no stuck Celes. Double check everything. Okay, thanks for the input. I will attempt again. *EDIT* I can post pics, but what's the max file/recommended file size. RE: It is the apocalypse after all. - Gi Nattak - 07-21-2021 I don't believe we have a rule about file size for attachments, just that 'no posting anything bigger than 700x700'. I'd recommend uploading the images to imgur though for this, or any other known image uploading/sharing site that provides links, if possible. RE: It is the apocalypse after all. - fw4210 - 07-21-2021 (07-21-2021, 02:09 AM)Gi Nattak Wrote: I don't believe we have a rule about file size for attachments, just that 'no posting anything bigger than 700x700'. https://imgur.com/a/hnlQil2 This work? |