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/02/23 08:30] – zbx1425 | mtr:adding_custom_resources [2024/01/21 09:25] (current) – The article on BVE Sound System has been moved to this wiki, so the link has changed. cinderaceots | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | < | + | ====== |
- | + | ||
- | # Adding Custom Resources | + | |
User-created content can be added to the Minecraft Transit Railway mod via resource packs. Currently, players can add the following: | User-created content can be added to the Minecraft Transit Railway mod via resource packs. Currently, players can add the following: | ||
- | * Texture variants for existing [trains](https:// | + | |
- | * New textures or text for [railway signs](https:// | + | * Blockbench models |
+ | * New textures | ||
- | It is highly recommended to be familiar with [creating a resource pack](https:// | + | It is highly recommended to be familiar with [[https:// |
- | # Resource Pack Format | + | ===== Resource Pack Format |
- | The file `mtr_custom_resources.json` is the main file that will get loaded. This file defines custom content for the mod to register. It must be placed under the `mtr` namespace; in other words, it must have the file path of `assets/ | + | The file '' |
- | ## Adding Texture Variants for Existing Trains | + | ==== Adding Texture Variants for Existing Trains |
- | To add texture variants, the `custom_trains` JSON object should be added to `mtr_custom_resouces.json`. Each JSON object under `custom_trains`, representing a texture variant for a train, should have a unique key and serveral required entries. | + | To add texture variants, the '' |
- | | Key | Data Type | Description | Notes | | + | < |
+ | |||
+ | |||
+ | | Key | Data Type | Description | ||
| --- | --- | --- | --- | | | --- | --- | --- | --- | | ||
- | | `name` | String | The name to be shown on [dashboards](https:// | + | | `name` | String | The name to be shown on [dashboards](https:// |
- | | `color` | String (colour hex code) | The colour 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, see [the trains page](https:// | + | | `base_train_type` | String (train ID) | The train model to apply the texture on | Required(If bbmodel is not used.) | N/A | See [the trains page](https:// |
- | | `texture_id` | String (texture ID) | The [namespaced ID](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 |N/A|| | ||
+ | | `wikipedia_article` | String | You can cite the English Wikipedia article. If it is too long, it will be omitted in the middle. | Optional |N/A|| | ||
+ | | `train_barrier_id` | String | Train barriers will be installed at the end of the car. If not specified, it will not be displayed. | Optional |N/A|| | ||
+ | | `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 |`mtr: | ||
+ | | `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|`true`|| | ||
+ | | `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.|N/ | ||
+ | | `model_properties` | String | Specify Model Properties file(.json) by file path.| Required if BBmodel is used.|N/ | ||
+ | | `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|N/ | ||
+ | | `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|The number of sounds specified by Train ID (if any)|| | ||
+ | | `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|N/ | ||
+ | | `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|`0.5`|| | ||
+ | | `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. | An example is shown below. | ||
Line 44: | Line 59: | ||
To add new [railway signs](https:// | To add new [railway signs](https:// | ||
- | | Key | Data Type | Description | Notes | | + | | Key | Data Type | Description | Required? |
| --- | --- | --- | --- | | | --- | --- | --- | --- | | ||
- | | `texture_id` | String (texture ID) | The [namespaced ID](https:// | + | | `texture_id` | String (texture ID) | The [namespaced ID](https:// |
| `flip_texture` | Boolean | If `true`, the texture will be flipped horizontally | Optional | | | `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 | | | `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 | | ||
Line 69: | Line 84: | ||
} | } | ||
``` | ``` | ||
+ | ## Model Properties file | ||
+ | |||
+ | </ | ||
+ | |||
+ | <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. | ||
+ | |||
+ | ### basis | ||
+ | | Key | Data Type | Description | Notes | | ||
+ | | --- | --- | --- | --- | | ||
+ | | `transport_mode` | String | ||
+ | | `length` | Number | ||
+ | | `width` | Number | ||
+ | | `door_max` | String | Specifies the door opening/ | ||
+ | |||
+ | ### `part` | ||
+ | | 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.< | ||
+ | | `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 | | ||
+ | |||
+ | |||
## Verifying the Resource Pack | ## Verifying the Resource Pack | ||
Line 79: | Line 127: | ||
</ | </ | ||
+ | |||
+ |
mtr/adding_custom_resources.1677141042.txt.gz · Last modified: 2023/02/23 08:30 by zbx1425