-
Notifications
You must be signed in to change notification settings - Fork 2
(92)‐Contentpacks‐1.4.0
Daniel Schmidt edited this page May 5, 2024
·
4 revisions
This documentation is currently being written and updated. It may not be complete or correct and can change in the near future.
Flares can be added to signals, signs and assets with the following syntax:
| Field | Default | Description |
|---|---|---|
| id | - | The ID of the block. Shouldn't be changed later and should be unique. |
| name | - | The name of the block Can be changed later on. |
| rotationSteps | 10 | The steps in which the block can be rotated. Optional. Allowed values: 10 - 90 |
| references | - | The references contain values that can be linked via the name. More informations below. |
| base | - | The base contains all OBJs used for rendering including textures, obj-groups and so on. Can be used for all contentpack entries, it will always be rendered. |
| flares | - | The flares contain details to how lamps a.s.o should flare up (color, offset, which state to be active, etc.) |
| Field | Default | Description |
|---|---|---|
| id | - | The ID uses the names of the OBJ groups (can either be exact or start with). Required. |
| color | #FFFFFF | The color of the flare. Either in HEX with (0x or #) or RGB (, or ; or : or -).Examples: #123DEF / 0xFFAA00 / 33,66,99 / 80;160;240 / 010:020:030 / 0-050-230 Optional. |
| rotation | - | The rotation of the flare to face the same direction as the signal. Required. Allowed values: 0 - 360 |
| pitch | 0 | The pitch of the flare. Not implemented yet. |
| offset | - | The offset from the center of the signal. Should be above 0 and below 1 Required. See example below. |
| alwaysOn | false | Should the flare always be active. Useful for signs and assets. Optional. Allowed values: true, false
|
| texture | Desc -> | A custom texture can be provided. Optional. Default flare image will be used if left empty. |
| states | - | The states on which the flare should be active. If "alwaysOn" is active the states can be [].Required. See examples below. |
| scaleWithDistance | true | Should the flare scale up with distance of the player? Optional. Allowed values: true, false
|
Example:
{
"name": "Traffic light (3 signals - no direction)",
"id": "traffic-light-3-signals-no-direction",
"model": "testpack/trafficlight/trafficlight.obj",
"rotationSteps": 15,
"translation": [0.5, 0, 0.5],
"itemTranslation": [0.5, 0, 0.5],
"states": [
"green",
"yellow_red",
"yellow",
"red"
],
"flares": [
{
"id": "ul",
"color": "165;32;25",
"rotation": 180,
"pitch": 0,
"offset": 0.019,
"alwaysOn": false,
"texture": "textures/light/custom_flare_image.png",
"states": [ "red", "yellow_red" ]
},{
"id": "ml",
"color": "229;189;1",
"rotation": 180,
"pitch": 0,
"offset": 0.019,
"alwaysOn": false,
"states": [ "yellow", "yellow_red" ]
},{
"id": "ll",
"color": "35;127;82",
"rotation": 180,
"pitch": 0,
"offset": 0.019,
"alwaysOn": false,
"states": [ "green" ]
}
]
}