RMRK is retiring.
Registration is disabled. The site will remain online, but eventually become a read-only archive. More information.

RMRK.net has nothing to do with Blockchains, Cryptocurrency or NFTs. We have been around since the early 2000s, but there is a new group using the RMRK name that deals with those things. We have nothing to do with them.
NFTs are a scam, and if somebody is trying to persuade you to buy or invest in crypto/blockchain/NFT content, please turn them down and save your money. See this video for more information.
Making a Reusuable Wineskin

0 Members and 1 Guest are viewing this topic.

***
Rep:
Level 82
We learn by living...
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 1

You 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):

Spoiler for:


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 event

Note: 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):

Spoiler for:


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 point

Spoiler for:


If 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 game

Finally, 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.
 
Spoiler for:


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

********
Resource Artist
Rep:
Level 94
\\\\\
Project of the Month winner for June 2009
~tutorial, not event system.

***
Rep:
Level 82
We learn by living...
thank you for moving it to the right place ^^

*****
Rep:
Level 84
This text is way too personal.
Bronze - GIAW 11 (Hard)Silver - GIAW Halloween
Seems pretty good, I mean I can totally see where this could be useful. But I think I found an error on the second screenshot. It says "Deal Damage: Entire Party - 50". Is this supposed to be happening?

***
Rep:
Level 82
We learn by living...
deal damage negative 50 if I'm not mistaken, is another way of healing 50 hit points.   ;D

*****
Rep:
Level 84
This text is way too personal.
Bronze - GIAW 11 (Hard)Silver - GIAW Halloween
Oh sorry. I didn't know you were using XP (I kept wondering where the hell the deal damage command was).

***
Rep:
Level 82
We learn by living...
Oh sorry. I didn't know you were using XP (I kept wondering where the hell the deal damage command was).

The topic was originally in an RMXP subforum but got moved, I guess the "I am an XP" program didn't get moved with it. I apologize.

Btw, has anyone got any ideas on how to address variable ammo types using a system like this? I was thinking of a chain of filtering conditionals on the common event side, with each source having a unique conditional. Thus the common event from spoiler #2 would have ALL conditions possible, while spoiler #3, where it says "control switches" would be changed to specific types of refill locations.

I began to wonder what happens if you mix two things. bullets and arrows are obviously unique, but a potion or medicine might get diluted with water, but make more doses. In that sense, instead of healing flat damage, you might deal a 'variable' that is divided by a second variable equal to your current uses. So if you had 1 dose of 500 hp healing, and you added one dose of tap water of 0 hp healing, you would have a total of 500 hp healing divided by 2 doses, for a total of 250 each. Note I haven't tested this yet.

*****
Rep:
Level 84
This text is way too personal.
Bronze - GIAW 11 (Hard)Silver - GIAW Halloween
Umm.. I'm not sure how your ammo system would work, but I suppose you could just make a common event that checks for the ammount of Ammo you have in your inventory. If you have > 0 Ammo, then nothing happens, but if you have = 0 Ammo, then you get re-equiped with something like an unloaded gun, which does 1 damage or something. Just a thought.

Your mixing system, though, seems really interesting to me, and is something that might work.

***
Rep:
Level 82
We learn by living...
I think ammo works good in arrays. Liquids work great in numerical values because you can add much smaller fractions. It's possible to take "mixing" liquids to the level of alchemy using my system and having various measurements and ratios. You could also bake a cake in this fashion. (containers of flour, sugar, salt, etc.)

Specified ammo as items doesn't work too great because the items are in everyone's inventory simultaneously, and can be passed around. With Arrows this is sort of different because in some games like FF there was one type of Ammo used at a time, and it otherwise stayed in inventory.

The reason i say it doesn't work good as items isn't for these reasons - these are reasons I am wrong. Now the reason I could be right is if you want to do a russian roulette with a revolver, or if you wanted to stylize your characters with variable types of ammo in the same clip. For example, [normal, normal, AP, AP, silver, Blessed, Explosive] might be one array. you could make it a full round action to change ammo, which while it might not make the players very happy, would allow you to give each ammo type a unique flavor and you could have ammo be "broken" without breaking the game.

