User Tools

Site Tools


mtr_extra:making_a_resourcepack

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
mtr_extra:making_a_resourcepack [2024/01/27 17:17] – ↷ Page moved and renamed from mtr_extra:resourcepack:make to mtr_extra:making_a_resourcepack sleepy_sapphmtr_extra:making_a_resourcepack [2025/05/14 14:46] (current) – Emphasize on allowed ResourceLocation/Identifier characters lx862
Line 6: Line 6:
  
 <WRAP center round important 90%> <WRAP center round important 90%>
 +
 **It is recommended to watch Jonathan's tutorial video for this topic: [[https://www.youtube.com/watch?v=QH1O-y6kPSk]]** **It is recommended to watch Jonathan's tutorial video for this topic: [[https://www.youtube.com/watch?v=QH1O-y6kPSk]]**
  
Line 11: Line 12:
  
 ===== Guide ===== ===== Guide =====
 +
 ==== Folder structure ==== ==== Folder structure ====
 +
   - Go to your //.minecraft// folder. {{:mtr_extra:resourcepack:minecraft_folder.png?200&nolink}}    - Go to your //.minecraft// folder. {{:mtr_extra:resourcepack:minecraft_folder.png?200&nolink}} 
   - Then find the //resourcepacks// folder {{:mtr_extra:resourcepack:screenshot_2023-05-16_211152.png?200&nolink}}    - Then find the //resourcepacks// folder {{:mtr_extra:resourcepack:screenshot_2023-05-16_211152.png?200&nolink}} 
Line 18: Line 21:
   - Upload a pack.png to your folder, this image will show in the resourcepack selection screen and should be 128x128.   - Upload a pack.png to your folder, this image will show in the resourcepack selection screen and should be 128x128.
   - Download this template pack.mcmeta and put it into your resourcepack folder:   - Download this template pack.mcmeta and put it into your resourcepack folder:
-<file json pack.mcmeta>+ 
 +<code json pack.mcmeta>
 { {
     "pack": {     "pack": {
         "description": "put your pack description here",         "description": "put your pack description here",
-        "pack_format": 9,+        "pack_format": 9
     }     }
 } }
-</file>+</code>
  
 <WRAP center round info 90%> <WRAP center round info 90%>
-The pack format is what version of Minecraft the pack is for. If you are only adding MTR models or textures, this is not important. \\ 
-However, if you feel the need to add a number, it is recommended to use 8 or 9, as they correspond to versions 1.18 and 1.19 respectively. \\ 
-If a pack tells you it's "not compatible", just remember that the only thing that changes that is this number, so it really doesn't say much. 
-</WRAP> 
  
 +The pack format is what version of Minecraft the pack is for. If you are only adding MTR models or textures, this is not important. \\  However, if you feel the need to add a number, it is recommended to use 8 or 9, as they correspond to versions 1.18 and 1.19 respectively. \\  If a pack tells you it's "not compatible", just remember that the only thing that changes that is this number, so it really doesn't say much.
 +
 +</WRAP>
  
   * Create a new folder named MTR in the assets folder.   * Create a new folder named MTR in the assets folder.
Line 38: Line 41:
  
 ==== JSON files ==== ==== JSON files ====
 +
 To format your JSON file, simply copy, paste & edit some of the values. The main code is here: To format your JSON file, simply copy, paste & edit some of the values. The main code is here:
  
 If you have just one train: If you have just one train:
-<file json mtr_custom_resources.json>+ 
 +<code json mtr_custom_resources.json>
 { {
  "custom_trains": {  "custom_trains": {
Line 48: Line 53:
  "color": "#66CCFF",  "color": "#66CCFF",
  "base_train_type": "sp1900",  "base_train_type": "sp1900",
- "texture_id": "mtr:{FOLDERNAME}/{TEXTURENAME}.png"+ "texture_id": "mtr:{folder_name}/{texture_name}.png"
  
  }  }
  }  }
 } }
-</file>+</code>
  
 If you have more than one (you cannot simply duplicate the piece above, as this messes with the json format): If you have more than one (you cannot simply duplicate the piece above, as this messes with the json format):
