Skip to content

Pack Making JSON Parts

Wartich edited this page Apr 17, 2026 · 102 revisions

Compared to vehicle JSON, part JSON is a cinch! There's not much to it, and some parts, like seats, will have less than 10 lines to mess with. Like before, it is expected that you have the official content pack to use as a reference for the JSON structure. Do note that all positions specified in these sections are relative to the part, not the vehicle. Since the positions are offset from the main vehicle, it may be possible that the current position of the part, plus the offset, overlaps with the position of another part. Care needs to be taken to ensure this cannot happen, as MTS does not allow for two parts to share the same space without complications.

Note that for every part, their JSON parameters and their prefix must match. So engines start with the engine_ prefix and have their parameters in the engine section, ground devices start with ground_ and have their parameters in the ground section, etc.

Properties that are marked with * can be modified using variableModifiers too, for more advanced functionality!

Inherited JSON

Parts inherit the following core JSON sections:

Generic

While every part type has its own section, this section is common to all parts. Being generic, it is used on all parts to define their generic properties. Note that some parameters in it may not apply on some parts, such as wheels which define properties like height based on other parameters, but it will work on the majority of parts for more fine-tuning of things like interaction box size. All parameters go in the generic section.

  • type – This is the type-name for the part you are creating. This tells MTS what sections to load and how to interact with your part. This needs to start with one of the names defined in the sections below (engine, ground, seat, etc.). Note that you may, and are encouraged to, add suffixes to handle different part types. Some common ones are engine_car, ground_wheel, and gun_tripod. For a complete list of common suffixes, check the conventions. Note that generic itself is an acceptable prefix, and is commonly used for parts that don't do anything except look cool, like spoilers, push-bars, and canvas tops.
  • customType – This parameter is optional and should only be used for parts that you need in specific places. This will restrict this part to only work in part definitions with customTypes defined, and only if they contain this customType.
  • benchTexture - This parameter is optional. If included, then the model will be rendered with this texture in the part bench, even if it has a different one defined or uses the vehicle texture.
  • canBeRemovedByHand – If true, this part will be able to be removed by hand and without a wrench. This also bypasses owner requirements (but not vehicle locking). Useful for small parts like luggage that anyone should be able to remove at any time.
  • mustBeRemovedByScrewdriver - If true, this part will only be able to be removed with a screwdriver.
  • forwardsDamage - If true, this part will deal the same amount of damage it receives to its parent vehicle as well.
  • forwardsDamageMultiplier - The multiplier for forwarded damage. If set, this part will forward damage onto the vehicle it is on when hit. This will also cause any bullets to stop when they hit this part. Defaults to 1.0 for engines, 0.0 for other parts.
  • canBePlacedOnGround - If true, this part can be placed on the ground. It will be placed axis-aligned when placed.
  • fallsToGround - If true, this part will fall to the ground with MC's gravity of 0.04m/tick/tick. Has no effect if canBePlacedOnGround is false.
  • destroyable - If true, then when this part runs out of health it will be destroyed and removed rather than just become inoperable.
  • forceAllLinks - If true, this part will link to all parts that it could possibly link to, no matter if they are specified in their linkedParts.
  • width – The width of the part.
  • height – The height of the part.
  • placedOffset - The offset, in the Y direction, as to where this part will exist when placed in the world. Has no effect if canBePlacedOnGround is false.
  • slotOffset - The offset for where this part will exist relative to its slot. May be left out if no offset is desired.
  • mass - The mass of the part. Is normally 0, but may be used for generic parts or engines or the like.
  • movementAnimations – This is a list of animations that can be used to move this part based on the animation values. This movement applies before the movement defined in the part slot. This is primarily used to move the part based on properties of sub-parts, mostly for guns, but may be used for other things.
  • activeAnimations – A listing of animation objects for determining if this part is active. Leaving this blank will make for a part that is always active. Visibility transforms will turn the part on and off. Inhibitor and activator transforms may be used in conjunction with these for advanced on/off logic. The exact thing that an 'active' part does depends on the part. Effectors only effect when they are active. Guns can only be used when active. Seats can only be sat in when active. etc.

Engines

