Request For Basic Help Editing Existing Signals

Discussion in 'General Discussion' started by Slugsix, Jun 19, 2020.

  1. Slugsix

    Slugsix Member

    Joined:
    May 11, 2020
    Messages:
    43
    Likes Received:
    2
    Hi all,

    I was wondering if somebody could get me started with editing an existing set of signals. I',m playing with a clone of a route to make it more fun, including improving the signalling. I'm using the JTMS signals, but have some issues with then including things like:

    1. Approach control sets the line speed immediately after passing a signal (not realistic)
    2. The green aspect is the wrong shade of green.
    3. AWS issues with the 2 aspect repeater.
    Etc.

    I'm happy to have a pop at fixing these, but can anybody give me a quick overview on the process. In particular I'd like to:

    Take the JTMS signals and clone them somewhere (so I don't destroy the existing ones!)
    Start editing these.
    Make the edited copy available for use in my route.

    Just an overview or links to other web pages will be fine......
     
  2. 749006

    749006 Well-Known Member

    Joined:
    Dec 10, 2016
    Messages:
    8,507
    Likes Received:
    2,719
  3. Slugsix

    Slugsix Member

    Joined:
    May 11, 2020
    Messages:
    43
    Likes Received:
    2
    Thanks for that. Probably some good reference material there. I'm more after how you clone the package (assuming that's what it is!), edit and then repackage to make it available. The scripts themselves won't be a problem.

     
  4. Tomas9970

    Tomas9970 Well-Known Member

    Joined:
    Oct 7, 2018
    Messages:
    924
    Likes Received:
    879
    I've tried to decompile the BR1822's script some time ago to self-fix it and found out that it's not really possible. Apperently the .out files have their debugging information removed so the output of the decompiler is almost unreadable.

    You can try but I don't think it's going to work.
    https://sourceforge.net/projects/unluac/
     
  5. Slugsix

    Slugsix Member

    Joined:
    May 11, 2020
    Messages:
    43
    Likes Received:
    2
    I'm not going to that level! I thought they'd just be LUA scripts as part of the package that I could edit. I've Emailed Just Trains for help to see what they say about it.

     
  6. 749006

    749006 Well-Known Member

    Joined:
    Dec 10, 2016
    Messages:
    8,507
    Likes Received:
    2,719
    [2] Greens
    A picture with 3 different signals
    The signal on the left is the JT_LED_3ASP
    The signal in the middle is the RSC/UKLEDsignals01 3A Auto
    The signal on the right is the JT_Bulb_3ASP
    Screenshot_1-Signals_50.72986--3.54419_12-00-23.jpg

    Not much difference
    My Signals date from 25/03/2019

    Peter
     
  7. Tomas9970

    Tomas9970 Well-Known Member

    Joined:
    Oct 7, 2018
    Messages:
    924
    Likes Received:
    879
    Packages that are distributed generally don't include the source code unless it's intended for the user to mess around with it. It's both to reduce the file size and also to protect the code from being copied.
     
  8. Slugsix

    Slugsix Member

    Joined:
    May 11, 2020
    Messages:
    43
    Likes Received:
    2
    Now that all depends on what the "source code" is. If it's LUA scripts that are interpreted then that forms both the executable and source code. It also depends on the standpoint of the developer and what license they may wish to grant too.

    The train simulator editor user's manual actually has a section on programming signals, so naively, I assumed that I would be able to do it!

    https://sites.google.com/a/railsimd...ction-reference/signalling-function-reference

     
  9. Tomas9970

    Tomas9970 Well-Known Member

    Joined:
    Oct 7, 2018
    Messages:
    924
    Likes Received:
    879
    I get it but lua code can be converted into a binary code for reasons I mentioned.

    Do you want to edit the signals from Just trains or do you want to make entirely new signal logic?
     
  10. Slugsix

    Slugsix Member

    Joined:
    May 11, 2020
    Messages:
    43
    Likes Received:
    2
    It turns out that it depends on which version of the JTMS signals you have. After a bit of hunting, I've found I've got two versions. Both are under the "Just Trains" selector in the object filter. One is under "Common Library". The other is under "JT_ModernSignals". They are clearly different, as you can see from the attached image (Left to right are UKPro, UK, Just Trains Modern Signals, Just Trains Common Library. I've labelled the signal posts where possible).

    I hope you can agree one of them has the wrong shade of green.

    So given that I've got (at least) two different versions of the JTMS signals I wonder how you work out their providence in terms of versioning etc. It's beginning to feel like something of a mess. When they are both selected in the object filter, the "JT_ModernSignals" seems to take precedence over "Common Library", although that may just be down to the order in which they were selected in the filter.

    From a Software Engineering point of view, all of this is a recipe for flaky software......

    upload_2020-6-20_12-12-36.jpeg

     
  11. Slugsix

    Slugsix Member

    Joined:
    May 11, 2020
    Messages:
    43
    Likes Received:
    2
    Thanks. I know all about LUA. You can use it in Wireshark without conversion into machine code. Wireshark has a LUA interpreter. LUA was designed to extend applications in exactly this way. The application contains a LUA interpreter and this allows add-ons to be written easily - like protocol dissectors in Wireshark for example.
     
    Last edited: Jun 20, 2020
  12. 749006

    749006 Well-Known Member

    Joined:
    Dec 10, 2016
    Messages:
    8,507
    Likes Received:
    2,719
    The lights are just Textures which are displayed by the game
    If the Green Light Texture from the JTMS was copied to the JTCL the result should be the same
    Signals 1 and 3 look better to me

    Peter
     
  13. Slugsix

    Slugsix Member

    Joined:
    May 11, 2020
    Messages:
    43
    Likes Received:
    2
    Thanks for that, I'll have a play. IMO, I prefer the UK Pro colour for green. I think the lenses used for green signals were (are) actually blue, giving a bluish-green with a yellow-ish bulb behind. The JTMS is clearly "too green" - I way prefer the JTCL colour over this one. Do we know which revision of the JTMS and JTCL signals is the most recent. I'm thinking that if it's the JTCL one, then if they've fixed the colour, they might have also fixed the approach control speed restriction issue too?

     

Share This Page