The International Simutrans Forum

 

Author Topic: All Trees disappearing  (Read 2524 times)

0 Members and 1 Guest are viewing this topic.

Offline HDomos

  • *
  • Posts: 153
  • Languages: EN, DE, FR, HU
All Trees disappearing
« on: December 22, 2012, 02:02:05 PM »
I don't know if it is a pakset or engine bug, so i'm posting it here...
In my game all trees suddenly disappeared... Here is the save:https://docs.google.com/open?id=0B1T_qBCnXlPdT2MwNFpUWG1DVFU. For me it is happening some minutes after i load this game... I'm using pak128 r1112 with r6208. (Don't know if it's the cause, but i turned on the timeline just before the save, and jumped from 1940 to 2040)

EDIT:
I made a small map:https://docs.google.com/open?id=0B1T_qBCnXlPdMkJHSXdJR0J1ZTA. To reproduce this, switch to public player and use the next year (?) button to jump to 2040. Fast forward then untill the trees disappear. (Maybe because their age or I don't know why)
« Last Edit: December 22, 2012, 03:23:40 PM by HDomos »

Offline mEGa

  • 2D painter
  • Devotees (Inactive)
  • *
  • Posts: 1041
  • Pak128 graphics
    • mEGa_Simutrans
  • Languages: FR, EN, ru
Re: All Trees disappearing
« Reply #1 on: December 22, 2012, 02:57:05 PM »
Hi,
your joined file is empty... So I didn't test it.

Offline HDomos

  • *
  • Posts: 153
  • Languages: EN, DE, FR, HU
Re: All Trees disappearing
« Reply #2 on: December 22, 2012, 03:23:15 PM »
Try the linked files... The attached one was indeed empty... (That's why i forgot to delete it)

EDIT: But it's easy to reproduce. Just jump ~100 years with any game from the starting time and fast forward until the trees disappear. (Around 7th of march if a new map)
« Last Edit: December 22, 2012, 03:36:48 PM by HDomos »

Offline Fabio

  • Devotee
  • Administrator
  • *
  • Posts: 2898
  • The Pak128 Guy
    • Visit me on Facebook
  • Languages: EN, IT, RO, FR
Re: All Trees disappearing
« Reply #3 on: December 22, 2012, 03:56:50 PM »
Trees die of old age, but jumping one year doesn't spawn saplings. This is indeed a program bug.
Solutions could be either spawn new trees over jumping to next year or don't age trees using this tool.

Offline Sarlock

  • Devotee
  • *
  • Posts: 1340
  • Languages: EN
Re: All Trees disappearing
« Reply #4 on: December 22, 2012, 07:48:49 PM »
Fabio is correct, I've had the same issue occur, all of your trees eventually die after 60 years or so and no new trees are planted with the advance one year button.  Thus, your forests all die out.

Offline prissi

  • Developer
  • Administrator
  • *
  • Posts: 9383
  • Languages: De,EN,JP
Re: All Trees disappearing
« Reply #5 on: December 22, 2012, 08:19:48 PM »
This is not easy to solve, as (for performance reason) trees only spawn during three month in year 48 (if I remember correctly). More exact during the first season change within these three month. Jumping one year will bypass this for some trees. Jumping all the time: Well not season changes => not new trees. Triggering three season changes with every year "jump" is also not reeally a solution, since this easily take minutes on larger maps. That tool is anyway only available for the public player for good reasons.

(Apart from jumping too much will completely alter the economity.)

Offline Ters

  • Coder/patcher
  • Devotee
  • *
  • Posts: 5435
  • Languages: EN, NO
Re: All Trees disappearing
« Reply #6 on: December 22, 2012, 08:41:39 PM »
Since trees remember their birthday (or rather birthmonth), not their age, the game would have to loop through them all and change their birthdays to prevent them from aging. Probably not a difficult programming task, but I guess it would be slow and result in a somewhat strange behaviour.

Offline Fabio

  • Devotee
  • Administrator
  • *
  • Posts: 2898
  • The Pak128 Guy
    • Visit me on Facebook
  • Languages: EN, IT, RO, FR
Re: All Trees disappearing
« Reply #7 on: December 22, 2012, 10:16:02 PM »
Instead of jumping one year, it could pop up a dialog asking how many years (maybe also months) you want to jump.
Them for trees you just loop and add to birth month x*12+y months you jumped.

Offline HDomos

  • *
  • Posts: 153
  • Languages: EN, DE, FR, HU
Re: All Trees disappearing
« Reply #8 on: December 22, 2012, 10:51:09 PM »
Instead of jumping one year, it could pop up a dialog asking how many years (maybe also months) you want to jump.
Them for trees you just loop and add to birth month x*12+y months you jumped.
It would save a lot of clicks too :)

Offline Sarlock

  • Devotee
  • *
  • Posts: 1340
  • Languages: EN
Re: All Trees disappearing
« Reply #9 on: December 23, 2012, 06:46:58 AM »
There would be a significant delay for larger maps as every single tree would have to have its data changed.  I can imagine that on a map with a lot of trees this could be quite a wait.

Offline prissi

  • Developer
  • Administrator
  • *
  • Posts: 9383
  • Languages: De,EN,JP
Re: All Trees disappearing
« Reply #10 on: December 23, 2012, 08:46:19 PM »
Whoever uses this tool to jump several years? Why not just switch off timeline via simucont.tab? One could imagine a "set date" tool instead of jumping years.

Offline Ters

  • Coder/patcher
  • Devotee
  • *
  • Posts: 5435
  • Languages: EN, NO
Re: All Trees disappearing
« Reply #11 on: December 23, 2012, 09:12:17 PM »
What's the purpose of jumping just a single year? Isn't fast forward good enough for such small time adjustments?

Offline DirrrtyDirk

  • Devotees (Inactive)
  • *
  • Posts: 1253
  • JR 700 Series Shinkansen
  • Languages: EN,DE
Re: All Trees disappearing
« Reply #12 on: December 23, 2012, 10:33:56 PM »
That depends on the size of the map, the speed of the computer and the bits_per_mpnth setting used... so, yes, I think there are indeed configurations where fast forward does not even come close to jumping one year - whether this jumping makes sense or not, may be a different matter.