Author Topic: How does the Trash Can work?  (Read 1358 times)

Bahamut ZERO

  • Cagnazzo
  • *
  • Posts: 347
  • Gender: Male
  • If ye're takin a beatin, hop in de back row!
    • View Profile
How does the Trash Can work?
« on: July 03, 2016, 12:23:20 PM »
That's right. I asked it.  :bored:


How does the trash can in the item screen function? I mean, I know it can delete most items when they are placed on top of it, but how are those functions called?

Since I'm not using the trash can in my hack atm, I was wondering if it were possible to have it function like an item bag (or storage) that would open the fat chocobo screen when used as an item, and maybe move items to the fat chocobo's storage when an item is placed on top of it rather than deleting it.

Now I have no idea if that's even possible, but I figure that's better then having a player figure out they have to keep buying whistles to store their items (and hearing that tune every time) haha.
I update my graphics thread on almost a daily basis, so keep an eye out for new stuff!

chillyfeez

  • FF4 Hacker
  • *
  • Posts: 1,285
  • Gender: Male
  • Go ahead, ask me about Angel Feathers!
    • View Profile
Re: How does the Trash Can work?
« Reply #1 on: July 03, 2016, 01:19:38 PM »
Quote
How does the trash can... function?
Whoah, remind me never to visit your house ;)

That probably could be done, and isn't a bad idea.
You could also use my "Change to Cache" patch, which is packaged in with the current version of User Options as a separate patch.

I've never really looked at the Trash Can routine, but I imagine it's pretty brief, which means what your suggesting would probably require some code rewiring.

If you really want, I can try to work on that next weekend. I won't have the time til then. Good ol' retail job - I'm working all this weekend including tomorrow, but I have a four day weekend 7/8-7/11.

Bahamut ZERO

  • Cagnazzo
  • *
  • Posts: 347
  • Gender: Male
  • If ye're takin a beatin, hop in de back row!
    • View Profile
Re: How does the Trash Can work?
« Reply #2 on: July 04, 2016, 12:03:07 PM »
Quote
Whoah, remind me never to visit your house ;)

XD

Quote
That probably could be done, and isn't a bad idea.
You could also use my "Change to Cache" patch, which is packaged in with the current version of User Options as a separate patch.

Yeah I was checking that out on TFW. It was actually part of what sparked the idea of seeing if the Trash can could do it.

Quote
I've never really looked at the Trash Can routine, but I imagine it's pretty brief, which means what your suggesting would probably require some code rewiring.

If you really want, I can try to work on that next weekend. I won't have the time til then. Good ol' retail job - I'm working all this weekend including tomorrow, but I have a four day weekend 7/8-7/11.

If you could take a look at it at some point that would be awesome! I'm no hurry, so take all the time you need.  :banonsmash:
I update my graphics thread on almost a daily basis, so keep an eye out for new stuff!

chillyfeez

  • FF4 Hacker
  • *
  • Posts: 1,285
  • Gender: Male
  • Go ahead, ask me about Angel Feathers!
    • View Profile
Re: How does the Trash Can work?
« Reply #3 on: July 21, 2016, 11:18:18 PM »
I looked at this a little bit today. I was hoping I could just overwrite the item deletion section of assembly with a jump to the storage routine, but for some reason doing so causes the item selection window to stay on the screen after exiting the item menu. Weird. So I'm gonna have to write a custom routine. Not difficult work, but it'll take a little bit of time...

chillyfeez

  • FF4 Hacker
  • *
  • Posts: 1,285
  • Gender: Male
  • Go ahead, ask me about Angel Feathers!
    • View Profile
Re: How does the Trash Can work?
« Reply #4 on: July 22, 2016, 09:44:51 AM »
OK, BZ I got it working. Before I send the patch, a question - does your ROM have seven lines of empty space beginning at 00/E290 (01/E290 in LoROM)?

If not, I'll have to relocate the custom routine before the patch will work.
 :cycle:

Bahamut ZERO

  • Cagnazzo
  • *
  • Posts: 347
  • Gender: Male
  • If ye're takin a beatin, hop in de back row!
    • View Profile
Re: How does the Trash Can work?
« Reply #5 on: July 22, 2016, 12:28:27 PM »
OK, BZ I got it working. Before I send the patch, a question - does your ROM have seven lines of empty space beginning at 00/E290 (01/E290 in LoROM)?

If not, I'll have to relocate the custom routine before the patch will work.
 :cycle:

Hell yeah! Sadly those lines are occupied with code in my rom, but I'll scour through my rom for free space. Should I look for lines of FF's or lines of 00's?
I update my graphics thread on almost a daily basis, so keep an eye out for new stuff!

chillyfeez

  • FF4 Hacker
  • *
  • Posts: 1,285
  • Gender: Male
  • Go ahead, ask me about Angel Feathers!
    • View Profile
Re: How does the Trash Can work?
« Reply #6 on: July 22, 2016, 01:16:23 PM »
I usually use FFs, but if you have seven lines of 00s, that'll work fine, too. It can be anywhere in the ROM, because I'm overwriting enough that I can do a long jump if needed. So really, just tell me where you want the seven lines to be.

Bahamut ZERO

  • Cagnazzo
  • *
  • Posts: 347
  • Gender: Male
  • If ye're takin a beatin, hop in de back row!
    • View Profile
