New Rail Types

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

Post Reply
User avatar
PikkaBird
Graphics Moderator
Graphics Moderator
Posts: 5631
Joined: 13 Sep 2004 13:21
Location: The Moon

New Rail Types

Post by PikkaBird »

Some thoughts. Some of the properties seem a little odd.

"New engines (0D)". Is this a text, or something else?

"Compatible railtype list (0E)". It seems to me that the inverse property (trains of railtypes can run on this track) would be useful too for multi-set compatibility. "Powered railtype list (0F)" likewise.

What are the labels for the default rail types? What is the ID of electrified rails, since vehicle compatibility for electrified rails is currently determined by vehicle property 19, not property 05?
michael blunck
Tycoon
Tycoon
Posts: 5954
Joined: 27 Apr 2005 07:09
Contact:

Re: New Rail Types

Post by michael blunck »

Apart from the fact that this is not a TTDPatch feature, I don´t see if it´s already working in OTTD, or how it integrates into the existing framework, like Pikka pointed out (props 05/19).


@planetmaker
Ingo, could you pleae read the TTDPatch Wiki local style guide to make sure that your work fits in and is useful? And please label it as "only available in OTTD since r..." and add the missing text.

On another note, we have a "preview" function on the Wiki. It makes no sense to change things randomly and change it back by the next version because it doesn´t do what you wanted to achieve in the first place.

regards
Michael
Image
peter1138
OpenTTD Developer
OpenTTD Developer
Posts: 1795
Joined: 30 Mar 2005 09:43

Re: New Rail Types

Post by peter1138 »

See http://wiki.ttdpatch.net/tiki-index.php ... n_table_12_ for interaction with train properties 05 and 19.

Edit: Although that's not entirely helpful... I'll update that.
Edit: Documented in http://wiki.ttdpatch.net/tiki-index.php ... ion0Trains. Seems the existing property 05 and 19 electric rail interaction wasn't documented there anyway...
He's like, some kind of OpenTTD developer.
maquinista
Tycoon
Tycoon
Posts: 1829
Joined: 10 Jul 2006 00:43
Location: Spain

Re: New Rail Types

Post by maquinista »

This feature will be awesome. It wou

I have two questions:

It would be possible to have the same locomotive in two different rail types? For example, there are crocodile locomotives for standard gauge and narrow gauge. This locomotive shouldn't be allowed to change the gauge of rails.
Other example are modern variable axle gauge trains that should be allowed to travel between two axle gauges.

How will be handled the road crossings?
Sorry if my english is too poor, I want learn it, but it isn't too easy.[/list][/size]
michael blunck
Tycoon
Tycoon
Posts: 5954
Joined: 27 Apr 2005 07:09
Contact:

Re: New Rail Types

Post by michael blunck »

petern wrote: [...] Edit: Documented in http://wiki.ttdpatch.net/tiki-index.php ... ion0Trains. Seems the existing property 05 and 19 electric rail interaction wasn't documented there anyway...
Well. Rail types were documented in the properties table, top of page. And how to make an electric loco (and a steamer or diesel loco) was already documented in prop19.

OTOH, something about the effects of TTDPatch´s "elctrified railways" and "unifiedmaglev" switches seems to be missing. I´ll have a look.

regards
Michael
Image
User avatar
FooBar
Tycoon
Tycoon
Posts: 6553
Joined: 21 May 2007 11:47
Location: The Netherlands
Contact:

Re: New Rail Types

Post by FooBar »

PikkaBird wrote:"New engines (0D)". Is this a text, or something else?
I think they're texts, but I can't get them to work. I only get "undefined strings"; tried both D0xx and DCxx IDs.

Furthermore I don't understand the compatible/powered railtype lists. I figured it should be possible to allow existing monorail and maglev trains on my TRPD track type, but I couldn't get that to work without changing the properties of the actual trains. So it is very welcome if someone could elaborate on that.



I also coded the graphics according to http://wiki.openttd.org/Peter1138/Railtypes, but obviously that doesn't work :D
buttercup
Traffic Manager
Traffic Manager
Posts: 136
Joined: 22 Jan 2007 20:19

Re: New Rail Types

Post by buttercup »

Yay!
railtypes.png
railtypes.png (135.54 KiB) Viewed 8947 times
To test that the different track types worked they each have their own speed limit; there's no change to the train properties. Using DCxx IDs seemed to work fine for me, but I haven't tried new graphics yet.