Engines are the most complex JSON in MTS. While all engines use the same generic code under the hood, each application has specific tweaks that will need to be made. For example, an aircraft engine that has propellers on it will need to have a propeller subPart to allow for a propeller to be placed on it, or an additionalPart on the vehicle, should the propeller be a vehicle option rather than an engine option (such as a car that has a boat propeller for water travel). Because of this, the forces that come out of your engine depend on what it's put in and what's attached to it more than anything else. While engines have a “type” parameter, this is only used for classifying engines into distinct categories to prevent users from putting jet engines on semi trucks and has no effect on the engine itself. The way the engine behaves is defined in the engine JSON section and contains the following parameters:

  • type – The type of engine. Different engines use different paramters. But at least one type must be specified. Valid types are:
  • normal – A standard internal-combustion engine. Requires fuel from the vehicle's fuel tanks to run.
  • rocket – A rocket-powered engine. Uses only internal fuel and must be rebuilt each use.
  • electric - An electric engine. Gets power from chargers connected to the grid.
  • magic - An engine that doesn't need fuel. This is designed for vehicles that don't need fuel, like bicycles, sailboats, handcars and the like.
  • isAutomatic* – Should the engine change gears on its own. This only affects cars and will prevent users from shifting into higher or lower gears using shiftUp and shiftDown. Instead, the engine will attempt to choose the best gear for the situation. Note that MTS's automatic transmission system isn't the best and may get confused when gear ratios are close together. For this reason, it is recommended to either use manual transmissions on vehicles with more than 5-6 gears, or to define the RPM at which a gear is shifted up or down via upShiftRPM and downShiftRPM.
  • allowThrustVector - If Enabled, Will calculate thrust vectoring forces on all 3 axis.
  • disableAutomaticStarter - If true, the automatic starter will be disabled for this engine. Instead, it must be started by hand. Note that while normally this requires hitting the propeller, but in this case the engine itself may be hit too. This is for outboard motors and the like.
  • starterPower – This is how much “oomph” the starter outputs on a single firing. When the starter key is held the engine RPM will be increased by this amount every 4 ticks, or every 0.2 seconds. Note that for engines with high loads, such as those with larger propellers, its quite possible to make a starter power that literally can't start the engine.
  • fuelConsumption* – How many mb/t the engine uses, and how powerful the engine is. This value is calculated at maxRPM and scaled down based on the percentage of speed the engine is at, so an engine with a maxRPM of 4000 with a fuel consumption of 1.0 running at 2000RPM is actually running at a rate of 0.5. This value is the key to determining the raw power output of your engine, as it's directly related to how much force the engine can output. However, even the most powerful engines won't do much if they're geared improperly, and even weak engines with low consumption can reach high speeds if they can maintain high RPMs.
  • superchargerFuelConsumption* – Same as fuelConsumption, but for the supercharger on this engine (if any). Note that vehicles will only take the base fuel consumption of the engine into account when checking min/max values. This is to allow for higher-performance engines to be added to vehicles without poking pack creators to increase their maximum values. This variable can be omitted if your engine doesn’t have a supercharger.
  • superchargerEfficiency* – The efficiency of the supercharger on this engine (if any). The supercharger fuel consumption of this engine (but not the base fuel consumption) will be multiplied by this value. A value of 1 will make the supercharger add the same amount of power for its fuel consumption as adding that number to the base fuel consumption, so make sure to set it to greater than that if you want your supercharger to have any power benefits!

This also affects the engine wear calculations, with a value of 1 or below leaving them the same as what it would be without a supercharger. By setting this value to significantly below 1 you can simulate inefficient, gas-guzzling engines if you have a high supercharger fuel consumption, as it won’t add much power but will make the engine use a lot more fuel.

