I'm tempted - by Passenger Mode

General discussion about Train Simulator, your thoughts, questions, news and views!

Moderator: Moderators

johnrossetti
Very Active Forum Member
Posts: 2542
Joined: Wed Mar 14, 2007 9:47 pm
Location: Same place as last time

I'm tempted - by Passenger Mode

Post by johnrossetti »

I realise today it’s all about FSX for now but for me the most exciting thing was to find a scenario in the Albula Line called [Passenger mode] Bergun to Preda.
I can’t find any reference to this type of scenario in the forum.
You take up the role of passenger (or sit in the drivers cab) and the train drives, correctly, for you, bit like AI, BUT you canuse any view key, as far as the scenario is concerned you are in drive mode so the Train Sim Live Maps FOLLOWS you as per normal.

This is, for me, without doubt one of the most exciting new features of TS2017.

My pc has even been taken over by a new fan, the other half, who came in and asked what I was doing? when I explained she said “move over” and for the first time ever is taking an interest and going for a ride on the Glacier Express.

Is there anyone who understands this type of scenario and how I could apply it to some of my UK routes?

As, sadly I get errors in FSX (graphics card probably) this is going to be my new interest. Shame really as I seem to be able to run some other pretty sophisticated software ok.
Cheers
gptech
Very Active Forum Member
Posts: 19585
Joined: Fri Oct 10, 2008 5:48 pm
Location: Wakefield, West Yorkshire

Re: I'm tempted - by Passenger Mode

Post by gptech »

The other half llikes it?

What will you do with all that free time you'll have now you can't get on the PC?
USRailFan
Very Active Forum Member
Posts: 4226
Joined: Wed May 14, 2003 8:07 am
Location: Norway

Re: I'm tempted - by Passenger Mode

Post by USRailFan »

johnrossetti wrote:I realise today it’s all about FSX for now but for me the most exciting thing was to find a scenario in the Albula Line called [Passenger mode] Bergun to Preda.
I can’t find any reference to this type of scenario in the forum.
You take up the role of passenger (or sit in the drivers cab) and the train drives, correctly, for you, bit like AI, BUT you canuse any view key, as far as the scenario is concerned you are in drive mode so the Train Sim Live Maps FOLLOWS you as per normal.
Sounds like pretty much the same as the Introductory Train Ride in MSTS (only without the irritating voiceover)?
I'm not fat - I'm easy to see
User avatar
theorganist
Very Active Forum Member
Posts: 1324
Joined: Thu Aug 02, 2007 3:05 pm
Location: Stourbridge

Re: I'm tempted - by Passenger Mode

Post by theorganist »

I wasn't aware this had been done in TS. I'm very interested to here about how to do it though as it's something I've wanted to do for ages especially on some of the scenic routes.

Peter
gptech
Very Active Forum Member
Posts: 19585
Joined: Fri Oct 10, 2008 5:48 pm
Location: Wakefield, West Yorkshire

Re: I'm tempted - by Passenger Mode

Post by gptech »

I'd guess that it's more a scenario specific setting than a *new* feature, so have a look in the Scenarioproperties.xml file to see how it's defined and what scenario marker is used.
Check the player train...is the driven consist comprised of edited vehicles?
User avatar
ashgray
Wafflus Maximus
Posts: 12235
Joined: Sun Jan 09, 2005 3:25 pm
Location: GWR, Nailsea, Somerset

Re: I'm tempted - by Passenger Mode

Post by ashgray »

