Regulator(Throttle) and RPM. Where's the connection?

Discussion of rolling-stock creation & re-painting.

Regulator(Throttle) and RPM. Where's the connection?

Unread postby bnsfsubdivision » Sun Jan 05, 2014 5:49 pm

Weird Subject, really but it pretty much describes my problem. I was wondering what the actual connection between the Regulator and the RPM is. The Throttle has by default the ControlName "Regulator" and controls the RPM value. But it can apparently have any other name assigned to it like "lvrThrottle" as example and it will still control the rpm even though there's nothing in the code which actually tells the Controller to control the rpm. I'm trying to set up a fake Regulator and fake rpm controller but I'm not able to let the fake Regulator change the fake rpm because I have no idea how to assign the regulator to them like it's the case with the default Throttle and the default RPM. I have been through every line in the simulation files and can't seem to find any connection. Hopefully some of you experienced folks know something and can help me out. Thanks in advance! *!!wink!!*
Kevin Schulz
Artist - Searchlight Simulations
User avatar
bnsfsubdivision
 
Posts: 822
Joined: Sun Feb 20, 2011 5:27 am

Re: Regulator(Throttle) and RPM. Where's the connection?

Unread postby mrennie » Sun Jan 05, 2014 8:29 pm

bnsfsubdivision wrote:Weird Subject, really but it pretty much describes my problem. I was wondering what the actual connection between the Regulator and the RPM is. The Throttle has by default the ControlName "Regulator" and controls the RPM value. But it can apparently have any other name assigned to it like "lvrThrottle" as example and it will still control the rpm even though there's nothing in the code which actually tells the Controller to control the rpm. I'm trying to set up a fake Regulator and fake rpm controller but I'm not able to let the fake Regulator change the fake rpm because I have no idea how to assign the regulator to them like it's the case with the default Throttle and the default RPM. I have been through every line in the simulation files and can't seem to find any connection. Hopefully some of you experienced folks know something and can help me out. Thanks in advance! *!!wink!!*


There are some predefined control variable names that act as keywords for the core code, and "Regulator" is one of them. Maybe you saw "lvrThrottle" in the "Pick transform name" field of the Interior Lever interface element connected to the control value. If, on the other hand, you've seen a control value with the control name "lveThrottle", then that would be a fake control value that's connected to a throttle lever in the cab, but elsewhere in the engine blueprint there would have to be another control value named "Regulator" (but with no associated interface element). The trick then is to have the engine's LUA script read the position of the "lvrThrottle" (the control manipulated by the player), do some internal manipulations and conversions on that value, and then assign the result to "Regulator" so that it's passed on into the core code, where the rpm is calculated. If you know how to programme and understand LUA code, you can do some really fancy stuff with control variables.
User avatar
mrennie
 
Posts: 3214
Joined: Wed May 30, 2012 12:22 pm

Re: Regulator(Throttle) and RPM. Where's the connection?

Unread postby BNSFdude » Sun Jan 05, 2014 8:52 pm

If you have it, look at the LUA for the Class 57/0. Simon Hall basically bypassed every core control he could to get more realistic performance for it.
Anthony Wood
Audio Engineer - Searchlight Simulations
User avatar
BNSFdude
 
Posts: 2721
Joined: Tue Nov 29, 2011 1:46 am

Re: Regulator(Throttle) and RPM. Where's the connection?

Unread postby bnsfsubdivision » Mon Jan 06, 2014 3:47 am

mrennie wrote:There are some predefined control variable names that act as keywords for the core code, and "Regulator" is one of them.

I thought so and that's exactly what I wanted to know. I will set up a new script as my current one doesn't do exactly what I need as I described and will post here once I'm successful. Thank you guys for your help and hopefully I'll be able to grab somewhere an old copy of the Class 57/0 to avoid the lua.out's and to learn out of Simon's work.
Kevin Schulz
Artist - Searchlight Simulations
User avatar
bnsfsubdivision
 
Posts: 822
Joined: Sun Feb 20, 2011 5:27 am


Return to Rolling-Stock Design

Who is online

Users browsing this forum: No registered users and 3 guests

cron