Some little bugs

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • csantucci
    Senior Member
    • Nov 1999
    • 856
    • Torino, Italy.

    #46
    I believe I have found a second small bug in the ORTS sigscr.dat parser.

    ORTS does not like this script:

    SCRIPT AVV2610

    extern float route_set ();
    extern float this_sig_lr ();
    extern float draw_state;
    extern float block_state ();
    extern float sig_feature ();

    float this_dis;
    this_dis = this_sig_lr (SIGFN_DISTANCE);

    if ( !route_set () )
    draw_state = 4;
    else if ( this_dis ==# 6 )
    if ( !sig_feature (SIGFEAT_USER2) )
    draw_state = 0; // Giallo Verde Lampeggiante Alternato
    else draw_state = 2; // Giallo Verde Lampeggiante Alternato/M
    // Fine Giallo Verde Lampeggiante Alternato
    else if ( this_dis ==# 4 )
    if ( !sig_feature (SIGFEAT_USER2) )
    draw_state = 1; // Giallo Verde Lampeggiante
    else draw_state = 3; // Giallo Verde Lampeggiante/M
    // Fine Giallo Verde Lampeggiante
    else draw_state = 4; // Nothing


    Following errors are reported by the log file:
    Warning: Unexpected number of = in string : ELSE IF ( THIS_DIS = 4 )IF ( !SIG_FEATURE (SIGFEAT_USER2) )DRAW_STATE = 1

    Warning: Unmatching brackets in : ELSE IF ( THIS_DIS

    If you however add a pair of braces after the else if block ABOVE the one giving the error, as shown herebelow, the error disappears.

    ////////////////////////////
    SCRIPT AVV2610

    extern float route_set ();
    extern float this_sig_lr ();
    extern float draw_state;
    extern float block_state ();
    extern float sig_feature ();

    float this_dis;
    this_dis = this_sig_lr (SIGFN_DISTANCE);

    if ( !route_set () )
    draw_state = 4;
    else if ( this_dis ==# 6 )
    {
    if ( !sig_feature (SIGFEAT_USER2) )
    draw_state = 0; // Giallo Verde Lampeggiante Alternato
    else draw_state = 2; // Giallo Verde Lampeggiante Alternato/M
    }
    // Fine Giallo Verde Lampeggiante Alternato
    else if ( this_dis ==# 4 )
    if ( !sig_feature (SIGFEAT_USER2) )
    draw_state = 1; // Giallo Verde Lampeggiante
    else draw_state = 3; // Giallo Verde Lampeggiante/M
    // Fine Giallo Verde Lampeggiante
    else draw_state = 4; // Nothing
    sigpic

    Comment

    • csantucci
      Senior Member
      • Nov 1999
      • 856
      • Torino, Italy.

      #47
      Sound issue

      Streams like this seem not to work:

      Stream (
      Priority ( 7 )
      Triggers ( 1
      Variable_Trigger ( Distance_Dec_Past 70 PlayOneShot ( 3
      File ("x_trcentro_loud_long.wav" -1 )
      File ("x_silence_short.wav" -1 )
      File ("x_trcentro_loud.wav" -1 )
      SelectionMethod ( RandomSelection ) ) )
      )
      VolumeCurve(
      SpeedControlled
      CurvePoints ( 5
      -100.0 1.0
      -2.0 1.0

      0 0.0
      2.0 1.0
      100.0 1.0
      )
      Granularity ( 0.1 )
      )
      )

      I assume that Distance_dec_past and Distance_inc_past are not yet implemented.
      sigpic

      Comment

      • csantucci
        Senior Member
        • Nov 1999
        • 856
        • Torino, Italy.

        #48
        Referring to sound I have another issue.
        I addedo to two tiles in a route some sound sources. These are played correctly if the train starts the activity within one of the two tiles.
        If the train comes from farther away, the sound sources are not played. It does not seem to be related to the maximum amount of .wav playable files, because the behaviour is the same if only the player train is present or many trains are present. By the way it would nice if ORTS could have some (raw) sound debugging tool as MSTS has with its "Sound interface".
        sigpic

        Comment

        • csantucci
          Senior Member
          • Nov 1999
          • 856
          • Torino, Italy.

          #49
          About signalling:
          1) I have some cases where player or AI train gets the STOP aspect in front of a signal even if it should have block clear and route set. I tried to remove from the signal script the test for !route_set and the STOP disappeared and the correct aspect came out. So it seems that in these cases either the variable route_set sometimes is FALSE even if it should be TRUE or its test does not work well.
          2) I have some cases on multiple head signals where all lights are off, even if one should be on (e.g. CLEAR_2 aspect and all lights off). P.S.: after further digging problem 2 has same cause as problem 1, that is a !route_set check that does not seem to provide the correct result.

          After further digging I believe to have found out that the problem arises in signal heads with no junction link. For this signal heads route_set is always true in MSTS (which seems quite reasonable), and some existing signal script files assume this. In ORTS in this case it does not seem that route_set is always true.
          Last edited by csantucci; 11-02-2012, 12:04.
          sigpic

          Comment

          • csantucci
            Senior Member
            • Nov 1999
            • 856
            • Torino, Italy.

            #50
            I have made further investigations about the "Sound sources" not playing and I have come to following conclusions: Sound sources play only if they are within a tile loaded at game start or at game resume. Sound sources don't play if they are within a tile that is loaded during the game.

            Another point: ORTS does not consider waiting points of AI trains if they occur before game start or resume.
            Last edited by csantucci; 11-05-2012, 11:20.
            sigpic

            Comment

            • csantucci
              Senior Member
              • Nov 1999
              • 856
              • Torino, Italy.

              #51
              A route builder gets this errors stopping the game when loading his route
              2012116154356_OpenRailsLog.zip
              Are there any suggestions by the ORTS team about the possible cause? Thank you in advance

              Carlo
              sigpic

              Comment

              • csantucci
                Senior Member
                • Nov 1999
                • 856
                • Torino, Italy.

                #52
                Some remarks about sound

                First of all, thank you again to the ORTS team for their release 1330. I appreciated many points addressed by that release.

                I have made a first set of tests about ORTS sound. Here I have some remarks.
                1) The Volume ( ) command related to a specific stream overrides the Volume ( ) command related to the full Scalability Level. In MSTS these two Volume values are multiplied to get the base Volume level of the specific stream. In my opinion the MSTS implementation is the best one, because it allows to assign to the two Volume commands two specific aims: the Volume command of the Scalability Group is provided to tune the overall volume level of the Scalability Group against other .sms files, while the Volume command of the specific stream is provided to tune the volume of that stream against the volume of the other streams in that Scalability Group. So my kind request is to modify the management of the two Volume commands following the MSTS implementation.
                2) I have noticed that for discrete trigger 54 (brake release) this rule applies: inside the cab also the related sound triggered in the ...eng.sms can be heard (even if CabCam is deactivated within such ...eng.sms file). This does not apply for other discrete triggers, as e.g. the horn trigger. So my request is that for all triggers the same general rule applies, that is no sound related to streams within Scalability Groups that have CabCam deactivated should be heard inside the cabin (as it is in MSTS). In my opinion the responsibility of what should be heard or not inside the cab should be left to the programmer of the .sms files. This provides also for maximum flexibility.
                3) Discrete trigger 48 (activated by pressing the Alerter acknowledge key) does not work.
                4) Distance_dec_past (and also I suppose Distance_inc_past) within Variable Triggers does not work. No sound starts when the distance decreases below the threshold defined.

                Thank you for attention

                Carlo
                sigpic

                Comment

                • kox
                  Senior Member
                  • May 2010
                  • 329

                  #53
                  I get this if i try to save.
                  sigpic

                  Comment

                  • Granders
                    Member
                    • Jul 2012
                    • 36

                    #54


                    This concern me alot, why is the consist behaving like this on all IC3 variants?

                    Comment

                    • twpol
                      Senior Member
                      • Oct 2009
                      • 434
                      • United Kingdom

                      #55
                      Originally posted by Granders
                      This concern me alot, why is the consist behaving like this on all IC3 variants?
                      This will be a problem with OR's interpretation of the wheels and bogies in these cars, most likely; gameplay and physics should be unaffected.
                      James Ross
                      Open Rails Management Team
                      sigpic

                      Comment

                      • Granders
                        Member
                        • Jul 2012
                        • 36

                        #56
                        Originally posted by twpol
                        This will be a problem with OR's interpretation of the wheels and bogies in these cars, most likely; gameplay and physics should be unaffected.
                        How can one change that? Is there a way to alter the train's behavior to fit with the OR behavior?

                        Comment

                        • twpol
                          Senior Member
                          • Oct 2009
                          • 434
                          • United Kingdom

                          #57
                          Originally posted by Granders
                          How can one change that? Is there a way to alter the train's behavior to fit with the OR behavior?
                          Without looking at the specific cars in question (which I haven't had the time to do), it's hard to say. It's more likely just a bug in OR.
                          James Ross
                          Open Rails Management Team
                          sigpic

                          Comment

                          • Granders
                            Member
                            • Jul 2012
                            • 36

                            #58
                            Originally posted by twpol
                            Without looking at the specific cars in question (which I haven't had the time to do), it's hard to say. It's more likely just a bug in OR.
                            I noticed that when the front couples with the end, without any wagon in between, it behaves pretty well. Front to front, with the "cushions" towards each other, if so to speak.

                            Comment

                            • csantucci
                              Senior Member
                              • Nov 1999
                              • 856
                              • Torino, Italy.

                              #59
                              A bug has been introduced since release 1330, that was not present before. After locomotive swap (Ctrl+E) the reverser does not work, at least in the case where there is also an engine without cab in the consist.
                              sigpic

                              Comment

                              • renfe269
                                New Member
                                • May 2010
                                • 1

                                #60
                                As csantucci states, also on the last OR X. release (1342) is not possible to drive the other cab(mainly in EMU and DMU). Many controls doesn't work as, for example, reverser, lights, alerter etc. and it is impossible to drive the train. I've tryied with Shift+E to gain controls on the train but didn't do anything.

                                Hoping to fix this!

                                Renfe269.

                                Comment

                                Working...