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

Forum for technical discussions regarding development. If you have a general suggestion, problem or comment, please use one of the other forums.

Moderator: OpenTTD Developers

User avatar
dev|ant
Traffic Manager
Traffic Manager
Posts: 140
Joined: 30 Nov 2005 11:26
Location: melbourne.au

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

Post 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
User avatar
dev|ant
Traffic Manager
Traffic Manager
Posts: 140
Joined: 30 Nov 2005 11:26
Location: melbourne.au

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

Post 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? :?
User avatar
Digitalfox
Chief Executive
Chief Executive
Posts: 708
Joined: 28 Oct 2004 04:42
Location: Catch the Fox if you can... Almost 20 years and counting!

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

Post 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 :)
User avatar
dev|ant
Traffic Manager
Traffic Manager
Posts: 140
Joined: 30 Nov 2005 11:26
Location: melbourne.au

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

Post 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. :(
User avatar
dev|ant
Traffic Manager
Traffic Manager
Posts: 140
Joined: 30 Nov 2005 11:26
Location: melbourne.au

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

Post by dev|ant »

Almost done. I think I'll add a filtering option, because that list is almost out of control. :lol:
Attachments
engines2.png
engines2.png (36.64 KiB) Viewed 1861 times
User avatar
Digitalfox
Chief Executive
Chief Executive
Posts: 708
Joined: 28 Oct 2004 04:42
Location: Catch the Fox if you can... Almost 20 years and counting!

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

Post by Digitalfox »

Nice to know you are having progress with the patch dev|ant :D
User avatar
Zephyris
Tycoon
Tycoon
Posts: 2890
Joined: 16 May 2007 16:59

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

Post by Zephyris »

Wow, nice work! Are the different grfs forced to load into different slots, or can they be made to coexist in one?
User avatar
athanasios
Tycoon
Tycoon
Posts: 3138
Joined: 23 Jun 2005 00:09
Contact:

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

Post by athanasios »

:] (Just to encourage you, since there is not much feedback to your posts lately.)
http://members.fortunecity.com/gamesart
"If no one is a fool I am also a fool." -The TTD maniac.


I prefer to be contacted through PMs. Thanks.
User avatar
dev|ant
Traffic Manager
Traffic Manager
Posts: 140
Joined: 30 Nov 2005 11:26
Location: melbourne.au

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

Post 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
User avatar
Toni Babelony
Tycoon
Tycoon
Posts: 1389
Joined: 07 Jul 2006 09:34
Skype: toni_babelony
Location: Sagamihara-shi, Japan
Contact:

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

Post 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!
Retired JapanSet developer and creator of TIAS.
DeXteRrBDN
Engineer
Engineer
Posts: 21
Joined: 02 Sep 2007 10:45

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

Post by DeXteRrBDN »

Imagine all the "new vehicle available" messages when using a bunch of new vehicles grf!! :shock: : )_________
nilsi
Transport Coordinator
Transport Coordinator
Posts: 268
Joined: 20 Nov 2002 16:20
Location: Dresden, Germany

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

Post 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 :)) :)) :))
richk67
Tycoon
Tycoon
Posts: 2363
Joined: 05 Jun 2003 16:21
Location: Up North
Contact:

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

Post 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.
OTTD NewGRF_ports. Add an airport design via newgrf.Superceded by Yexo's NewGrf Airports 2
Want to organise your trains? Try Routemarkers.
--- ==== --- === --- === ---
Firework Photography
User avatar
belugas
OpenTTD Developer
OpenTTD Developer
Posts: 1507
Joined: 05 Apr 2005 01:48
Location: Deep down the deepest blue
Contact:

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

Post 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
If you are not ready to work a bit for your ideas, it means they don't count much for you.
OpenTTD and Realism? Well... Here are a few thoughs on the matter.
He he he he
------------------------------------------------------------
Music from the Bloody Time Zones
richk67
Tycoon
Tycoon
Posts: 2363
Joined: 05 Jun 2003 16:21
Location: Up North
Contact:

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

Post 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.
OTTD NewGRF_ports. Add an airport design via newgrf.Superceded by Yexo's NewGrf Airports 2
Want to organise your trains? Try Routemarkers.
--- ==== --- === --- === ---
Firework Photography
nilsi
Transport Coordinator
Transport Coordinator
Posts: 268
Joined: 20 Nov 2002 16:20
Location: Dresden, Germany

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

Post 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.
User avatar
pavel1269
Route Supervisor
Route Supervisor
Posts: 473
Joined: 03 Dec 2006 13:22
Location: Czech Republic
Contact:

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

Post by pavel1269 »

wow :) i am really looking forward to see this patch bug freeor even in trunk :wink:
LordAzamath
Tycoon
Tycoon
Posts: 1656
Joined: 08 Jun 2007 08:00

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

Post 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
PS: And I stopped the propaganda to support Dave Worley since he got a nice new red hat now.[/color]
I know I have a BBCode error in my signature but I really cba to fix it.
User avatar
athanasios
Tycoon
Tycoon
Posts: 3138
Joined: 23 Jun 2005 00:09
Contact:

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

Post 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...
http://members.fortunecity.com/gamesart
"If no one is a fool I am also a fool." -The TTD maniac.


I prefer to be contacted through PMs. Thanks.
richk67
Tycoon
Tycoon
Posts: 2363
Joined: 05 Jun 2003 16:21
Location: Up North
Contact:

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

Post 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.
OTTD NewGRF_ports. Add an airport design via newgrf.Superceded by Yexo's NewGrf Airports 2
Want to organise your trains? Try Routemarkers.
--- ==== --- === --- === ---
Firework Photography
Post Reply

Return to “OpenTTD Development”

Who is online

Users browsing this forum: Amazon [Bot] and 6 guests