Session bulding: Un-portal is not working properly

PTrains

New member
Hello Trainz community, I was doing some test to learn the deep functionality of the Session editor in Surveyor for Trainz 2019.
I just wanted to create something easier but honestly I've been facing a lot of trouble with it. Basically, by using Portals made from Track Markers, I want to be able to spawn a Train at a specific time.
For example, my session would start at 10:00, and at 10:01 I want a Train to be spawned from a specific Track Marker.

So I've created a simple circle route, very large indeed to avoid any issues with space and stuff, placed 2 Track Markers (named Portal 01 and Portal 02) and then I've placed some rules on the Session Editor.
Leaving everything by default (such as Driver Setup, Driver Command, etc), I've just added 2 rules:

  1. Timecheck: adding time at 10:01 and without checking the box execution time is on the day after the start time;
  2. Un-Portal: adding the two Track Markers in there and putting Portal 02 track marker as Consume Train, so there would be only 1 origin point, which would be Portal 01.
I've tried everything with that Portal 01 rule applied in Un-Portal, like checking and unchecking Emit Immediately, put one minute as Time Between trains and Time Flactuation, changed order to Emit Train but nothing, as soon as the session start a Train will be spawned immediatelly, no matter if I've indented the Un-Portal rule under the Timecheck rule, it seems that this rule doesn't care so much of the others.

Have you had a similar issue with Un-Portal? There is another way to achieve what I want here?

PS: the Un-Portal KUID is the following one kuid2:117746:1024:10
 
There is an un-portal 2 I think. Anyway, I don't advise indenting the rule. Also, try the unportal on a long section of single track, not a loop. Make sure the trackmark is far enough out from the end of track, it builds backward from the mark if I recall correctly. Worth a try, but these rules are finickly.
 
I've tried the un-portal 2, KUID2:400260:100645:2.
With the same exact rule applied as the "Un-Portal" is not even able to spawn a single Train. I've also changed the route, making a single straight line, huge space (like a mile to give enough space for a single carriage train) but nothing. It seems that Un-Portal 2 is totally broken, at least for me.

As for Un-Portal 1, how can I make a Train spawning at a specific time of the simulation if I cannot indent Un-Portal under Timecheck? Is Trainz 2019 compatible with such feature?
 
i just loaded an old session with a single track and set unportal2 to emit an engine every 2 minutes. It works fine. I don't do serious AI, so I can't help with using schedules.

Be sure that consume trains is off, and use a large number for allowed trains.
 
I did everything already, and here you can find the screenshots of a simple Un-Portal 2 rule.

GC9vnJs
T01.png


T02.png


Still nothing, with this kind of Un-Portal no Trains are spawning, instead if I use the previous mentioned one is working, but I cannot control the time of spawn.
Can you give me the KUID of your Un-Portal 2 perhaps? Or is the same one I'm using?

Thanks anyway!
 
Same rule kuid as mine. I set time fluctuation to 0. You did not increase the max trains on route parameter. Don't know how large your route is. Not sure the effect of having a timer fluc larger than the emit interval. i also don't have emit immediately set, but I don't think that matters unless maybe with the fluc so high.
 
Hi

I notice that you have the timer fluctuation set to 5 minutes but you want a train to be emitted every 2 minutes. Obviously this can lead to issues as, if a train is waiting for 5 minutes to be issued, then two others should have been issued during the time that it is waiting. This is bound to cause problems.

The timing of a train every two minutes may also cause problems depending on the length of the train. It has to be emitted and moved away from the portal during that two minutes otherwise the next train will have problems. Even in a rush hour scenario the real railway would have tremendous difficulty dealing with a train every two minutes on the same track due to signalling constraints and platform occupancy problems.

The first thing that I would do is set the timer fluctuation to 0 and see if it works then. The reason that the train always emits immediately is because you've told it to do that - set "Emit immediately" to "No" and that will resolve that problem.

Un-portals have their own quirks which can cause problems if you aren't aware of them. The main difference between Un-portal and Un-portal 2 is that Un-portal will emit a moving train just like a normal portal while Un-portal 2 places a train down instantly at the trackmark but it is stationary so you need enough room to place the whole train down at one go. If there isn't room to do this then nothing will appear.

Set the maximum trains to 99, the maximum possible. This figure is the total number of trains that can be emitted from all of the Un-portals and Un-portal 2s on the route which leads to another quirk. The maximum number of trains from each portal will be 99 divided by the number of Un-portals. If you have 11 Un-portals for example then each portal will only emit a maximum of 9 trains each which can be a problem if one of the Un-portals is on a main line that needs 20 trains an hour emitting.

Timing the emission of trains from the portal is a bit more involved as the Quick Portal rule doesn't work with Un-portals, or didn't the last time I tried to use it with them. It's quite a while since I have used the Un-portals and the Quick Portal rule has had further iterations released since so this may have been resolved. Give it a try and see if anything has been changed.

Regards

Brian
 
Hello Brian,

So I've tried to re-do everything from scratch, moved the Track Markers slightly and now the rule Un-Portal 2 is working fine. Obviously if I don't enable the function Emit Immediately the Train will spawn at the specific time based on "Time Betweens Train".
This solution might works, but is not definetely what I want to achieve since this will simple repeate the Train Spawn based on that mentioned rule.

