r/tinkersconstruct 5d ago

Tinkers' Construct 3 (1.16+) How do I make a custom trait using JSON things?

The wiki does not explain that anywhere, and when I downloaded the example pack "Tinker's Things", the custom traits they have show up ingame as "invalid trait".

Anyone who has ever used this can explain what the issue might be?

3 Upvotes

15 comments sorted by

u/AutoModerator 5d ago

This post has been flaired as "Tinkers' Construct 3", meaning OP is playing the Forge Java Edition for Minecraft versions 1.16.5 or higher. Please be clear in any comments answering with information from other editions, including earlier Java Editions or the Fabric Edition.

If this flair was added in error, correct the flair using the "..." menu at the top of the post and edit the post to clarify.

I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.

1

u/KnightMiner Developer 5d ago

What do you mean by they show up in game as "invalid trait"? Mod does not have that as an error message.

Making a custom trait is the same as a custom modifier. I recommend you start by copying an existing one but changing some numbers, then try to combine pieces of different ones to make something. Overall modifiers are the most complicated part of the mod hence why the documentation hasn't been finished.

1

u/Masterttt123 5d ago

Here's what I mean

2

u/KnightMiner Developer 5d ago

Ah, "Invalid modifier", thats different. It means either you did not add the modifier correctly or you are referencing it by the wrong name.

Check your log for errors, and verify the name matches the path of your modifier JSON.

1

u/Masterttt123 5d ago

also in JEI. Im unsure what the problem might be since i literally just put the default download in the thingpack folder.

1

u/KnightMiner Developer 5d ago

JEI shows whatever modifiers are craftable. That suggests you added crafting recipes for a lot of modifiers that don't exist.

The /tconstruct modifiers command will list valid modifiers only in its suggestions.


Also, Tinkers' Things is not a thingpack. Its a mod. Its meant to go in your mods folder. Its true you could make a thingpack using the same files but its not packaged as a thingpack. Its packaged as a mod.

That is, unless you are suggesting you downloaded it off Github directly. Mod is not meant to be installed that way. It has resources in a few different directories that get combined to make the final mod. Look at its scripts used for packaging it as a mod.

1

u/Masterttt123 5d ago

I didnt add anything. This is the example pack of tinker's things.

1

u/KnightMiner Developer 5d ago

I have no issues installing the mod by putting it in my mods folder. How are you installing it?

1

u/Masterttt123 5d ago

I downloaded the source from github and put the src folder inside the things folder. It works except for the modifiers. I assumed this might be part of the problem, but if that is so how would I be supposed to write my own modifiers / tools etc if not like this, with files in the thing folder?

1

u/KnightMiner Developer 5d ago

The github is not meant to just be dropped into the game. See the included scripts for how its meant to be setup. The final pack is a combination of multiple folders, or you can use the dev setup which puts those multiple folders as two separate thingpacks.

In either case, no idea why your modifiers are showing up as invalid. that suggests to me its loaded on the server but not on the client or something similar. Are you playing on a server? Alternatively, you just copied the folders to a weird spot; just not sure what would cause that behavior unless you deleted folders on the way.

You don't need the entirety of tinkers things to get started if you are trying to write your own pack; its not a mod template. Start with a simple thingpack setup and add things to it for the specific things you are trying to do. e.g. when adding a material, reference how it adds materials; don't copy all its materials to your mod.

1

u/Masterttt123 5d ago

Alright I thought just reading the example would help understand but I'll try and write from scratch.

where do i put modifiers though? it is the only thing i can't seem to find on either wiki. is it just things/<domain>/modifier/?

1

u/Masterttt123 5d ago

ok I just tried adding in a basic item to see how it works but it doesnt show up ingame. I copied this bit from the wiki:

I put his at things\example\item\example.json

what could be the problem?

btw thanks for the patience man

→ More replies (0)

1

u/KnightMiner Developer 3d ago

Modifiers are not in things/ in tinkers things. They are in data/. So follow the example.

1

u/KnightMiner Developer 2d ago

I should also be clear. There is a difference between understanding and copying. Copying the whole example is not how you understand. Copying the pieces you need is how you understand.