As a final note: supercharged engines heat up faster than non-supercharged engines. A supercharger efficiency of 0 would make the calculations the same as a non-supercharged engine in this case; setting it to 1 will not make the engine heat up twice as fast. This is intended behavior, as real supercharged engines heat up faster than naturally aspirated ones even if the supercharger itself isn’t very efficient. This variable can be omitted if your engine doesn’t have a supercharger.

  • heatingCoefficient*- How quickly this engine heats up when at higher RPMs

  • coolingCoefficient*- How quickly this engine tries to cool itself down when not actively generating heat/at lower RPMs.

  • fuelType– What type of fuel this engine uses. This is NOT the name of the fluid this engine uses, rather it's a generic type that basically lumps it in with other engines. gasoline and diesel are two of the most common, electricity is also an option. This type system allows for packs to group their engines by what fuels they take to make them more uniform, and allows server owners to configure their fluids to work with specific types of engines.

  • gearRatios* – A list of gear ratios for this engine. This should contain at a minimum 3 entries. 1 reverse gear, a 0 for neutral, and 1 or more forwards gears. For vehicles such as aircraft that don't shift gears, a simple [-1, 0, 1] will do. That is, unless you want the engine to come with a reducer, in which case use the appropriate ratio. For example, having a setup of [-2, 0, 2, 1] would make the wheels/propeller of the vehicle turn half as fast as the engine in first gear and reverse, but the same speed in second. You can have at most 127 gears per engine, and only cars, boats, and blimps have gearboxes to shift into reverse, so keep this in mind when designing engines for these applications. If you're having trouble with cross-platform applications, you might need to set a propellerRatio instead. Note that the currentGearRatio may be modified with a variableModifier to adjust the ratio of the engine at any given time. It will not replace the need for the defined ratio lists, however.

  • propellerRatio – This is a constant ratio that will be used for any propellers attached to this engine, and will override the value in gearRatios. Useful when you want to gear-down a propeller on a vehicle that's normally land-bound.

  • jetPowerFactor* – If this is greater than 0, this engine will provide jet thrust. This thrust is based on the bypassRatio and various fuel consumption parameters. Note that you can set this on engines that provide power through other means, which will cause the jet power to be added to whatever other power the engine provides. Useful for turboprops, or just pure jets.

  • bypassRatio* – Used only with jetPowerFactor for jet thrust calculations. Higher bypass ratio engines will have better power when turning fast, and will allow for lower fuel consumption, but will also have a lower top-speed.

  • maxRPM* – The max RPM for this engine. This is how fast the engine will try to go with no load at 100% throttle. The red-line value (max safe RPM) is lower than and auto-calculated from this value.

  • maxSafeRPM* – The max safe (redline) RPM for this engine. If left out, MTS will auto-calculate this value for you. Normally this is fine, but SOME folks may not like the math, so manually-specifying it is an option.

  • idleRPM* – The RPM where this engine will start and idle, provided it is turned on and isn't drowned or out of fuel. Set to -1 for electric function (functions as 0)

  • startRPM* – The RPM where this engine will start, after starting the engine will try to maintain the speed set by the idleRPM and maxRPM. May be lower than the idleRPM, as the engine will stall based on the stallRPM, not this value. Set to -1 for electric function (functions as 0)

  • stallRPM* – The RPM where this engine will stall. Should be below the idleRPM to prevent the engine automatically shutting off on low throttle. Set to -1 for electric function (functions as 0)

  • revlimitRPM* – The RPM where this engine will attempt to slow down, whether in gear or in neutral. If left out, MTS will auto-calculate this value for you. Set to -1 to disable.

  • revlimitBounce* – How much the engine's RPM "bounces" when limiting in neutral, with lower values bouncing harder as a "hard limiter" and higher values acting as more of a "soft limiter". If left out, MTS will automagically set this to 8.

  • engineWinddownRate* – The rate at which this engine's RPM winds down per tick after sputtering out or being turned off. 10 by default, and can be configured to make engines wind down quicker or slower.

  • rocketFuel - Normally, engines run off of the fuel from the main vehicle. However, one can give them rocket fuel, which will be used rather than the vehicle's fuel. The moment the engine turns on, the fuel will ignite and run as if full throttle until the fuel runs out, at which point they must be crafted again to re-fuel them for their next use.

  • engineWearFactor* – The rate at which this engine accrues hours. If you make it lower, it'll be more reliable. If you make it higher, it'll collect that wear out like the infinity stones. Does not affect engines being damaged by mobs, arrows, etc. though!

  • upShiftRPM – A list of engine RPM speeds that tells MTS when to shift up a gear. This may be added in conjunction with downShiftRPM to specify the shift points in automatic transmissions to avoid bad shifting choices by the MTS code. You must have one of these for each gear, including neutral and reverse!

  • downShiftRPM – The same as upShiftRPM, but instead tells MTS when to shift down a gear. Be careful while configuring this and upShiftRPM, as you can create an infinite shifting loop if the RPMs are too close. A rule of thumb is to use what RPM your engine lands at after shifting up and subtract a few hundred RPM.

  • shiftSpeed – For automatic gear boxes only. This parameter is how long, in ticks, to wait to shift gears after shifting gears once. This is needed as there's a slight delay between shifting and the engine RPM catching up, so without this parameter engines would just bounce between first and last gear. Adjust this parameter to fit the power output and ratio spacing of your engine. Engines with lots of gears or high power will likely need a smaller number than a gutless 3-speed.

  • clutchTime – For manual gear boxes only. This parameter defines how long the clutch variable is set to 1 for up-shifting and down-shifting animations. Has no other affect than this, as vehicles don't simulate clutches. That's a bit TOO realistic!

  • revResistance* – How long it takes for the engine RPM to “catch up”, or how fast it revs. The lower the value is, the faster the engine will react to RPM changes. If ignored, MTS will set the value of this to a default of 10.

  • forceShift* – If true, this engine will forcefully shift into the desired gear, rather than return a bad shift when shifting into a gear opposite the direction of travel.