I often like to use passenger view instead of driver view, particularly when it's one of Gordon Mackenzie's wonderful coach interiors. Trouble is, you dare not stay there for long as you cannot see signal aspects. :(

Ash
Ashley Gray

Intel Core i7-7700K @ 4.2Ghz Quad Core, Gigabyte Gaming Motherboard, 2 x 512Gb SSDs + 1TB SATA drives,
16 Gb DDR-4 Corsair RAM, Nvidia GeForce GTX1060 6Gb RAM, ASUS Xonar D2X/XDT Soundcard, Windows 10 64 bit
User avatar
yerkes
Very Active Forum Member
Posts: 2545
Joined: Thu Oct 09, 2003 6:18 am
Location: Kidlington, Oxfordshire

Re: I'm tempted - by Passenger Mode

Post by yerkes »

Also a risk of missing DSD alert, AWS warnings, etc, unless these are overridden/taken care of by whatever the scenario properties specify.

Really interested to learn more about this...
Michael
gptech
Very Active Forum Member
Posts: 19585
Joined: Fri Oct 10, 2008 5:48 pm
Location: Wakefield, West Yorkshire

Re: I'm tempted - by Passenger Mode

Post by gptech »

He also said there are lots of ways to go about it. Has anybody yet had a look at the scenario's files to see if there are any clues there?
User avatar
yerkes
Very Active Forum Member
Posts: 2545
Joined: Thu Oct 09, 2003 6:18 am
Location: Kidlington, Oxfordshire

Re: I'm tempted - by Passenger Mode

Post by yerkes »

Alas, I don't have the route.

At around 3:40 he says 'You can do it on any route; however you need to write quite a complex script to make it happen'.
Michael
gptech
Very Active Forum Member
Posts: 19585
Joined: Fri Oct 10, 2008 5:48 pm
Location: Wakefield, West Yorkshire

Re: I'm tempted - by Passenger Mode

Post by gptech »

yerkes wrote:Alas, I don't have the route.

At around 3:40 he says 'You can do it on any route; however you need to write quite a complex script to make it happen'.
I don't have it either...

but...once a complex script has been written, unless its released as a pre-compiled .out file, it can be read with nothing more sophisticated than Notepad. Once the calls/functions are recognised implementing them elsewhere becomes much less complex.
User avatar
yerkes
Very Active Forum Member
Posts: 2545
Joined: Thu Oct 09, 2003 6:18 am
Location: Kidlington, Oxfordshire

Re: I'm tempted - by Passenger Mode

Post by yerkes »

Yes, I know that. I would love to get my hands on the file! Almost worth purchasing the route just to have a look...
Michael
User avatar
yerkes
Very Active Forum Member
Posts: 2545
Joined: Thu Oct 09, 2003 6:18 am
Location: Kidlington, Oxfordshire

Re: I'm tempted - by Passenger Mode

Post by yerkes »

So after a bit of messing around with LUA in a quick scenario on the Island Line (faster loading time), I've managed to get a player train to move off by itself, complete with passenger view.

Now to work out how to stop the thing!
Michael
johnbarron
Established Forum Member
Posts: 389
Joined: Sun Jan 04, 2015 8:42 pm

Re: I'm tempted - by Passenger Mode

Post by johnbarron »

John,

Where did you find that scenario? I have the Albula line but only five scenarios, two Standard and three Free Roam, and none of them are [Passenger mode] Bergun to Preda.

Regards,

John.
User avatar
yerkes
Very Active Forum Member
Posts: 2545
Joined: Thu Oct 09, 2003 6:18 am
Location: Kidlington, Oxfordshire

Re: I'm tempted - by Passenger Mode

Post by yerkes »

For what it's worth, and in case anyone else wants to play around with it, here's what I've scripted. I'm no coder so I'm sure it's not particularly well written, but at least it works and I'm happy to have got this far.

It needs four trigger instructions in the scenario (a simple player service using the Class 483 from Ryde Pier Head to Ryde Esplanade): passview, drive, speedcheck and (after about a minute) Esplanadestop.

At least I've got the thing starting and stopping now.

Code: Select all

-- true/false defn
FALSE = 0
TRUE = 1

-- condition return values
CONDITION_NOT_YET_MET = 0
CONDITION_SUCCEEDED = 1
CONDITION_FAILED = 2

-- Message types
MT_INFO = 0   -- large centre screen pop up
MT_ALERT = 1  -- top right alert message

MSG_TOP = 1
MSG_VCENTRE = 2
MSG_BOTTOM = 4
MSG_LEFT = 8
MSG_CENTRE = 16
MSG_RIGHT = 32

MSG_SMALL = 0
MSG_REG = 1
MSG_LRG = 2

-- functions

function OnEvent(event)
   if (event == "passview") then
		SysCall ( "CameraManager:ActivateCamera", "CarriageCamera", 0 )
	end
	
	if (event == "drive") then
		SysCall ( "PlayerEngine:SetControlValue", "VirtualThrottle", 0, 1 )
		SysCall ( "PlayerEngine:SetControlValue", "Reverser", 0, 1 )
		SysCall ( "PlayerEngine:SetControlValue", "TrainBrakeControl", 0, 0 )
	end
	
	if (event == "speedcheck") then
		SysCall ( "ScenarioManager:BeginConditionCheck", "SpeedCondition" )
	end
	
	if (event == "Esplanadestop") then
		SysCall ( "PlayerEngine:SetControlValue", "VirtualThrottle", 0, 0 )
		SysCall ( "PlayerEngine:SetControlValue", "TrainBrakeControl", 0, 1 )
	end
	
end	
	
function TestCondition(condition)
	if (condition == "SpeedCondition") then
		speed = SysCall ( "PlayerEngine:GetSpeed" );
		speedlimit = SysCall ( "PlayerEngine:GetCurrentSpeedLimit" );
		if (speed > speedlimit) then
		SysCall ( "PlayerEngine:SetControlValue", "VirtualThrottle", 0, 0 )
		end
		if (speed < speedlimit) then
		SysCall ( "PlayerEngine:SetControlValue", "VirtualThrottle", 0, 1 )
		end
	end
end
Michael
Locked

Return to “[TS] General Discussion”