I too think it would be good to have a little clarification on the compatible/powered railtypes. The three properties that I can think of that might need defining are:
  • what track types a certain train type can run on
  • what train types a certain track type can carry
  • what track types are compatible with each other (for example normal track and electrified track can cross each other, monorail and maglev track cannot cross anything other than themselves)
I'm not sure if the first and second points both need defining though - there's the potential for conflict if, for example, train type A says it can run on track types A and B, but track type B will only allow train types B and C.
User avatar
andythenorth
Tycoon
Tycoon
Posts: 5705
Joined: 31 Mar 2007 14:23
Location: Lost in Music

Re: New Rail Types

Post by andythenorth »

Trains trains trains. Trains trains trains. Nothing but silly trains. :roll:

/me hopes for...RoadTypes

But seriously this looks like a nice development :)
Last edited by andythenorth on 02 Feb 2010 20:43, edited 1 time in total.
buttercup
Traffic Manager
Traffic Manager
Posts: 136
Joined: 22 Jan 2007 20:19

Re: New Rail Types

Post by buttercup »

Like this? :wink:
User avatar
andythenorth
Tycoon
Tycoon
Posts: 5705
Joined: 31 Mar 2007 14:23
Location: Lost in Music

Re: New Rail Types

Post by andythenorth »

buttercup wrote:Like this? :wink:
Knowing that page exists is what brings light to my very darkest hours.

If I remember rightly, I joined the very forums solely because I discovered that page. But somehow my memory ain't what it used to be.
User avatar
FooBar
Tycoon
Tycoon
Posts: 6553
Joined: 21 May 2007 11:47
Location: The Netherlands
Contact:

Re: New Rail Types

Post by FooBar »

buttercup wrote:Using DCxx IDs seemed to work fine for me, but I haven't tried new graphics yet.
I probably cocked up somewhere then...

EDIT:
Indeed cocked up somewhere. Have it figured out now.
I put 7F as language id where I should have put FF... :oops:


As for allowing trains from other track types on my track type, I figured this should work (bot doesn't):

Code: Select all

-1 * 0 00 //action 0
	10 //feature: rail types
	\b2 //num-props
	01 //num-info
	02 //ID (monorail)
	0E 01 "TRPD" //compatible railtype list (TRPD)
	0F 01 "TRPD" //powered railtype list (TRPD)
Using r18983.
peter1138
OpenTTD Developer
OpenTTD Developer
Posts: 1795
Joined: 30 Mar 2005 09:43

Re: New Rail Types

Post by peter1138 »

Should work after r18989, before this you had to 'set' the rail type label before setting any property.
He's like, some kind of OpenTTD developer.
User avatar
Ben_Robbins_
Tycoon
Tycoon
Posts: 1234
Joined: 20 Nov 2005 01:56
Location: Abu Dhabi, UAE

Re: New Rail Types

Post by Ben_Robbins_ »

andythenorth: Slightly sidetracking, but roads would be slightly different as almost always all vehicles can go on all roads, but just more/less successfully, where as a maglev train on regular tracks would be a motionless lump of metal. Roads would upgrade, where as rails replace. Roads types are basically just speed limits with more influence on some vehicles than others.

Roads would be great, but for now I'll just say rail types is a really nice feature, so thanks a lot for the work that's gone into this.
Ben
User avatar
Zephyris
Tycoon
Tycoon
Posts: 2897
Joined: 16 May 2007 16:59

Re: New Rail Types

Post by Zephyris »

Ben_Robbins_ wrote:Roads types are basically just speed limits with more influence on some vehicles than others.
Apart from things like tram tracks, monorail tracks, etc. A car is a motionless lump of metal on a tram track :)
Ben_Robbins_ wrote:... I'll just say rail types is a really nice feature, so thanks a lot for the work that's gone into this.
I totally agree! One problem though; now we need loads more nice graphics to use this feature!
User avatar
FooBar
Tycoon
Tycoon
Posts: 6553
Joined: 21 May 2007 11:47
Location: The Netherlands
Contact:

Re: New Rail Types

Post by FooBar »

petern wrote:Should work after r18989, before this you had to 'set' the rail type label before setting any property.
Thanks, petern! Setting the rail type label indeed made it work on my older version of OTTD.