Ground Devices

It's a device, that touches the ground. Therefore, it's a ground device part. Simple, no? Ground devices come in all shapes and sizes. From the pinnacle of modern motion, wheels, to simple devices like pontoons, ground devices are the bread and butter of movement in MTS. Unless you're making a boat, you'll probably need a few of these. Ground device parameters are in the ground section and consist of the following:

  • isWheel – If true, then this part will be considered a wheel. Wheels can transmit power from engines to the ground, making them the go-to choice for ground-based vehicles.
  • isTread – If true, then this part is considered a tread. Treads are a special case, and therefore have special code on their part slots.
  • canFloat – If true, then this part will consider water blocks solid and will float on the top of them. This may be used in conjunction with floating hitboxes.
  • width – How wide this part is. Used for collision detection.
  • height* – How tall this part is. This is used as the min-max parameter. In cars, this also affects the max ground speed as the rotation of a larger wheel will cause more movement than the rotation of a smaller wheel.
  • climbHeight – If set, defines how many blocks this wheel can climb. Can be a decimal value. Defaults to 1.5 when not set.
  • flatHeight – If set, then this part can go “flat”, and the height of the part will be set to this. This also reduces the friction it provides.
  • motiveFriction* – How much friction this part has for forwards movement. Used in cars to determine how much grip wheels have with the ground and if they should spin out, and used with all vehicles when brakes are applied to determine how much force they should be able to apply.
  • lateralFriction* – How much friction this part has for sideways movement. Used during turning operations to determine how much the vehicle will skid sideways when turning at speed.
  • wetFrictionPenalty – How much friction this part has for sideways movement. Used during turning operations to determine how much the vehicle will skid sideways when turning at speed.
  • extraCollisionBoxOffset – If set, this part will create an extra collision box offset in the +Z direction by this amount when placed on a vehicle. This collision box will have all the same properties as this part (wheel, floating, friction, etc.). Useful for longer parts like pontoons or helicopter landing skids. Note that if this parameter is set in the vehicle JSON the vehicle value will override this value.
  • spacing – Used only for treads.
  • treadOrder – The object order to render for the treads. Allows rendering of patterned tread links with multiple objects in the same model, rendering in the defined sequence. Used only if isTread is true.
  • frictionModifiers – A mapping of friction modifiers. These are used to determine the friction change when on specific surfaces. Defaults to -0.1 (except for treads) on wet surfaces, and -0.2 on ice and snow for all ground devices. Valid surfaces are: normal, ice, snow, sand, gravel, clay, grass, dirt, metal, stone, glass, and wood

Propellers

