Set-Driver-Condition-Rule (update)

Thanks for the updates - I'm enjoying exploring what your new toys can do for my session development workflows and testing regimes.
(Certainly adds variety to the session's operating environment to relieve the boredom of same-ol, same-ol... :) when you're repeatedly viewing a particular scenario during testing following editing changes.)
Up to v8 at least - I haven't installed v9 yet - your rule generally works well with the Quickdrive rule added to the session - and in the Unified Driver/ Surveyor interface.
 
TY PC_Ace
The quickdrive (workaround) i meant was when working in Surveyor, then Select F2,
normally scripts wont init again, in v9 it does.


So far I've been concentrating on adding features and fine-tuning the interface
but all in English, think most Trainz users can atleast read that language.
If people want this in their Native language, i need for every word, you see in the screens, the proper word/phrase in that language
Dutch people get netherlands, english, french and german at school but last 2 very basic.
I can read/speak a little, italian, spanish and swedish also but not enough to make language versions.
let me know if someone wants to help
greetings GM
 
Will this guy ever stop with this rule? nope. why?


No response/reply on language versions, so not spending time on that.


Layer-screen:
-Expanded, it now shows max. 16 route layers and 2 session layer



View-details screen:
-Added Tilt, you can make every train tilt/roll a bit in curves
it's an on/off switch for the current selected train
(no, it won't kill the "excessive curve speed")


-Added Pitch, it's the wobble you see when driving
it's an on/off switch for the current selected train


-Added DoorSwitch, open/close all passenger doors for the entire train,
left and right separate, they are on/off switches
btw. there is no direction check, its based on the name in the config
makes it easy to test your passenger door animations.



Repeat: nothing gets saved, no train or session gets altered.
works with/beside, any rule or driver command you already use.


get beta v10 here (CM: remove old, install new)
https://www.mediafire.com/file/we45hyfohgdpn3t/Set_Driver_Conditions_Rule_TRS19_v10.cdp/file
enjoy GM
 
Ty John
Working on another HUD part, the Driver-Train-List, button (T)
it shows how many trains are in session, name of the driver(or consistname)
then the name of the first vehicle, often a loc
and the status D-driving S-stopped, also red and green colored

You see about 8 trains in the list but it has a little scrolbar that won't jump back sofar
not good enough for a beta update today
greetings GM
 
That's going to be great for busy commuter routes. My concern is all the static consists we have. Do they show as well, or do they need drivers to be active, which is a better. With boxcars and other freight cars all over, having a list of these would be very confusing.
 
Johns post made me think, why not build a filter you can change...
So i made a filter with these options:
-All trains, all trains and consist in your session(even ghost and derailed)
-Has Driver, shows only trains with a driver
-Driving, shows trains that drive
-Stopped, shows trains that stopped and have a driver
clicking the filter text moves to the next option and refreshes


DTL screen also counts all trains and drivers in session.
when you click on a driver name the camera focus moves to that driver.

Specially with big routes and many trains/drivers,
its much faster and easier to switch than the standard Driverlist
and ofc. no scary heads haha.


how to get there?, click the icon in driver to open SDCR, then the HUDscreen (Train icon), then the (T)


get beta v11 here (CM: remove old, install new)
https://www.mediafire.com/file/hm8nstyeosfwvem/Set_Driver_Conditions_Rule_TRS19_v11.cdp/file
enjoy testing and driving
greetings GM
 
Last edited:
G.M. Sounds great. Looking forward to testing this, 'must-have' utility!
It is cool to have such easy access to the rich set of features that Trainz provides in such a small, unobtrusive interface element.
Edit Update: Sadly, Version 11 does not work for me. Appears in the Driver session; you can rotate the dials, etc. but the command buttons don't work so nothing changes.
Anyone else experiencing this?
 
Last edited:
Nothing was changed to the settings screen (with the dials)
is there any msg, in the log? only tested here in 100240 sofar will try SP2
try go out of trains, then in again and try to find when it hangs, TY
btw after setting the dials, the (GO) button makes it change

edit: tested in SP2, and working here
 
Last edited:
Ok now after several restarts. Most dials/ buttons were simply inoperable in the first attempts to use this at the start of a couple of sessions - one with 8 drivers and the other with 32.
What I think happened was that the Rule was initially swamped by the sheer number of scripting messages that occur at such a busy session start.
Many are error messages associated with certain built-in wide-body locomotive cabs and locos missing attachments and endless 'WorldNativePlaySound' calls saying that it cannot find (lists all of the locomotives in the session except for the one in focus!).
After 4 restarts, the Rule finally began to strut its stuff - and worked well. Love the Driver List and their current motion status - and the ability to view each by clicking on their name.
Much less intrusive than the default Driver List dialog.
 
Thanks, GM. I'll see how it works. These are great additions given the size and complexity of some of my routes.
 
Here's a wee observation for G.M. relating to the new Driver List functionality which basically works very well. (Thank you!)
The list is tricked by ampersands [&] (and presumably other special characters) in the name of the locomotive or consist. Example C&O Kanawha K-4 Steam gets truncated to 'C'.
The & and all characters following are omitted.
Driver's names also wrap if they exceed a certain number of characters. Perhaps we can tolerate some truncation there?

Edit Update: Another observation. Unlike the default Driver List dialog, which updates the list dynamically as new drivers emanate from portals and others are removed/ deleted, there's a need to manually Refresh the UI in this new tool to poll the current Driver's List state. This applies to vehicles awakening from a 'Wait' state as well. They do not show as driving again until the dialog is refreshed.
Still - the advantages are: Transparent background allows you to see the onscreen action behind. The dialog is a fraction of the size of the built-in (opaque) one, especially when there are many AI drivers/ consists being tracked.
Disadvantage? Unable to see the in-focus Driver's current task or destination. If that could be woven into this tool, then you will have a killer app indeed!
 
Last edited:
Now that is real useful feedback PC_Ace TY
This rule started as a tool for Content Creators to see time and weather changes etc..
now expanded to many more functions that are harder to do/hidden in the trainz interface.
What i avoided so far, is to use Threads(looping parts of a script) those are heavy on the game.


Yesterday eve, after releasing the beta v11, already made the DTL update a bit automatic
FI when you couple/uncouple, then the number of trains change, so it needs to update the screen
think I will also try that when other important changes happen or a thread that only runs when the screen is open.


From the wiki (mini-browser): & - the "ampersand" character (' & '),
in the default trainz HTML it will act weird when in a string
which means i would have to write code to find "&" then replace it with "&"


Will look into the names and truncating, atm. have it set at:
11 characters for drivers, max.example is "consist 999" because of caps it sometimes will go to the next line
14 characters for the first vehicle/loco


Why some people made drivers like "animated subway driver" beats me. I would have called him/her "Anisub"
and a loco called "BR Class 60 Transrail phototextured" I would simply call "C60 Transrail"
even worse when people add their own initials or name before an assetname, but its their choice.


Will check how to get info what the train will do now/next and how to reach it in the interface.
also need to be able to add a driver maybe? or could just leave it to the native interface.
anyway its a forever W.I.P. lol, but it's fun and I learn a lot.
greetings GM
 
Update beta v12:
Layer screen:
-added a switch to set your Junctions Arrowicons to 50% or 100% size
I know the first thing we do is [Ctrl]-H when we drive but this is an alternative.
About a year ago already changed my Junction arrows here, to look a bit more modern
and removed the red blob underneath.



DTL screen:
-The status D or S were removed, the names of the drivers are already color coded
this gives me now 12 characters for a drivername and 17 for the first loc.
-Made a filter, if the & is on the 2nd or 3rd place in the loc-name,
it gets replaced by "&" and shows better (can expand on this if need be)
-DTL gets updated when you Couple, Decouple, Derail or complete a Schedule.
-Made a thread to update the DTL-screen, can be set to Manual, 10sec or 30sec.
a 1 click switch moves to the next option and refreshes.
-Time in session, gradient and odometer/distance also updates, set on the update time.
-Removed the Beeb sound when you select focus of another train.
-The tool tip, if you hover your mouse over a drivername, will show the next object on track
in the current direction, this can be a Junction, Signal, Trackmark, Industry or other Train.
it's a limited track search of 5km (3.1mi). if no driver it will show "no driver"

Think it's now a decent alternative for the Driverlist, on big routes with many drivers.
adding/deleting/moving drivers is still done in the native driver-list.


over 250 downloads, but please only get/use the latest version (CM: remove old, install new)
https://www.mediafire.com/file/tqj11lbvs0zbyge/Set_Driver_Conditions_Rule_TRS19_v12.cdp/file
enjoy driving/testing
greetings GM
 
G.M. - Excellent - that covers most of my needs - I always use the Set Helper Icons rule in sessions to set arrows to 50%, so now you've saved me loading that rule too!
Have not measured the impact of your Rule on performance yet (has not been noticeable so far) but I will run some tests following this addition of the 'look-ahead' functionality.
To a large extent, this rule also mostly replaces the need for running the superb klausm <kuid2:39730:61000:2> TrackView Rule.
Now if we can somehow find a way to safely switch junctions ahead of the current switching/ shunter driver... :wave:
 
TY PC_Ace
This was meant to use with Klaus his great trackview rule, there you can set switches


Already working on:
-Remove Driver, got it partly working, trainname then changes to "consist yyy"
-Add Driver, got it partly working, but only reuses drivers in session
need a way to get those we have installed in CM and not in session yet


Found a way to get the current driver command for each train, not what the destinaton is though
think this is somewhere in the "soup" the dbase of trainz
so the tooltip can show: Ahead:<next item on track> Command:<Current Drivercommand>
a bit vague on the screeny but its there



Removed the Tilt switch (does nothing I can see)
replace it with Cabinsway, so we can turn that off/on.
this only works if you have it On in general settings


not good enough for an update and not sure V13 is a good idea ;-)
greetings GM
 
