April 19, 2024
blog Markets

Secret stash on refillabe potion

Secret stash on refillabe potion

This blog post is about how to create a secret stash on an refillable potion. 

When you need to be invisible, sneak past the guards, or just solve one of your pesky problems without anyone knowing it was you, 

there’s no better tool at your disposal than a potion! It’s quick and easy to brew, once you know how. 

Little do most people know that potions are actually reusable, given that there are many parts of the brewing process that can be reused up until they wear out.

 The exception is the potion bottle. The bottle is one-time use only, but thanks to a certain renowned alchemist, 

who by a strange twist of fate had a love for D&D Gaming, the knowledge of how to make a refillable potion bottle was discovered.

In this blog post we will learn how to make a refillable potion bottle, and how to code it into our game.

 Before we can put a potion into a bottle, we first have to brew it ourselves. 

There are three different ways potions come out of your flask: dripping, bubbling, and vapour. 

Given that all three possibilities use the same flask base form,

 it is much easier to code a potion as a drip potion. We will discuss how to make a basic drip potion in the next step.

First you need to create an empty container with your working fluid for this kind of thing.

 In my case I used a second flask as my container for this experiment since it has the exact same type of fill as the original one 

 I didn’t need any more bottles myself (I don’t drink That much That often).

In this example I set the empty flask as a drip item, now you have to rename it from its default name with an empty string which is now called “Default”.

And the 2nd flask shows the dripping animation, but you have to trigger it. 

You can trigger with a switch for example if you want to be able to refill a bottle by it self. 

Or you trigger with a trigger or a touchpad. 

The dripping animation will restart once your bottle is refilled.

First we have to set up our switch: 1:1

Now we need to code the data into our flask as a variable. It needs to be called “Custom 1”, otherwise it will not show up in the dyesim. 

Your first dyesim based potion should look like this: All those text elements are just filler for this example,

 you can write your own custom-text or use an image and insert it here 

I hope you don’t mind that I put a little image of my own into this picture.

The text and images will be visible in your dyesim and they will just look like “Default” 

Now we have to change our empty flask so it can be filled by the player. 

This is where we need to use the switch we created earlier.

 We will set the variable “Custom 1” into a special value called “true” which makes it show up in the dyesim and that will be the switch that will refill the potion.

And lastly we have to input an amount of fluid into our object. my case I put in 5 units of my working fluid which is water.

 In this recipe I used 25 units of water for example.

  this case the amount of water is not a big deal since the bottle will be filled with 5 units of my working fluid.

The last thing we need to do is to add in a trigger that lets us trigger our recipe when we fill up our bottle. 

We do that by adding a new item into our recipe and setting its value to “true”. 

This lets you trigger the recipe when you fill up your potion.

And now you can fill your bottle! 

But wait, it is still a one time use potion.

 What to do? 

You can couple a couple of timers with a simple door to make a reusable bottle. 

Now the door is only open for a short time and then closed again, but that isn’t necessary you can also invent your own logic.

 In my case I set a simple timer on my door to make it open and close after a short time. 

The door is now automatically open for 10 seconds, then closed again. 

Avatar for Aaron Finch

Aaron Finch

There are many labels that could be given to describe me, but one thing’s for certain: I am an entrepreneur with passion. Whether it's building websites and social media campaigns for new businesses or traveling the world on business trips - being entrepreneurs means constantly looking at yourself in a different light so as not get bored of your own success!

Leave a Reply

Your email address will not be published. Required fields are marked *