Author Topic: Townhall relocating while not necessary  (Read 697 times)

0 Members and 1 Guest are viewing this topic.

Offline Combuijs

  • Web Team
  • Devotee
  • *
  • Posts: 1386
  • Total likes: 22
  • Helpful: 53
  • Maintainer of maps.simutrans.com
    • Combuijs
  • Languages: EN, NL
Townhall relocating while not necessary
« on: February 26, 2017, 05:51:06 PM »
I use the lastest stable version (120.2) and I notice that upon upgrading the townhall it is getting relocated for unnecessary reasons.

I use my own pak based on pak64, but I've resized all townhalls to 2x2 size:

Code: [Select]
#--------------------------------------------
# Townhalls for pak64.combuijs
# Taken from pak64, but all on 2x2
#-------------------------------------------
Obj=building
Name=02_CITY
Type=tow
Level=10
Build_Time=0
needs_ground=1
Dims=2,2
BackImage[0][0][0][0][0][0]=a0-townh-stage1.0.2
BackImage[0][0][1][0][0][0]=a0-townh-stage1.0.3
BackImage[0][1][0][0][0][0]=a0-townh-stage1.0.0
BackImage[0][1][1][0][0][0]=a0-townh-stage1.0.1
BackImage[0][0][0][0][0][1]=a0-townh-stage1.1.2
BackImage[0][0][1][0][0][1]=a0-townh-stage1.1.3
BackImage[0][1][0][0][0][1]=a0-townh-stage1.1.0
BackImage[0][1][1][0][0][1]=a0-townh-stage1.1.1
# flags
FrontImage[0][1][1][0][0][0]=a0-townh-stage1.0.4
FrontImage[0][1][1][0][1][0]=a0-townh-stage1.0.5
FrontImage[0][1][1][0][2][0]=a0-townh-stage1.0.6
FrontImage[0][1][1][0][3][0]=a0-townh-stage1.0.4
FrontImage[0][1][0][0][0][0]=a0-townh-stage1.0.4
FrontImage[0][1][0][0][1][0]=a0-townh-stage1.0.5
FrontImage[0][1][0][0][2][0]=a0-townh-stage1.0.6
FrontImage[0][1][0][0][3][0]=a0-townh-stage1.0.4
FrontImage[0][1][1][0][0][1]=a0-townh-stage1.0.4
FrontImage[0][1][1][0][1][1]=a0-townh-stage1.0.5
FrontImage[0][1][1][0][2][1]=a0-townh-stage1.0.6
FrontImage[0][1][1][0][3][1]=a0-townh-stage1.0.4
FrontImage[0][1][0][0][0][1]=a0-townh-stage1.0.4
FrontImage[0][1][0][0][1][1]=a0-townh-stage1.0.5
FrontImage[0][1][0][0][2][1]=a0-townh-stage1.0.6
FrontImage[0][1][0][0][3][1]=a0-townh-stage1.0.4
--------------------
Obj=building
Name=03_CITY
Type=tow
Level=20
Build_Time=2500
NoConstruction=1
needs_ground=1
Dims=2,2
BackImage[0][0][0][0][0][0]=a0-townh-stage2.0.3
BackImage[0][0][1][0][0][0]=a0-townh-stage2.0.7
BackImage[0][1][0][0][0][0]=a0-townh-stage2.0.0
BackImage[0][1][0][0][1][0]=a0-townh-stage2.0.1
BackImage[0][1][0][0][2][0]=a0-townh-stage2.0.2
BackImage[0][1][1][0][0][0]=a0-townh-stage2.0.4
BackImage[0][1][1][0][1][0]=a0-townh-stage2.0.5
BackImage[0][1][1][0][2][0]=a0-townh-stage2.0.6
BackImage[0][0][0][0][0][1]=a0-townh-stage2.1.3
BackImage[0][0][1][0][0][1]=a0-townh-stage2.1.7
BackImage[0][1][0][0][0][1]=a0-townh-stage2.1.0
BackImage[0][1][0][0][1][1]=a0-townh-stage2.1.1
BackImage[0][1][0][0][2][1]=a0-townh-stage2.1.2
BackImage[0][1][1][0][0][1]=a0-townh-stage2.1.4
BackImage[0][1][1][0][1][1]=a0-townh-stage2.1.5
BackImage[0][1][1][0][2][1]=a0-townh-stage2.1.6
--------------------
Obj=building
Name=04_CITY
Type=tow
Level=50
Build_Time=10000
NoConstruction=1
needs_ground=1
Dims=2,2
BackImage[0][0][0][0][0][0]=a0-townh-stage3.0.3
BackImage[0][0][1][0][0][0]=a0-townh-stage3.0.7
BackImage[0][1][0][0][0][0]=a0-townh-stage3.0.0
BackImage[0][1][0][0][1][0]=a0-townh-stage3.0.1
BackImage[0][1][0][0][2][0]=a0-townh-stage3.0.2
BackImage[0][1][1][0][0][0]=a0-townh-stage3.0.4
BackImage[0][1][1][0][1][0]=a0-townh-stage3.0.5
BackImage[0][1][1][0][2][0]=a0-townh-stage3.0.6
BackImage[0][0][0][0][0][1]=a0-townh-stage3.1.3
BackImage[0][0][1][0][0][1]=a0-townh-stage3.1.7
BackImage[0][1][0][0][0][1]=a0-townh-stage3.1.0
BackImage[0][1][0][0][1][1]=a0-townh-stage3.1.1
BackImage[0][1][0][0][2][1]=a0-townh-stage3.1.2
BackImage[0][1][1][0][0][1]=a0-townh-stage3.1.4
BackImage[0][1][1][0][1][1]=a0-townh-stage3.1.5
BackImage[0][1][1][0][2][1]=a0-townh-stage3.1.6
--------------------