-<file json mtr_custom_resources.json>+ 
 +<code json mtr_custom_resources.json>
 { {
  "custom_trains": {  "custom_trains": {
Line 63: Line 69:
  "color": "66CCFF",  "color": "66CCFF",
  "base_train_type": "sp1900",  "base_train_type": "sp1900",
- "texture_id": "mtr:{FOLDERNAME}/{TEXTURENAME}.png"+ "texture_id": "mtr:{folder_name}/{texture_name}.png"
  
  },  },
Line 71: Line 77:
  "color": "66CCFF",  "color": "66CCFF",
  "base_train_type": "sp1900",  "base_train_type": "sp1900",
- "texture_id": "mtr:{FOLDERNAME}/{TEXTURENAME}.png"+ "texture_id": "mtr:{folder_name}/{texture_name}.png"
  
  }  }
  }  }
 } }
-</file>+</code>
  
 <WRAP center round important 90%> <WRAP center round important 90%>
-Make sure to **never** include uppercase letters in your filenames or the ids inside the resourcepack. Using them usually causes minecraft to ignore it and revert to the default texture.+ 
 +==== Note on Naming ==== 
 + 
 +By definition, Minecraft only supports the character set ''a-z'', ''0-9'', ''/._-''. This means characters such as uppercase letters **is not allowed and will not work**. 
 + 
 +If it works on your Minecraft instance, it means you have installed some mods which explicitly bypass this behavior. However they do not work for other people without such mod, and you are discouraged from using these invalid characters as much as possible. 
 + 
 +As such, make sure to **never** include uppercase letters in your filenames or the ids inside the resourcepack. Using them usually causes minecraft to ignore it and revert to the default texture. 
 </WRAP> </WRAP>
 +
 <WRAP center round tip 90%> <WRAP center round tip 90%>
 +
 Also for more help check out the MTR Github Wiki [[https://github.com/jonafanho/Minecraft-Transit-Railway/wiki/Trains]], [[https://github.com/jonafanho/Minecraft-Transit-Railway/wiki/Adding-Custom-Resources]] Also for more help check out the MTR Github Wiki [[https://github.com/jonafanho/Minecraft-Transit-Railway/wiki/Trains]], [[https://github.com/jonafanho/Minecraft-Transit-Railway/wiki/Adding-Custom-Resources]]
 +
 </WRAP> </WRAP>
  
 <WRAP center round box 60%> <WRAP center round box 60%>
 +
 **JSON explanation:** **JSON explanation:**
  
Line 92: Line 110:
   *  **"base_train_type":**    The type of the retextured train.   *  **"base_train_type":**    The type of the retextured train.
   *  **"texture_id":**    The custom texture that will display when train has been spawned.   *  **"texture_id":**    The custom texture that will display when train has been spawned.
-  + 
-**What it should look like:** +**What it should look like:** {{ :mtr_extra:resourcepack:screenshot_2023-05-17_181818.png?200&nolink }} {{ :mtr_extra:resourcepack:screenshot_2023-05-17_181802.png?200&nolink }} {{ :mtr_extra:resourcepack:screenshot_2023-05-17_181516.png?200&nolink }} {{ :mtr_extra:resourcepack:screenshot_2023-05-17_181411.png?200&nolink }} 
-{{ :mtr_extra:resourcepack:screenshot_2023-05-17_181818.png?nolink&200 |}} +
-{{ :mtr_extra:resourcepack:screenshot_2023-05-17_181802.png?nolink&200 |}} +
-{{ :mtr_extra:resourcepack:screenshot_2023-05-17_181516.png?nolink&200 |}} +
-{{ :mtr_extra:resourcepack:screenshot_2023-05-17_181411.png?nolink&200 |}}+
 </WRAP> </WRAP>
  
 ==== Train textures ==== ==== Train textures ====
 +
   - Download an image editing software of your choice, that supports transparency. Recommended are Paint 3D and GIMP, as they are both free and relatively easy to use. **Do not** use MS Paint, because it **does not** support transparency and will cause all transparent parts of your texture to turn white   - Download an image editing software of your choice, that supports transparency. Recommended are Paint 3D and GIMP, as they are both free and relatively easy to use. **Do not** use MS Paint, because it **does not** support transparency and will cause all transparent parts of your texture to turn white
-  - Go to [[https://github.com/jonafanho/Minecraft-Transit-Railway/tree/4.0.0/resources/common/normal/assets/mtr/textures/entity]] and download the texture file you want to edit+  - Go to [[https://github.com/Minecraft-Transit-Railway/Minecraft-Transit-Railway/tree/master/fabric/src/main/resources/assets/mtr/textures/vehicle]] and download the texture file you want to edit
   - Open your image editing software, find the texture you want to edit, then open it and start making your edits   - Open your image editing software, find the texture you want to edit, then open it and start making your edits
   - When you're done, export the texture file as a PNG to your resourcepack, and put it in the appropriate folder (re-read the section above on making a resourcepack if you're unsure of how and where)   - When you're done, export the texture file as a PNG to your resourcepack, and put it in the appropriate folder (re-read the section above on making a resourcepack if you're unsure of how and where)
Line 110: Line 126:
  
 <WRAP center round tip 90%> <WRAP center round tip 90%>
-You can also use blockbench to retexture trains! To do so however, you must first also download the train bbmodel file from the following link: \\ + 
-[[https://github.com/jonafanho/Minecraft-Transit-Railway/tree/4.0.0/models]]+You can also use blockbench to retexture trains! To do so however, you must first also download the train bbmodel file from the following link: \\  [[https://github.com/Minecraft-Transit-Railway/Minecraft-Transit-Railway/tree/master/fabric/src/main/resources/assets/mtr/models/vehicle]] 
 </WRAP> </WRAP>
  
 And you are done with the basics! And you are done with the basics!
 +
 <WRAP center round box 60%> <WRAP center round box 60%>
 +
 The example resource pack can be downloaded below: The example resource pack can be downloaded below:
 +
 <WRAP center round download 60%> <WRAP center round download 60%>
-https://bit.ly/MtrExampleLink+ 
 +[[https://bit.ly/MtrExampleLink]] 
 </WRAP> </WRAP>
 +
 </WRAP> </WRAP>
  
 ==== Sound files ==== ==== Sound files ====
-  * Download Audacity, its optional, but it makes it easier if you want to record a sound yourself.+ 
 +  * Download Audacity, you're going to need it.
   * Record any sound file, or perhaps download one from an external source. Make sure its in .ogg format and the filename doesnt contain any uppercase letters.   * Record any sound file, or perhaps download one from an external source. Make sure its in .ogg format and the filename doesnt contain any uppercase letters.
 +
 <WRAP center round info 90%> <WRAP center round info 90%>
-Do you want the sound to play in the player's ears or from the source that plays the sound+ 
-Make sure your sound file is **stereo** (player's ear) or **mono** (source). This can be changed in Audacity.+You are going to want the sound to originate from the source that plays the sound, so make sure your sound file is **mono**. This can be changed easily by importing the sound file into Audacity and exporting it as a mono ogg file. 
 </WRAP> </WRAP>
-  * Go back to the ''mtr'' folder inside your resourcepack and create a new folder within that called ''sounds'', then paste in the sound file+ 
-  *  +  * Make sure you have two long sound files that sound approximately like your train accelerating from 0 to about 160-200 or so, and decelerating the other way (since sometimes the sound may vary between the two, such as brake whine or motors only making sound when accelerating) you may also use a single file if acceleration and braking is identical. 
- +  * Open this sound file in Audacity, select the sound in the timeline and then find "Regular Interval Labels" under "Tools" at the top. 
 +  * Choose the amount of sounds you want to end up with. More is not necessarily better, but does give better precision if sounds change drastically over a small time frame. Try to make the files approximately half a second to a second long. 
 +  * Now click export, and select "Multiple Files" below, click "Labels", then hit export. (Make sure again to export them as **mono** .ogg files) 
 +  * Now comes the fun part! You have to manually rename EVERY. SINGLE. SOUND FILE. Follow a pattern that goes speed_0a, speed_0b, speed_0c, speed_1a, speed_1b, etc. 
 +  * Go back to the ''mtr'' folder inside your resourcepack and create a new folder within that called ''sounds'', create another new folder inside that called whatever you want, then paste the sound files in a folder called ''acceleration'' or ''deceleration''. That second-to-last folder will be your "sound id" that you will have to specify later in the process
 +  * bla bla sounds.json stuff 
 + 
mtr_extra/making_a_resourcepack.1706375861.txt.gz · Last modified: 2024/01/27 17:17 by sleepy_sapph