TSRE Changes / Wish List

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • kapitaen
    Senior Member

    • May 2010
    • 331
    • Germany
    • German + a little bit English
    • MSOR

    #76
    season = Night
    also works.​

    Screen Shot 03-09-24 at 12.30 AM.jpg
    Grettings Jan

    Comment

    • docmartin
      Member

      • Dec 2004
      • 99
      • Bossier City, LA, USA

      #77
      Thanks to the previous posts, I've got the answer!

      Martin

      Comment

      • GokuMK
        Senior Member

        • Oct 2015
        • 729
        • Poland

        #78
        Originally posted by eric
        New version now available above
        Because of how they're saved, the signal and milepost markers can't be moved yet. I've been banging my head trying to understand Goku's method here, but when you click on the arrow, it moves the related scenery object (e.g. the displayed signal or mile marker shape highlighted in purple).

        GokuMK or anyone else familiar with the code.... if you have an idea how to make it moveable, I'd love to hear what I'm not seeing.
        You have to override more than one function, but it should be simple if you look at the other interactives. Don't move the object but selected item.

        Comment

        • StormerDSR
          Member
          • Feb 2024
          • 33
          • Poland

          #79
          Originally posted by eric View Post
          New version now available above
          Because of how they're saved, the signal and milepost markers can't be moved yet. I've been banging my head trying to understand Goku's method here, but when you click on the arrow, it moves the related scenery object (e.g. the displayed signal or mile marker shape highlighted in purple).

          GokuMK or anyone else familiar with the code.... if you have an idea how to make it moveable, I'd love to hear what I'm not seeing.
          You have to override more than one function, but it should be simple if you look at the other interactives. Don't move the object but selected item.
          ​
          I think,carspawners are good example of movable interactives in TSRE.

          Comment

          • eric
            9500 Post Veteran and Administrator



            • Dec 2002
            • 9583
            • NS MP245.4 CNO&TP South District
            • English, SQL
            • General

            #80
            Originally posted by denglihong
            sometimes the absolute value of the X or Z coordinates of an object exceeds 1024.
            Doing a search, there's position checking/correction taking place on all of the save functions. I've yet to find in the code where an object isn't being moved to an adjacent tile when the absolute values exceed 1024.

            If you find a code block where that's not happening, let me know.
            If you like what you see here at Trainsim.com, be it the discussions and knowledge in the forums, or items available in our library, I hope you'll consider a paid membership to help support keeping the site operating.... Thanks!

            Comment

            • StormerDSR
              Member
              • Feb 2024
              • 33
              • Poland

              #81
              The problem with car spawner, platform, and siding markers is that they have a start and end marker which can be moved.

              The signal and speedpost items have a related shape, and only one marker. When you move it, you're moving the related shape, not the TrItem. If you highlight the black TrItem cube, that is also not moveable, nor does the related code from the platform items make it moveable.
              So, maybe good approach for this is to disable selection of signal shape when signal marker is selected. Signal shape can be always selected individually.​

              Comment

              • Tonya37
                Member

                • Apr 2019
                • 41
                • Perth, Western Australia
                • MSOR

                #82
                Hi Eric

                I might have missed this if so my apologies. I would like to see TSRE be able to use one or more DEM files other than hgt files, for example Geotiff. There seem to be not many high resolution hgt files available (I'm happy to be corrected on this).

                Not that you haven't enough suggestions to keep you busy for a long time to come!

                Comment

                • eric
                  9500 Post Veteran and Administrator



                  • Dec 2002
                  • 9583
                  • NS MP245.4 CNO&TP South District
                  • English, SQL
                  • General

                  #83
                  Originally posted by yellowdog
                  I'd like to see the Consist Editor updated so that it could properly display new rolling stock, like what you see in navs_dttx_456700_c2001.zip
                  Now this was a fun one yellowdog .....

                  Here's how the files were being concatenated by TSRE....

                  [I] Nowy 4 shape: "m:/trains/trainset/NAVS_DTTX_456700_c2001/../NAVS_COMMON/BNSF_Freight_c2001/Well_Gunderson_48ft/Well_Gunderson_48ft_1.s"
                  It'll never find that path. Ever. TSRE is expecting absolute paths, and the "../" is a relative path.

                  Thus... some trickery and deceit had to come in with an error handler. If there's a folder name between "Trainset" and the relative path, it's deleting out that folder name to create the absolue path:

                  [I] Before APF: "m:/trains/trainset/NAVS_DTTX_456700_c2001/../NAVS_COMMON/BNSF_Freight_c2001/Well_Gunderson_48ft/Well_Gunderson_48ft_1.s"
                  [I] After AFP: "m:/trains/trainset/NAVS_COMMON/BNSF_Freight_c2001/Well_Gunderson_48ft/Well_Gunderson_48ft_1.s"
                  Unfortunately... this **MIGHT** create other issues rendering other shapes where a relative path is deeper e.g. " ../../ " rand nested two folders deep.

                  I'll be testing that some more, but for now, the NAVS cars are rendering correctly (as were the dozen or so other non-NAVS cars that I spot checked).

                  But for now, it is working for that particular use case... here is DTTX_456701 from above:

                  capture_500482.jpg
                  Last edited by eric; 03-14-2024, 23:44.
                  If you like what you see here at Trainsim.com, be it the discussions and knowledge in the forums, or items available in our library, I hope you'll consider a paid membership to help support keeping the site operating.... Thanks!

                  Comment

                  • yellowdog
                    1500 Post Veteran



                    • Nov 1999
                    • 1586
                    • .
                    • MSOR

                    #84
                    Originally posted by eric

                    Now this was a fun one yellowdog .....
                    Hey, Eric, thanks for looking into this! But from looking at the screenshot, I'm not sure we're there yet. Previous versions of TSRE have displayed the "wagon" the same as what your screenshot shows. Here's DTTX_456701 on my machine (TSRE v0.8.002).

                    dttx 456701 1.jpg

                    But here's how it displays in the sim, with it's load.

                    dttx 456701 2.jpg
                    I'm hoping a future version of TSRE will be able to display the load as well.

                    Per the .wag file, the wagon shape is here:
                    WagonShape ( ../NAVS_COMMON/BNSF_Freight_c2001/Well_Gunderson_48ft/Well_Gunderson_48ft_1.s )

                    which is what TSRE displays. TSRE is able to display the "decal," which in this case is the DTTX 456701 plate on the model. That data comes from here:
                    FreightAnimStatic (
                    Shape( ../NAVS_COMMON/BNSF_Freight_c2001/Well_Gunderson_48ft/Decals/Well_Gunderson_48ft_Decal_A01.s )​

                    but it doesn't display the load, which is described here in the ORTSFreightAnims section of the .wag:

                    LoadData ( Container_48ft_5 NAVS_Container_Base Center Loaded )
                    LoadData ( Container_48ft_6 NAVS_Container_Base Above Loaded )

                    Data for Container_48ft_5 and Container_48ft_6 are here:

                    ../NAVS_Container_Base/Container_48ft_5.load-or and
                    ../NAVS_Container_Base/Container_48ft_6.load-or

                    TSRE isn't reading those .load-or files to pull the shape for the loads.

                    (I believe they are set up as .load-or files so that they can interact with other objects, like container cranes--for loading and unloading the wagon) ​

                    Comment

                    • geepster775
                      2500 Post Veteran


                      • Sep 2006
                      • 2846
                      • .
                      • General

                      #85
                      Originally posted by kennyeaton
                      I don't know if this has been mentioned previously, I would like to be able to place loose consists in the route. Car strings are OK but limited to straight tracks only. I'm sure that if the loose consists can be added to an activity, shouldn't be too hard to create this addition.

                      Kenny

                      Have to disagree with this. I see this as a step backwards, to the time when low computing power required yards filled with static scenery rolling stock and dead (dummy) yard trackage.

                      All you are doing is creating a workload for end users who don't like to see the same car strings in the same spur tracks, All the work that Kenny did placing cars and locomotives on the KD sub route is lost when the end user who wants variety has to fire up the RE to clean that static "Flintstone-wheeled scenery" out. The whole purpose of enhanced computing power is to give the ultimate flexibility to the activity designer who now works without fear of high poly cars or locomotives on active spurs dragging their machine performance down.

                      For a stuffed and mounted steam locomotive on display in a virtual trackside park somewhere, sure. It never changes. But this is not the tool to work around a low performance computer or to avoid learning how to dynamically place loose consists properly via the activity editor. It is not a tool to give the 'running in explore only' crowd something to look at in industrial spurs, because the goal should be higher than that.

                      My Open Rails videos https://www.youtube.com/@lakecities3663/videos

                      Comment

                      • R. Steele
                        3500 Post Veteran

                        • Feb 2013
                        • 3928
                        • known universe
                        • ORTS

                        #86
                        Originally posted by geepster775
                        I see this as a step backwards,... yards filled with static scenery rolling stock and dead (dummy) yard trackage.
                        Especially bothersome, if it's placed on live tracks, don't know how many routes that I've to clean that stuff out and replace - per activity - with working models.

                        It's perfectly okay for someone to approach "decorating" their personal routes in this manner....how they "hobby" is up to them, but to release routes for general use in the hobby with yard/siding decoration is unnecessary -- in my view.
                        Last edited by R. Steele; 03-21-2024, 08:39.
                        Cheers, Gerry
                        "A mind is like a parachute. It doesn't work if it is not open." Frank Zappa
                        It's my railroad and I'll do what I want! Historically accurate attitude of US Railroad Barons.
                        Forever, ridin' drag in railroad knowledge.
                        Audi, Vide, Tace, Si Vis Vivere In Pace​

                        https://www.trainsim.com/forums/filedata/fetch?filedataid=79656&type=medium​ https://www.trainsim.com/forums/filedata/fetch?filedataid=79654&type=small

                        Comment

                        • eric
                          9500 Post Veteran and Administrator



                          • Dec 2002
                          • 9583
                          • NS MP245.4 CNO&TP South District
                          • English, SQL
                          • General

                          #87
                          I'd be fine with ORTS doing some random placement of cars *at runtime* on tracks where there isn't a path.

                          That way, if I define a new path or I download a new activity out, it's unimpeded.
                          If you like what you see here at Trainsim.com, be it the discussions and knowledge in the forums, or items available in our library, I hope you'll consider a paid membership to help support keeping the site operating.... Thanks!

                          Comment

                          • eric
                            9500 Post Veteran and Administrator



                            • Dec 2002
                            • 9583
                            • NS MP245.4 CNO&TP South District
                            • English, SQL
                            • General

                            #88
                            Originally posted by yellowdog
                            but it doesn't display the load, which is described here in the ORTSFreightAnims section of the .wag:
                            I'll dig a little deeper. Parsing out the LoadData() line and aliasing the .load to be treated as a .s shouldn't be difficult, but placing the load on the render will be a bit of a challenge... the actual positioning isn't really defined and will require a bunch of math:

                            Code:
                            case LoadPosition.Center:
                            break;
                            case LoadPosition.CenterRear:
                            zOffset += container.LengthM / 2;
                            break;
                            case LoadPosition.CenterFront:
                            zOffset -= container.LengthM / 2;
                            break;
                            case LoadPosition.Rear:
                            zOffset += (LoadingAreaLength - container.LengthM) / 2;
                            break;
                            case LoadPosition.Front:
                            zOffset -= (LoadingAreaLength - container.LengthM) / 2;
                            break;
                            case LoadPosition.Above:
                            if (container.ContainerType == ContainerType.C20ft || !DoubleStacker) return false;
                            var heightBelow = 0.0f;
                            var contType = ContainerType.C20ft;
                            foreach (var animation in Animations)​
                                              {
                                                    if (animation is FreightAnimationDiscrete)
                                                    {
                                                        if ((animation as FreightAnimationDiscrete).LoadPosition == LoadPosition.Above) return false;
                                                        if (heightBelow != 0 && (animation as FreightAnimationDiscrete).Container.HeightM != heightBelow)
                                                            return false;
                                                        heightBelow = (animation as FreightAnimationDiscrete).Container.HeightM;
                                                        freightAnimDiscreteCount++;
                                                        contType = (animation as FreightAnimationDiscrete).Container.ContainerType;
                                                    }
                                                }
                                                if (freightAnimDiscreteCount == 0 || freightAnimDiscreteCount == 1 && contType == ContainerType.C20ft)
                                                    return false;
                                                if (heightBelow != 0)
                                                    offset.Y += heightBelow;
                                                else
                                                    return false;
                                                break;
                                        }
                                        offset.Z = Offset.Z + zOffset;
                                        if (container.LengthM > loadingAreaLength + 0.01f && loadPosition != LoadPosition.Above) return false;
                                        if (container.LengthM > AboveLoadingAreaLength && loadPosition == LoadPosition.Above) return false;
                                        if (container.LengthM > LoadingAreaLength / 2 + 0.01f && (loadPosition == LoadPosition.CenterFront ||
                                            loadPosition == LoadPosition.CenterRear)) return false;
                                        if (Animations.Count == 0 && loadPosition != LoadPosition.Above) return true;
                                        freightAnimDiscreteCount = 0;
                                        foreach (var animation in Animations)
                                            if (animation is FreightAnimationDiscrete)              
                                                freightAnimDiscreteCount++;
                                        if (freightAnimDiscreteCount == 0 && loadPosition != LoadPosition.Above) return true;
                                        // there are already other containers present; check that there aren't superpositions
                                        if (loadPosition == LoadPosition.Above)
                                            return true;
                                        foreach (var animation in Animations)
                                        {
                                            if (animation is FreightAnimationDiscrete animationDiscrete)
                                                if ((animationDiscrete).LoadPosition != LoadPosition.Above && Math.Abs(offset.Z - (animationDiscrete).Offset.Z) + 0.01f <
                                                    (container.LengthM + (animationDiscrete).Container.LengthM) / 2)
                                                    return false;
                                                else return true;
                                        }
                                        return validity;
                                    }​
                            Last edited by eric; 03-21-2024, 09:31.
                            If you like what you see here at Trainsim.com, be it the discussions and knowledge in the forums, or items available in our library, I hope you'll consider a paid membership to help support keeping the site operating.... Thanks!

                            Comment

                            • R. Steele
                              3500 Post Veteran

                              • Feb 2013
                              • 3928
                              • known universe
                              • ORTS

                              #89
                              Originally posted by eric
                              I'd be fine with ORTS doing some random placement of cars *at runtime* on tracks where there isn't a path.
                              I'd think that would be a welcome addition to OR
                              Cheers, Gerry
                              "A mind is like a parachute. It doesn't work if it is not open." Frank Zappa
                              It's my railroad and I'll do what I want! Historically accurate attitude of US Railroad Barons.
                              Forever, ridin' drag in railroad knowledge.
                              Audi, Vide, Tace, Si Vis Vivere In Pace​

                              https://www.trainsim.com/forums/filedata/fetch?filedataid=79656&type=medium​ https://www.trainsim.com/forums/filedata/fetch?filedataid=79654&type=small

                              Comment

                              • eric
                                9500 Post Veteran and Administrator



                                • Dec 2002
                                • 9583
                                • NS MP245.4 CNO&TP South District
                                • English, SQL
                                • General

                                #90
                                Originally posted by eric

                                I'll dig a little deeper. Parsing out the LoadData() line and aliasing the .load to be treated as a .s shouldn't be difficult, but placing the load on the render will be a bit of a challenge... the actual positioning isn't really defined and will require a bunch of math:

                                Code:
                                case LoadPosition.Center:
                                break;
                                case LoadPosition.CenterRear:
                                zOffset += container.LengthM / 2;
                                break;
                                case LoadPosition.CenterFront:
                                zOffset -= container.LengthM / 2;
                                break;
                                case LoadPosition.Rear:
                                zOffset += (LoadingAreaLength - container.LengthM) / 2;
                                break;
                                case LoadPosition.Front:
                                zOffset -= (LoadingAreaLength - container.LengthM) / 2;
                                break;
                                case LoadPosition.Above:
                                if (container.ContainerType == ContainerType.C20ft || !DoubleStacker) return false;
                                var heightBelow = 0.0f;
                                var contType = ContainerType.C20ft;
                                foreach (var animation in Animations)​
                                                  {
                                                        if (animation is FreightAnimationDiscrete)
                                                        {
                                                            if ((animation as FreightAnimationDiscrete).LoadPosition == LoadPosition.Above) return false;
                                                            if (heightBelow != 0 && (animation as FreightAnimationDiscrete).Container.HeightM != heightBelow)
                                                                return false;
                                                            heightBelow = (animation as FreightAnimationDiscrete).Container.HeightM;
                                                            freightAnimDiscreteCount++;
                                                            contType = (animation as FreightAnimationDiscrete).Container.ContainerType;
                                                        }
                                                    }
                                                    if (freightAnimDiscreteCount == 0 || freightAnimDiscreteCount == 1 && contType == ContainerType.C20ft)
                                                        return false;
                                                    if (heightBelow != 0)
                                                        offset.Y += heightBelow;
                                                    else
                                                        return false;
                                                    break;
                                            }
                                            offset.Z = Offset.Z + zOffset;
                                            if (container.LengthM > loadingAreaLength + 0.01f && loadPosition != LoadPosition.Above) return false;
                                            if (container.LengthM > AboveLoadingAreaLength && loadPosition == LoadPosition.Above) return false;
                                            if (container.LengthM > LoadingAreaLength / 2 + 0.01f && (loadPosition == LoadPosition.CenterFront ||
                                                loadPosition == LoadPosition.CenterRear)) return false;
                                            if (Animations.Count == 0 && loadPosition != LoadPosition.Above) return true;
                                            freightAnimDiscreteCount = 0;
                                            foreach (var animation in Animations)
                                                if (animation is FreightAnimationDiscrete)              
                                                    freightAnimDiscreteCount++;
                                            if (freightAnimDiscreteCount == 0 && loadPosition != LoadPosition.Above) return true;
                                            // there are already other containers present; check that there aren't superpositions
                                            if (loadPosition == LoadPosition.Above)
                                                return true;
                                            foreach (var animation in Animations)
                                            {
                                                if (animation is FreightAnimationDiscrete animationDiscrete)
                                                    if ((animationDiscrete).LoadPosition != LoadPosition.Above && Math.Abs(offset.Z - (animationDiscrete).Offset.Z) + 0.01f <
                                                        (container.LengthM + (animationDiscrete).Container.LengthM) / 2)
                                                        return false;
                                                    else return true;
                                            }
                                            return validity;
                                        }​
                                Well.... the .load-or files are proving far uglier than I thought.

                                They're JSON appearing, but they aren't coming in as UTF8, and all the tabs/linefeeds/quotes are escaped chars, which means it doesn't look like JSON to QT.... I'm sure there's a workaround somewhere.

                                Taking a break from that after 6 hours of not getting it to work.....

                                Sent from my SM-S911U using Tapatalk

                                If you like what you see here at Trainsim.com, be it the discussions and knowledge in the forums, or items available in our library, I hope you'll consider a paid membership to help support keeping the site operating.... Thanks!

                                Comment

                                Working...