Unsynchronizing identical moving items?

manjoe

Still Learning
Howdy Folks...........Is there a way to un-synchronize identical moving assets? For example, kuid 59977:27000 is an Oil Pump Jack. Obviously I would want several, and if I place them during a single session in Surveyor they DONT move in sync. But after closing Surveyor and then reloading it, the oil pumps move up and down harmoneously in perfect rhythm. Not exactly real world.:confused: :'(

Is there anything that can be done, such as in the config file, to allow identical assets that move, to move "out of sync" ? Maybe there exists some sort of "time delay mechanism" or a "wait parameter" prior to the movement of the item. I am thinking along the lines of..... item#1 moves, but item#2 waits 1 second before moving, even though they are loaded at the same time. I know nothing about coding, but if there is a parmeter that I could throw into the config file, I am willing to give it a try.

I searched the Forum, but found nothing. TRS2004 at 2365. Thanks a lot for any assistance. Have a great day.:wave:
 
The way I resolve that problem is to ahave a few copies of the same asset, each with a different KUID, and each with a slightly different animation-loop-speed
 
I think Pauls suggestion is probably the only way out but it means cloning the asset and assigning your own KUIDs, this will be a great problem if you intend to upload to the DLS.

I have noticed that scenery items do not all appear at the same instant. They seem to appear in KUID List order. The animation starts when the asset appears so you could try this. Add as many cloned pumps as you need. Then, at your own risk (make a backup copy), doctor the config.txt kuid list, RE-positioning your cloned pumps evenly through the list and correcting the line number. Do not add assets this way, just reposition. No guarantees and you still have the problem if you upload. You must store your backup config.txt out of the ...\world\ folder so Trainz does not see duplicate map KUIDs

When we hear you scream, we will know it did not work. That's what backups are for. If it does work they will all stay out of synch but pumping at the same rate. That will make your field superintendent happy.

Cheers

Narrowgauge
 
The way I resolve that problem is to ahave a few copies of the same asset, each with a different KUID, and each with a slightly different animation-loop-speed

Thanks Barn700. I had given the assignment of different kuid a thought, but the idea of an "animation loop speed" is something which I am not aware. I will definitely chase that down. Again, thanks a lot.:wave:
 
I think Pauls suggestion is probably the only way out but it means cloning the asset and assigning your own KUIDs, this will be a great problem if you intend to upload to the DLS.

I have noticed that scenery items do not all appear at the same instant. They seem to appear in KUID List order. The animation starts when the asset appears so you could try this. Add as many cloned pumps as you need. Then, at your own risk (make a backup copy), doctor the config.txt kuid list, RE-positioning your cloned pumps evenly through the list and correcting the line number. Do not add assets this way, just reposition. No guarantees and you still have the problem if you upload. You must store your backup config.txt out of the ...\world\ folder so Trainz does not see duplicate map KUIDs

When we hear you scream, we will know it did not work. That's what backups are for. If it does work they will all stay out of synch but pumping at the same rate. That will make your field superintendent happy.

Cheers

Narrowgauge

Thanks Narrowgauge. I never considered how the kuids are loaded, or in what order. And I definately wont be uploading anything to the DLS. But I can easily backup the kuid. The only other thought I had was to rotate the pumps ever so slightly so none are parallel to each other, and also raise/lower them a foot or two from each other. I live with them pumping at the same rate. Thank you for the ideas.:wave:
 
You can also do it through scripting. Since KenKohl's "Oil Pump Jack" (kuid:59977:27000) isn't currently scripted as such, this means editing your local copy so, like Narrowguage pointed out, if you intend to eventually upload your route to the DLS, people using your route would not have your local version of the oil pump.

I sat down and wrote such a script tonight, since I thought it might be fun. (I'm weird like that :p) If you want to try it out, do the following:

1) Open the Pump Jack for editing. If you're using TRS2006, start the CMP, search for the Oil Pump Jack, right click and choose "Edit"/"Edit in Explorer". If you're using TRS2004, just find the Oil Pump Jack's folder in your World/Dispatcher/Downloads/ directory.

2) Copy the following two files into the Pump Jack's folder (the config file will replace the existing one):
* config.txt
* pumpjack.gs

