[Tutorial] Creating a functional Curios bauble (Outdated)

Started by NerdyPuzzle on

Topic category: User side tutorials

[Tutorial] Creating a functional Curios bauble (Outdated)
Wed, 01/04/2023 - 18:39 (edited)

First, you will need to install my plugin that adds Curios API support for versions 1.16.5 and 1.18.2: https://mcreator.net/plugin/90992/nerdys-curios-api-plugin

Go to workspace, workspace settings, and external APIs. If you installed the plugin correctly, It should show up here. Enable it, and click save changes.

example

 

Now, you need to create the bauble item. You don't have to do anything new, just a plain old item will do.

Here is my example item I will be using: 

text

 

The next step is to register the item as a ring. To do so, we will have to do a bit of manual labour.

 

First, you want to go to your mod's resources, and find the assets folder, and click Show in explorer.

explorer

 

Once you're there, you don't want to actually go into the assets folder. We will be creating a few new folder in which any item can be tied to any slot type. For this example, we will register a ring, which means the file will need to be named ring.json. If you want something else, you simply add a new file named as that identifier, like charm.json.

path

 

Okay, we're getting close. You will now need to add some text inside the ring.json through a text editor. I am using atom, but the default windows text editor will do the same thing. The text will need to be in this format: 

{
  "replace": "false",
  "values": ["curiosbaubletutorial:blessing_of_thor"]
}

You simply need to replace curiosbaubletutorial with your mod id, and blessing_of_thor with your own Item id. To register multiple baubles, you will need to do it this way:

{
  "replace": "false",
  "values": ["curiosbaubletutorial:blessing_of_thor", "your_mod_id:your_bauble"]
}

 This can also, as I'm sure you have guessed, register items from other mods too.

 

Now that you have written your text, save the file and exit file explorer.

 

Now, It's time to register some ring slots that you can place that ring in. If you haven't launched your mod yet, do so now, as It will generate some folders that we will require.

Go to your run folder, and find defaultconfigs. Right click and select show in explorer, just like before:

run folder

and create the file curios-server.toml:

config

 

Inside the file, write these lines, and replace ring with whatever slot you want to add, for example charm. Size determines how many slots of that type there will be, but you can simply not write that if you only want one of that slot:

[[curiosSettings]]
  identifier = "ring"
  size = 2
[[curiosSettings]]
  identifier = "charm"

Save the file and close file explorer.

 

Congrats! If you followed every step correctly, you should have an item that now goes inside a curios slot that you have registered.

 

You can now use the triggers provided by the plugin to add functionality to the item. Make sure your variables are set to PLAYER_LIFETIME, since when the player dies they will lose their baubles:

enable 

disable

function

Edited by NerdyPuzzle on Wed, 01/04/2023 - 18:39
uses a global player…
Wed, 10/12/2022 - 18:35

uses a global player lifetime variable to detect when the bauble is equipped, and strikes lightning when the player attacks an entity while having the bauble equipped.

Joined Feb 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
like when u put on adn of it…
Thu, 10/13/2022 - 20:49

like when u put on adn of it set varable and when theat varable on the rig cabn do stuf. is like fridt 2 are for settig and last ids for the shtif it doo

:)

Joined May 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
how to set variables to…
Sat, 10/15/2022 - 11:55

how to set variables to PLAYER_LIFETIME(sorry for my english)

Joined May 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
just do this and when the…
Sat, 10/15/2022 - 12:06

just do this and when the player dies they will lose their baubles?

They will lose the bauble's…
Sat, 10/15/2022 - 13:50

They will lose the bauble's effects. The baubles drop by default.

Joined Oct 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Hello. I want to make my…
Sun, 10/16/2022 - 02:50
Hello. I want to make my item do something with an assigned key when the item is in the slot. I would greatly appreciate your help!
You simply make the keybind…
Sun, 10/16/2022 - 10:13

You simply make the keybind only do something when the player variable is true.

Joined Oct 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
help me I have a problem,…
Tue, 10/25/2022 - 02:20

help me I have a problem, the "truth" block does not connect to the "Set global:variable to entity:EventTarget entity

Joined Oct 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Hello, can I make a video…
Thu, 10/27/2022 - 07:12

Hello, can I make a video based on your article?

Joined Oct 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Hello, can I make a video…
Thu, 10/27/2022 - 07:12

Hello, can I make a video based on your article?

Joined Oct 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Hi, My english not good. How…
Mon, 10/31/2022 - 13:26

Hi, My english not good.

How to prohibit equip 2 identical items?

Joined Oct 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
And Variable PLAY_LIFETIME…
Mon, 10/31/2022 - 13:36

And Variable PLAY_LIFETIME will not be cleared after exiting the game

is Bug or not?