mtr:adding_custom_resources
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| mtr:adding_custom_resources [2023/10/19 07:55] – reduce markdown portion and add content BDark000 | mtr:adding_custom_resources [2025/11/21 17:20] (current) – Grammar correction Navi | ||
|---|---|---|---|
| Line 7: | Line 7: | ||
| * New textures and/or text for [[/ | * New textures and/or text for [[/ | ||
| - | It is highly recommended to be familiar with [[https:// | + | It is highly recommended to be familiar with creating a resource pack before proceeding with this guide. |
| - | ===== Resource Pack Format | + | ===== Resource Pack structure |
| - | The file '' | + | This guide will tell you how to set up your file structure |
| - | ==== Adding Texture Variants for Existing Trains ==== | + | Requirements: |
| - | To add texture variants, the '' | + | ===== Guide ===== |
| - | < | + | |
| - | | Key | Data Type | Description | Notes | | + | |
| - | | --- | --- | --- | --- | | + | |
| - | | `name` | String | The name to be shown on [dashboards](https:// | + | |
| - | | `color` | String (colour hex code) | The colour to be shown on [dashboards](https:// | + | |
| - | | `base_train_type` | String (train ID) | The train model to apply the texture on | Required(If bbmodel is not used.), see [the trains page](https:// | + | |
| - | | `texture_id` | String (texture ID) | The [namespaced ID](https:// | + | |
| - | | `description` | String | A brief description of this train can be added. Newline code (\n) available. | Optional | | + | |
| - | | `wikipedia_article` | String | You can cite the English Wikipedia article. If it is too long, it will be omitted in the middle. | Optional | | + | |
| - | | `train_barrier_id` | String | Train barriers will be installed at the end of the car. If not specified, it will not be displayed. | Optional | | + | |
| - | | `gangway_connection_id` | String | Gangway will be placed at the end of the car. If not specified, a Gangway of SP1900 will be shown.| Optional | | + | |
| - | | `has_gangway_connection` | Boolean |Selects whether the gangway can be passed through if false, the gangway will be transparent and the `gangway_connection_id` specification will be ignored.| Optional, Default is true (can pass through)| | + | |
| - | | `door_animation_type` | String | The following door animations can be specified. Must be written in CAPITAL LETTERS.< | + | |
| - | | `model` | String | Specify BBmodel file by file path.| Required if BBmodel is used.| | + | |
| - | | `model_properties` | String | Specify Model Properties file(.json) by file path.| Required if BBmodel is used.| | + | |
| - | | `speed_sound_base_id` | String | Specifies the ID of a conventional running sound, which can be either the default train ID or one defined in sounds.json.|Optional, | + | |
| - | | `speed_sound_count` |Number|Specify the number of ogg files in the acceleration or deceleration folder within the folder specified in speed_sound_base_id above. If not specified correctly, files above a certain speed will be silent.|Optional, | + | |
| - | | `door_sound_base_id` | String | Specifies the ID of a conventional door sound, which can be either the default train ID or one defined in sounds.json.|Optional, | + | |
| - | | `door_close_sound_time` |Number|Specifies the offset of the door sound; cannot be greater than 1 or less than 0 due to limitations on the MTR side.|Optional, | + | |
| - | | `bve_sound_base_id` | String |Specifies the ID of a BVE sound, which can be either the default train ID or one defined in sounds.json. See here for how it is defined. [MTR: | + | |
| - | An example is shown below. | + | ==== Folder structure ==== |
| - | ``` | + | - Go to your // |
| + | - Then find the // | ||
| + | - Create a folder with a name that you want (for example: My custom M-Train) {{: | ||
| + | - Create a new folder inside of the existing folder called '' | ||
| + | - Upload a pack.png to your folder, this image will show in the resource pack selection screen and should be 128x128. | ||
| + | - Download this template pack.mcmeta and put it into your resource pack folder: | ||
| + | |||
| + | <code json pack.mcmeta> | ||
| { | { | ||
| - | | + | |
| - | "my_custom_train": | + | "description": "put your pack description here", |
| - | | + | "pack_format": |
| - | "color": | + | |
| - | " | + | |
| - | " | + | |
| } | } | ||
| - | } | ||
| } | } | ||
| - | ``` | + | </ |
| - | ## Adding New Railway Sign Textures or Text | + | <WRAP center round info 90%> |
| - | To add new [railway signs](https:// | + | The pack format is what version of Minecraft |
| - | | Key | Data Type | Description | Notes | | + | </WRAP> |
| - | | --- | --- | --- | --- | | + | |
| - | | `texture_id` | String (texture ID) | The [namespaced ID](https:// | + | |
| - | | `flip_texture` | Boolean | If `true`, the texture will be flipped horizontally | Optional | | + | |
| - | | `custom_text` | String | If set, the text will be shown to the right of the image; the pipe character `\|` is supported, for example `客務中心\|Customer Service Centre` | Optional | | + | |
| - | | `flip_custom_text` | Boolean | If `custom_text` is set and `flip_custom_text` is `true`, the text will be shown to the left of the image | Optional | | + | |
| - | | `small` | Boolean | If `true`, the image will be rendered with a margin around it | Optional | | + | |
| - | | `background_color` | String (colour hex code) | The colour for the backgound | Optional, defaults to the colour black if none specified | | + | |
| - | An example is shown below. | + | * Create a new folder named MTR in the assets folder. |
| + | * Create a text file inside the folder named '' | ||
| - | ``` | + | ==== JSON files ==== |
| + | |||
| + | The main code for all custom resources is here: | ||
| + | |||
| + | <code json mtr_custom_resources.json> | ||
| { | { | ||
| - | | + | |
| - | "my_custom_sign": | + | "signs": |
| - | " | + | "rails": |
| - | "flip_texture": | + | "objects": |
| - | "custom_text": | + | "lifts": |
| - | "flip_custom_text": | + | |
| - | " | + | |
| - | " | + | |
| - | } | + | |
| - | } | + | |
| } | } | ||
| - | ``` | + | </code> |
| - | ## Model Properties file | + | |
| - | </markdown> | + | |
| - | <WRAP center round todo 60%> | + | |
| - | This section is currently unwritten. | + | |
| - | </ | + | |
| - | < | + | |
| - | The Model Properties file can be edited by the Resource Pack Creator or directly in a text editor, for example. | + | ==== Explanation ==== |
| - | ### basis | + | The file is quite self-explanatory; |
| - | | Key | Data Type | Description | Notes | | + | |
| - | | --- | --- | --- | --- | | + | |
| - | | `transport_mode` | String | + | |
| - | | `length` | Number | + | |
| - | | `width` | Number | + | |
| - | | `door_max` | String | Specifies the door opening/ | + | |
| - | ### `part` | + | <WRAP center round important 90%> |
| - | | Key | Data Type | Description | Notes | | + | |
| - | | --- | --- | --- | --- | | + | |
| - | | `name` | String | Specify the parts folder of BBmodel. Specifying a folder without a single cube may cause Minecraft to crash.| Required | | + | |
| - | | `stage` | String | The following model attributes can be specified. Must be written in CAPITAL LETTERS.<br>< | + | |
| - | | `mirror` | Boolean | Flip the model 180 degrees on the y-axis. | Optional, default is true | | + | |
| - | | `skip_rendering_if_too_far` | Boolean | If set to true, models more than 2 chunks apart will not be displayed. | Optional, default is false | | + | |
| + | ==== Note on Naming ==== | ||
| + | By definition, Minecraft only supports the character set '' | ||
| - | ## Verifying the Resource Pack | + | 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. |
| - | Use a [JSON validator](https:// | + | As such, make sure to **never** include uppercase letters in your filenames or the ids inside the resource pack. Using them usually causes Minecraft to ignore it and revert |
| + | |||
| + | </ | ||
| - | The resource pack (zip file) can be installed either clientside or as a server resource pack. If installed as a server resource pack, all players joining the server will be able to see the new additions after accepting the server resource pack. | + | ===== Let's get started on making some custom resources! ===== |
| - | [Download | + | Follow |
| - | </ | + | * [[mtr_extra: |
| + | * [[mtr_extra: | ||
| + | * [[mtr_extra: | ||
| + | * [[mtr_extra: | ||
| + | * [[mtr_extra: | ||
| + | * [[mtr_extra: | ||
mtr/adding_custom_resources.1697702125.txt.gz · Last modified: 2023/10/19 07:55 by BDark000