Forge Project

Total Miner Files are here and free

View on GitHub

Total Miner XML Modding Reference

Complete reference for Total Miner's XML modding files, organized by category.

Lua · Command Scripting · XML Modding


Start Here

XML mods are data files. Each file describes an item, block, NPC, particle, texture entry, or another game object. Begin with the file type that matches what you want to change, copy the smallest relevant example, and add only the fields you need.

The usual workflow is:

  1. Choose the XML file that owns the data you want to change.
  2. Add the XML declaration and the expected root element.
  3. Add the identifying field, such as ItemID, BlockID, or ActorType.
  4. Add and test one group of properties at a time.
  5. Use the XML Mod Example to compare complete files.

Important: XML element names, root wrappers, IDs, and value types must match the loader’s expected structure. The examples show the documented structure, but keep a backup of the original files while testing.

How XML Data Is Organized

XML document format

Every standalone XML file should begin with the XML declaration:

<?xml version="1.0" encoding="utf-8"?>

When a field is serialized as an array, use the array wrapper generated for its item type. For example, an ItemXML[] uses <ArrayOfItemXML> as its root, while other array types use the corresponding type name, such as <ArrayOfLootItem> or <ArrayOfString>. The individual entries remain the element type inside the wrapper.

<?xml version="1.0" encoding="utf-8"?>
<ArrayOfItemXML>
  <ItemXML>
	<ItemID>FrostBlade</ItemID>
	<Count>1</Count>
  </ItemXML>
</ArrayOfItemXML>

Do not add an array wrapper around a normal object field. For example, LootTable is shown as a property containing LootItem entries; use an array root only when the XML file itself represents an array.

Table of contents


Data Types


Adding And Modifying Items

Items can be added and modified with XML mods. If an Item ID supplied already exists, that item will be modified. Below is the documentation for each file used to add and modify items. Any file or field can be omitted to use default values.

Files: ItemData.xml, ItemTypeData.xml, ItemTypeClassData.xml, ItemCombatData.xml, ItemSwingTimeData.xml, ItemSwingData.xml, ItemSoundData.xml, SkillData.xml, BlueprintData.xml, ItemTextures16.xml/ItemTextures32.xml

ItemData.xml

Contains general information about this item.

ItemTypeData.xml

Contains information about this item’s type data and use.

ItemTypeClassData.xml

Contains information about the item class. The number of hits taken to destroy a block is equal to Block Resistance / Item Power × Tool Effectiveness. E.g. Rhyolite has a resistance of 7200, and a Titanium Pickaxe has a power of 1200, meaning it will take 6 hits to destroy Rhyolite with a Titanium Pickaxe.

ItemCombatData.xml

Contains information about the stat bonuses of items. Every 100 points in a stat is equal to 1 skill level.

ItemSwingTimeData.xml

Contains information about the swing time of this item. The Time field is the total amount of time this item takes to swing and is not affected by any other field. Say, Time=1, and Pause=0.5: this item will take 1 second to swing, half a second of which is spent paused.

ItemSwingData.xml

Contains information about how items are swung.

ItemSoundData.xml

Contains information about the sound this item makes.

SkillData.xml

Contains information about the skill types and requirements for this item.

BlueprintData.xml

Contains information about how this item is crafted and its Dig Deep Blueprint.

ItemTextures16.xml/ItemTextures32.xml

Contains the order of items in their respective texture atlas image. HD Texture Packs use ItemTextures32.xml while SD Texture Packs use ItemTextures16.xml. Always supply both TexturesXML files and both texture atlas images when adding custom items. The texture atlas image should have every item texture laid out next to one another. Recommended up to 32 items on one line in the texture atlas. Once the 32nd item is reached, move down a line.


Modifying Blocks

At the moment, blocks cannot be added with mods, but they can be modified. Below is the documentation for each file used to modify blocks. Any file or field can be omitted.

To modify the name, description, price, etc. of blocks, you must use ItemData.xml with the desired Block ID as the Item ID.

Files: BlockData.xml, BlockMaterialData.xml, BlockTextures16.xml/BlockTextures64.xml

BlockData.xml

Contains general information about this block.

BlockMaterialData.xml

Contains information about this block material. The block material affects the tools that can break the block. If any efficiency is set to 0, that respective tool cannot break the block.

BlockTextures16.xml/BlockTextures64.xml

Contains the order of items in their respective texture atlas image. HD Texture Packs use BlockTextures64.xml while SD Texture Packs use BlockTextures16.xml. The texture atlas image should have every item texture laid out next to one another. Recommended up to 32 blocks on one line in the texture atlas. Once the 32nd block is reached, move down a line.


Adding And Modifying NPCs

NPCs, also known as Actors, can be added and modified with XML mods. If the NPC ID supplied already exists, that NPC will be modified. Below is the documentation for each file used to add or modify NPCs. Any file or field can be omitted to use default values.

Files: ActorTypeData.xml, ActorAIData.xml, ActorAudioData.xml, ActorLevelData.xml, ActorPhysicsData.xml

ActorTypeData.xml

Contains general information about this NPC.

ActorAIData.xml

Contains information about this NPC’s AI.

ActorAudioData.xml

Contains information about the sounds this NPC makes.

ActorLevelData.xml

Contains information about this NPC’s skill levels.

ActorPhysicsData.xml

Contains information about this NPC’s movement.


Adding Particle Templates

Particle templates can be added with XML mods. These particle templates can be used with Particle Emitter blocks and scripts. Any field can be omitted to use defaults.

Files: ParticleData.xml

ParticleData.xml

Contains the data for this particle template.


Sources


← Back to Home