Page 3 of 4

Re: Increase the amount of veh. IDs? (Use mult. vehicle sets)

Posted: 18 Nov 2007 10:11
by dev|ant
Thanks for lending your thoughts Maedhros.

Basically the biggest factor that led to me calling it 'hackish' is the way the higher engine IDs are handled - they're stacked on top of the existing 256 engines in slots 256-511, 512-767, 768-1023, etc. This can lead to situations where some code expects the regular 8 bit values, and some can deal with the larger values. (Note that this is the way Magic Buzz also went about it, as it makes the necessary changes relatively easy.)

I did try and fix this by creating a SlotID type and passing it along any time an EngineID is passed, but this got very out of hand very quickly. It would almost be impossible to implement in this fashion.

So maybe I can clean up the code some what and achieve an acceptable compromise. It's not ready for testing yet anyway because there are still some bugs, so I'll just keep working and post it up when it's ready for public scrutiny. :D

Re: Increase the amount of veh. IDs? (Use mult. vehicle sets)

Posted: 21 Nov 2007 02:44
by dev|ant
Most bugs are gone and the GUI is done. Can anyone suggest an acceptable way of creating separate vehicle base costs for each slot? I've come up with 2 ideas but don't particularly like either of them:

1. Make the whole _price array 2D, though most of it will be redundant.
2. Split out the vehicle costs and make them 2D, but that's getting a bit ugly. Edit: actually this is growing on me if I can find a nice way to do it.

Any ideas? :?

Re: Increase the amount of veh. IDs? (Use mult. vehicle sets)

Posted: 23 Nov 2007 00:34
by Digitalfox
dev|ant, i'm not a coder, but i appreciate your attempt to raise the amount of veh. IDs, so keep the good work so you can show a patch for us players to try :)

Re: Increase the amount of veh. IDs? (Use mult. vehicle sets)

Posted: 25 Nov 2007 11:37
by dev|ant
Thanks mate, I appreciate the support. :)

I feel like I'm just chasing bugs at the moment, work is only progressing slowly. :(

Re: Increase the amount of veh. IDs? (Use mult. vehicle sets)

Posted: 02 Dec 2007 22:40
by dev|ant
Almost done. I think I'll add a filtering option, because that list is almost out of control. :lol:

Re: Increase the amount of veh. IDs? (Use mult. vehicle sets)

Posted: 02 Dec 2007 23:33
by Digitalfox
Nice to know you are having progress with the patch dev|ant :D

Re: Increase the amount of veh. IDs? (Use mult. vehicle sets)

Posted: 03 Dec 2007 00:09
by Zephyris
Wow, nice work! Are the different grfs forced to load into different slots, or can they be made to coexist in one?

Re: Increase the amount of veh. IDs? (Use mult. vehicle sets)

Posted: 03 Dec 2007 00:20
by athanasios
:] (Just to encourage you, since there is not much feedback to your posts lately.)

Re: Increase the amount of veh. IDs? (Use mult. vehicle sets)

Posted: 03 Dec 2007 01:56
by dev|ant
Digitalfox: Yes I'm actually making progress again. I spent a good week trying to hunt down a single bug. :(

Zephyris: You can put the GRFs into any slot. The original vehicles in slot 0 are always active, while vehicles in other slots are only active once a NewGRF modifies them.

athanasios: Thanks! :D

Re: Increase the amount of veh. IDs? (Use mult. vehicle sets)

Posted: 03 Dec 2007 07:47
by Toni Babelony
Dear my! This is truly going to be completely awesome! Now I'll be able to combine DB Set XL and the CSD set without having the chance of OTTD crashing! Maybe even add the NG part of ther Serb set to it... *starts drooling*

Keep up the good work!

Re: Increase the amount of veh. IDs? (Use mult. vehicle sets)

Posted: 03 Dec 2007 10:16
by DeXteRrBDN
Imagine all the "new vehicle available" messages when using a bunch of new vehicles grf!! :shock: : )_________

Re: Increase the amount of veh. IDs? (Use mult. vehicle sets)

Posted: 03 Dec 2007 11:06
by nilsi
The best single feature in the whole OTTD :shock:
I already love it.
Now I can finally combine Serbian, Czech and DBset and also make an additional DRset with only a few additions :] :] :]

I love you all :)) :)) :))

Re: Increase the amount of veh. IDs? (Use mult. vehicle sets)

Posted: 03 Dec 2007 14:01
by richk67
dev|ant - sounds like fantastic progress on this.

Does it retain the vehicle type limits within the 256 block? ie. trains ~110, a/c ~80, ships ~10, road ~50 ish, or can a newgrf set now basically ignore that limit and create, say, 200 road vehicles in one set?

Would be fantastic to be able to create a UKRS version with all those "missing" classes - 50s, 52s, 45s, 56s, etc, and still retain the maglev and monorail systems.

Re: Increase the amount of veh. IDs? (Use mult. vehicle sets)

Posted: 03 Dec 2007 17:19
by belugas
nilsi wrote:The best single feature in the whole OTTD :shock:
I do not want to be rude, but aren't we a little bit over reacting?
Although I admit it is indeed cool, I somehow can think of many more features that did changed more radically the game play of OTTD...
But... you are entitled to your opinion ;) And I respect it

Re: Increase the amount of veh. IDs? (Use mult. vehicle sets)

Posted: 03 Dec 2007 17:57
by richk67
TerraGenesis & NewIndustries support for example.... although personally, if this works OK, it will go straight into my top 3 fave features. I just need to get the willpower & time together to create the all-climates-at-once patch that is the perfect parallel for this feature.

Re: Increase the amount of veh. IDs? (Use mult. vehicle sets)

Posted: 03 Dec 2007 20:27
by nilsi
@belugas: No :D
It is a question of personal taste of course, but using the serbian narrow gauge set with the dbset will probably switch me to OTTD after long years with the patch. I do not need more industries or better landscape but this one just plain rules. :shock:

PS: Changing gameplay is not exactly what I want.

Re: Increase the amount of veh. IDs? (Use mult. vehicle sets)

Posted: 03 Dec 2007 22:00
by pavel1269
wow :) i am really looking forward to see this patch bug freeor even in trunk :wink:

Re: Increase the amount of veh. IDs? (Use mult. vehicle sets)

Posted: 03 Dec 2007 22:04
by LordAzamath
nilsi wrote:The best single feature in the whole OTTD :shock:
heh..Even not newindustries support...I think the best is NewGRF support and pre-signals. Although others are closely behind..

Lord

Re: Increase the amount of veh. IDs? (Use mult. vehicle sets)

Posted: 03 Dec 2007 23:38
by athanasios
Let us not start comparing new features. All coders have worked hard and deserve our awe.
Regarding this one now, came to my mind the endless discussion, under TTDPatch, for vehicle slots...

Re: Increase the amount of veh. IDs? (Use mult. vehicle sets)

Posted: 04 Dec 2007 01:14
by richk67
Yeah, I thought it funny that TTDP can spend so much breath on arguing over how many buses to allow in a road vehicles set... well, duh! Just allow as many sets as you want.