Page 1 of 2
Blueprint 'hud element' - forcing the black/yellow AWS icon
Posted: Mon Dec 15, 2014 6:15 pm
by chrisell
I don't know if I have to spoof the game into thinking I'm getting an AWS alert, but if not, anyone know a more sensible way of forcing the black/yellow striped HUD element on that indicates an AWS warning?. I'm writing my own PZB functions for a train I'm working on and it would be nice if I could force that icon on during an alert. I know the blueprints have a field for 'hud element' but in typical railworks wiki fashion, the page for it has no data on what this value does (if it does anything at all). I've seen this done on other German trains but I don't know if they're just spoofing the AWS function or if they're properly controlling that HUD icon. I think Virtual Railroads do this.
Re: Blueprint 'hud element' - forcing the black/yellow AWS icon
Posted: Mon Dec 15, 2014 7:18 pm
by DaveDewhurst
Have a look at the control values
"AWS" & "AWSWarnCount"
I'm sure its linked to one or both of them
Dave
Re: Blueprint 'hud element' - forcing the black/yellow AWS icon
Posted: Mon Dec 15, 2014 8:28 pm
by chrisell
I think so too but I'm not sure I want to put "half" an AWS back into the train just for the sake of the HUD

Re: Blueprint 'hud element' - forcing the black/yellow AWS icon
Posted: Tue Dec 16, 2014 7:42 pm
by JasVick
It should trigger when the AWS warning activates and will then clear when the cancel button is activated. It should work automatically if you've got aws installed and it repsonds correctly to the appropriate magnets....
The Following should set AWS off to display it:
Call("*:SetControlValue", "AWSWarnCount", 0, 1)
Call("*:SetControlValue", "AWS", 0, 0)
To cancel it:
Call("*:SetControlValue", "AWSWarnCount", 0, 0)
Call("*:SetControlValue", "AWS", 0, 1)
Not sure if you would have to add:
Call("*:SetControlValue", "AWSClearCount", 0, 1)
To reset the system properly but the above two definatly activate and cancel as these are used (also with a clear count) during a self test....
If you didn't want a sound to play then leave the appropriate variable out in the sound file.
Re: Blueprint 'hud element' - forcing the black/yellow AWS icon
Posted: Tue Dec 16, 2014 8:37 pm
by chrisell
I know I can do it like that but I don't want any AWS components in the train as the AWS functions are hard-coded by the game - once you have AWS controls in the engine, you can't force them to be overridden.
Re: Blueprint 'hud element' - forcing the black/yellow AWS icon
Posted: Tue Dec 16, 2014 9:31 pm
by MaikG
Youn can't control the HUD icons by script or blueprint. If you were able to create your own HUDs (and i know that you can't do it ^^ ) then you have the abilities to point a control value to a specific named HUD icon. But that's all and not possible at now for little devs like us

Re: Blueprint 'hud element' - forcing the black/yellow AWS icon
Posted: Tue Dec 16, 2014 10:12 pm
by nschichan
chrisell wrote:I know I can do it like that but I don't want any AWS components in the train as the AWS functions are hard-coded by the game - once you have AWS controls in the engine, you can't force them to be overridden.
Hi Chris,
I think that it would be possible to set the AWSReset control value to 1 once the AWSWarnCount control transitions from 0 to 1 (be it due to the script or the core code setting it to 1), and setting to 0 otherwise.
If it was set by the core code, the AWS Hud zone would briefly show a warning but that shouldn't be that much of a problem though and the game will be tricked into thinking that the AWS was acknowledged.
If it was set by your script, then no harm done in pulsing the AWSReset control anyway.
If this doesn't work, I think that removing the EmergencyBrake control will also avoid the emergency brake application dues to the AWS.
Regards,
Re: Blueprint 'hud element' - forcing the black/yellow AWS icon
Posted: Tue Dec 16, 2014 10:39 pm
by karma99
I can confirm that as long as you don't have an EmergencyBrake control then the AWSReset and AWSWarnCount controls will activate but will not effect the train in any way. This is how the Bulleid Q1 has optional AWS.. if an AWS version is selected then the timer to reset followed by the brake activating are all controlled in script from watching the AWSWarnCount and AWSReset values.
Re: Blueprint 'hud element' - forcing the black/yellow AWS icon
Posted: Wed Dec 17, 2014 2:09 pm
by chrisell
Ugh. That's a lot of hassle for a HUD indicator - the Ebrake is already hard-wired into all my scripts so I'd have to undo all that to take it out and re-do a different way of emergency braking.
It would be too difficult for DTG to give us simply the ability to turn the damn indicator on and off. Or to - you know - provide developer docs that aren't 5 years out of date

