How to place a route and AI trains in a single OpenBVE package?
2 posters
Page 1 of 1
How to place a route and AI trains in a single OpenBVE package?
I have written in another thread, but thought I'd start a separate one for this issue. Here's the problem I am facing. Please bear with me, it's a bit lengthy.
I have upgraded my Királyliget route to include 5 AI trains, which hopefully add some more fun to playing. Currently I am not able to place the whole project in a single package: I need one package for the route itself and a second separate package for the AI trains (also includes the driveable train).
Now users download the route and install it, but some of them don't download the train package - even though I specifically write on my website that they must also download the trains.
Now, if OpenBVE cannot locate the AI trains it simply crashes and creates a crash log in the Settings folder, saying it could not locate the AI trains.
Then the users come to me to say that my route doesn't work and it crashes OpenBVE - which is what is happening.
Because of all this, I'd really like to include the AI trains in the route package. That would stop this problem completely. However, there is no package type in OpenBVE which would support this, you either have a route package, or a train, or an other type, but no combined route and train.
In another thread Chris said OpenBVE looks for the AI trains in both the Train folder and the Object folder. In my personal experience it could not find the AI trains in the object folder, doesn't matter if the AI trains are in the root of Object or in a subfolder. This is true for any recent OpenBVE version. Hence the need for two packages.
How can I solve this problem? How can I put my route and AI trains in a single package? Would it be possible for OpenBVE not to crash in such situations, but give a message and then go back to the homescreen? Or would it be possible to place the AI trains within the route package, say the Object folder?
I have upgraded my Királyliget route to include 5 AI trains, which hopefully add some more fun to playing. Currently I am not able to place the whole project in a single package: I need one package for the route itself and a second separate package for the AI trains (also includes the driveable train).
Now users download the route and install it, but some of them don't download the train package - even though I specifically write on my website that they must also download the trains.
Now, if OpenBVE cannot locate the AI trains it simply crashes and creates a crash log in the Settings folder, saying it could not locate the AI trains.
Then the users come to me to say that my route doesn't work and it crashes OpenBVE - which is what is happening.
Because of all this, I'd really like to include the AI trains in the route package. That would stop this problem completely. However, there is no package type in OpenBVE which would support this, you either have a route package, or a train, or an other type, but no combined route and train.
In another thread Chris said OpenBVE looks for the AI trains in both the Train folder and the Object folder. In my personal experience it could not find the AI trains in the object folder, doesn't matter if the AI trains are in the root of Object or in a subfolder. This is true for any recent OpenBVE version. Hence the need for two packages.
How can I solve this problem? How can I put my route and AI trains in a single package? Would it be possible for OpenBVE not to crash in such situations, but give a message and then go back to the homescreen? Or would it be possible to place the AI trains within the route package, say the Object folder?
Re: How to place a route and AI trains in a single OpenBVE package?
The 'correct' (well at least in package terms) solution would I suspect be to set the trains as a dependancy.
At the minute dependancies are 'soft' in that a package will still install when they're missing.
The probable solution I think is going to be to allow 'hard' dependancies where a package refuses to install without them present.
This of course doesn't stop them manually extracting the archive
At the minute dependancies are 'soft' in that a package will still install when they're missing.
The probable solution I think is going to be to allow 'hard' dependancies where a package refuses to install without them present.
This of course doesn't stop them manually extracting the archive
Re: How to place a route and AI trains in a single OpenBVE package?
I think instead of changing the system of dependencies just for this it could be easier to allow the AI trains to be placed inside the route, somewhere in the Object folder. Of course, within the route's folder. Is this possible? This would be the best option I think.
To give you an example, I would like to place my AI trains in the Railway/Object/Kiralyliget/AI_Trains folder. And then the AI_Trains folder would contain five train folders, with all the AI trains required by the route. This would eliminate the need for a separate train package completely, as they could be kept within the route package.
To give you an example, I would like to place my AI trains in the Railway/Object/Kiralyliget/AI_Trains folder. And then the AI_Trains folder would contain five train folders, with all the AI trains required by the route. This would eliminate the need for a separate train package completely, as they could be kept within the route package.
Re: How to place a route and AI trains in a single OpenBVE package?
I just found another argument that supports putting AI trains in the Object folder:
I have five AI trains in my current train package which install in the Train folder (using the package manager). The user arbitrarily selects one of these trains to drive along the route, goes to external view and sees that there is no locomotive, only cars.
I had to tell him that that particular train is only supposed to be an AI train and the locomotive is at the back of it because it has been designed as an oncoming train, moving "backwards" along the route.
I have five AI trains in my current train package which install in the Train folder (using the package manager). The user arbitrarily selects one of these trains to drive along the route, goes to external view and sees that there is no locomotive, only cars.
I had to tell him that that particular train is only supposed to be an AI train and the locomotive is at the back of it because it has been designed as an oncoming train, moving "backwards" along the route.
Re: How to place a route and AI trains in a single OpenBVE package?
Absolutely agreed on the issues you've got.
To be clear, the latest build fixes trains in the object folder, this appears to have been an oversight.
Unfortunately, the train related renovations are nowhere near complete at the minute & there are still a massive amount of existing internal code which means things just don't play as nicely as we want
Some simple additions by the look of it to make life easier:
To be clear, the latest build fixes trains in the object folder, this appears to have been an oversight.
Unfortunately, the train related renovations are nowhere near complete at the minute & there are still a massive amount of existing internal code which means things just don't play as nicely as we want
Some simple additions by the look of it to make life easier:
- Allow the consist to be reversed in a TFO (dead easy)
- Allow the reversing of a drivable consist from the main menu. (Probably be useful somewhere!)
- Add something that allows a folder containing a train.dat to be ignored as a train by the in-game menu browser. (easy, but potentially dangerous)
Re: How to place a route and AI trains in a single OpenBVE package?
Wonderful! I will upgrade my route to include the AI trains in the object folder once a new release is out. No need to hurry with it, I will keep explaining things to users until then.leezer3 wrote:To be clear, the latest build fixes trains in the object folder, this appears to have been an oversight.
Am I able to put AI trains in subdirectories of the Object folder?
One more thing: OpenBVE keeps giving a warning that TFOXML is not supported. It works, but this warning is still there (I have another thread about this but thought I'd drop it here too).
Notes on your additions:
- Ignoring train folders: no need for it if AI trains can be in Object folder.
- Allow the consist to be reversed in TFO: super useful.
Re: How to place a route and AI trains in a single OpenBVE package?
AI trains in subdirectories should work OK unless I've broken something I've not noticed.......
(For that matter, trains in subdirectories have always worked- Odakyfan used this with Chasanai)
The TFOXml message has been fixed (TLDR: The name was changed from the original proposition, but the error message wasn't), and we'll have reversal of consists working in a couple of days- I've got everything other than the bogies reversing nicely now, but they're slightly more complex.
(For that matter, trains in subdirectories have always worked- Odakyfan used this with Chasanai)
The TFOXml message has been fixed (TLDR: The name was changed from the original proposition, but the error message wasn't), and we'll have reversal of consists working in a couple of days- I've got everything other than the bogies reversing nicely now, but they're slightly more complex.
Re: How to place a route and AI trains in a single OpenBVE package?
OK, so I've implemented the following:
This lot will probably be in tomorrow's build when I've tested them a little more.
- If a train is intended for AI use only, the train.dat may be renamed train.ai which stops it showing up as drivable in the main menu.
- A new tag for TFOs:
- This should be placed below the train folder name, and reverses the consist if set to true. - A checkbox toggle in the advanced train properties (not remembered), which lets you reverse the train consist.
This lot will probably be in tomorrow's build when I've tested them a little more.
Re: How to place a route and AI trains in a single OpenBVE package?
Chris, those are great additions.
Tonight I tested the AI trains placed inside the Object folder. I put my five AI trains in Railway/Object/Kiralyliget/AI-Trains and linked them in the XML files from there. They worked properly, I saw no problems and got no error messages.
I also checked log.txt, there were no more TFO not supported format messages, so that's good too.
Tonight I tested the AI trains placed inside the Object folder. I put my five AI trains in Railway/Object/Kiralyliget/AI-Trains and linked them in the XML files from there. They worked properly, I saw no problems and got no error messages.
I also checked log.txt, there were no more TFO not supported format messages, so that's good too.
Similar topics
» Making an big OpenBVE Package wih many routes for Newbies?
» Királyliget route updated - includes several AI trains
» Route Viewer for Openbve
» OpenBVE Error Loading Trains
» Unable to load trains in OpenBVE v1.5.3.10
» Királyliget route updated - includes several AI trains
» Route Viewer for Openbve
» OpenBVE Error Loading Trains
» Unable to load trains in OpenBVE v1.5.3.10
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum
|
|