Scripttexturen mit mehreren Variablen (Dash)

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!
  • Hallo zusammen,


    ich modde gerade etwas am MAN DL05, Das Dash wird über Scripttexturen gesteuert... ?(


    Die Kneeling Pfeile sind in der Font dort alle enthalten, aber es werden nur die während des Kneelens angezeigt. Wenn der Bus vollständig abgesenkt ist wird nichts mehr angezeigt.



    Das hier ist der Auszug aus dem Cockpit Script. Gibt es eine Möglichkeit, dass ich dort unter der Voraussetzung (L.L.kneel_setpoint) unter -0,03 noch das Zeichen _ anzeigen lassen. Sollte möglichst an der gleichen Stelle sein...

    Gruß



    Tom

    • Hilfreichster Beitrag

    Hello,


    This is somewhat complicated; for one because the script goes to some lengths to be efficient, by not updating the display's script-textures with each frame unless the content to be rendered has actually been modified; and for two because the font is not "modular" -- rather than offering primitive shapes (e.g. triangles and circles) for users to compose more complex ones off of, it provides ready-assembled composite shapes of varying widths --, thus necessitating some slightly more nuanced clearing logic when, as in this case, it's desired to alternate between multiple symbols at overlapping coordinates. I'll include some in-line commentary in case you're interested in the details.


    1. Revise the conditions under which the display's script-texture gets refreshed:


    a. Find:

    Code: cockpit.osc
    (L.L.vdv_blink) s0
    (L.S.GetTime) 1.6 % 1.1 < (S.L.vdv_blink) l0 = !
    {if}
        1 (S.L.vdv_refresh)
    {endif}

    Insert after:


    b. Optionally, find and delete (or comment out) the following line (to be found under the "Kriterien für Aktualisierung der Scripttextur" block), as it is now superfluous:

    Code
    (L.L.kneel_upsound) (L.L.kneel_downsound) || $IntToStr $+


    2. Replace (or comment out and insert after) the "Kneeling-Pfeile" section (i.e. all code referenced in your opening post above) with:

    Code
        (M.L.vdv_kneel_display_refresh)


    3. Insert the implementation of the revised kneeling-specific display handling at the very end of the file (after the closing {end} of the vdv_frame macro):


    4. a. Declare the following new variables (e.g. in cockpit_varlist.txt).

    Code
    vdv_kneel_display_target
    vdv_kneel_display

    b. ...as well as the string-variable vdv_kneel_display_str (e.g. in cockpit_stringvarlist.txt).


    Note that I didn't test the above extensively, let alone exhaustively -- there may be bugs. Feel free to ask if you run into issues (I do understand German, but am usually too lazy to write in it).

  • Then I'm afraid that our files are incompatible; I tested the aforementioned changes on the DL05 of a plain vanilla X10 installation (version 1.31) and they are at least at first glance working as intended. Unfortunately I can't attach the whole cockpit.osc due to copyright.


    Have you modded the script(s) yourself, or have you by chance introduced third-party mods affecting them? Have any new script-related error entries made an appearance in your logfile?


    Maybe try eliminating all comment lines from the patch above, for the unlikely case that the extra apostrophes or other special characters in there, in conjunction with our differing Windows locales and no support for UTF-8, are giving your OMSI a headache.