Author Topic: Location of parameters to replace the missing pak  (Read 1012 times)

0 Members and 1 Guest are viewing this topic.

Offline THLeaderH

Location of parameters to replace the missing pak
« on: May 17, 2017, 11:11:04 AM »
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?

Offline Ters

  • Coder/patcher
  • Devotee
  • *
  • Posts: 4870
  • Total likes: 202
  • Helpful: 108
  • Languages: EN, NO
Re: Location of parameters to replace the missing pak
« Reply #1 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. (grund_t is the ground itself, it has no speed at all.)

Offline THLeaderH

Re: Location of parameters to replace the missing pak
« Reply #2 on: May 17, 2017, 02:32:16 PM »
Thank you for your immediate answer.
So... where is the process of choosing the alternative written?

Offline Ters

  • Coder/patcher
  • Devotee
  • *
  • Posts: 4870
  • Total likes: 202
  • Helpful: 108
  • Languages: EN, NO
Re: Location of parameters to replace the missing pak
« Reply #3 on: May 17, 2017, 03:23:44 PM »
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.

Offline Leartin

  • Devotee
  • *
  • Posts: 848
  • Total likes: 301
  • Helpful: 44
  • !!!!!This user was banned for double posting!!!!!
  • Languages: DE, EN
Re: Location of parameters to replace the missing pak
« Reply #4 on: May 17, 2017, 07:15:44 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 :)

Offline prissi

  • Developer
  • Administrator
  • *
  • Posts: 8823
  • Total likes: 323
  • Helpful: 229
  • Languages: De,EN,JP
Re: Location of parameters to replace the missing pak
« Reply #5 on: May 18, 2017, 12:01:19 AM »
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).

Offline THLeaderH

Re: Location of parameters to replace the missing pak
« Reply #6 on: May 18, 2017, 07:39:44 AM »
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.

Offline prissi

  • Developer
  • Administrator
  • *
  • Posts: 8823
  • Total likes: 323
  • Helpful: 229
  • Languages: De,EN,JP
Re: Location of parameters to replace the missing pak
« Reply #7 on: May 19, 2017, 01:38:27 AM »
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.)