Change Next KUID Increment

Christopher824

CDETrainz.com
I know it has been discussed before, but I can't find the thread.

How do you set the next KUID increment. I'm am using TRS22 and the next increment is a very low number. In TRS19 I think I'm almost at 4000 and in TRS22 it starts at 0001 etc. I want TRS22 to start at 4000 so it won't conflict with my TRS19 assets
 
I know it has been discussed before, but I can't find the thread.

How do you set the next KUID increment. I'm am using TRS22 and the next increment is a very low number. In TRS19 I think I'm almost at 4000 and in TRS22 it starts at 0001 etc. I want TRS22 to start at 4000 so it won't conflict with my TRS19 assets
You can use TrainzUtil to do that:

TrainzUtil setnextcontentid <int> - Provides a 'next content ID' hint for the KUID generator.

Justin Cornell created a batch file to set a KUID range. Copy and paste this into a .cmd file and run in a command prompt. You need to open a command prompt first prior to executing the batch to be able to interact with the parameters.


echo off
cls
ECHO.
ECHO ...............................................
ECHO PRESS 1, 2,3, OR 4 to select your task, or 5 to EXIT.
ECHO ...............................................
ECHO.
ECHO Set for Loco 10000 1
ECHO Set for Rolling Stock 20000 2
ECHO Set for Interiors 30000 3
ECHO Set to Default 800000 4
ECHO EXIT 5
ECHO.
SET /P M=Type 1, 2, 3, 4, or 5 then press ENTER:
IF %M%==1 GOTO LOCO
IF %M%==2 GOTO STOCK
IF %M%==3 GOTO INTERIORS
IF %M%==4 GOTO DEFAULT
IF %M%==5 GOTO EOF

:LOCO
trainzutil setnextcontentid 10000
GOTO EOF
:STOCK
trainzutil setnextcontentid 20000
GOTO EOF
:INTERIORS
trainzutil setnextcontentid 30000
GOTO EOF
:DEFAULT
trainzutil setnextcontentid 800000
GOTO EOF
:EOF


Mod 2:
GOTO EOF
:DEFAULT
REM %TRSpath%\trainzutil setnextcontentid 800000
GOTO EOF
:EOF
Set TRSpath=
set M=
%TRSpath%\trainzutil setnextcontentid 2000000

Mod 3:

>NUL %TRSpath%\trainzutil setnextcontentid 100000
FOR /F "delims=: tokens=1-4" %%i in ('%TRSpath%\trainzutil generateKUID') do (
if "%%i"=="<KUID2" set LZKUID="%%i:%%j:%%k:%%l"
)
 
You can use TrainzUtil to do that:

TrainzUtil setnextcontentid <int> - Provides a 'next content ID' hint for the KUID generator.

Thank you, worked perfect with TRS22. Here are the screenshots of the steps needed to do it

setnextcontentid_1.png


setnextcontentid_2.png


setnextcontentid_3.png
 
Back
Top