The District of Joban JCM:PIDS Preset

JCM:PIDS Preset

From The District of Joban
Revision as of 19:51, 5 November 2024 by LX86 (talk | contribs)

Joban PIDS refers to a series of Passenger Information Display System blocks that supports customization currently not present on the PIDS of the main MTR Mod.

These class has support for PIDS Variable and PIDS Preset. The following block supports these features:

Block Entity Data

Name Type Description
All MTR Mod PIDS Properties
preset_id String The string of the Preset ID

PIDS Preset

A PIDS Preset is a set of configuration for a PIDS, there are currently 2 types of PIDS Preset:

JSON PIDS Preset

A JSON PIDS Preset is a RV PIDS-alike preset, using JSON property to modify the basic appearance of the PIDS.

Things you can change:

  • Visibility of Weather/Time
  • Font used
  • Font Color
  • Background Images
  • Hide arrival override (Since v1.1.5)
  • Push arrival down even without hiding the arrivals (Since v1.1.5)
  • Colors for different cars (Since v1.2.2)

For more detail of the implementation, you may download the Example Pack to learn more.

Cars Color

You may now specify the color for the car display by adding a carLengthColor array for each preset, for example:

"carLengthColor": [null, "00FFFF", "FF00FF"]

This means:

  • No color change for the 1st car
  • Use color #00FFFF if the train is 2-car long
  • Use color #FF00FF if the train is 3-car long
  • No color change for other car length.

PIDS Variable

A variable is like a placeholder, you can put a text formatted in a specific way, and that text will be replaced with something else (e.g. a dynamic value).

List of variables
Variable Name Description Version Added
{weather} The weather of the current world, possible values are:

"Sunny", "Raining", "Thundering"

v1.1.2
{time} The current world time, returns "HH:MM" v1.1.2
{time_period} The current time period, possible values are:

"Morning", "Afternoon", "Night"

v1.1.2
{weatherChin} The weather of the current world in chinese.

Possible values are: "晴天", "下雨", "雷暴"

v1.1.4
{worldPlayer} Current amount of player on the current world v1.1.4
{day} The day elapsed (Same as the one shown in F3 Screen) v1.1.5

Simply put the Variable Name mentioned above in your PIDS as custom text, and it will work.

Scripted PIDS Preset

Scripted PIDS Preset, as the name implies, uses a scripting language (Javascript in this case) to create the appearance of PIDS.

As custom logic can be expressed, this method is much more flexible than JSON PIDS Preset, but has a higher learning curve due to the need to learn programming.

For more details, please check Scripted PIDS Preset