I don't often use 'gun' characters, but as far as I know, their ammo are as much a part of the trademark as the rifle or pistol firing it. I'm thinking a common event that allocates slots might work.

*****
Rep:
Level 84
This text is way too personal.
Bronze - GIAW 11 (Hard)Silver - GIAW Halloween
Well it looks like you have a rough idea of how to make the system. That's good to hear. Good luck with it!

*
Rep: +0/-0Level 79
RMRK Junior
the idea of custom clips is intriguing, but I don't think it'd work out very well when you consider how many clips you're likely to go through, especially in protracted boss battles. unless you actually did force players to waste an entire turn reloading their guns every 6 (pr w/e) turns, which would probably see the gun character benched for the entire game whenever he wasn't being forced into the party.

most games seem to handle the joint inventory problem by only having one gunslinger and the multi-ammo type problem by either letting them select their ammo the way mages select spells (each gun is a like a musket and only has one bullet in it at a time) or by making them choose their ammo before the battle and have some sort of non-elemental attack or semi-useful support ability to keep the gunner from being totally useless when he's got the wrong type of ammo on. A perfect example of this solution would be Billy from Xenogears and a decent example of the other solution would be the gunner from FF8, though his bullets were only used as part of his limit break iirc. personally I prefer the spell type ammo use option, since it makes the character more versatile and useful, potentially replacing a mage if the story doesn't really allow for actual magic users.

if you want more than one gunner then it might be good to give them each unique guns that aren't capable of using the same ammo so that their individual ammo use/refill routines would ignore the other characters' ammo.

its been awhile since I coded anything, but your alchemy idea sounds like something you'd want to make a list for with all the possible "successful" combinations and then make a default "useless" combination with a set (or possibly random) effect of minimal (or no) value. actually allowing people to freely dilute potions would require you to set up some sort of variable to contain the actual effect of the potion or a separate variable to multiple the numerical values of the potion by whenever the potion was used, which would make things a lot more complex. unless I'm simply suffering from a failure of imagination here.

also, if you're going to include alchemy you'd want to create a recipe database so that people could easily recreate their successes without having to keep an external log of some sort. I ran into a problem with the absence of such a list in Dungeon Magic, and it was seriously irritating when I couldn't find my list of spells under the pile of junk in my room.

a lab (kitchen/blacksmith shop/etc) would also be a good idea for a refill spot since it would give a good justification for having multiple types of refill options. depending on the game you could even make this a personal lab (or w/e) that gets upgraded as the game progresses. which type of workshop you have access too could be determined by a variable that would be altered at the time of upgrade. that variable would determine which process was called when you stepped up to/in to the workshop, greatly reducing the number of conditional checks.

in a more advanced setup you'd need to be paying for the ingredients somehow (with water and air most likely being free) and would determine the entire contents of the container before anything was put in it, to prevent people with poor math skills from "almost" making the ultimate potion while completely draining their monetary supplies.

of course, if you're going to have an alchemy system like this, then it would probably be fairly aggravating for the player to have a refillable container that can only hold one type of finished item rather than simply combining items from their inventories' into other newer and (hopefully) better items. unless it was only used during the actual item creation process and the end result was placed into the inventory separately as a standalone item. making the upgrading of the container's capacity a valuable event/commodity in and of itself.

sorry if not everything I've suggested is possible with this programing tool, I'm only just starting to look into what its capable of.

***
Rep:
Level 82
We learn by living...
those are some good ideas on the alchemy. I'm not sure what to do with the clips yet, but now that I know how to use jumps, I'll be upgrading this system shortly, probably in the next 48 hours.

***
Rep:
Level 82
We learn by living...
those are some good ideas on the alchemy. I'm not sure what to do with the clips yet, but now that I know how to use jumps, I'll be upgrading this system shortly, probably in the next 48 hours.

Here's the updated version

Spoiler for Wineskin2.0: