Page 1 of 1
AI movement dictated by player events?
Posted: Mon Apr 14, 2014 8:13 am
by Stanlow
Hey there.
I'm having a problem with one of my scenarios in progress. Basically I have an AI shunter in an unsignalled, manual points dock system that'd I'd like to have set off before the player. Currently, the AI is told to set off at 12:55. The player hits a waypoint before it gets to the shunter which displays a message saying to be aware. The player then has to reverse back into a siding to drop off some goods, and while this is happening, the shunter sets off ahead of them and joins the main track that goes over to the other side of the dock. If the player keeps to speed limits and does the stock pickups and drop offs in reasonable amounts of time, then the shunter generally tends to set off just after the player hits the aforementioned waypoint, which is what I want. However if the player speeds, then they can be ahead of the shunter on the line, which in turn screws up all of the points set ready for the AI as the player takes a different route to do their activities.
The point of my query is this: Is is possible to trigger the shunter setting off to the event of the player passing the waypoint? Or will it not be possible as the dispatcher is AI based?
If the answer to the above is no, then is it possible to set a stop instruction to run up to a certain time, or is it only the length of time that the stop instruction is active that can be varied?
Thanks in advance.
Re: AI movement dictated by player events?
Posted: Mon Apr 14, 2014 8:27 am
by Rockdoc2174
As I understand it, all AI trains are governed by a combination of start time and the percentage of the line speed allowed for it. If the player running early screws up an AI task then I would add an AI train at a suitable point that will run ahead of the player and keep the player's speed under control through the signals.
Keith
Re: AI movement dictated by player events?
Posted: Mon Apr 14, 2014 9:50 am
by Stanlow
Cheers for your reply Keith, much appreciated.
I think it may get a bit messy with three locos in the same area, plus it's only a small dock system. I may just resort to a Stop At instruction to the player for the second time they approach the waypoint, until after the shunters departure time. I'll increase the effort percentage for the 08 as well so the player doesn't have to wait too long before being able to move off.
As an aside, I have Stop At instructions earlier on in the scenario that I've set to 20 seconds. However, once that 20 seconds has counted down (the red marker has finished moving), it'll take ages before the game 'finishes' the Stop At instruction. Does anyone know how to fix this?
Re: AI movement dictated by player events?
Posted: Mon Apr 14, 2014 10:06 am
by AndiS
Your situation is the prime case for using Trainz over Railworks.
I remember loads of such posts, back when everyone wanted to convince the world of his favourite simulator.
And - in fairness to RW - the implementation in Trainz would resemble fully signalling the yard in complexity.
RW hits the following limitations here:
- You always need link 0 a stopping signal between player and AI. You can clone a shunting signal at set Stopping to eTrue in its .bin file. Or you can sink normal main signals underground. Without such precautions, the AI will freeze dead in its track and crawl at 1 mph till the end of the scenario.
- All AI movements are determined during scenario design. If the devised course of action does not happen, AI will freeze as described above. It may take short delays gracefully, but no one knows the limits of "short".
- Triggers can show message boxes or fireworks, but they cannot influence anything. Certainly not AI, no force in the universe can do that.
- I think that you can timetable stop-at instructions (by clicking on the clock icon), but that only means that you are late if you arrive there after the scheduled time. It does not mean that the stopping order goes away after that time. You may, however, lead the dispatcher to believe that the player will actually stay there until the defined departure time. This may cause him to route the AI shunter across your part if time is considered sufficient. But I would not assume that to work without a (stopping) signal between the waiting player train and the first switch of the junction where the collision could occur.
All frustrations with the inflexible AI aside, it must be acknowledged that the dispatcher designs schedules based on proper block working principles. Not more, not less. Without a stop signal between two trains, there is no means of keeping them from crashing. Drive-on-sight may well be found in the prototype, but it is not implemented at all in this game. Block working is, and block working is more common, easier to implement and safer for the novice user.
Re: AI movement dictated by player events?
Posted: Mon Apr 14, 2014 10:37 am
by Rockdoc2174
You're right, Andi, because there's no equivalent to track circuits in the game. The system assesses the position of every item at the very beginning and then assumes they will move in accordance with the associated times and routes. If anything doesn't work as programmed the game continues regardless, usually producing AI collisions.
Keith
Re: AI movement dictated by player events?
Posted: Mon Apr 14, 2014 11:01 am
by Stanlow
Yeah, it's not my route so I doubt I can place signals on it. The entire dock system is unsignalled. I think I'll just have to resort to Stop At instructions for the player and hope they stick to them!
Re: AI movement dictated by player events?
Posted: Mon Apr 14, 2014 11:56 am
by scefhwil
Just a thought, but can't you use the lua scenario script to disable the player controls? So couldn't you trigger this to happen on a stopping event and only release the controls once a certain time has been reached? Not particularly realistic I know, but this is only RW after all.....