[Tutorial] Creating a functional Curios bauble (Outdated)

Started by NerdyPuzzle on

Topic category: User side tutorials

Last seen on 18:51, 7. May 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 18:51, 7. May 2024
Joined Jul 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
It is not meant to be…
Mon, 10/31/2022 - 14:45

It is not meant to be cleared after exiting the game, only after the player dies.

Last seen on 14:47, 13. Mar 2023
Joined Oct 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Got it, thank you
Tue, 11/01/2022 - 10:58

Got it, thank you

Last seen on 17:58, 18. Oct 2023
Joined Nov 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
This was extremely useful,…
Thu, 11/24/2022 - 07:02

This was extremely useful, thank you so much for putting it together.

Last seen on 19:29, 2. Oct 2023
Joined Aug 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
It works through the…
Thu, 11/24/2022 - 08:46

It works through the MCreator client, but not through normal means. The defaultconfig is just empty even if I make a new world. I am running it through the CurseForge launcher (Forge/1.16.5). The only thing I need working is the slots lol. I can use it if I add a mod like Botania that adds head slots. Is it my Curios version (curios-forge-1.16.5-4.0.5.3.jar)? I feel like it might have to do with how I'm running it, but I'm not sure if I'm okay with not having it work everywhere. Is there a fix?

Last seen on 02:25, 1. Jan 2023
Joined Dec 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Thank you for making this…
Tue, 12/13/2022 - 21:19

Thank you for making this plugin.  I'm making a simple mod in 1.19.2.  I got everything working in MCreator, items show up, curios slots show up, procedures work as intended, etc.  When I export the mod and add it to a game, the curios slots do not show when I click the button.  When I check the config-server.toml in the save folder, the config does not have the slot registered.  It only has the following, "#List of curio slot type settings  curiosSettings = []"  The items show, and everything else seems to be working.  If I manually add the config-server.toml file from MCreator, then everything works.  So my issue seems to be that the code in the config, or the config itself, is not exporting properly.  Am I missing something simple, like a check mark to click when exporting using this plugin?  Do I need to add the config-server.toml somewhere else before exporting?    Any help would be appreciated.  Thank you.

Last seen on 18:51, 7. May 2024
Joined Jul 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Using the file manager…
Wed, 12/14/2022 - 16:14

Using the file manager plugin, you can make the file generate automatically. This issue will be solved when I rework the plugin to use a custom element instead, which will automatically generate the files required for this.

Last seen on 02:25, 1. Jan 2023
Joined Dec 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Understood.  Used file…
Thu, 12/15/2022 - 11:33

Understood.  Used file manager it to write the lines for me.  Thank you for the advice!  Now I just need to figure out how to generate the new file in the save folder if one already exists, like what happens in a mod pack.  But your plugin is working great!  Thank you for all your great plugins!

Last seen on 02:37, 18. Sep 2023
Joined Oct 2013
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
FIRSTLY: Awesome Plugin!!!…
Sun, 05/07/2023 - 19:21

FIRSTLY: Awesome Plugin!!! Thank you so much!!!

Quick Question, if anyone has the time. The default curios, for example "Head" or "Ring", have icons that show up in the slots when no curio is in there. If i were to do a custom curio, say "mask" or something, how would I add an image to that slot so I don't get the purple squares texture when no curio is in the slot? 

Last seen on 00:42, 10. Oct 2023
Joined Mar 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
revmykl777  Example on…
Sun, 05/28/2023 - 21:03

revmykl777 

Example on custom slots:

curios-server.toml file:
[[curiosSettings]]
 identifier = "mask"
 size = 1
 priority = 3
 icon = "curios:slot/mask"

once you have that in the server config then:

in the file location assets/curios/textures/slot the icon would be a file called mask.png

 

Last seen on 18:46, 17. Mar 2024
Joined Feb 2024
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
How do I make it so these…
Fri, 02/23/2024 - 23:17

How do I make it so these items will render a custom armor texture onto my character?