How to manage 3 separate display addresses' length in pixels?

Willkommen in der OMSI-WebDisk!
Als Gast kannst du nur Inhalte in deiner ausgewählten Sprache sehen. Registrierte Nutzer können die Sichtbarkeit anderer Sprachen in ihrem Kontrollzentrum aktivieren, weitere Infos hier.
Alle Themen sind in den Foren mit einer Sprachflagge gekennzeichnet: = Englisch [EN], = Deutsch [DE], = Französisch [FR]. Wenn du die angegebene Sprache nicht beherrschst, schreibe auf Englisch!
  • Hello!

    I'd like to get help from more experienced members of the scripting community, because I'm trying to make a display mod that controls the matrix's length based on the display address (in bus.cfg: [matl_transmap]).


    The height is fixed at 19 pixels. For example, the first front display is 144 pixels wide and that's \S:1. The side display is 120 pixels in width, \S:2. Finally, the back display is 32 in width, \S:3. The current script is linked below, highlighted with the added part I tried, but it didn't work. Also, part of the model.cfg is also linked below.

    (instead of my addition, here's the original of the modified part

    '3.B.2 Bestimmen der verbliebenen Länge des Zieles vorne (l3):

    144 (L.L.Matrix_Xpos) - s3
    )


    Appriciate the help!

  • \S:x doesn't define the address, rather the script texture index. This means that you need to write the according alpha channels to three separate script textures, which is quite a bit more complex than just using one script texture since you need to readjust coordinates for each display separately.


    Since you only have three separate displays operating at a single static resolution each, I'd recommend just sticking to the regular way the matrix script is implemented. It's very easy to adjust the script to different resolutions, so there is no real need to make it more complicated than it needs to be by using three different script textures for something that can easily be implemented with just one.

  • So is it possible to edit the display resolution of the 3 displays separately? And where should I start in the script?
    Beacuse my main problem is that with 144 px res, the side display will be chopped off a bit, but the front display is perfect. That's why I need this solution. Btw, thanks for your answer!

  • What exactly are you trying to do there? You are dividing a random font index (the one used before for the line number) by 100 and then truncate it, to then compare it to 1 and 2 to set register 3 (remaining width) with those values.


    Remove those lines completely. Then replace the block on line 550(?) with the following:

    Code
    'Schreiben des Zieles Front-Anzeige:
    0 (S.L.Matrix_Ypos)
    144 (L.L.Matrix_Xpos) - s3
    (M.L.Matrix_WriteTerminus)
    'Und Schreiben des Zieles Seitenanzeige:
    33 (S.L.Matrix_Xpos)
    120 s3
    19 (S.L.Matrix_Ypos)
    (M.L.Matrix_WriteTerminus)
    'Fertig: Unlocken