Strange Bug - Class 87 Brakes Inop. On Wcml Os

Discussion in 'Technical Reports' started by FactionOne, Mar 24, 2019.

  1. FactionOne

    FactionOne New Member

    Joined:
    Mar 24, 2019
    Messages:
    4
    Likes Received:
    0
    Hi,

    As subject, I've got quite a strange bug to report. Basically, the keyboard controls for the RSC Intercity Class 87's train brakes don't work, but only on the WCML Over Shap route (unless there are others yet to be discovered!)

    We first noticed something strange happening when making a scenario on Dad's computer, but as that install takes a battering, we just put it down as a gremlin caused by too much tinkering. Having come back to it and done a bit of testing, I found that the train brakes worked fine driving the included WCML North scenarios, but with a similar train set-up on the WCML Over Shap route, nothing happens when I press semi-colon/apostrophe. (Operating the brake handle with the mouse is OK.)

    Still not convinced it wasn't something wrong elsewhere in Dad's install, and figuring it's about time I made some AC Electric scenarios, I decided to take advantage of the discount on the Class 87; and I've just found exactly the same results.

    For good measure, I tried making a new scenario on the WCML North route - no problem, I can operate the train brakes with the keyboard.

    Grateful for any help!

    Rob.

    Scenario attached for anyone who'd like to test (train is comprised of the same rolling stock used in the scenarios included with the 87 for WCML North - Class 87, included Mk3a coaches, Mk1 BG from WCML North).

    EDIT: Also, the cab view is misaligned (pointed into the corner of the cab), but that's not exactly a show-stopper; and it does respond to adjustments in the .bin

    EDIT EDIT :) Should it maybe do more than a ton on the flat with a rake of ten, or is that about right?
     

    Attached Files:

    Last edited: Mar 24, 2019
  2. Cat

    Cat Well-Known Member

    Joined:
    Feb 3, 2018
    Messages:
    1,181
    Likes Received:
    711
  3. FactionOne

    FactionOne New Member

    Joined:
    Mar 24, 2019
    Messages:
    4
    Likes Received:
    0
    Thanks for your reply.

    I thought they were rated to 110mph, but wasn't sure about the weight of the train; having said that, I would bet that 'back in the day' 87s were hauling 9x Mk3a + 1x Mk1 BG (NHA) up to line speed, at least on the flat.

    Anyway, in respect of the brakes bug, I think I've got it pretty much figured out...

    Basically, InputMappers don't load particularly discretely/with graceful de-confliction (prioritisation by relative path, perhaps) in case of conflict.

    I noticed that on Vulcan Productions' Intercity Swallow pack (n.b. not their Executive names pack), the brakes work on WCML OS (indeed, any route). On closer inspection, I saw they use a custom InputMapper. Side-by-side comparison with the default revealed them to be largely the same - the name element is different, and VP have tweak some cab light stuff, but all the braking bits are identical (key up/down, control target, even IDs). Curious, I edited the default loco's .bin to point it at VP's InputMapper; lo and behold, the brakes worked.

    I did a bit more tinkering - because it couldn't just be the name, right? - removing an empty line at the end of the default InputMapper, adding an extra one/a comment/anything to cause the file to have a different length/attributes; no dice (brakes). OK, next I edited the default mapper to have a completely new name (changing the filename to match), and again pointed the default loco .bin at the original-just-renamed InputMapper; again, the brakes were suddenly back in service.

    Then, a flash of inspiration - there's a (Keithmross) Class 87 included with WCML OS. I wonder...

    Sure enough, its [expert/advanced] InputMapper is also called class87_mapper.bin... I deleted it from the .ap file, and reset my default RSC Class 87 loco .bin and InputMapper to standard, et voila! Working brakes. [Interestingly, the keys are the same in both mappers for train brakes, but they address different control channels (M8Brake vs. VirtualBrake)]

    Also, I've found it's not only an issue on WCML OS - I found the problem to be the same on the excellent free WCML South route. I've not yet fiddled-around to see if I can find out whether the issue is only apparent when a scenario has WCML2 (OS) assets marked, or if it happens whenever the route loads WCML2 assets (regardless of what is or isn't marked in the scenario).

    I suppose the 'simplest' solution, is that developers be aware InputMappers aren't fully discrete when loaded, and give them a GUID name like other things in the game; but that doesn't magically undo the 87 problem out-in-the-wild; and it sort of requires everyone making things to get the message in order to prevent another instance. The 'safest'/most belt-and-braces fix which I can see might be retrofitted would be a bit of code in the routine which loads InputMappers, to prioritise them according to relative path. I'm guessing that the engine deals with more than one mapper at once, because different locos in a free roam scenario might use different controls, and there isn't a clear 'player' one to be the only one loaded. An extra layer that would select and attach the 'tree-nearest' mapper to locos in cases where two are loaded with the same name seems fiddly, but feasible. The huge pinch of salt being that I'm a hobbyist nerd with rudimentary programming knowledge who's never seen the code I'm talking about, so... :)

    I can bodge my 87s to de-conflict them, but I wonder if DTG might consider a 'head it off' fix in a future TS update?

    Thanks all for reading,

    Rob.
     
    Last edited: Mar 24, 2019
  4. FactionOne

    FactionOne New Member

    Joined:
    Mar 24, 2019
    Messages:
    4
    Likes Received:
    0
    [In the meantime?] In case anyone else would like to use my 'bodge', I've prepared a little patch package.

    There's a readme inside the zip which explains more, but the two most important things to know are:

    1) IT'S PROVIDED WITH NO WARRANTY - WHAT YOU DO WITH IT IS YOUR RESPONSIBILITY
    2) IT'LL PROBABLY MEAN YOU DON'T EARN POINTS IN SCENARIOS WHICH USE THE LOCO

    Unfortunately this only addresses the default RSC Class 87, repaints based on it will still be at risk of broken brakes.

    Regards,

    Rob.
     

    Attached Files:

  5. FactionOne

    FactionOne New Member

    Joined:
    Mar 24, 2019
    Messages:
    4
    Likes Received:
    0
    Another little patch for the cab view for anyone who's interested (same caveats as before - no warranty, probably no points(!))

    I'm not sure I'll attempt to fiddle with the power output for a rake of ten (mainly for fear of ending up with it 200mph light engine!).

    All the best,

    Rob.
     

    Attached Files:

  6. 749006

    749006 Well-Known Member

    Joined:
    Dec 10, 2016
    Messages:
    8,488
    Likes Received:
    2,708
    You might be better joining a Group, like UKTS, and posting there.
    There is a bigger audience for your Mods and most people are used to manipulating files.

    Peter
    Link - https://www.uktrainsim.com/
     
  7. KiwiLE

    KiwiLE Well-Known Member

    Joined:
    Jul 27, 2018
    Messages:
    351
    Likes Received:
    535
    Yes, deffo more than 100 with that load on! But physics isn't TS20XX strong point.
     

Share This Page