Skip to content

Creating a Custom Reward

TheTurkeyDev edited this page Sep 8, 2023 · 15 revisions

So you want to add your own custom rewards now do ya? Well on this page I will go over the setup of creating a custom reward! Do note though that if you want to create your own custom reward it is strongly suggested that you know some basic knowledge of the JSON file format. If you don't I will try my best to explain things, but no promises! To see a full test reward file go here.

Step 1: Creating the file

With Chance Cubes there are 2 ways to add a custom reward, but since we haven't even created a file yet we are limited to only the first way which is creating a new file to store the custom reward. To do this, create a JSON file named what ever you want and put it with in the custom rewards folder inside the ChanceCubes folder in your configs. Now open your JSON file and add these brackets: {}. For appearances sake it helps to put them on their own lines but make sure that this bracket comes first, {, it is very important! That's it you are now ready to move to step 2 and set up a custom reward!

Step 2: Naming our custom reward

So now that the file is created and set up we can move onto adding our own custom rewards to the file. Like i said before there are 2 ways to add a custom reward. Either add it to an already existing file, or create a whole new file entirely. This is very useful for those who want to organize their rewards and not have them all in one file. Anyways, the first thing that you need to do is to name your reward by putting then name between 2 quotation marks in side the open and closed brackets that you made before. Now add a colon after the second quotation mark and follow that up with another set on brackets, both an open and closing one. Your reward file should look something like this:

Failed to load image: Creating-Naming.png

Step 3: Assigning a chance value to your reward

The last step in setting up the essentials to your custom reward is giving your reward a chance value. This value can range from -100 to 100 based upon how good, or bad the reward is with -100 being the worst and 100 the best. To add this to your file simply add "chance":(chance amount), in between the 2 brackets that you made after your reward name. Again your reward file should look something like this:

Failed to load image: Creating-Chance.png

The comma after the chance value is very key as it is a separator between the keys and values of the file.

That's it! you have successfully set up the basics of your custom reward! Now you can move on to adding the different rewards to your custom reward!