Update beta v14 (yup 13 got skipped)


Viewdetails screen:
-[D] switches your train to Autopilot mode and just Drive (if not blocked),
the icon changes to and you can click it to Stop (1-hand kiss driving?)
normally Autopilot is, [Ctrl] rightclick the train and select Drive.
-[L] fully Loads the entire train with products in their configs (even locs/tenders)
- Unload/remove your trains cargo/passengers (will not affect loco or tender)
-Removed the "Pitch" switch, replaced it with (cabin) Sway, so we can turn that off/on.
this only works if you have it ON [V] in Trainz Settings, Interface settings.



DTL screen:
behind the driver count:
-[-] removes the driver and the trainname will become "consist yyy"
-[>] moves the driver to another train that has no driver, the consists show as blue
click one, the driver goes there and the camera focus goes to that train.
-[+] adds a driver to the current selected consist, if it has a loco (you may get double names)

-the Tooltip when hover over a drivername not only shows the next item Ahead,
but now also the current Drivercommand and next destination or value.
Works for most basic commands, like Drive to, Navigate to/via, Couple, Wait(in seconds)


Most wonderful rules/drivercommands already made, should work beside this, (if not I'll change mine)
so keep using them in your schedules, this is mainly meant to quick test
or as alternative UI on big routes with many trains.


Download beta v14 here: (CM: remove old, install new)
https://www.mediafire.com/file/px1ulecgyakxey4/Set_Driver_Conditions_Rule_TRS19_v14.cdp/file
enjoy testing and driving
greetings GM
 
G.M. -
the Tooltip when hover over a drivername not only shows the next item Ahead,
but now also the current Drivercommand and next destination or value.

Sensational! Thank you. Works well.
 
TY PC_Ace
Already working on the right upper side of our screen.
Here i try to make a minimap, so I don't have to switch to full Mapview when I'm lost
also trying to put seconds behind the time (requested often)

First i let it calculate the width of your screen, then it will put the minimap,
so it will work with any monitor/screenresolution
There is also a little button (<-), this moves the minimap 185 pixels to the left
for those that still use the mc.customhud. and (x) to close it again.
so maybe v15 next weekend :)
greetings GM
 
Update beta v15


Right side:
-borderless Minimap can be added, right upper corner of the screen
you can zoom, move and set options (turn most off)
easiest way to navigate is right click on the map and use scroll-wheel
-(x) closes.
-(<) moves it 185 pixels to the left
-(O) make it a bigger floater which you can move and make less width
specially nice with a 2 monitor side-by-side setup.
-a seconds counter (dependent on updatetime)
should be an option to have seconds in the native interface (dreamon GM)



DTL screen
-update times changed to 5 sec, 20 sec, manual, (no performance decay at 5 here)
-[+] Add driver now random takes from all installed drivers, less chance on double names


HUD screen, behind distance: ..m
-[Y] a junction switch, for the next junction of your current train
it will be greyed out when no junction close-by,
-[0] next signal state/switch if found for this train
only works on simple states/signals (may expand later)
Both work only, after the trainlist has been opened 1x, best used with updatetime 5sec
they can even be used in cabview mode.


See TRS21 in a whole new interface :)
get beta v15 here: (CM: remove old, install new)
https://www.mediafire.com/file/v2ui7zbkhmai3ap/Set_Driver_Conditions_Rule_TRS19_v15.cdp/file
Have a good Easter weekend all !
greetings GM
 
Back
Top