Page 1 of 4

Raildriver for Christmas...so far thumbs down

Unread postPosted: Mon Dec 26, 2011 9:46 pm
by HbgRdgLine
I got a Raildriver for Christmas and so far I'm very disappointed. $200 bucks and the controls don't work on some trains (P42), headlights don't work on ANY of the trains. Am I missing something? I searched the forums and I don't see any fixes.

Re: Raildriver for Christmas...so far thumbs down

Unread postPosted: Mon Dec 26, 2011 10:26 pm
by Machinist
You missed many many things.... !!*ok*!!

RailDriver problems with some new assets
viewtopic.php?f=29&t=3172

Raildriver and NEC Corridor Route
viewtopic.php?f=29&t=3101&p=35451&hilit=raildriver#p35451

For RD users I recommend this must have add-on, Marleyman HUD mod:
viewtopic.php?f=6&t=3543

And also, look this awesome fixing for RD light switcher:
viewtopic.php?f=6&t=3541

I'm very happy with mine. I grabbed my RD 7 years ago, 8.000 hours played and still working fine, so far more than 130 different full playable locomotives (counting MSTS, Trainz and RW assets), one or two new TS2012 locomotives make no lack, besides P.I. Engineer is working on the fixes caused by new commands in game (RSC didn't spread them to 3rd Party creators and device produtor).

Cheers,
Lisboa.

Re: Raildriver for Christmas...so far thumbs down

Unread postPosted: Mon Dec 26, 2011 10:28 pm
by Kali
Heavily scripted stuff needs some careful coding so it doesn't fight RD for the controls - as it stands with the current RD driver you'll miss out on all the scripting unfortunately. Headlights? no idea I'm afraid - never had a RD user come back to me and say headlights don't work :(

All you actually need to do when you're coding regulator/brakes ( just in case any dev is interested ) is to check the previous value of your virtual control and not set Regulator/TrainBrakeControl unless it's changed - if someone's using RD then they won't ever change unless the user bashes the keyboard, so it's pretty safe. I have a cacheing control read/write library that's possibly bundled in with the autonumber stuff I posted already that's inherently RD safe ( by virtue of only ever setting *any* control if the value's changed ) that I don't mind anyone using. I suspect my local copy is a bit newer, mind.

Re: Raildriver for Christmas...so far thumbs down

