[Tutorial] Creating a functional Curios bauble (Outdated)

Started by NerdyPuzzle on

Topic category: User side tutorials

Last seen on 05:43, 29. Mar 2024
Joined Jul 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
[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
Last seen on 21:14, 23. Feb 2024
Joined Jun 2018
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Is ubequip event work when…
Fri, 10/07/2022 - 22:42

Is ubequip event work when player lost items on death?

Last seen on 05:43, 29. Mar 2024
Joined Jul 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
no, which is why your…
Fri, 10/07/2022 - 23:30

no, which is why your variables should be PLAYER_LIFETIME, they reset on death

Last seen on 20:00, 28. Mar 2024
Joined Feb 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
My ring says it works in …
Sun, 10/09/2022 - 17:52

My ring says it works in "Slot: Ring" but no slot shows up in the inventory... any way to fix?

Last seen on 05:43, 29. Mar 2024
Joined Jul 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
you need to add ring slots…
Sun, 10/09/2022 - 18:20

you need to add ring slots in the curios-server.toml file as shown in the post.

Last seen on 20:00, 28. Mar 2024
Joined Feb 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
My server file is called …
Sun, 10/09/2022 - 18:29

My server file is called "curios-server.toml"
and it contains
"[[curiosSettings]]
 identifier = "ring"
 size = 2
[[curiosSettings]]
 identifier = "charm""

Am i doing something wrong?

 

Last seen on 05:43, 29. Mar 2024
Joined Jul 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Make sure the file actually…
Sun, 10/09/2022 - 18:58

Make sure the file actually ends with .toml and it isn't saved as curios-server.toml.txt, and that it is in the folder defaultconfigs

Last seen on 05:43, 29. Mar 2024
Joined Jul 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
also, make sure your text…
Sun, 10/09/2022 - 19:00

also, make sure your text doesnt actually start and end with " ",  like you've said "[[curiosSettings]]
 identifier = "ring"
 size = 2
[[curiosSettings]]
 identifier = "charm""

 

it needs to be 

 

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

Last seen on 20:00, 28. Mar 2024
Joined Feb 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
All of the things you have…
Sun, 10/09/2022 - 19:11

All of the things you have said are what i have done...

Last seen on 05:43, 29. Mar 2024
Joined Jul 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
So when you click the button…
Sun, 10/09/2022 - 19:25

So when you click the button in the inventory nothing happens? Try and paste the same text in the curios config in your config folder instead of the defaultconfigs folder.

Last seen on 05:43, 29. Mar 2024
Joined Jul 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Try creating a new world…
Sun, 10/09/2022 - 19:42

Try creating a new world aswell, see if the config applies to it.

Last seen on 20:00, 28. Mar 2024
Joined Feb 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Making a new world worked,…
Sun, 10/09/2022 - 20:15

Making a new world worked, thank you!

Last seen on 20:00, 28. Mar 2024
Joined Feb 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
So when you transfer the…
Mon, 10/10/2022 - 17:50

So when you transfer the workspace the run file gets deleted... Will this be a problem when i export the mod?

Last seen on 05:43, 29. Mar 2024
Joined Jul 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
No, the defaultconfigs…
Mon, 10/10/2022 - 20:04

No, the defaultconfigs contents stay when you export it.

Last seen on 13:02, 10. Mar 2024
Joined May 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Really useful, but can you…
Wed, 10/12/2022 - 18:13

Really useful, but can you explain me what the last three pictures do?