This part is used on aircraft and is designed to fit on aircraft engines. It is unique in that it must be a sub-part or additionalPart of an engine, and not a part on the vehicle JSON. The JSON, however, is fairly standard, and contains the following parameters under the propeller section:

  • isRotor – If true, MTS will consider this propeller a rotor and will angle it when the aircraft control keys are pressed. This will cause the thrust to be vectored in different directions. Designed for helicopters, which use rotors to control their movement.
  • pitch – Pitch is a critical defining characteristic of this part. In essence, pitch is how far forward, in inches, the propeller tries to move in one revolution. This, coupled with the RPM and gear ratio of the engine, determines the max possible speed of the aircraft this propeller is attached to. Note, however, that propellers with higher pitches are less efficient at slower speeds so they require a longer runway. This should be considered carefully before designing a propeller with a high pitch...
  • pitchChangeRate - How many inches, per tick, this propeller tries to change pitch. Defaults to 1 if not set, but can be higher if faster propeller response time is desired.
  • diameter – The diameter of this propeller, in inches. Higher-diameter propellers provide more thrust at the same RPM as lower-diameter units. However, the higher the diameter the more force they take to turn and the more powerful an engine will need to be to drive them (some low-power engines may not even be able to start with large propellers on them). Additionally, the higher the diameter the lower the maximum RPM the propeller can turn. Should the propeller exceed this speed it will break off and the engine it was attached to will suddenly not have a load and will rev up rapidly.
  • isDynamicPitch – If this is present and set, the propeller will have a dynamic pitch. Propellers with dynamic pitch automatically change their pitch to keep their speed at the top end of the max RPM of the engine. Below that range their pitch will decrease to a minimum of 45, and above that range it will increase to whatever value is specified by the “pitch” parameter. Dynamic pitch propellers are also able to provide reverse thrust, though at a significantly reduced power level to their forward-thrust capabilities.

Seats

Seats allow users to ride vehicles and have a prefix and JSON section of seat. While most seats won't have anything special about them, there are a few parameters that you set to change how they function:

  • standing – If true, the player will stand in this seat rather than sit. Note that some mods may mess this up and force the player to sit, so if you're having troubles try removing mods first.
  • playerScale – If included, the player will be scaled along to this X, Y, and Z value when sitting in this seat. Useful for times when you can't fit a regular seat. You can also use this to make the player invisible with a small enough size.

Guns

What's a vehicle without guns? That's right: it's a target! If weaponized vehicles is your goal, you'll want to pay special attention to this and bullets, as they in tandem define the abilities and effects of the gun.

Note that if a gun is placed as a part on a seat or an additionalPart on a vehicle where a seat is required to place it, then the gun will be controlled by the player in the seat. The player may then rotate the gun to the direction they are facing. The limits of how far the gun rotates and the speed at which it rotates is dictated by the gun's parameters, and the parameters of the part slot. Should a gun be placed on a vehicle normally it will be controlled by players in seats marked as controllers. These guns can also rotate, though, so be mindful of this when designing tanks and other such vehicles. All gun parameters are as follows:

  • autoReload* – If set in vehicles, this causes the gun to automatically reload from the vehicle's inventory. For hand-held guns, it will cause the gun to try and load ammo before the gun hits 0 bullets (hand-helds will always reload when they hit 0). Guns will prefer to reload the same ammo that was previously in the gun, and will only reload different (yet compatible) ammo if the old ammo is not found.
  • isClipless - Normally, reloading in the hand swaps clips. If set, this won't happen, and rather the gun will load bullets with other bullets.
  • blockReloading* - If set, then this gun will never be able to be reloaded. Useful for single-use weapons.
  • handHeld – If set and true, then this gun part will be able to be held and fired from the player's hand. All animations, and lighting applies here, so keep this in mind. If this is set, then handHeldNormalOffset and handHeldAimedOffset MUST be included! Note that custom cameras will work when hand-held, but they will not be activated via the standard F5 cycling. Instead, they will be activated when the player sneaks. This is intended to allow for scopes and the like.
  • isTwoHanded* – If set and true, then this gun will always be held with two hands. Normally, guns are only held with two hands when aiming, but one hand normally.
  • forceHandheldCameras - If true, then this gun will force the custom camera when hand-held. Useful for custom HUDs. Does not affect third-person mode.
  • isSemiAuto* – If set, the gun will only be able to be fired once per button press.
  • fireSolo – If true, this makes it so that only one of this type of gun can be selected and fired at a time. This is useful for missiles and bombs that have different types of ammunition, as you can load different guns with different types of ammunition, and switch between the individual guns. If not used or set to false, cycling through weapons will select all weapons of the same type.
  • windsDownInstantly - If true, then when this gun has windup it will wind down instantly. This allows for essentially charged-shot guns.
  • resetPosition – If true, this gun will return to its default yaw and pitch if it not active. This is useful for anyone who likes to keep their large assortment of weapons nice and tidy.
  • disableMuzzleOrientation - If true, then this gun will fire bullets to align with itself only, and not with the muzzle rot parameter. However, the initial velocity will still align with the rot parameter. This allows the muzzle to be rotated to adjust the firing direction without modifying the orientation of the spawned bullet. Think bomb bays and rocket launchers with a jettison before burn.
  • disableInheritedMotion - If true, then the bullets fired from this gun will not inherit the motion of the gun upon firing. Useful for handheld guns where merely walking can throw the projectile off.
  • capacity – The capacity of the gun, in number of bullets.
  • reloadTime – How long, in ticks, this gun takes to reload. This is applied for hand-held reloading as well as automatic reloading. This value should be similar to the duration of your gun _reloading sound to ensure players don't get confused about why they can't fire their guns.
  • reloadStartTime - Like reloadTime, but this is applied only at the start of a reload. Used for opening breaches on multiple bullet guns where there's a start/end animation.
  • reloadEndTime - Like reloadStartTime, but the end.
  • reloadDelay - How long, in ticks, this gun has to wait after firing a shot to reload. This differs from reloadTime, as it blocks the reload sequence from starting, rather than changes how long it takes.
  • windupTime – How long, in ticks, this gun takes to start firing after pulling the trigger. This is designed for chain-gun type guns that need a short period of wind-up before they can start firing. When the trigger is released, the gun will wind-down for the same amount of time it took to wind up. If the gun doesn’t wind all the way down before pulling the trigger again, it will start to wind back up from that point rather than 0.