Unread postPosted: Mon Dec 26, 2011 10:44 pm
by Machinist
Kali wrote:I have a cacheing control read/write library that's possibly bundled in with the autonumber stuff I posted already that's inherently RD safe ( by virtue of only ever setting *any* control if the value's changed ) that I don't mind anyone using. I suspect my local copy is a bit newer, mind.

So I missed this post... *!rolleyes!* where is it? !*don-know!*

Headlights switcher was working fine with RS and many RW2 assets, but with the fix mentioned above all locos I played so far are working fine. If isn't working for any locomotive, well this may be another problem... RS Support never failed with me, they use to be fast and efficient with owners, since you submit the problem to them.

Re: Raildriver for Christmas...so far thumbs down

Unread postPosted: Mon Dec 26, 2011 11:12 pm
by Kali
I knocked up a stand-alone version, it's attached. It's prototype code ( I'm doing a whole new set of libraries ) but it should be perfectly functional - let me know if it's not ( and note all I've done with this version is run luac -p over it ).

To use: add

require("path/to/library/ControlCacheSA.lua")

to the script & start using the functions. Note that I think lua paths use unix-type "/".

Re: Raildriver for Christmas...so far thumbs down

Unread postPosted: Mon Dec 26, 2011 11:48 pm
by HbgRdgLine
Machinist wrote:You missed many many things.... !!*ok*!!

RailDriver problems with some new assets
viewtopic.php?f=29&t=3172



Thanks for the posts, but this list of problems is from back in September and it still isn't fixed. $200 is a lot of money for me and for that kind of cash I expect the thing to work. I don't want to have to apply third party fixes. Sorry I just feel it's un- acceptable.

Re: Raildriver for Christmas...so far thumbs down

Unread postPosted: Tue Dec 27, 2011 7:34 am
by dick8299
Kali wrote:I knocked up a stand-alone version, it's attached. It's prototype code ( I'm doing a whole new set of libraries ) but it should be perfectly functional - let me know if it's not ( and note all I've done with this version is run luac -p over it ).

To use: add

require("/path/to/library/ControlCacheSA.lua")

to the script & start using the functions. Note that I think lua paths use unix-type "/".


OK, If you could help me out a little:

Here is where I put the ControlCacheSA.lua script:

Assets\K-rail\Scripts\Generic\ControlCacheSA.lua

So would I add this line to the script for the AEM7

require("/Assets/K-rail/Scripts/Generic/ControlCacheSA.lua") right at the very top?

Like this:

require("/Assets\K-rail\Scripts\Generic\ControlCacheSA.lua")

--------------------------------------------------------------------------------------
-- Engine Script for AEM7 electric locomotive
-- RailWorks 2: Train Simulator
--------------------------------------------------------------------------------------
--
-- Updates controls, reads messages from signals and set engine controls for
-- cab signalling. Controls flashing of appropriate aspects.
--
--------------------------------------------------------------------------------------


Please correct me where I have erred.

Re: Raildriver for Christmas...so far thumbs down

Unread postPosted: Tue Dec 27, 2011 7:58 am
by Kali
You would want:
Code: Select all
require("Assets/K-rail/Scripts/Generic/ControlCacheSA.lua")


anywhere before you use anything in the library, so the top of the file is a pretty safe bet. Note the unix-type path with forward-slashes. You don't have to put it in that path, you can put it anywhere in the RW tree you like, it's probably not the best idea to use my dev tree in case I decide to move it all around one day.

Re: Raildriver for Christmas...so far thumbs down

Unread postPosted: Tue Dec 27, 2011 8:22 am
by dick8299
Kali, If I get it to work, I will move it to another folder; however I revised the AEM7 script by adding that line to the top - and there was no change in RailDriver control performance - the Throttle and Trainbrake do not respond to the RailDriver control.

require("Assets/K-rail/Scripts/Generic/ControlCacheSA.lua")
--------------------------------------------------------------------------------------
-- Engine Script for AEM7 electric locomotive
-- RailWorks 2: Train Simulator
--------------------------------------------------------------------------------------
--
-- Updates controls, reads messages from signals and set engine controls for
-- cab signalling. Controls flashing of appropriate aspects.
--
--------------------------------------------------------------------------------------

Re: Raildriver for Christmas...so far thumbs down

Unread postPosted: Tue Dec 27, 2011 8:41 am
by Kali
Yes, you have to use the contents of the library in the script - there are replacements for SetControlValue/GetControlValue and so on which are all raildriver-safe. There are basic instructions on the available functions at the top of the library, if you open it. There's no way of making an existing script raildriver-proof just by including another one.

Re: Raildriver for Christmas...so far thumbs down

Unread postPosted: Tue Dec 27, 2011 9:38 am
by dick8299
OK, Here is a copy of the AEM7 script. Please take a minute to revise it showing how to enable RD controls. I can not tell from your description or from reading your post what to do. I am sure I am not the only one interested in getting this to work and perhaps a couple of minutes of your time would be a valuable help to the community.

Code: Select all
--------------------------------------------------------------------------------------
-- Engine Script for AEM7 electric locomotive
-- RailWorks 2: Train Simulator
--------------------------------------------------------------------------------------
--
-- Updates controls, reads messages from signals and set engine controls for
-- cab signalling. Controls flashing of appropriate aspects.
--
--------------------------------------------------------------------------------------

-- Boolean.
   TRUE = 1
   FALSE = 0

   ON = 1
   OFF = 0

-- For light flash rate.

   LIGHT_FLASH_ON_SECS = 0.5

-- Cab signal states.

   NONE = 0
   CLR = 1
   CABSPD8 = 2
   CABSPD6 = 3
   APPLIM = 4
   APPMED = 5
   APP = 6
   RESTRICT = 7
   IGNORE = 8

function Initialise ()

-- Initial cab signal states.
   gCabSignal = NONE
   gTrackSpeed = DASH

-- State of flashing for appropriate cab signal aspects.
   gTimeSinceLastFlash = 0
   gLightFlashOn = FALSE

end


function OnControlValueChange ( name, index, value )

   if Call( "*:ControlExists", name, index ) then

      Call( "*:SetControlValue", name, index, value );

   end

end


function OnCustomSignalMessage ( Parameter )

   if ( Call( "GetIsPlayer" ) == TRUE ) then

      newsig = string.sub ( Parameter, 4, 4 )
      if (newsig+0) ~= IGNORE then
         gCabSignal = newsig
      end

      gTrackSpeed = string.sub ( Parameter, 8 )

      Print( (" consist signal: " .. gCabSignal ) )
      Print( (" consist speed: " .. gTrackSpeed) )

      currentSig = Call( "*:GetControlValue", "CabSignal", 0 )
      currentTrk = Call( "*:GetControlValue", "TrackSpeed", 0 )

-- Add zeros to comparisons to ensure the strings are converted to type number.

      if (( currentSig + 0 ) ~= ( gCabSignal + 0 )) and ((newsig+0) ~= IGNORE ) then
         Call( "*:SetControlValue", "CabSignal", 0, gCabSignal )
         Call( "*:SetControlValue", "AlertLight", 0, TRUE )
         Call( "*:SetControlValue", "AWSWarnCount", 0, TRUE )
      end

      if ( (gCabSignal+0) == APPLIM ) then
         Call( "*:SetControlValue", "CabSignal1", 0, OFF )
         Call( "BeginUpdate" )
      elseif ( (gCabSignal+0) == CABSPD8 ) or ( (gCabSignal+0) == CABSPD6 ) then
         Call( "*:SetControlValue", "CabSignal2", 0, OFF )
         Call( "BeginUpdate" )
      elseif (gCabSignal+0) == APPMED then
         Call( "*:SetControlValue", "CabSignal2", 0, ON )
         Call( "*:SetControlValue", "CabSignal1", 0, OFF )
      elseif (gCabSignal+0) == CLR then
         Call( "*:SetControlValue", "CabSignal1", 0, ON )
         Call( "*:SetControlValue", "CabSignal2", 0, OFF )
      elseif (newsig+0) ~= IGNORE then
         Call( "*:SetControlValue", "CabSignal1", 0, OFF )
         Call( "*:SetControlValue", "CabSignal2", 0, OFF )
      end

      if ( currentTrk + 0 ) ~= ( gTrackSpeed + 0 ) then
         Call( "*:SetControlValue", "TrackSpeed", 0, (gTrackSpeed + 0) )
         Call( "*:SetControlValue", "AlertLight", 0, TRUE )
         Call( "*:SetControlValue", "AWSWarnCount", 0, TRUE )
      end
   end
end


function Update ( time )

   gTimeSinceLastFlash = gTimeSinceLastFlash + time
   if gTimeSinceLastFlash > LIGHT_FLASH_ON_SECS then
      gTimeSinceLastFlash = 0
      if gLightFlashOn == FALSE then
         gLightFlashOn = TRUE
         if ((gCabSignal+0) == CABSPD8) or ((gCabSignal+0) == CABSPD6) then
            Call( "*:SetControlValue", "CabSignal1", 0, ON )
         elseif ((gCabSignal+0) == APPLIM) then
            Call( "*:SetControlValue", "CabSignal2", 0, ON )
         end
      else
         gLightFlashOn = FALSE
         if ((gCabSignal+0) == CABSPD8) or ((gCabSignal+0) == CABSPD6) then
            Call( "*:SetControlValue", "CabSignal1", 0, OFF )
         elseif ((gCabSignal+0) == APPLIM) then
            Call( "*:SetControlValue", "CabSignal2", 0, OFF )
         end

      end
   end

   if ((gCabSignal+0) ~= CABSPD6) and
      ((gCabSignal+0) ~= CABSPD8) and
      ((gCabSignal+0) ~= APPLIM) then
      gLightFlashOn = FALSE
      gTimeSinceLastFlash = 0
      Call ("EndUpdate")
   end

end


Re: Raildriver for Christmas...so far thumbs down

Unread postPosted: Tue Dec 27, 2011 2:03 pm
by hminky
b737lvr wrote:I think its safe to say RD isn't very user friendly.


Raildriver isn't the problem. They have been sold since 2002. Producing equipment that doesn't work with the "Defacto" controller is on the game developer. Sorta like an Xbox game not working with an Xbox controller.

Harold

Re: Raildriver for Christmas...so far thumbs down

Unread postPosted: Tue Dec 27, 2011 2:38 pm
by Machinist
hminky wrote:Raildriver isn't the problem. They have been sold since 2002. Producing equipment that doesn't work with the "Defacto" controller is on the game developer. Sorta like an Xbox game not working with an Xbox controller.
Harold

!*brav*! I couldn't say it better... in fact RSC invented that weird (to say the least) F4 virtual console to be played with mouse (absurde!), and seems to not be worried enough with users that need a more immersive experience. I've been following P.I. Engineering try to get from RSC the new codes (mostly TS2012 new engines) to fix the problems but RSC doesn't help.

Re: Raildriver for Christmas...so far thumbs down

Unread postPosted: Tue Dec 27, 2011 4:03 pm
by hminky
Machinist wrote: !*brav*! I couldn't say it better... in fact RSC invented that weird (to say the least) F4 virtual console to be played with mouse (absurde!), and seems to not be worried enough with users that need a more immersive experience. I've been following P.I. Engineering try to get from RSC the new codes (mostly TS2012 new engines) to fix the problems but RSC doesn't help.

Raildriver hasn't supported steam locomotives in Trainz since TS2009 because of a change in coding and the Raildriver people haven't fixed that problem probably because Raildriver and steam use in Trainz is really low. Since there are fewer people using Railworks so I don't expect them to fix the problems since RSC is the problem.

I run mostly OpenRails lately, MSTS is ugly but definitely more immersive.

Harold

Re: Raildriver for Christmas...so far thumbs down

Unread postPosted: Tue Dec 27, 2011 5:08 pm
by HbgRdgLine
hminky wrote:Raildriver hasn't supported steam locomotives in Trainz since TS2009 because of a change in coding and the Raildriver people haven't fixed that problem probably because Raildriver and steam use in Trainz is really low. Since there are fewer people using Railworks so I don't expect them to fix the problems since RSC is the problem.

I run mostly OpenRails lately, MSTS is ugly but definitely more immersive.

Harold


About Open Rails, where can I get get a copy of MSTS and will it work on Windows 7? I see the light about Raildriver, but it doesn't make you feel any better when you drop 200 large and it doesn't work correctly. I'm computer savvy, but talking about scripts and all this other stuff is Greek to me!