Stormworks: Build and Rescue

Stormworks: Build and Rescue

Not enough ratings
Train Destination Indicator(Using XML edit)
   
Award
Favorite
Favorited
Unfavorite
File Size
Posted
Updated
225.313 KB
1 Jan, 2021 @ 11:27am
1 Jan, 2021 @ 11:47am
3 Change Notes ( view )

Subscribe to download
Train Destination Indicator(Using XML edit)

Description
# 1.1.22アップデートの1x3ディスプレイについて
You can replace the display with the 1x3 display that was added in 1.1.22.
At the beginning of the Lua program, the part that says "PW,PH=1,3" should be changed to "PW,PH=3,3".
I am planning to take action in the future, including organizing and optimizing the logic.

# !!Warning!!
- This sample uses "XML editing" to change the shape of official blocks. This sample uses "XML editing" to change the shape of official blocks. Please do not use it if you cannot tolerate it or in an unacceptable environment.
- The XML editing blocks are different from what they appear to be in terms of detection and placement, so please handle them with care.
- There is a possibility that it will not work properly in future versions.

# What's this?
When a 1x1 display is stretched N times by XML edditing, the drawing pixels themselves are stretched (as of 1.0.26).
This sample shows that takes advantage of this behavior and uses it as a paintable sign/indicator that can change its display dynamically.
It is intended to be used as a train destination indicator, but there are many ways to use it.

# What's it show?
If you enter "1" in the Small Keypad, it will display "Gora(強羅)", if you enter "2", it will display "Hakone-Yumoto(箱根湯本)", otherwise it will display "Out-Of-Service(回送)".
In this sample, Hakone Tozan Line stations are used as an example.
https://en.wikipedia.org/wiki/Hakone_Tozan_Line

# How to customize?
Please refer to the implementation of the placed microcontroller (HT_TozanLine_Dest Indicator Controller) and use the functions to display the dots to create the display of your choice.
I recommend to use the green microcontroller as a base.

## Design
Prepare a sheet of 30x10 grid paper (e.g. Excel, Google Spreadsheet,...) and design the layout of the images you want to display.

## Programming
Use the following functions to program the display to show what you have designed.
- dPX : Draw any 1 pixel of point x,y
- dHL : Draw a horizontal line of length l from point x,y.
- dVL : Draw a vertical line of length l from point x,y.

x and y...use 30x10 coordinates(see "Design") instead of the screen.drawXXX function coordinates.
(Top left is x,y=1,1, bottom right is x,y=30,10)

The last argument of each function(cl) is the color of the pixel; give the RGB code in the Lua Table.
If omitted, the color in the most recent screen.setColor() will be used.


Re-uploading of this module alone is prohibited, but I welcome any uploads of vehicles using this concept and codes.