Note for anyone going for realism: while it may seem counterintuitive, real chain-guns do not need any wind up time at all.

  • muzzleVelocity* – How fast, in m/s, the bullet will exit the barrel of this gun. Should be 0 in cases where bombers are concerned, as setting the value to 0 will make the bullet use the velocity of the vehicle that fired it rather than the muzzle. Critical for proper bomber functionality. Multiply by 10 for 1:1 speeds (800 = 80 blk/s).
  • knockback* – How much this gun knocks players backwards every time this gun is fired. This does not work like recoil and instead physically pushes the player back.
  • pitchRecoil* - How much pitch recoil this gun provides to the shooter. This will apply this value every shot. Only for hand-held mode.
  • pitchRecovery* - How much pitch recoil should be recovered, over pitchRecoveryTime period. Only for hand-held mode.
  • pitchRecoveryTime* - How long to recover the pitch in pitchRecovery. Only for hand-held mode.
  • yawRecoil* - How much yaw movement this gun provides to the shooter. This will apply this value, multiplied by a random value from -1 to 1, every shot. Only for hand-held mode.
  • fireDelay* – The delay, in ticks, between the firing of bullets.
  • bulletSpreadFactor* – How much spread the bullet will have when fired. 0 is no spread, higher values have higher spread.
  • minYaw – The minimum yaw this gun can angle left and right when controlled. Note that if this is 0, and it is specified in the part JSON section on the vehicle, the vehicle's parameter will override this parameter. Otherwise, the more conservative of the two values will be used. Note that if this is -180 and maxYaw is 180, then the gun will be allowed full 360 rotation.
  • maxYaw – Like minYaw, but the max.
  • minPitch – Like minYaw, but for pitch angle downwards.
  • maxPitch – Like minPitch, but for angling upwards.
  • diameter – The diameter of this gun. This defines what ammo diameter may be used with it, and is what corresponds to the min-max parameters in the vehicle JSON. It is also used to calculate rotation speed (if travelSpeed is not set). Units are in mm.
  • minCaseLength – The minimum case length of bullets that can go into this gun. Useful for preventing extra-long bullets from going into a gun that normally fires short ones. Units are in mm.
  • maxCaseLength – Like minCaseLength, but the maximum.
  • yawSpeed – How fast, in degrees/tick, the gun can rotate in the yaw direction. Note that if this value, and the value on the part slot are both specified, the lower of the two values will be used.
  • pitchSpeed – Like yawSpeed, but for pitch.
  • defaultYaw – Used when resetPosition is true. Defaults to 0 if not set.
  • defaultPitch – Used when resetPosition is true. Defaults to 0 if not set.
  • canLockTargets* - Whether this gun can lock on to targets, regardless of if the loaded bullet is guided."True" required for semi-active bullets.
  • lockOnType – How this gun obtains a lock.
  • default -Locks the entity you are looking at. Set to 750 meters and 2 degrees if not defined. Can use lockRange & lockMaxAngle to act more like a mouse-aimed boresight.
  • boresight -Gets the closest target within a cone around the gun's barrel vector. Requires lockRange & lockMaxAngle to be used.
  • radar -Currently unimplemented.
  • manual -Beam riding logic. Goes to wherever you are currently looking. Think laser-guided weapons.
  • targetType – What type of target the gun will lock on to.
  • all -Default, will lock any type of target.
  • aircraft -will only lock aircraft.
  • ground -will lock only ground vehicles.
  • hard -will lock all vehicles, but not other entities.
  • soft -Will lock living entities.
  • lockMaxAngle – Used in boresight lockOnType. The maximum angle, in degrees, from the gun's current orientation, that it can lock on to a target.
  • lockRange – Maximum range that the gun can lock on to a target, in blocks.
  • knockback - How much knocback this gun provides to the shooter.
  • preloadedBullet - The bullet that should be loaded into this gun on spawning. Useful for single-use weapons, especially hand-helds. Format is packID:bulletName.
  • handHeldNormalOffset – The offset where this gun will be when held normally by the player. An offset of 0,0,0 will render the gun in the center of the player's right shoulder rotation point. For reference, this is 0.3125 blocks to the right, and 1.375 blocks from the bottom-center of the player's feet.
  • handHeldAimedOffset – Like the normal offset, but this applies when the player starts sneaking/aiming.
  • handHeldModelOffset - An optional offset to move the gun in the player's hand off-center from the model. This is different from the other offsets as it offsets the position the player holds the gun, but NOT where they actually hold their arm.
  • muzzleGroups – A list of muzzle groups. When firing this gun, the list is cycled though, and each group of muzzles takes turns firing. If there are multiple muzzles in the group, they are all fired. This allows for guns with muzzles that fire in sequence, or all at once.

