This is a tutorial (with screen shots) designed to show a method of creating a reusable container with consumable contents and multiple charges. I suppose similar methods could be used for making a quiver of arrows or a clip for a gun. While this method allows for only two uses before refilling, that number could just as easily be 3 or 30,000 doses.
In the future I plan on making the type of contents variable such as water, wine, or potions, which for gun clips would be the same as say lead, AP, or explosive rounds. Without further adue,
Step 1You need to make a new item. I called mine wineskin and made my own 24x24 icon in a tile maker. You can also use Paint to make tiles in 800% zoom, which oddly works better than my tile maker
Anyway, if you can see the image in the spoiler below (click to open):
you can see you want
occasion set to
always,
consumable set to
No,
and plan on adding a
common event called
wineskin (or whatever you want to call your container)
Step 2: make the wineskin Common eventNote: be sure to go back to your new item and add this common event when you are done!
if you can see the image in the spoiler below (click to open):
Then you can see the steps, if someone cannot see the steps, let me know and I will add it in manually as an alt.
The objective is to present a choice to use the item, refill the item, or cancel.
If the item is to be used, you want to check to see if the item has any uses/charges left. If not, it can't be used. If it has charges left, you want to reduce the total charges by 1, then add the desired effect, such as healing, damage, teleport or whatever effect your ammo/charges are supposed to do.
if the item is to be refilled, you check to see if it is full, meaning a number equal or greater to the maximum. If it is full, it can't be refilled. If it isn't full, you check to see if the actor is on a refill location by use of a switch, as described below:
Step 3: make the refill pointIf you can't see this, it's basically an event next to my refill source - in this case, a blue jar. It could just as easily be a water fountain or river. Source/Refill events are nifty because you can copy paste them all over the game, reusing the same parameters, and generally only become different if you want variable types or variable ammo.
The source event is a conditional that checks to see if you have the container, and if you are near it. In my event, I add a direction so if you aren't facing it, it doesn't trigger. The event in this tutorial also gives you options such as drinking straight from the source or using your container, if you have one. If you don't have a container, it only presents the option of drinking from the source.
It is very important to remember this is an
ITEM that is used from the item menu. In theory that means it can also be used in combat. When you are away from a source, there's a lot of menu navigation to use the item, but when you are at the source, it's much more direct, requiring less screens to use.
Step 4: Put the container in the gameFinally, and arguably most important you need to put the item in the game and set it's base number of uses/charges, otherwise the game won't know whether it is full or empty. That's what the following treasure chest example does.
I'm open to any suggestions for improvement and any ideas on using variable ammo types. I'm also curious if anyone has figured out how to make Bows & Arrows work.
-Shin