Aller au contenu principal

Machine Definition

Machine Definition

Typewriter entry that defines a machine type. Configuration is grouped into logical sections. All recipe/fuel data uses String-based material names (e.g., "IRON_OAK_LOG") for KSP compatibility — these are resolved to ItemStack at runtime via Material.valueOf().

Champs

ChampTypePar défautDescription
processingTypeMachineProcessingTypeSMELTINGThe core processing behavior of this machine (SMELTING, STORAGE, GRINDING, etc.)Valeurs :SAWMILLMIXER
behaviorsList<MachineBehavior>emptyExplicit set of machine behaviors. Leave empty to auto-derive from processingType.
inputSlotsInt1Number of input slots for items to be processed
outputSlotsInt1Number of output slots for processed results
hasFuelSlotBooleantrueWhether this machine has a dedicated fuel slot
upgradeSlotsInt1Number of upgrade slots at base tier (0 = upgrades disabled)
shearsSlotsInt0Number of shear storage slots (for SHEARING machines)
essenceSlotsInt0Number of essence slots at base tier (0 = essences not accepted)
filterSlotsInt0Number of filter slots (for SORTING machines)
maxPerSlotInt64Maximum items allowed per inventory slot
liquidTankCapacityInt0Liquid tank capacity in millibuckets (0 = no liquid tank)
energyCapacityLong0Energy storage capacity (0 = no energy system)
energyGenerationPerTickLong0Energy generated per tick (for generators)
spawnItemVar<Item>—Item used to place this machine, and given back when it is picked up or broken
visualTypeMachineVisualTypeNONEVisual display type (NONE, FURNITURE, CUSTOM_BLOCK)Valeurs :NONEFURNITURECUSTOM_BLOCK
furnitureIdString—Furniture model ID (CraftEngine) used when visualType is FURNITURE
customBlockIdString—Custom block ID (CraftEngine) used when visualType is CUSTOM_BLOCK
alignWithPlayerYawBooleantrueWhether to align placed furniture with the player's yaw
hologramEnabledBooleantrueWhether the hologram status display is enabled
hologramOffsetHeightDouble1.2Height offset of the hologram above the machine block
hologramProgressBarFormatVar<String><green>%bar%</green> <gray>%percent%%</gray>Progress bar format string (supports %bar%, %percent%, %time_left%)Placeholders
hologramIdleMessageVar<String>DEFAULT_IDLEHologram message displayed when the machine is idle. Supports %machine%, %tier%, %energy%.PlaceholdersCouleursMultiligne
hologramActiveMessageVar<String>DEFAULT_ACTIVEHologram message displayed during active processing. Supports %bar%, %percent%, %time_left%.PlaceholdersCouleursMultiligne
hologramLowEnergyMessageVar<String>DEFAULT_LOW_ENERGYHologram message when energy is too lowPlaceholdersCouleursMultiligne
hologramFullMessageVar<String>DEFAULT_FULLHologram message when output slots are fullPlaceholdersCouleursMultiligne
recipesList<MachineRecipeSpec>emptyList of processing recipes. Use material names (e.g., IRON_OAK_LOG) for items.
MachineRecipeSpec (17)
ChampTypePar défautDescription
inputMaterialString—Input material name (e.g., IRON_OAK_LOG, GOLD_OAK_LOG)
outputMaterialString—Output material name (e.g., IRON_INGOT, GOLD_INGOT)
outputAmountInt1Output amount
cookTimeInt200Processing duration in ticks (20 ticks = 1 second)
fuelCostInt0Fuel units consumed per operation (0 = no fuel needed)
energyCostInt0Energy units consumed per operation (0 = no energy cost)
liquidInputNameString—Liquid input required (e.g., water, lava)
liquidInputAmountInt0Liquid input amount in millibuckets
liquidOutputNameString—Liquid output produced (e.g., lava)
liquidOutputAmountInt0Liquid output amount in millibuckets
inputPotionTypeString—Base potion type required as input, e.g. `AWKWARD`. Only meaningful on a POTION input.
outputPotionTypeString—Base potion type written on the output, e.g. `SWIFTNESS`. Only meaningful on a POTION output.
inputItemIdString—Catalogue item id required as input. Takes precedence over inputMaterial when set.
outputItemIdString—Catalogue item id produced. Takes precedence over outputMaterial when set.
secondaryInputsList<MachineIngredientSpec>emptyAdditional inputs consumed alongside the main one. All must be present to start.
MachineIngredientSpec (3)
ChampTypePar défautDescription
materialString—Material name (e.g., COPPER_INGOT)
amountInt1Amount required or produced
itemIdString—Catalogue item id. Takes precedence over material when set.
secondaryOutputsList<MachineIngredientSpec>emptyAdditional outputs produced on every successful operation.
MachineIngredientSpec (3)
ChampTypePar défautDescription
materialString—Material name (e.g., COPPER_INGOT)
amountInt1Amount required or produced
itemIdString—Catalogue item id. Takes precedence over material when set.
randomOutputsList<MachineRandomOutputSpec>emptyOutputs produced only on a successful roll. Yield modules raise their chance.
MachineRandomOutputSpec (4)
ChampTypePar défautDescription
materialString—Material name
amountInt1Amount produced when the roll succeeds
chanceDouble1.0Chance between 0.0 and 1.0
itemIdString—Catalogue item id. Takes precedence over material when set.
fuelTypesList<MachineFuelSpec>emptyList of fuel types this machine accepts. Use material names for items.
MachineFuelSpec (4)
ChampTypePar défautDescription
materialString—Fuel material name (e.g., COAL, CHARCOAL, LAVA_BUCKET)
itemIdString—Catalogue item id burnt as fuel. Takes precedence over material when set.
burnTimeInt1600Burn duration in ticks
fuelValueInt1Fuel value units provided
allowedUpgradesList<MachineUpgradeType>emptyUpgrade types this machine accepts. Leave empty to refuse upgrades entirely.
upgradeSpecsList<MachineUpgradeSpec>emptyUpgrade modules installable in this machine's upgrade slots
MachineUpgradeSpec (4)
ChampTypePar défautDescription
itemIdString—BTC item id of the module (recommended). Falls back to material when left blank.
materialString—Material of the upgrade item, used only when no item id is given (e.g. DIAMOND, NETHERITE_INGOT)
typeMachineUpgradeTypeSPEEDWhat this upgrade improves
magnitudeDouble1.0Strength of the effect. SPEED/YIELD are multipliers (2.0 = twice); FORTUNE is a 0..1 chance; RANGE adds blocks; FILTER adds slots
tiersList<MachineTierSpec>emptyResearch-gated tiers, in ascending order (T2, T3...). The highest unlocked tier applies.
MachineTierSpec (7)
ChampTypePar défautDescription
researchNodeString—BTCSky research node id that unlocks this tier for the island
speedMultiplierDouble1.0Operation speed multiplier (2.0 = twice as fast)
yieldMultiplierDouble1.0Output multiplier (1.2 = +20% yield)
energyMultiplierDouble1.0Energy cost multiplier (0.85 = 15% cheaper)
fortuneChanceDouble0.0Chance (0..1) for an operation to yield a double output
upgradeSlotsInt0Total upgrade slots at this tier; zero keeps the machine's base count
essenceSlotsInt0Total essence slots at this tier; zero keeps the machine's base count
chargeablesList<ChargeableSpec>emptyItems this charger can fill. Used by CHARGING machines.
ChargeableSpec (2)
ChampTypePar défautDescription
materialString—Material of the chargeable item (e.g. a custom drill or jetpack item's base material)
maxChargeLong10_000LMaximum energy this item can hold
chargeRatePerSecondLong0Energy moved from the island pool into the charged item per second
assemblerModeAssemblerModeSPAWNWhether this assembler spawns entities or harvests nearby ones
assemblerEntityTypeString—Entity type to spawn or harvest (e.g. IRON_GOLEM, COW). Used by ASSEMBLER machines.
assemblerMobIdString—Native Typewriter BTC mob template id to spawn instead of the vanilla entity. An unknown id is rejected explicitly.
assemblerIngredientsList<AssemblerIngredient>emptyIngredients consumed per assembly (SPAWN mode)
AssemblerIngredient (2)
ChampTypePar défautDescription
materialString—Ingredient material name
amountInt1How many are consumed per assembly
assemblerEnergyCostLong0Energy consumed per assembly/harvest operation
assemblerIntervalLong100Ticks between two assembler operations
spawnerUpgradesList<SpawnerUpgradeSpec>emptyUpgrades this spawner accepts, each bought by inserting its essence. Steps are permanent.
SpawnerUpgradeSpec (5)
ChampTypePar défautDescription
itemIdString—Catalogue item id of the essence that buys this upgrade
effectSpawnerUpgradeEffectMOB_LEVELWhat the essence buys
maxStepsInt1How many times this upgrade can be bought on one spawner
valuePerStepDouble1.0Value added per step. MOB_LEVEL adds it to the spawned level; YIELD and SPECIES ignore it.
speciesMobIdString—SPECIES only: the BTC mob template this spawner produces once the upgrade is bought
assemblerRangeDouble5.0Radius in which COLLECT-mode assemblers look for entities
panelOpenCommandString—CONTROL_PANEL: command run on right-click, as the player (blank = nothing). Leading / optional.
panelAltCommandString—CONTROL_PANEL: command run on left-click without sneaking (blank = nothing). Sneak + left-click always picks the machine up.
vanillaBlockString—Vanilla Material this definition takes over (blank = none). Placing that block creates this machine.
liquidFuelNameString—Liquid burned as fuel when a LIQUID_FUEL upgrade is installed (e.g. LAVA). Blank = none.
grinderDamageDouble10.0MOB_GRINDING: damage dealt to each living entity in the footprint, per operation
grinderIntervalLong200MOB_GRINDING: ticks between two damage passes (200 = every 10 seconds)
grinderRangeDouble1.5MOB_GRINDING: radius of the footprint in blocks (1.5 = a 3x3 square). Range modules extend it.
grinderEnergyCostLong250MOB_GRINDING: energy drawn per damage pass (0 = free)
experienceCapacityInt30EXPERIENCE_TANK: how many experience levels it holds before overflowing. Capacity modules extend it.
machineLimitInt0Maximum number of instances a single player can place (0 = unlimited)
perIslandLimitInt0Base maximum instances of this machine per island (0 = unlimited). Island upgrades add to this.
islandLimitUpgradeKeyString—Island 'upgrades' map key whose level is added to perIslandLimit (blank = no upgradeable bonus)
dimensionScopeList<String>emptyDimension ids this machine may be placed in (empty = every dimension). Trade machines declare their own island only.
hopperIntervalLong100Hopper transfer interval in ticks (0 = hopper automation disabled)
hopperTransferAmountInt1Hopper transfer amount per operation
redstoneModeRedstoneModeIGNOREHow a redstone signal affects this machine (IGNORE, DISABLE_WHEN_POWERED, REQUIRE_POWER)
ejectWhenPoweredBooleanfalseWhen true, a redstone signal ejects finished products into adjacent containers
redstoneComparatorOutputComparatorSourceNONEWhat a neighbouring comparator reads (NONE, PROGRESS, INPUT_FILL, OUTPUT_FILL, ENERGY_FILL). Needs BTC-CORE.
redstonePulseOnCompleteBooleanfalseEmit a short redstone pulse each time an operation completes. Needs BTC-CORE.
redstonePulseTicksInt4Duration in ticks of the completion pulse
vacuumRangeDouble0.0Vacuum collection range in blocks (for VACUUM machines)
shearRangeDouble5.0Shearing range in blocks (for SHEARING machines)
shearIntervalLong100Shearing interval in ticks (for SHEARING machines)
storageRefRef<MachineDataArtifactEntry>—Artifact reference for persisting machine runtime state
guiStorageRefRef<GuiStorageEntry>—GUI storage artifact backing the stored items of a STORAGE machine (one group per machine instance)
Champs TypeWriter communs (criteria, modifiers, triggers)
ChampTypePar défautDescription
criteriaList<Criteria>emptyCriteria that must be met before this definition can be used
modifiersList<Modifier>emptyModifiers applied when this definition is activated
triggersList<Ref<TriggerableEntry>>emptyTriggers fired when this definition is activated

How to use it​

Start with processingType, the slot counts and storageRef, then fill the groups your type needs (see the field groups on the extension page).

  • Recipes — inputMaterial/outputMaterial name a vanilla Material (for example IRON_ORE). When inputItemId/outputItemId is set, the catalogue item wins and the material is only a fallback. Use inputPotionType/outputPotionType for potions. secondaryInputs are all required; secondaryOutputs are produced every time; randomOutputs only on a successful roll (chance from 0.0 to 1.0, raised by yield modules). cookTime is in ticks (20 = 1 second).
  • Fuel — fuelCost of a recipe is paid in fuelValue units of the items in fuelTypes; burnTime is in ticks.
  • Modules — a module only works if its type is in allowedUpgrades. SPEED and YIELD are multipliers, FORTUNE a chance between 0 and 1, RANGE adds blocks and FILTER adds slots.
  • Tiers — list them in ascending order; each needs a name and a researchNode of BTC Sky.
  • Spawners — for an ASSEMBLER in SPAWN mode, spawnerUpgrades are bought by inserting the essence (itemId): MOB_LEVEL adds valuePerStep to the level, YIELD adds one creature, SPECIES replaces the species by speciesMobId. maxSteps caps each upgrade.
  • Limits — machineLimit per player, perIslandLimit per island (plus the island upgrade named in islandLimitUpgradeKey). A definition restricted with dimensionScope needs one of these limits.
attention

A definition is rejected when it has no spawnItem and no vanillaBlock, an invalid recipe (no input and no output, cookTime or outputAmount of 0 or less), or two modules sharing the same item. The log lists every problem.