Example code from the "Volvo_5000.mdl"
Code
labelList = {
labels = {
{
alignment = "CENTER",
childId = "RootNode",
color = { 0.76862746477127, 0.87058824300766, 0.2352941185236, 1, },
filter = "NUMBER",
fitting = "CUT",
size = { 0.48500001430511, 0.18899999558926, },
transf = { 0, -1, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, -5.4619998931885, -0.25900000333786, 2.2830998897552, 1, },
type = "LINE_NAME",
renderMode = "EMISSIVE",
},
{
childId = "RootNode",
color = { 0.76862746477127, 0.87058824300766, 0.2352941185236, 1, },
fitting = "CUT",
size = { 1.0615999698639, 0.1870000064373, },
transf = { 1, 0, 0, 0, 0, 0, 1, 0, 0, -1, 0, 0, 2.4179999828339, -1.1476000547409, 2.3227000236511, 1, },
type = "NEXT_STOP",
renderMode = "EMISSIVE",
},
{
childId = "RootNode",
color = { 0.76862746477127, 0.87058824300766, 0.2352941185236, 1, },
fitting = "CUT",
size = { 1.0615999698639, 0.1870000064373, },
transf = {
-1, 0, 0, 0,
0, 0, 1, 0,
0, 1, 0, 0,
3.4956 , 1.1435 , 2.2752 , 1,
},
type = "NEXT_STOP",
renderMode = "EMISSIVE",
},
{
childId = "RootNode",
color = { 0.76862746477127, 0.87058824300766, 0.2352941185236, 1, },
fitting = "CUT",
size = { 1.777999997139, 0.2790000140667, },
transf = {
0, 1, 0, 0,
0, 0, 1, 0,
1, 0, 0, 0,
5.327700138092, -0.88999998569489, 2.2734000682831, 1,
},
type = "LINE_NAME",
renderMode = "EMISSIVE",
},
},
},
Display More
Here is only a list of valid selections for labels (labelList)
Name | value | example | description |
alignment | LEFT, CENTER, RIGHT | ||
alpha | Integer | ||
alphaMode | CUTOUT, BLEND, NONE | ||
childId | String | ||
color | {Integer,Integer,Integer} | { 1,1,1, } | |
filter | NONE, NUMBER | ||
fitting | NONE, CUT, SCALE | ||
font | String | ||
nLines | Integer | Number of lines | |
params | { relative = Boolean, offset = Integer } | ||
renderMode | STD, EMISSIVE | ||
size | { Integer , Integer } | ||
transf | { Float,
Float,
Float,
Float, Float, Float, Float, Float, Float, Float, Float, Float, Float, Float, Float, Float ] | See Transformationsmatrix | |
type | LINE_NAME, NEXT_STOP, NAME, COMPANY_NAME, STATION_NAME, CUSTOM | ||
verticalAlignment | BOTTOM, CENTER, TOP |
Comments 7
Newly created comments need to be manually approved before publication, other users cannot see this comment until it has been approved.
Newly created comments need to be manually approved before publication, other users cannot see this comment until it has been approved.
N0neGiv3N
Do you think you could provide code example of using the "Params" options Relative and Offset?
melectro
Sorry, I've looked at my own mods and none of them I've had to use the params options as you request.
You might find what you are looking for on the UG Wiki page. https://www.transportfever2.co…dding:resourcetypes:mdl&s[]=labellist
Marcolino26
Look here for more details
Zielanzeigen
melectro
Thank's, It's not easy to find it as I didn't know what it was called in German language. I have started this page and I hope that others can edit the missing information.
Sadly there is no detailed info about type = CUSTOM. That was why I started this page
Marcolino26
Yeah.
Custom is unknown at the moment.
KarlCharlson
Es fehlt einfach ein FIRST_STOP und LAST_STOP, das sollte UG noch nach Liefern, dass man die Erste oder Letzte Station der Linienrichtugn anzeigen lassen kann.
melectro
The busses in Sweden has often the name of the end station and below the text of a city or a bigger station "via city / via station".
In the game the "via" could be player selected index of the line list, if only the type INDEXED_STOP exist.