Jump to content

Photo

Letter for Different Items


  • Please log in to reply
7 replies to this topic

#1 Lynel Richie

Lynel Richie

    Recipient of Ways

  • Members

Posted 02 June 2020 - 07:40 PM

I want to make it so the letter can be used to purchase different items than the potions. The first part works as I can make any items for sale in a potion shop but the problem is with the "used letter." I want it to disappear when you buy the new item but it sticks around. Is there a way I can make the letter disappear when I get new item and still use the same spot in the subscreen? 


  • Lightwulf likes this

#2 Jamian

Jamian

    ZC enthusiast

  • Members

Posted 04 June 2020 - 03:49 AM

There is the "Letter or potion" item class in the subscreen to do that as far as potions are concerned, but for other items, I don't think there's a built-in way to do that.


Edited by Jamian, 04 June 2020 - 03:51 AM.

  • Lightwulf and Lynel Richie like this

#3 Lynel Richie

Lynel Richie

    Recipient of Ways

  • Members

Posted 05 June 2020 - 07:22 PM

Thanks you.

I have accepted that I can just have the letter remain in the inventory after it's used.



#4 SkyLizardGirl

SkyLizardGirl

    Unbeknownst to danger we call upon your help

  • Banned
  • Real Name:Arianna Crystal Ritter
  • Location:Earthia

Posted 07 June 2020 - 12:17 AM

I have something a bit different in my game.

 

I have the Prescription paper as it's own select screen item, while using the 4-potion bottles script Moosh made me.

'So the paper i have doesn't turn into a bottle anymore',  if you buy potions or pick them up.

 

It just stays in my inventory and I can switch from it to bottles.

 

Unless you use a 4 bottles script,

I would suggest just making a new sub-screen item as 'another paper' you can always hold in your inventory, even if you purchase other items.


Edited by SkyLizardGirl, 07 June 2020 - 11:02 PM.

  • Lightwulf and Lynel Richie like this

#5 Emily

Emily

    Scripter / Dev

  • ZC Developers

Posted 07 June 2020 - 01:15 AM

I have something a bit different in my game.

 

I have the Prescription paper as it's own select screen item, while using the 4-potion bottles script Moosh made me.

'So the paper i have doesn't turn into a bottle anymore',  if you buy potions or pick them up.

 

It just stays in my in inventory and I can switch from it to bottles.

 

Unless you use a 4 bottles script,

I would suggest just making a new sub-screen item as 'another paper' you can always hold in your inventory, even if you purchase other items.

 

Use screen secrets or permanent block type triggers with the item, to make the shops appear if you need to use the item to activate the shops.

 

If you need, make the paper have a 'slash outwards' animation so it looks like you are using it in caves to unlock shops.

He was wanting to NOT hold it in the inventory if purchasing other items, so you've just explained how to do the exact opposite of what was wanted.


  • Lightwulf and Lynel Richie like this

#6 SkyLizardGirl

SkyLizardGirl

    Unbeknownst to danger we call upon your help

  • Banned
  • Real Name:Arianna Crystal Ritter
  • Location:Earthia

Posted 07 June 2020 - 01:31 AM

Aww .. i know.  That was my fault.


  • Lightwulf likes this

#7 Timelord

Timelord

    The Timelord

  • Banned
  • Location:Prydon Academy

Posted 07 June 2020 - 10:41 AM

I have something a bit different in my game.

 

I have the Prescription paper as it's own select screen item, while using the 4-potion bottles script Moosh made me.

'So the paper i have doesn't turn into a bottle anymore',  if you buy potions or pick them up.

 

It just stays in my in inventory and I can switch from it to bottles.

 

Unless you use a 4 bottles script,

I would suggest just making a new sub-screen item as 'another paper' you can always hold in your inventory, even if you purchase other items.

 

You can certainly script these sequences easily now. There remains no easy in-engine way to have duplicate types of letter items that unlock different things, although you can sort of fake it with DMap-specific keys (or boss keys)--providing access to a second room, as well as bait if you have no other use for it.

 

String change doesn't help, as it cannot change the room type.

 

To clarify, the 'Letter or Potion' item works similar to having a Level 0 potion. If you have a potion (L1 or higher), the letter is replaced by the potion. Otherwise, you can always have both by positioning items for each with the individual Letter and Potion itemclasess.

 

If you use the L1 potion, it drops down by one level, converting into the (L0) Letter, with the 'Letter or Potion' itemclass. If you use separate classes for each, then you can re-use the letter, and some quests have repurposed the letter to a hasitem check with CSSs as a general pass for other events by granting a L2 letter or a L3 letter that acts as a glorified key.


  • Lightwulf and SkyLizardGirl like this

#8 Mani Kanina

Mani Kanina

    Rabbits!

  • Members

Posted 07 June 2020 - 08:37 PM

I want to make it so the letter can be used to purchase different items than the potions. The first part works as I can make any items for sale in a potion shop but the problem is with the "used letter." I want it to disappear when you buy the new item but it sticks around. Is there a way I can make the letter disappear when I get new item and still use the same spot in the subscreen? 

You can do this, (mostly), with the features in ZC on it's own, but you gotta be a bit creative.

Letter and Letter (used) are two different items, the former turns into the latter when used. While it's simple enough to make the Letter (used) not have any graphics assigned to it, that does not solve the subscreen issue. ...But a more convoluted solution will.

You'll want two sets of item slots on the subscreen, one for the letter and one for the new item. Treat the letter as the first one and just configure whatever you have in the slot currently to be the letter class, then use the item override option for the regular letter. This means the slot will only manage the letter, not the letter (used).

Next you make a new inventory selectable item, and put it on top of where the last one was. Now here is the tricky part: configuring inventory movement. First start with having both have the exact same position and directional select, then give the replacement an position index that isn't used (could be a high number like 99 or something). Then you want the Letter item's Right and Down pointers to point to whatever the replacement item (or item class) is. Then make the replacement items Up and Left pointers to point to the letters. Then you want the item to the Right and Down from the slot to point to the replacement item's slot instead of to the letter's slot. Then just simply place these two selectable items on top of each other in the inventory, and it should work!

There is a tiny problem left: The letter is not removed from link's inventory when you get the letter used though. This can be solved in a few different ways: String control code \17\X on the potion shop's string, or a pickup script that removes the letter (but not letter (used)) when you get the new item.

If you wish to see this in effect, I put together a small showcase quest here: Link

Just go one screen up and one screen to the left for a letter and a potion shop screen that sells the hookshot that will take up the same inventory visual slot as the letter did.
 


  • Lightwulf, klop422, SkyLizardGirl and 1 other like this


1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users