Unfortunately on upgrading from level 10 tot level 20 the town hall gets relocated (have not had any upgrades from 20 to 30). Any ideas why? I think this is a bug, but I might be wrong. Anyway I have not seen this before in my own pak.
Bob Marley: No woman, no cry

Programmer: No user, no bugs



Offline Dwachs

  • DevTeam, Coder/patcher
  • Administrator
  • *
  • Posts: 4224
  • Total likes: 168
  • Helpful: 148
  • Languages: EN, DE, AT
Re: Townhall relocating while not necessary
« Reply #1 on: February 27, 2017, 09:12:07 AM »
I could not reproduce this with a new map using your townhalls. Relocation could happen if you load an old savegame with your pakset. Then standard pak64 1x1 townhalls will be replaced by your 2x2 ones and relocated if necessary.
Parsley, sage, rosemary, and maggikraut.

Offline Combuijs

  • Web Team
  • Devotee
  • *
  • Posts: 1386
  • Total likes: 22
  • Helpful: 53
  • Maintainer of maps.simutrans.com
    • Combuijs
  • Languages: EN, NL
Re: Townhall relocating while not necessary
« Reply #2 on: February 27, 2017, 09:19:39 AM »
Thanks for looking into this!

I will try to reproduce this by growing towns manually.

My townhalls have been 2x2 for ages, so loading an old savegame is not causing this.
Bob Marley: No woman, no cry

Programmer: No user, no bugs



Offline Combuijs

  • Web Team
  • Devotee
  • *
  • Posts: 1386
  • Total likes: 22
  • Helpful: 53
  • Maintainer of maps.simutrans.com
    • Combuijs
  • Languages: EN, NL
Re: Townhall relocating while not necessary
« Reply #3 on: February 27, 2017, 08:37:14 PM »
I can easily reproduce this.

Take this savegame and pak:
https://dl.dropboxusercontent.com/u/103560986/Simutrans/Veepland.sve
https://dl.dropboxusercontent.com/u/103560986/Simutrans/pak64.combuijs.zip

Go to the town of Hucknall Torkard (4th town in size). Add 3 times 100 inhabitants (there is a special button on the map editing toolbar). In my case the town hall relocated to the north west near the cotton fields, but there will be a random element in this I suspect. On the location of the old town hall a 1x1 construction was started.
Bob Marley: No woman, no cry

Programmer: No user, no bugs



Offline Dwachs

  • DevTeam, Coder/patcher
  • Administrator
  • *
  • Posts: 4224
  • Total likes: 168
  • Helpful: 148
  • Languages: EN, DE, AT
Re: Townhall relocating while not necessary
« Reply #4 on: February 28, 2017, 08:02:51 AM »
thanks. should be fixed with r8124.
Parsley, sage, rosemary, and maggikraut.

Offline Combuijs

  • Web Team
  • Devotee
  • *
  • Posts: 1386
  • Total likes: 22
  • Helpful: 53
  • Maintainer of maps.simutrans.com
    • Combuijs
  • Languages: EN, NL
Re: Townhall relocating while not necessary
« Reply #5 on: February 28, 2017, 10:14:37 AM »
Ooh, wow, that's pretty fast!

Thank you very much, will test the new release!

Edit: Ah, it just missed the 120.2.1 release, must wait for a nightly then...
« Last Edit: February 28, 2017, 05:11:14 PM by Combuijs »
Bob Marley: No woman, no cry

Programmer: No user, no bugs



Offline Combuijs

  • Web Team
  • Devotee
  • *
  • Posts: 1386
  • Total likes: 22
  • Helpful: 53
  • Maintainer of maps.simutrans.com
    • Combuijs
  • Languages: EN, NL
Re: Townhall relocating while not necessary
« Reply #6 on: March 04, 2017, 04:10:24 PM »
Tested the nightly today, and indeed the townhall does not relocate anymore. Thank you very much!
Bob Marley: No woman, no cry

Programmer: No user, no bugs