The International Simutrans Forum

 

Author Topic: Missing tools in menu bar  (Read 5732 times)

0 Members and 1 Guest are viewing this topic.

Offline Franck70

  • *
  • Posts: 11
  • Languages: FR
Missing tools in menu bar
« on: November 23, 2013, 11:50:46 PM »
Hello everyone.
I come to you because I have a big worry since yesterday my tools menu buttons rail, road tools AIR tools etc. have disappeared from the menu bar.
I simutrans 112.3 comic Pack 96th 0.4.10
When I raise the game they are but I load my current game they disappear.


Offline Lmallet

  • Devotee
  • *
  • Posts: 727
  • 128 on the brain...
  • Languages: FR, EN
Re: Missing tools in menu bar
« Reply #1 on: November 24, 2013, 01:13:29 AM »
To clarify the bug report, it seems the toolbar disappears once you hit January 1st 2999.  (from http://forum.simutrans.com/index.php?topic=12865.msg127741#msg127741)

Offline Fabio

  • Devotee
  • Administrator
  • *
  • Posts: 2898
  • The Pak128 Guy
    • Visit me on Facebook
  • Languages: EN, IT, RO, FR
Re: Missing tools in menu bar
« Reply #2 on: November 24, 2013, 09:40:00 AM »
The most logical reason might be that all pakset infrastructure (ways, stations, depots) retire on 2999.

Offline Ters

  • Coder/patcher
  • Devotee
  • *
  • Posts: 5447
  • Languages: EN, NO
Re: Missing tools in menu bar
« Reply #3 on: November 24, 2013, 10:21:00 AM »
2999 is the default retire date if the pak set doesn't specify one, either because the pak set is very old or because the pak set author simply didn't consider it to be any problem. (I think many pak sets deteriorate sometime after 2000-2013 in the game as they don't fully predict the future.)

Offline Lmallet

  • Devotee
  • *
  • Posts: 727
  • 128 on the brain...
  • Languages: FR, EN
Re: Missing tools in menu bar
« Reply #4 on: November 25, 2013, 01:56:08 AM »
2999 is the default retire date if the pak set doesn't specify one, either because the pak set is very old or because the pak set author simply didn't consider it to be any problem. (I think many pak sets deteriorate sometime after 2000-2013 in the game as they don't fully predict the future.)

Is this something that can be set via a config file, or is this set when the pakset is compiled?

Offline Ters

  • Coder/patcher
  • Devotee
  • *
  • Posts: 5447
  • Languages: EN, NO
Re: Missing tools in menu bar
« Reply #5 on: November 25, 2013, 07:46:58 AM »
Is this something that can be set via a config file, or is this set when the pakset is compiled?

Each individual object type's introduction and retirement dates are set in the dat files making up the "source code" for the pak files. The default dates used when the pak set doesn't specify one, are hardcoded into the game.

Offline gauthier

  • Devotee
  • *
  • Posts: 3629
    • SNFOS'website (in both FR and EN)
  • Languages: FR, EN, JP
Re: Missing tools in menu bar
« Reply #6 on: November 26, 2013, 08:31:17 PM »
Each individual object type's introduction and retirement dates are set in the dat files making up the "source code" for the pak files. The default dates used when the pak set doesn't specify one, are hardcoded into the game.
So the only thing to do is to change the default retire date which is coded in the game ?
Although I have other questions in mind :
_ Why did coders choose a date which is so near from the player ? (Well yes ... I can't really say "near", anyway 2999 is in player's reach, hence this bug report, integer type allow much higher values).
_ What about using a special value, let's say 0, to mean "no retire date" to the game ?

Offline Ters

  • Coder/patcher
  • Devotee
  • *
  • Posts: 5447
  • Languages: EN, NO
Re: Missing tools in menu bar
« Reply #7 on: November 26, 2013, 08:47:31 PM »
I wouldn't call 2999 near. I'm almost at 2040 in my current game, and I feel like I have played it for ages (since 1850 or so). It's hardly any fun anymore, as there are no new vehicles, except a few that are so badly balanced that they won't generate a profit no matter what. Cities are so huge, covering them with local transportation, let alone coming up with names for the stops, is tiresome. I mostly just sit and watch the trains run. Sometimes I try to reduce the losses that set it on my rail network due to a skyrocketing speed bonus base speed around 2030, but almost nothing works.

Generally speaking, changing the default could potentially cause compatibility issues. Perhaps not so much for the default retire date as for the default introduction date, but still. If a pak set is ready for a longer timeline, it should go for it itself.

Offline prissi

  • Developer
  • Administrator
  • *
  • Posts: 9411
  • Languages: De,EN,JP
Re: Missing tools in menu bar
« Reply #8 on: November 27, 2013, 05:10:15 PM »
This date was choose from old age. Before simutrans crashed at 2240 ...

Offline Ters

  • Coder/patcher
  • Devotee
  • *
  • Posts: 5447
  • Languages: EN, NO
Re: Missing tools in menu bar
« Reply #9 on: November 27, 2013, 06:01:27 PM »
2999 times 12 isn't too far away from the upper limit of a signed 16-bit integer, which might have been used at some point, if it isn't still somewhere.

Offline Fabio

  • Devotee
  • Administrator
  • *
  • Posts: 2898
  • The Pak128 Guy
    • Visit me on Facebook
  • Languages: EN, IT, RO, FR
Re: Missing tools in menu bar
« Reply #10 on: November 27, 2013, 06:32:00 PM »
Considering that no serious game can run until 1400, paksets could have a display_year_offset e.g. 1400 which might allow to play until 4399.

Offline Ters

  • Coder/patcher
  • Devotee
  • *
  • Posts: 5447
  • Languages: EN, NO
Re: Missing tools in menu bar
« Reply #11 on: November 27, 2013, 06:58:12 PM »
If pak sets want to play until 4399 and beyond, they can (unless there is some lingering limitation somewhere that hasn't been dealt with). They just have to opt in by telling the game their retirement dates. 2999 is just for loading/compiling old pak sets. One could perhaps make it possible for makeobj to use a different default date if the author is too lazy (I can understand them) to put dates on everything.

Offline Dwachs

  • DevTeam, Coder/patcher
  • Administrator
  • *
  • Posts: 4555
  • Languages: EN, DE, AT
Re: Missing tools in menu bar
« Reply #12 on: November 27, 2013, 07:01:51 PM »
Dates are saved as 32bit signed integers in 12*year + month format. There is plenty of room to lift the default retirement date.

The problem is what happens with paks that have the default retirement date set at 2999? Should this be similarly increased? I doubt that any pak-file uses this retirement date intentionally. This would be an easy fix: apply new retirement date to all old pak files and change makeobj to set it for fresh compiled files.

Offline gauthier

  • Devotee
  • *
  • Posts: 3629
    • SNFOS'website (in both FR and EN)
  • Languages: FR, EN, JP
Re: Missing tools in menu bar
« Reply #13 on: November 29, 2013, 09:10:05 PM »
Dates are saved as 32bit signed integers in 12*year + month format. There is plenty of room to lift the default retirement date.

The problem is what happens with paks that have the default retirement date set at 2999? Should this be similarly increased? I doubt that any pak-file uses this retirement date intentionally. This would be an easy fix: apply new retirement date to all old pak files and change makeobj to set it for fresh compiled files.
I thought we were dealing with a hardcoded limit...
Quote
2999 is the default retire date if the pak set doesn't specify one

Anyway, if "2999" is set in all pak files, it will be easy to replace this in official paksets, but much more difficult to make every addon maker remake his addons.
I don't know how retire dates are dealt with in the game. Should it be possible to just disable retirement for pak files having 2999 as retire date ?

Offline Fabio

  • Devotee
  • Administrator
  • *
  • Posts: 2898
  • The Pak128 Guy
    • Visit me on Facebook
  • Languages: EN, IT, RO, FR
Re: Missing tools in menu bar
« Reply #14 on: November 29, 2013, 09:16:50 PM »
I would suggest that after 2999 timeline gets disabled.

Offline prissi

  • Developer
  • Administrator
  • *
  • Posts: 9411
  • Languages: De,EN,JP
Re: Missing tools in menu bar
« Reply #15 on: November 29, 2013, 10:44:09 PM »
One could just set "no timeline" in the starting dialogue and then save the game. This should bring everything back (if not, then there is an error to report.)

Offline Ters

  • Coder/patcher
  • Devotee
  • *
  • Posts: 5447
  • Languages: EN, NO
Re: Missing tools in menu bar
« Reply #16 on: November 30, 2013, 09:17:13 AM »
I thought we were dealing with a hardcoded limit...
Anyway, if "2999" is set in all pak files, it will be easy to replace this in official paksets, but much more difficult to make every addon maker remake his addons.
I don't know how retire dates are dealt with in the game. Should it be possible to just disable retirement for pak files having 2999 as retire date ?

My worry is that this may break those paks. A default of 2999 is/was part of the contract between developers and pak set makers. Retireing at 2999 might be intentional by the pak set maker, although that may be rare. It's the same with the introduction date. If the default retirement date is ignored, the default introduction date should also be ignored. There have been problems with that as well. But ignoring the introduction date may easily look very odd.

Offline prissi

  • Developer
  • Administrator
  • *
  • Posts: 9411
  • Languages: De,EN,JP
Re: Missing tools in menu bar
« Reply #17 on: November 30, 2013, 10:51:48 PM »
If you play to 2999 just disable the timeline. Because no development will happen after 2050 is almost any pak.

Offline Ters

  • Coder/patcher
  • Devotee
  • *
  • Posts: 5447
  • Languages: EN, NO
Re: Missing tools in menu bar
« Reply #18 on: December 01, 2013, 09:09:48 AM »
Disabling the timeline has the unfortunate side effect of enabling everything. A possible feature could be to allow the game to stop advancing the years. This could be useful also for stopping the timeline before the end, for those pak sets that enter an unfortunate state at some point, or if you just want to keep playing in a certain era.