Pack Making General Introduction - DonBruce64/MinecraftTransportSimulator GitHub Wiki

So you want to make an MTS pack, eh? Well you came to the right place. This wiki will tell you everything you need to know about packs. What files you need, how to format your pack, how to navigate the treacherous waters of JSON, and much more. So grab a cup of your favorite beverage and get ready to learn all about MTS pack creation!

Before you even attempt to make a pack, there are a few things you'll need. The first is a model in the proper format. You can't create a content pack without content! The model itself will need to be UV-mapped and in OBJ format with a texture. You'll also need a texture for the model, a 2d icon for the item, and perhaps a sound or two depending on what you're making.

You'll also need to come up with an ID for your pack for your master file. This should be unique to your pack and should not be something another pack creator or mod author would come up with. This ID must be lowercase without spaces, and is used throughout the entire pack file structure and in some pack files. It is HIGHLY suggested you come up with a unique ID that is aligned to your pack's name. If you change your ID while you're in the middle of making your pack, you'll find yourself spending a head-banging amount of time trying to hunt down every spot you need to change IDs. Anywhere you see the text <yourpackid> in this wiki, it means that the pack ID you created here belongs in that spot. You'll see that both in the directory structure of the pack and in the Minecraft item JSON files, and will likely use it in various other JSON areas, so get used to typing it out!

Once you have your models ready and textures done you have enough to get the rough basics of a pack ready to go. It's now time to start the creation of a JSON file to tell MTS everything about your model. Item name, collision mapping, crafting ingredients, fuel capacity, and pretty much everything else is defined in JSON file. Note that this file is NOT the same as the JSON model file programs like BlockBench export. JSON is a general-use file system and works for models and MTS configurations alike.

It is HIGHLY recommended that you create the JSON in a program that knows JSON syntax to avoid missing things like brackets and commas that will cause MTS to not load your pack. Notepad++ is a good general choice over the regular Notepad program that comes with Windows. If you are on Linux, the standard gedit program comes with an excellent syntax checker if you set the language to JSON. What you use is ultimately up to you, however, so pick whatever you find easiest as you'll be spending a decent amount of time messing with JSONs. When you get into JSONs, you'll find that there are some generic JSON sections that appear in all content types. These are presented here below, and are common between all the types, except where exceptions are noted in those types.

You will want to enable devMode via the option in the mtsconfig file. While you can't change the data in the pack jar while Minecraft is running (it locks the jar and prevents access), you CAN export all loaded JSONs into the mts_dev folder, edit those, and then load them back in with changes. By doing this you can make changes while Minecraft is running, and then simply grab the final versions to put into the JAR when you're done. Do this by the following:

  1. Get into a vehicle and right-click anywhere in that vehicle with a wrench to open the devMode screen.
  2. Press Export Packs. This will create a mts_dev folder in the same location as your mods folder with all JSONs in there. Note: The exported JSONs will be updated to the newest format and ordering, so they probably won't look the same as what you have in your jar.
  3. Edit the JSONs in the mts_dev folder and press Import Packs. This will apply your changes, or will notify you of any errors you have made during editng.
  4. If you changed something besides animation, and it didn't seem to take effect on in-game vehicles, try wrenching and placing down the vehicles. Some dev-mode things are not hot-swappable. If you do find these, however, please report them as it's more of a bug than a limitation.

Finally, if you're working on a pack for MC versions higher than 1.12.2, you'll want to download the Official Content Pack. Or, at a minimum, the scripts in it. These scripts will automatically compile your pack for you and set up most of the files to get the pack working in the game. There are some things they cannot do, but those that they cannot do it will let you know about. Once run, you will get two packs. One for 1.12.2, and one for 1.16.5+.

Should you have any troubles, you're always welcome to stop by the MTS Discord. You can find a link from the site that took you here.

Happy pack creation! ~Don Bruce----MTS Dev.

⚠️ **GitHub.com Fallback** ⚠️