The International Simutrans Forum

Development => Patches & Projects => Incorporated Patches and Solved Bug Reports => Topic started by: bahner on October 28, 2014, 04:50:47 PM

Title: building, maxing, removing HQ leaves constant positive cash flow
Post by: bahner on October 28, 2014, 04:50:47 PM
I placed a HQ, maxed it. Noticing it was useless and generating high cost I removed it.
Wasnt there longer as 2 minutes.

But now I am stuck with a constant cash flow of 14,500. This is due to building and removing the HQ.


I mean... Its a positive cash flow, so I dont complain, but its a bug...
pak128 newest version
Title: Re: building, maxing, removing HQ leaves constant positive cash flow
Post by: gauthier on October 28, 2014, 06:23:31 PM
I can't reproduce this bug.
_ Create a new savegame
_ Build a HQ
_ Upgrade it
_ destroy it
... and end up with no cash flow (no maintenance, no anything), just less money than I started with.

Could you post a screenshot of your finance window before and after the operation ? By the way, can you confirm you are playing with pak128 2.5.1 ?

By the way, HQ are not completely useless (they are partly useless indeed since one can play very well without HQ), they generate a passenger (and mail) flow which is significant at high levels.
Title: Re: building, maxing, removing HQ leaves constant positive cash flow
Post by: DrSuperGood on October 28, 2014, 07:58:06 PM
I also recall them adding a lot to the population of a city in pak64 112.3 if built within the boundary (unsure about pak128). But this is pretty insignificant in the long run once everything becomes heavily connected. I personally think that headquarters should be given a more important role one day than passenger and mail generation and showing how much money you have but that would be something outside the scope of a single pakset.
Title: Re: building, maxing, removing HQ leaves constant positive cash flow
Post by: ny911 on October 28, 2014, 11:10:47 PM
Quote from: DrSuperGood on October 28, 2014, 07:58:06 PM
I personally think that headquarters should be given a more important role one day than passenger and mail generation and showing how much money you have but that would be something outside the scope of a single pakset.
What about a limitation of lines to build, dependening on the HQ size. Biggest HQ ever with no limitation.

But that's a serprate subject, so please start a new one if you thing it qould make sense.

to the bug:
I can reproduce it on r7354 with pak128.r1487 (with old and new HQs)
First start with game break, build the HQs, then destroy them, make fast forward for several month.
The first set maintenance is exactly a positive number of cash flow.
This may be pakset independence bug , but it may be also a cheat modus.
Title: Re: building, maxing, removing HQ leaves constant positive cash flow
Post by: gauthier on October 29, 2014, 10:08:07 AM
I'm not sure to understand what "game break" is, are you talking about Pause ? I still can't reproduce the bug, I think I missed something in your explanations ...
Title: Re: building, maxing, removing HQ leaves constant positive cash flow
Post by: ny911 on October 29, 2014, 01:56:12 PM
sorry, "game break" = pause

second control with r7354 and pak64 with same result -> there is a bug too. I'm still not sure if it is a pakset or simutrans bug. Maybe it is in simutrans, due to the fact that the "this month" at the right sight of the finance window shows a negativ number and the monthly table the same amount as positiv maintenance.

how to-do:
Well, as written this is a bug, but it behaves like a "cheat mode", I can live with it.
The only thing is that it will take more than 66 month to earn the cash of the HQ construction cost, so the effect is very low.
Title: Re: building, maxing, removing HQ leaves constant positive cash flow
Post by: gauthier on October 29, 2014, 02:13:25 PM
Finally achieved reproducing this bug. I'm pretty sure the bug happens that way :

When upgrading HQ by rebuilding it elsewhere :
_ build HQ, add maintenance cost (324 c/month)
_ upgrade HQ, upgrade maintance cost (-> 972 c/month)
_ destroy HQ, remove maintenance cost according to the HQ (-> 972-972=0 c/month)

When upgrading HQ by rebuilding it at the same place (=> bug)
_ build HQ, add maintenance cost (324 c/month)
_ upgrade HQ, upgrade maintenance cost (this part is forgotten) (-> still 324 c/month)
_ destroy HQ, remove maintenance cost according to the HQ (-> 324-972= -648 c/month)

This is obviously a bug in the code, not in the pakset. This thread should be moved to the general bug reports section.
Title: Re: building, maxing, removing HQ leaves constant positive cash flow
Post by: Isaac Eiland-Hall on October 29, 2014, 03:34:24 PM
Moving :)
Title: Re: building, maxing, removing HQ leaves constant positive cash flow
Post by: TurfIt on October 30, 2014, 12:04:32 AM
Please try r7356.
Title: Re: building, maxing, removing HQ leaves constant positive cash flow
Post by: ny911 on October 30, 2014, 05:35:27 PM
tested in r7356, bug is fixed, thanks.