Muzzle Groups

  • muzzles – A listing of muzzles that are in this group. They will all be fired when this group is active.

Muzzles

  • pos – The position of this muzzle. This is where the bullet will be spawned on firing.
  • rot – The rotation of this muzzle. Allows for slight toe-in on barrels.
  • center – This is the point this muzzle will rotate about when the gun's pitch is applied. Used to define a point of rotation for things like tank barrels. If the barrel is part of, and rotates, with the gun, don't include this.

Interactable

Interactable is a generic bucket for parts that can be interacted with. These parts don't do anything to the vehicle. Rather, they are mainly for player interaction. They may display a GUI for the player to use, store items, or run tasks set by the player. Exactly what they do depends on the type parameter. All interactable parameters are contained in the interactable sub-section as follows:

  • interactionType – What this interactable does when interacted with. Valid types are:
  • crate – Stores items. If feedsVehicles is set, then this crate will allow other parts such as guns, engines, and effectors to pull inventory out for their operations.
  • barrel – Stores liquid. If feedsVehicles is set, and this barrel contains fuel, then fuel will be taken out of this barrel to be put into the main fuel tank. If the vehicle containing this barrel explodes, and the barrel contains fuel, the explosion size will be increased as if the vehicle had the fuel in the barrel in its fuel tank.
  • crafting_table – Works as a standard crafting table when clicked.
  • crafting_bench – Works as a MTS crafting bench when clicked. This requires supplemental parameters.
  • jerrycan - Works as a jerrycan, allowing for fuel to be stored inside and then used to fuel vehicles without a fuel pump.
  • battery - Works as a battery, allowing a charge to be stored inside and then used to charge electric vehicles without a charger.
  • furnace – Works as a furnace when clicked. Will take fuel internally, or externally depending on the crafter type.
  • brewer - Works as a brewing stand when clicked. Will take fuel internally, or externally depending on the crafter type.
  • crafterType - What type of crafter this is. Only required if this is a furnace or brewing stand component. Valid types are:
  • standard - Standard crafter with Vanilla fuel. Will pull from crates if those feed vehicles.
  • fuel - Runs off fuel liquid stored in barrels on the vehicle, or jerrycans if clicked on the furnace with them.
  • electric - Runs off electric power. Only valid for vehicles.
  • crafterRate - The processing rate of this crafter. This will make the crafter process items faster. This does NOT affect the fuel used, so a 2x multiplier here will make the crafter process and use fuel twice as fast.
  • crafterEfficiency - The efficiency of the crafter. A value of 1.0 will make it use the standard rate of fuel for processing. Lower values will use less fuel, higher values more fuel. For FUEL crafters, a value of 1.0 makes for 20 ticks of run time for 1mb. For ELECTRIC furnaces, a value of 1.0 gives 500 ticks run time for 1 electric unit.
  • feedsVehicles – If set, this part's inventory can be used by the vehicle and its parts. This does not affect loader/unloader operations.
  • hasBlowoutPanels - If this part is a crate with ammo, or barrel with fuel, and it is hit, then when it is destroyed it will not make a massive explosion like normal. Used for specialty ammo crates that shouldn't nuke the vehicle they are on if compromised.
  • canBeOpenedInHand – If set, this inventory will be able to be opened while in the player's hand. Only valid for chests.
  • inventoryUnits – If this part is a crate or barrel, this defines the size of its inventory. This is also what is used for min/max value calculations on vehicles. For crates, this is how many rows (of 9 slots) the inventory has. For barrels, this is how many buckets the barrel can store x10. The idea being that 1 unit for crates holds a bit less than 1 unit of barrels, as with barrels you're storing the raw material, and not the container.
  • inventoryStackSize - An optional max stack size for each inventory slot. Defaults to 64 if not set.
  • inventoryTexture – The texture for the GUI for this interactable part. Only used if this part has a GUI (such as crates). If not set, the default is used.
  • defaultInventory - A optional list of items that will be in this inventory when first spawned.
  • crafting - A optional crafting definition for this interactable. Requires an interactable type of crafting_bench to do anything.

