Loco running number

peterwhite

Steam Rules OK
I have a loco that changes it's running number each time the session is loaded.
Is there anything I can add to the config to save the number so that it keeps the same number every time I load the session.
I've tried searching the forums but have not come up with anything.
Any help would be much appreciated.

Peter
 
Some auto numbering has entries in the config where you can change the range of numbers used. You may be able to set it to just use one number from that but be aware that this will change it for all instances of that loco.

If you've got the name/KUID of the loco that may help.

Shane
 
Thanks Shane but I will be using that loco in several instances so that would not be much use.
I'm sure I read somewhere on the forum that you could add a line in the config that told the asset to save the number once generated but I am blowed if I can find it.

The asset is Class 26 green yellow WP <kuid:283805:26011> by tmz06003.
 
Thanks Shane but I will be using that loco in several instances so that would not be much use.
I'm sure I read somewhere on the forum that you could add a line in the config that told the asset to save the number once generated but I am blowed if I can find it.

The asset is Class 26 green yellow WP <kuid:283805:26011> by tmz06003.

Hi Peter.

I have just looked in the script source code for asset is Class 26 green yellow WP <kuid:283805:26011> by tmz06003 to see if I can help.

The script is programmed to assign a running number between 05300 et 05346 randomly at initialisation and to verify that no other locomotive in the route has the same number. If it finds one other loco with the same number, it will retry a new random number assignment until it succeeds finding one not already used.

There is nothing in the code to avoid this random assignment based on any previously stored value, so sorry but I don't think the script has been designed for saving/retrieving the generated number once assigned.

Take also care that if you have more than 47 locos occurrences of this asset in your session, the script will loop forever on the 48th occurrence ...

Sorry not having any solution to propose except to ask tmz06003 to update his script to include saving/retrieving the running number once it has been assigned.

Regards.
Pierre.
 
Thanks for the responses Brian and Pierre.
Looks like I am stuck with whatever it generates. But it's not the end of the world.
 
Back
Top