Items - game-stuff-official/exampledustry GitHub Wiki
Items are the most important part of Mindustry. I will fight you on this.
- Resources
- Mindustry source code for the class
Item
. - Mindustry's Items.java.
- Official Mindustry Wiki on items.
- Mindustry source code for the class
Unique Properties
Property | Type | Default | What it means |
---|---|---|---|
color | Hex Color | ffffff | This is the color that the item will be in sorters, item sources and the ore on the mini map. |
explosiveness | Float | 0 | How explosive the item is. |
flammability | Float | 0 | How flammable the item is. |
radioactivity | Float | 0 | How radioactive the item is. |
charge | Float | 0 | How charged the item is. |
hardness | Integer | 0 | How strong a drill needs to be to drill this item. |
cost | Float | 1 | Used for calculating build times of blocks. 1 cost = 1 tick. |
healthScaling | Float | 0 | When this item is in the build cost, the blocks default health is multiplied by the healthScaling. Health scaling of items add, not multiply. |
lowPriority | Boolean | false | If other ores will be mined by drills first. |
frames | Integer | 0 | Amount of frames in the item's animation. Leave at zero to turn off animation. |
transitionFrames | Integer | 0 | Number of auto generated frames between each frame. |
frame time | Float | 5 | How many ticks in-between animation frames. |
buildable | Boolean | true | Set true if this building is used in building. If this is set to false it will be incinerated in cores. |
hidden | Boolean | false | If the item wont show up in any planet's resource selection screen. |
hiddenOnPlanets | ??? | null | Deprecated. |
File Location and Naming Conventions
Items should go into the content/items
folder.
Sprites should go into the content/items
folder
Ores
If your item will be mined from an ore you should name the ore after the item like this: `ore-[item-name].hjson Read more about Ores
Basic Items
To create an item do not set type
to anything.
Example of a basic item
name: Generic Red Item
description: An item. It's red.
color: ff0000
Fun Properties
All the extra properties aren't just for show. They actually affect their behavior in game. Most of these behaviors are when they are destroyed in containers or units. That's how you get bomber flares holding blast powder.
explosiveness
Example from Exampledustry
name: Explodium
description: Dangerous item, there's no reason to have this in your possession.
color: ffffff
explosiveness: 200