3) Commit the asset if you're using TRS2006 and the CMP.

4) Start up Trainz and your oil pumps should be somewhat out of synch with each other.

If you're curious, the script sets each pump's animation speed to be a random number from 0.9 to 1.1 (where 1.0 is the normal speed). So they will be animated at slightly different speeds.

I was hoping to be able to get it to work with all the pumps running at the same speed, but starting on a random frame of the animation. I was even able to get that sort of working. When you load a map (in either Surveyor or Driver mode), an initialization method is called on each object on the map. I specialized that method so that it would start each pump on a random frame of its animation. The problem is that objects not in view are not actually animated, and when an object does come into view, the animation starts back at frame #0, regardless of what my script did during initialization. I couldn't find any events that trigger whenever an object comes into view, so I had to give up on the idea of setting each pump to a random frame in the animation. Making them run at slightly different speeds was a compromise, but since the speeds are only slightly different, it wasn't a horrible compromise (in my opinion at least :o).

Give it a try and see what you think! And if you like it, feel free to talk Ken Kohl into releasing a new version using the script. I don't mind at all if it gets used.

I'm glad you started this conversation. I intended eventually to use that same oil pump model on one of my routes and the fact that they were all exactly in synch also bothered me. They look much better now. Thanks for spawning the ideas!

- Madeline
 
Last edited:
Thanks to BARN700 and to NARROWGAUGE, it works !!!!!

1 - I created 2 kuids using my Auran assigned userid.

2 - I copied kuid 59977:27000 to each one.

3 - I then edited my kuid configs with the new kuid numbers.

4 - I gave them names of OIL PUMP JACK1, and OIL PUMP JACK2.

5 - I then changed their respective ANIMATION LOOP SPEEDs to 2 and 3.

6 - I then deleted the dispatcher chump files...........WORKS FINE.

The "3" speed on the animation is faster, so I will tweak it a bit, but all in all, it is great seeing the 3 pumps moving "out of sync".:udrool: :udrool: :udrool:


Now I am looking at MADDY25's added suggestions. Thanks MADDY25, and thanks again to BARN700 and to NARROWGAUGE:wave: .
 
I just tried this on the EXCAVATOR CAT 365, kuid2:129654:25100:2. The Animation Loop Speed is ".20", so I added 2 additional excavators with ".15" and ".25". Works like a charm !!!! Nice to see the 3 side by side, but not in sync !!!! This is fabulous. My wholehearted thanks to you all. Have a great day !:udrool: :wave:
 
Hey you guys, anything to help, glad one of my suggestions has proven useful !!!

As a favour, I need you to make thousands of those oil pump thingies, the price of oil from overseas is crazy LOL
 
Last edited:
Hey you guys, anything to help, glad one of my suggestions has proven useful !!!

As a favour, I need you to make thousands of those oil pump thingies, the price of oil from overseas is crazy LOL


Yes Barn700, it appears that the Animation Loop Speed was the key factor. I will be applying this technique to a few other vehicles.

CAT - kuid 71704:200026..........moving some logs
HANDLER CAT - kuid 129654:29100
DRAGLINE BIG MUSKIE - kuid2:129654:21100:2 ( I always wanted to have 2 of these:hehe: . Not prototypical, but I can dream cant I?:udrool: )

Now if I can just change the color of the tractor trailer in the NEW MACK kuid 71704:200014, I can have a very busy truck terminal !!!!!:udrool: Add to that a few gantry cranes, or the CONTAINER FORKLIFT CRANE kuid 60238:26164. Gee I can have a very lively port.
 
Last edited:
Hi Maddy

Would it possible to use that random number idea with loads at industries - so that one day an industry would need say 3 wagon loads and the next 4 or that with the consume rate so that one day it would us 3 loads worth and the next only 2 - just examples...
 
Hi Maddy

Would it possible to use that random number idea with loads at industries - so that one day an industry would need say 3 wagon loads and the next 4 or that with the consume rate so that one day it would us 3 loads worth and the next only 2 - just examples...

I really dont have the expertise to know if that is possible, but it sure works with the moving cranes...:wave:
 
Back
Top