I was wondering the following though:
When I allow MONO and MGLV vehicles on my new TRPD track, building my TRPD track is only available if I have at least one vehicle available with it's tracktype set to TRPD. If I don't have a vehicle for my tracks (but still allow monorail and maglev vehicles on it), my track is not buildable.
Is this intentional, or could you be so kind to change this and allow new railtypes to be buildable if they only allow "alien" vehicles and don't have any of their own?
Ben_Robbins_ wrote:Roads types are basically just speed limits with more influence on some vehicles than others.
Not only that, it's also a great eyecandy feature, allowing all different styles of roads.
Besides, you can create very cheap trails with low speed limit, expensive highways with high speed limit, stuff like that.
User avatar
Zuu
OpenTTD Developer
OpenTTD Developer
Posts: 4553
Joined: 09 Jun 2003 18:21
Location: /home/sweden

Re: New Rail Types

Post by Zuu »

Is there an interest from GRF authors to make vehicles that have different max speeds on different road types?

Eg.

Each road/rail type have their max speed.
* Gravel road has 40 km/h
* Asphalt road has 90 km/h

But vehicle "Special Deluxe" has a special feature of going in 40 km/h on gravel road but only 20 km/h on Asphalt road.


I'm sure GRFs could do this with some magic already; however, if there is an interest to do vehicles like this it might be possible to introduce properties for this in the grf spec so that these speeds can be presented to the users as well as the AI players. Preferable the same method is used for both road vehicles and locomotives.


Edit: Note that "vehicles" is in my post generic and could be either road or rail vehicles.
My OpenTTD contributions (AIs, Game Scripts, patches, OpenTTD Auto Updater, and some sprites)
Junctioneer (a traffic intersection simulator)
User avatar
FooBar
Tycoon
Tycoon
Posts: 6553
Joined: 21 May 2007 11:47
Location: The Netherlands
Contact:

Re: New Rail Types

Post by FooBar »

Zuu wrote:Edit: Note that "vehicles" is in my post generic and could be either road or rail vehicles.
I like that: 'gravel track', 'asphalt track' :D

Anyways, I wonder what sort of road vehicle would do worse on pavement than on dirt. I can't think of any and therefore I think it would confuse users if they encounter a vehicle that 'doesn't work' on normal roads.

And the same applies to trains as well I think: what train would do worse on better track?
User avatar
Ben_Robbins_
Tycoon
Tycoon
Posts: 1234
Joined: 20 Nov 2005 01:56
Location: Abu Dhabi, UAE

Re: New Rail Types

Post by Ben_Robbins_ »

FooBar: Don't think I'm against this feature, I was just saying it's not exactly the same as the rail feature in relation to andythenorth's request. In fact I've gone as far as to model 5 road types and multi-road type junction, from a farm track up to tarmacked white lined roads, so I'd say I'm pretty fond of the idea. Multiple type junctions is a bigger issue yet created by having all vehicles able to use all road types, but in a different way, and therefore a higher frequency of variation in neighbouring tiles. It hugely increases the sprite count but, from experimenting I'd say it hugely increases the eye candy. Another issue is vehicle alignment, and single/lane. i.e. a track is thin and alignment would be central.

Apologies for the off-topicness, but it's got me interested! A split maybe in order.
Ben
michael blunck
Tycoon
Tycoon
Posts: 5954
Joined: 27 Apr 2005 07:09
Contact:

Re: New Rail Types

Post by michael blunck »

FooBar wrote: what train would do worse on better track?
Well, unlike for rvs, not "better" but "different".

Consider following list of track (1 .. 9) and vehicles (A .. I):

A 1 narrow-gauge
B 2 narrow-gauge electrified
C 3 narrow-gauge rack
D 4 narrow-gauge rack electrified
E 5 standard gauge light (15t axle load)
F 6 standard gauge light (15t axle load) electrified
G 7 standard gauge heavy (20t axle load)
H 8 standard gauge heavy (20t axle load) electrified
I 9 standard gauge 3rd rail
...

then there would be quite a number of possible combinations rack/vehicle:

A1, A2
B2
C1, C2, C3, C4
D2, D4
E5, E6, E7, E8, E9
F6, F8
G7, G8
H8
I9

Something like this could open up quite interesting new game options.

regards
Michael
Image
maquinista
Tycoon
Tycoon
Posts: 1829
Joined: 10 Jul 2006 00:43
Location: Spain

Re: New Rail Types

Post by maquinista »

It works well with High speed tracks (label: SPRL) in the latest nightly:
Attachments
Screenshot with the four text strings loaded.
Screenshot with the four text strings loaded.
high_speed.png (32.48 KiB) Viewed 8576 times
Sorry if my english is too poor, I want learn it, but it isn't too easy.[/list][/size]
Post Reply

Return to “OpenTTD Development”

Who is online

Users browsing this forum: No registered users and 37 guests