Navigation Menu

Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wagons with expire time is always available #2434

Closed
DorpsGek opened this issue Nov 30, 2008 · 7 comments
Closed

Wagons with expire time is always available #2434

DorpsGek opened this issue Nov 30, 2008 · 7 comments
Labels
component: NewGRF This issue is related to NewGRFs flyspray This issue is imported from FlySpray (https://bugs.openttd.org/)

Comments

@DorpsGek
Copy link
Member

djnekkid opened the ticket and wrote:

this topic in the tt-forums say it most, and Froch suggested (@IRC) that i added a flyspray entry).

http://www.tt-forums.net/viewtopic.php?f=33&t=40722

The point is; wagons dont expire if it's told be expire after a sertain number of years. .nfo file(s) can be provided if needed. Catch me@irc, pm in for forums or otherwise.

/DJ

Reported version: trunk
Operating system: All


This issue was imported from FlySpray: https://bugs.openttd.org/task/2434
@DorpsGek
Copy link
Member Author

DorpsGek commented Dec 9, 2008

PhilSophus wrote:

The attached patch should fix the engine expiration for wagons (i.e. the models now disappear unless vehicles never expire is on).

It does not introduce vehicle aging for wagons. Though, it wouldn't be very complicated to implement, I'm not sure how useful that would be from a playability point-of-view (imagine messages like "coal wagon 7 of train 12 is getting old").

Mercurial patch against 4c9d49e5589a (svn14662)

Attachments


This comment was imported from FlySpray: https://bugs.openttd.org/task/2434#comment5094

@DorpsGek
Copy link
Member Author

DorpsGek commented Dec 9, 2008

frosch wrote:

Ok, as it turns out that there is more than one working on it. I will just post my unfinished stuff.

Open points:

  1. PhilSophus modified the old loader: Looks wrong at first glance, but I am not sure :)
  2. Using 0xFF for "infinite" might be wrong for early introduction dates. Maybe 0xFFFF is better, but in that case 0xFF should be always translated to 0xFFFF when it is set by newgrfs.
  3. Theoretically old grfs are broken, when they use a default engine ID for a wagon and do not set the model life, as they would inherit the model life of the original engine, and would not be infinitely available as up to now.
    However all newgrfs on my harddisk either do not use engine IDs for wagons, or also set model life for all wagons. And TTDP also behaves like attached patch.

Attachments


This comment was imported from FlySpray: https://bugs.openttd.org/task/2434#comment5095

@DorpsGek
Copy link
Member Author

DorpsGek commented Dec 9, 2008

PhilSophus wrote:

  1. PhilSophus modified the old loader: Looks wrong at first glance, but I am not sure :)
    Hmm, thinking about it again, old games should not have NewGRFs loaded ;-), so assuming that the original wagons don't expire, they should indeed get infinite live on loading and changing the old loader was probably wrong.

I'll have a closer a look at the other differing hunks. By only reading the patch I don't get what they do, but that's probably due to the missing context, do I'll look into the code.

I'm not sure on the last one in fs2434.diff. If there still is a concept like infinite life, why is the check for age == 0xffff removed?


This comment was imported from FlySpray: https://bugs.openttd.org/task/2434#comment5101

@DorpsGek
Copy link
Member Author

DorpsGek commented Dec 9, 2008

PhilSophus wrote:

Okay, now I understand better. I would suggest, we treat a base_life value of 0xff as a special value for wagons, so that they never expire no matter how long a game lasts. Like in the attached patch.

Attachments


This comment was imported from FlySpray: https://bugs.openttd.org/task/2434#comment5102

@DorpsGek
Copy link
Member Author

djnekkid wrote:

so, are there any news on this? :)


This comment was imported from FlySpray: https://bugs.openttd.org/task/2434#comment5109

@DorpsGek
Copy link
Member Author

frosch wrote:

base_life == 0xFF is now used for infinite availability. Not only for wagons but also for engines.

As this removes the need for the special 'age' value, the oldloader part can be removed. Btw. the oldloader part was broken anyway, as those IDs are not necessarily wagons, when we load a TTDP savegame.

Might need some nights sleeping over it, and thinking about other implications. Well and maybe some documenting of the new special value :p

Attachments


This comment was imported from FlySpray: https://bugs.openttd.org/task/2434#comment5111

@DorpsGek
Copy link
Member Author

frosch closed the ticket.

Reason for closing: Implemented

in r14680


This comment was imported from FlySpray: https://bugs.openttd.org/task/2434

@DorpsGek DorpsGek added flyspray This issue is imported from FlySpray (https://bugs.openttd.org/) component: NewGRF This issue is related to NewGRFs bug labels Apr 6, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: NewGRF This issue is related to NewGRFs flyspray This issue is imported from FlySpray (https://bugs.openttd.org/)
Projects
None yet
Development

No branches or pull requests

1 participant