Re: How does the Trash Can work?
« Reply #7 on: July 22, 2016, 02:07:04 PM »
Hmm found a massive chunk o' free space at 00/1DF10 Unheadered (00DF10 in  normal offset) that you can use for it. 47 rows of FF's!

Not sure what the space is normally for, but it doesn't look like freed space from me messing around with maps or anything.  :banonsmash:
I update my graphics thread on almost a daily basis, so keep an eye out for new stuff!

chillyfeez

  • FF4 Hacker
  • *
  • Posts: 1,285
  • Gender: Male
  • Go ahead, ask me about Angel Feathers!
    • View Profile
Re: How does the Trash Can work?
« Reply #8 on: July 22, 2016, 02:22:22 PM »
Nah, most of the 00/ and 01/ banks are pure assembly. So empty space is usually safe there.
I'm at work now, but I should be able to get a patch over to you by tomorrow AM.

Bahamut ZERO

  • Cagnazzo
  • *
  • Posts: 347
  • Gender: Male
  • If ye're takin a beatin, hop in de back row!
    • View Profile
Re: How does the Trash Can work?
« Reply #9 on: July 22, 2016, 02:28:59 PM »
Nah, most of the 00/ and 01/ banks are pure assembly. So empty space is usually safe there.
I'm at work now, but I should be able to get a patch over to you by tomorrow AM.

Hell yeah! Thank you very much! :happy:
I update my graphics thread on almost a daily basis, so keep an eye out for new stuff!

chillyfeez

  • FF4 Hacker
  • *
  • Posts: 1,285
  • Gender: Male
  • Go ahead, ask me about Angel Feathers!
    • View Profile
Re: How does the Trash Can work?
« Reply #10 on: July 23, 2016, 09:31:31 AM »
So here it is.
Moving a normal item to the trash can will store it in the fat chocobo storage.
You still can't store key items or -sort-. Trying to do so will result in the "invalid" buzzer sound.
If chocobo storage is full, you'll also get the "invalid" buzzer sound. I couldn't make it so the "I'm full" message pops up, because apparently that message exists on a different layer, and rewriting a new routine for that would have been a massive headache. in my experience, it takes a concerted effort to fill up fat chocobo storage anyway, so hopefully that's OK.
Apply to unheadered ROM.

Bahamut ZERO

  • Cagnazzo
  • *
  • Posts: 347
  • Gender: Male
  • If ye're takin a beatin, hop in de back row!
    • View Profile
Re: How does the Trash Can work?
« Reply #11 on: July 23, 2016, 11:22:30 AM »
So here it is.
Moving a normal item to the trash can will store it in the fat chocobo storage.
You still can't store key items or -sort-. Trying to do so will result in the "invalid" buzzer sound.
If chocobo storage is full, you'll also get the "invalid" buzzer sound. I couldn't make it so the "I'm full" message pops up, because apparently that message exists on a different layer, and rewriting a new routine for that would have been a massive headache. in my experience, it takes a concerted effort to fill up fat chocobo storage anyway, so hopefully that's OK.
Apply to unheadered ROM.

Storing items works perfectly! I'm perfectly content with buzzer noises playing instead of messages popping up. Like you said, a player would have to go out of their way to fill the 255 slots for item stacks. :happy:

Now, I hate to ask after you've gone through this much trouble already, but... is there a way to make the trash can  open the item storage screen as well? Meaning, instead of just giving the "Cannot be used here" message when trying to use it as if it were an item, it goes straight to the storage screen like your Item Cache Addendum to User Options.

If it isn't feasible, or you don't feel like messing with it any further that's understandable. I don't want to eat up a plethora of your time with this.
I update my graphics thread on almost a daily basis, so keep an eye out for new stuff!

chillyfeez

  • FF4 Hacker
  • *
  • Posts: 1,285
  • Gender: Male
  • Go ahead, ask me about Angel Feathers!
    • View Profile
Re: How does the Trash Can work?
« Reply #12 on: July 23, 2016, 04:46:52 PM »
That would be considerably tougher, and possibly impossible.

If I can somehow make the trash can behave as though it was the whistle, then it'd be not too difficult, but we'll see.

How about: I promise I'll look into it at some point.

Bahamut ZERO

  • Cagnazzo
  • *
  • Posts: 347
  • Gender: Male
  • If ye're takin a beatin, hop in de back row!
    • View Profile
Re: How does the Trash Can work?
« Reply #13 on: July 23, 2016, 05:28:41 PM »
That would be considerably tougher, and possibly impossible.

If I can somehow make the trash can behave as though it was the whistle, then it'd be not too difficult, but we'll see.

How about: I promise I'll look into it at some point.

After thinking a bit on how hard that would end up being to do (and undoubtedly time-consuming on your end) I'm gonna try your Change-to-Cache patch alongside of the Trashcan patch.

I figure this way the trashcan can be a quick way of putting something in storage without having to back out of the item menu, opening the stash, reopening the main menu, then going back to the item/equip menus.

Plus I just re-re-realized how awesomely quick your cache mod jumps to the item storage being as that whistle noise doesn't play when it's opened.

MID-POST EDIT:  Yeah, no need to look at the trashcan any further. These two patches are AWESOME together, and do exactly what I was hoping could be accomplished! Thank you!!  :cookie: :cookie: :cookie:

Now I can go to town on the trash can and fat chocobo graphics when it cools off in a little bit and turn them both into a bag or chest.  :happy:
I update my graphics thread on almost a daily basis, so keep an eye out for new stuff!