-
Notifications
You must be signed in to change notification settings - Fork 92
Pack Making JSON Instrument Slots
Franz edited this page Sep 20, 2022
·
6 revisions
The instruments section is a listing of instrument slots for this object. Instrument slots are used to tell MTS where to render instruments, and where they correspond to on the HUD. They also are used to tell MTS if the instrument is specific to part or not. Each instrument slots contains the following entries:
- pos – An entry of x, y, and z coordinates that define the center of the instrument on the object.
- scale – The scale of the instrument. By default instruments are 128x128.
- rot – An entry of x, y, and z rotations that tell MTS how to rotate this instrument. By default all instruments face -z, or the rear of the object. This can be used to change rotation to fit a different spot of the objectif desired.
- hudX – The x-coordinate for the center of this instrument on the HUD, in pixels.
- hudY – The y-coordinate for the center of this instrument on the HUD, in pixels.
- hudScale – Like scale, but for the HUD and Panel instead.
- optionalPartNumber – If included and set, then MTS will try to grab this part number for any animation done by this instrument, unless the instrument already has a part number hard-coded. For example, if you have two engines, you can reference the part number for each of your engine gauges to get the individual output. (the number of the engine, not the engine in the whole parts list) Note that this will only happen if the animation is for a part, so instruments with non-part animations may safely be put in this slot.
- placeOnPanel – Setting this to true will move this instrument to the panel rather than the main HUD. Useful in multi-engine vehicles where you don't want to clog the main HUD with a bunch of tachometers.
- defaultInstrument – Normally, all instrument slots are empty when the object is first placed into the world. In the case you want to have the instrument in this position come with the object, you can set this. Note that MTS won't check if the instrument actually exists, so either keep things in-house, or require packs you use as a dependency. Also note that it is possible to combine this with an inaccessible hudX and hudY coordinate to put the instrument off the HUD. This will effectively make this instrument permanently attached.
- applyAfter - If this is set, then the animations on this slot will first use the animations for this object (not the instrument) from the rendering section instead of the animations defined here. If the specified object has applyAfter on it itself, then the animations will be gotten recursively until an applyAfter is not found.
- animations – This is a list of animations that can be used to move this instrument based on the animation values. Note that the instrument animations are applied AFTER the instrument is moved to its initial potion and rotation, and all animations are applied relative to that orientation. As such, you will have to adjust your parameters to accommodate this.
- The Absolute Basics
- Pack Making General Introduction
- Pack Making General Master File
- Pack Making General File Structure
- Pack Making General Item Textures and JSONs
- Pack Making General Languages
- Pack Making General Conventions
- Pack Making JSON Colors
- Pack Compiling for 1.16.5
- JSON Templates
- Hitbox Tool