Cabin problems with levers

VVMM

Trainz Scripter/Developer
Hi,

I am working on a Diesel loco cabin (download here: https://1drv.ms/u/s!Ano7p-K16N1oidUqU7GgpQZ6qAUuBQ?e=GVuN1i)

I have 2 problems:
1. The throttle lever is not working at all. It just cannot be moved, no overlay is shown, no tooltip-text whatsoever. Why is that? The loco works fine from the GUI, but not from the throttle lever.
2. The tooltip text for the light_switch is not visible. The switch works, but no tooltip text shown...

Can anyone have a look at the asset and provide some tips?

Thanks!
 
Tooltip text hasnt been showing up for some time. Onlight doesn't work these days either tho I'm in yhe middle of a bug report with N3V about that at the moment.

Dunno about the throttle lever I'm afraid. Post your config.txt as it might help.
 
Here is the throttle_lever part of the config.txt, but I'm not sure that you can say much about it without testing:
Maybe I'm missing something here...

Code:
  throttle_lever
  {
    kind                                "lever"
    auto-create                         1
    mesh                                "tractiune.im"
    att                                 "a.tractiune"
    limits                              0,8
    angles                              0,1
    notches                             0,0.125,0.25,0.375,0.5,0.625,0.75,0.875,1
    notchheight                         1,2,2,2,2,2,2,2,1
    radius                              0.2
    mousespeed                          -0.5
    att-parent                          "default"
  }
 
Well nothing out of the ordinary there...

Any scripts?

(I dont have access to trainz ATM, just trying to help)
 
As you can see, no. No scripts. The link to the loco & cabin is in the first post it might be a more convoluted issue here and without looking at the asset there is no way to tell.
 
Oh wow, I managed to figure it out! It looks like a nasty bug... Whatever control is FIRST written in the config.txt's mesh-table it does not work... I just swapped the order in the config.txt between the throttle and the reverser levers and now the reverser does not work and the throttle works.
To solve this I just put the default mesh first and then the controls...

Here the throttle does not work:
Code:
mesh-table
{
  throttle_lever
  {
    kind                                "lever"
    auto-create                         1
    mesh                                "tractiune.im"
    att                                 "a.tractiune"
    limits                              0,8
    angles                              0,1
    notches                             0,0.125,0.25,0.375,0.5,0.625,0.75,0.875,1
    notchheight                         1,2,2,2,2,2,2,2,1
    radius                              0.2
    mousespeed                          -0.5
    att-parent                          "default"
  }
  
  reverser_lever
  {
    kind                                "lever"
    auto-create                         1
    mesh                                "reversor.im"
    att                                 "a.reversor"
    limits                              0,2
    angles                              0.785,-0.785
    notches                             0,0.5,1
    notchheight                         1,1,1
    radius                              0.16
    att-parent                          "default"
  }

  default
  {
    mesh                                "cabina.im"
    auto-create                         1
  }
}

Here the reverser doesn't work (I just swapped the order in the config):
Code:
mesh-table
{
  reverser_lever
  {
    kind                                "lever"
    auto-create                         1
    mesh                                "reversor.im"
    att                                 "a.reversor"
    limits                              0,2
    angles                              0.785,-0.785
    notches                             0,0.5,1
    notchheight                         1,1,1
    radius                              0.16
    att-parent                          "default"
  }

  throttle_lever
  {
    kind                                "lever"
    auto-create                         1
    mesh                                "tractiune.im"
    att                                 "a.tractiune"
    limits                              0,8
    angles                              0,1
    notches                             0,0.125,0.25,0.375,0.5,0.625,0.75,0.875,1
    notchheight                         1,2,2,2,2,2,2,2,1
    radius                              0.2
    mousespeed                          -0.5
    att-parent                          "default"
  }
  
  default
  {
    mesh                                "cabina.im"
    auto-create                         1
  }
}

Here all works (the default cabin mesh is the first):
Code:
mesh-table
{
  default
  {
    mesh                                "cabina.im"
    auto-create                         1
  }
  
  throttle_lever
  {
    kind                                "lever"
    auto-create                         1
    mesh                                "tractiune.im"
    att                                 "a.tractiune"
    limits                              0,8
    angles                              0,1
    notches                             0,0.125,0.25,0.375,0.5,0.625,0.75,0.875,1
    notchheight                         1,2,2,2,2,2,2,2,1
    radius                              0.2
    mousespeed                          -0.5
    att-parent                          "default"
  }
  
  reverser_lever
  {
    kind                                "lever"
    auto-create                         1
    mesh                                "reversor.im"
    att                                 "a.reversor"
    limits                              0,2
    angles                              0.785,-0.785
    notches                             0,0.5,1
    notchheight                         1,1,1
    radius                              0.16
    att-parent                          "default"
  }
}

Should I report this? Is it really a bug? Or a "feature" ?
 
I usually put the cabin mesh first anyway so haven't noticed the issue. Perhaps its a config parsing problem so I'd suggest putting in a report.
 
I dunno. It's somewhat logical that the order would be "thing with attachment points" then "things that attach to those points" - I suppose it should have pitched a fit when committed, but it also seems like a non issue.
 
I never encountered this issue myself because I always put the default mesh first. But it didn't cross my mind there would be issues if the order changes.
Anyway, I opened a bug today for both issues. This looks like an undefined behaviour which needs to be addressed either as a validation error or make it work regardless the mesh ordering.
 
Back
Top