News:

Simutrans.com Portal
Our Simutrans site. You can find everything about Simutrans from here.

Location of parameters to replace the missing pak

Started by THLeaderH, May 17, 2017, 11:11:04 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

THLeaderH

Simutrans can replace the missing pak of ways. When replacing, simutrans choose the alternative way that has similar parameter of the original way. I heard that grund_t stores the speed limit of the original way to realize this. However, I can't find the variable in grund_t. Where were those parameters stored?

Ters

weg_t stores the maximum speed, although I don't think this is the original purpose for it doing so. (grund_t is the ground itself, it has no speed at all.)

THLeaderH

Thank you for your immediate answer.
So... where is the process of choosing the alternative written?

Ters

I don't know, but considering it needs to figure it out when reading the weg_t from disk, that is probably a good place to start.

Leartin

Quote from: Ters on May 17, 2017, 12:50:22 PM
weg_t stores the maximum speed, although I don't think this is the original purpose for it doing so.
I'd like to know what the original purpose was (or what you think it was) please :)

prissi

Simutans just uses the default way for that type.That way be the last one used, the current city road or something else. It depends on when the default way is required, and at what year.

Th speed limit is needed, since for instance in cities existing roads get another limit than their original type. (Same could happn whith wayobjs).

THLeaderH

I want to make simutrans consider overtaking_info (should be renamed to overtaking_mode) when replacing missing ways. So I needed to know how simutrans find the alternative.

prissi

You do not need this information; when using wayobjs, the information is within the wayobj.As such if there is no wayobj, there will be no overtaking allowed. (Same as for electrification.)