Skip to content

Material JSON

moos2333 edited this page Dec 6, 2026 · 2 revisions

English | 中文

Material JSON

This mod's six custom parts normally only accept the materials defined by the mod. You can give any existing Tinkers' Construct material access to one or more of these parts by dropping a JSON file into the config folder. No new material is created - the existing material simply gains the extra stat type.

No files means no change at all. Files are read once at startup; restarting is required after adding, editing or removing them.

Folder layout

config/tinkersgadgets/materials/
├── clasp/<material_id>.json
├── grip/<material_id>.json
├── fuel_tank/<material_id>.json
├── heat_ray_emitter/<material_id>.json
├── chain/<material_id>.json
└── barrel/<material_id>.json

The folder name decides which part is adapted. The file name (without .json) is the material ID, for example manyullyn.json. Only .json files are read; other files in these folders are ignored.

You only need the folders and files for the parts you want to change. Nothing is generated or overwritten.

File contents

Each file contains the stat values for that one part, plus an optional traits list. Fields are specific to the folder:

Folder Part Required fields
clasp Clasp none (use {} or only traits)
grip Grip none (use {} or only traits)
fuel_tank Fuel Tank maxFuel, heatCapacity, efficiency
heat_ray_emitter Heat Ray Emitter chargeTime, power
chain Chain Link maxBounces, bounceRange, ammoBonus, speedRate, comboBonus
barrel Gun Barrel ammoBonus, rangedDamage, durabilityBonus

Values are validated. Unknown fields are ignored; a missing or out-of-range value makes that file fail with a log warning, and no partial stats are applied.

Examples:

// config/tinkersgadgets/materials/fuel_tank/manyullyn.json
{
  "maxFuel": 15000,
  "heatCapacity": 20,
  "efficiency": 1.4
}
// config/tinkersgadgets/materials/clasp/manyullyn.json
{
  "traits": ["inertia_throwingknife"]
}
// config/tinkersgadgets/materials/grip/manyullyn.json
{}

traits is an optional array of registered trait IDs. Unknown IDs are skipped with a warning, duplicates are removed, and a trait already present on that part type is not added again. Disabled traits from the config are ignored.

Rules

  • Fill only. If the material already has stats for that part, the whole file is skipped, including its traits. Existing materials and tools are never modified. Overriding stats is intentionally not supported.
  • The material must already exist. A material ID that is not registered yet is retried once during initialization; if still unknown, the file is skipped with a warning. This covers addons that register materials late.
  • Config wins. Material and trait IDs listed in disabledMaterials / disabledTraits are ignored.
  • No hot reload. Adding or changing a file needs a game restart.

See Troubleshooting for how to confirm a file was applied.

Clone this wiki locally