Effector

Effectors are parts that effect the world they are in. Different effectors do different things, but the one thing they have in common is they do something with blocks in the world. Unlike interactable parts, they do not have any inventories or GUIs. To have such functionality, they should be combined with an interactable part. For example, a planter combined with a crate to hold seeds for the planter. The area of effect of an effector is defined by the collision boxes of the effector. Keep this in mind, as an effector with lots of collision will effect lots of blocks and may cause lag. Also, effectors will operate until they run out of health, so if you want a limited-use effector, use health to define this.

All effector parameters are contained in the effector sub-section as follows:

  • type – The type of the effector. This defines what this effector does. Valid types are:
  • fertilizer: Checks for plants on the ground and applies bonemeal to them contained in crates.
  • harvester: Will harvest plants that pass through it, depositing items into vehicle crates, or on the ground if no crates are present, or their inventories are full. Will also break “bush” blocks like tall grass, flowers, and saplings, depositing them on the ground.
  • planter: Will plant any plant-able items located in vehicle crate parts onto farmland. Does not work with cactus, reeds, or other non-farmland-based plants.
  • plow: Turns dirt and grass into farmland, and coarse dirt into dirt.
  • snowplow: Removes snow wherever it touches. Does NOT create snowballs to prevent lag.
  • drill: Removes blocks matching the parameters from the world when touched.
  • placer: Tries to place blocks from linked inventories. Will only place blocks into air, so combine with a drill if you want to replace blocks.
  • collector: Tries to pick up items that come in contact with it and tries to place them into linked inventories.
  • dropper: Drops items from linked inventories into the world. Will not drop items if one already exists in the bounding box for the dropper, however.
  • sprayer: Hydrates farmland, powdered concrete, and turns lava into cobblestone or obsidian in the block it's in.
  • crafter: Crafts items from inventories based on the set material parameters. Will craft as fast as the operations delay is set. Note that while this can put the resulting item into any inventory, it can only pull from linked inventories that have feedsVehicles as true. Use this for separate input/output inventories if desired.
  • operationDelay- The delay, in ticks, between operations. Used to cut down on operation spam for some applications.
  • drillHardness – How hard a block the effector can break. Only valid for drills. Link to Vanilla hardness chart.
  • drillSpeed – How fast a drill can break a block at the specified hardness. Softer blocks will break quicker.
  • crafterInputs - Inputs for the crafting type effector.
  • crafterOutputs - Outputs for the crafting type effector.

Clone this wiki locally