So let me clarify what I want to achieve so you can tell me if is something possible in Trainz or not:

1) Session will start at 10:00;
2) A Train will spawn at 10:01 from the Portal 01, and that's it;
3) I might create a third Portal, located somewhere else where another AI train will spawn at 10:10, and that's it.

So only 2 Trains must be present during the Session. Is this possible to achieve it?

I've tried again to use Timechecker rule, indenting the Un-Portal 2 underneath it, but obviously I must check Emit Immediately, but it seems again to bypass the Timecheck rule and a Train will spawn regardless of the Timechecker time given.
Here are my screenshots:

T03.png


T04.png
 
You might peruse the session I wrote for the Port Loleta RR. It is called Beer Can Roundup, or something like that. It uses the Basic Portal Short. It also uses my driver command that emits a single train from a portal for each invocation of the command.

If all you wish to do is have the 2 trains you mentioned above, why not just put then on a spur to begin with with a wait and drive commands.
 
Thanks Pitkin, I'll try as I must download 400MB of data for your Route and Session itself, is gonna take forever to download it as the speed is 4KB/s (I don't have the premium Trainz account), so I will wait and see which kind of results you have achieved.

In the meantime if anybody else have some suggestion on my request, please feel free to reply here!
 
Hi again

I'm not sure that Un-portal 2 will work as an indented rule. If I get a bit of time I'll have a play to see if it will work. I wrote a session for the built in ECML route in TS12 which imitated an hours train movements in and out of the station based on the working timetable for Kings Cross and is on the DLS. Unfortunately it doesn't work in anything later than TS12 as the route was expanded in Tane and again in TRS19 using different kuids.

This session used a method of generating trains when required using Un-portals and the CPC Emit Train rule. When a controlling train hit a trigger it caused a train to be emitted from one of the Un-portals. This is quite complicated to set up though and is probably overkill for what you are wanting to do.

I wasn't aware of pitkin's driver command for causing trains to be emitted from a portal so I'll have a look for it and download it as it sounds as though it could be useful.

Regards

Brian
 
CPCInstantEmit_TRS19
Type:Driver Command
Downloaded: 774
File Size:20.52 kb
File Type:.cdp
Created by:pitkin
Date:19th October 2020
Version:TRS19
KUID2:<KUID2:121843:100603:2>

FTP Location: (for FTP users)
/Restricted/trainz/TRAINZ2009/drivercommand/kuid2_121843_100603_2.cdp


Description:
Immediately send a message to a CPC port that is configured for triggers to emit a train
 
So basically there is nothing that can be done on "time" side instead to use Triggers events and such? Like if somebody wants to replicate/simulate what is going on in a reality, with Trains departing/arriving at a specific time of the day, this is not achievable at all in Trainz? Pretty strange for a game about Trains with the Simulator adjective. But I hope I could be wrong here as this would be a great missing feature.
 
I have no idea if this works in later versions of trainz:

Wait Until II
Type:Driver Command
Downloaded: 76831
File Size:35.15 kb
File Type:.cdp
Created by:Dap
Date:26th February 2011
Version:TS2009
KUID:<KUID:32711:100025>

FTP Location: (for FTP users)
/Restricted/trainz/TRAINZ2009/drivercommand/kuid_32711_100025.cdp


Description:
A command to make the driver schedule wait until the specified time. If the driver is running up to 4 hours late this command will terminate immediately. If the wait until time is more than 4 hours behind the game time, the command will wait until tomorrow. The game time rate must be set to x1 for the command to work correctly
 
Hi

"Wait Until II" works for me in later versions of trainz and I often use it. Thanks for the info regarding your driver command. I've now found it and will have a look at how it could possibly be used for creating timetables. I don't know how I missed it before as I normally download all new rules and driver commands when they appear on the DLS in case they could be useful. As I only create AI only sessions I'm always on the look out for anything new in this area.

Regards

Brian
 
For a quick and dirty dispatching system, I would do as follows:

Sprinkle trains here and there. Some in CPC controlled portals, some on active track.

Park an engine somewhere with a driver.

Driver schedule for this driver consists of series of Wait Until, start a portal train with CPCInstantEmit, and start on track trains with the S-Variable rule and accommapying commands.
 
That's great, if you can share anything in terms on how to build up a Timetable/Scheduled sessions would be awesome, as a lot of players (me included) are interested to "simulate" the real trains world instead to just run freely a train on an "empty" route.
I will try the Wait Until II to see how it works, and I'll let you know if is useful for me or for any other purpose.

I really appreciate your help guys, keep me/us updated please :)
 
Hello again, so I've tried those commands and, even tho they are great, but they are more suitable for a Train already spawned/present on the route, not related to make a Train spawn instead. So those are still not suitable for my purpose as I want to make a Train appears at a specific time of the session instead make a Train waiting to start moving.
 
Hello again, so I've tried those commands and, even tho they are great, but they are more suitable for a Train already spawned/present on the route, not related to make a Train spawn instead. So those are still not suitable for my purpose as I want to make a Train appears at a specific time of the session instead make a Train waiting to start moving.

use one of the wait commands followed by the CPCInstantEmit to a portal.

Refer again to my post #16
 
Last edited:
Back
Top