Re: Blueprint 'hud element' - forcing the black/yellow AWS icon
Posted: Thu Dec 18, 2014 1:49 am
by MaikG
I'm using that indicator in all PZB equipped vR locos. No problems there. You need to implement the control values for AWS, but not any AWS functionality at all. You can't drive such vehicles on AWS equipped routes. But who want to drive e.g. a german PZB equiped loco on the west higland route or something. So no one will drive the GTW or such things on these routes. So no problems there to use that indicator with control values for different things. You just can't control the icon itself, becaus it is not just an icon. There is much more complexity under the hood of the HUD. DTG can create own HUDs with different icons. But only they can. You can ask them to build one for you and then you have control over all icons that are not hardcoded in the core of TS like AWS stuff.
Re: Blueprint 'hud element' - forcing the black/yellow AWS icon
Posted: Thu Dec 18, 2014 2:23 pm
by chrisell
MaikG wrote:I'm using that indicator in all PZB equipped vR locos. No problems there. You need to implement the control values for AWS, but not any AWS functionality at all. You can't drive such vehicles on AWS equipped routes. But who want to drive e.g. a german PZB equiped loco on the west higland route or something.
You'd be surprised....
I have people complaining that they can't pass TPWS grids on the UK routes using the Dutch GTW with ATB running. Even though I specifically point out in the manual that you can't do this- people still do.
I can live without the HUD icon - it was just a thought that I might be able to force it using the "HUD element" in the control blueprint.
Re: Blueprint 'hud element' - forcing the black/yellow AWS icon
Posted: Tue Jan 13, 2015 1:03 am
by chrisell
Ok - through process of experimentation I've discovered that you only need one control : AWSWarnCount. Once you have that, the yellow/black icon becomes available in the HUD. Force that value to 1 via the script and the icon lights up. Force it to zero and it goes out. No other AWS controls needed and it doesn't screw with the e-brake

Re: Blueprint 'hud element' - forcing the black/yellow AWS icon
Posted: Tue Jan 13, 2015 3:57 pm
by MaikG
The real problem with this icon is, that you can click it and it will disappear then without any function behind. So if a user click on it and guess he confirmed the alarm, it may be confusing. So you need the other controls to check (polling in update only, unfortunately) if the user clicked the icon or not.
Re: Blueprint 'hud element' - forcing the black/yellow AWS icon
Posted: Tue Jan 13, 2015 4:10 pm
by chrisell
MaikG wrote:The real problem with this icon is, that you can click it and it will disappear then without any function behind. So if a user click on it and guess he confirmed the alarm, it may be confusing. So you need the other controls to check (polling in update only, unfortunately) if the user clicked the icon or not.
MaikG: I believe if you don't have the main "AWS" and "AWSReset" controls, the "AWSWarnCount" hud control isn't clickable.
Also - if it was, you can just continually force it "on" via the script until whatever action you WANT the driver to take is actually taken.
Re: Blueprint 'hud element' - forcing the black/yellow AWS icon
Posted: Tue Jan 13, 2015 6:12 pm
by MaikG
The icon is always clickable. Try it. And the second part of your post, i can't believe it

In my scripts almost 20 percent of the code is for preventing the continuous fire on controllers, because this is a very bad behaviour of many TS scripts. I won't do this. Polling is more efficient than hammering values onto controllers that are not changing.