Page 1 of 1
Constant train breakdowns
Posted: 05 Mar 2005 12:56
by henrik
Playing a little experimental game on 7x7. My maglevs break down all the time even though I have set breakdowns to none.. This has to be a bug.
Build: 1924
WinXP SP2
Savegame attached
Posted: 05 Mar 2005 13:01
by haakon99
If you set brekadowns to none and then save the gave and quit, the setting for breakdowns are not restored when you later load the game.
Yes. It must be a bug.
HÃ¥kon
Posted: 05 Mar 2005 17:22
by henrik
Yeah but these breakdowns happen even if i explicitly set breakdowns to none in-game and press the save button. Doesn't help. Also, should a train really break down 3 times a month or so which happens in this save game?
Another problem is that the cities grow crazy fast compared to the 8x8 and especially 9x9 games I've played.. in 9x9 the cities had 3000 citizens in 2020 played normally from 1970, while in this savegame a city grew from 2000 to 6000 in like 5 years. I've seen other threads about this problem and I really wish it would be fixed..
Other than these problems, I have to say great work OpenTTD team!
EDIT: Downloaded the source and broke out ye olde debugger to try to find the problem. Seems that even if you change breakdowns to none in the dialog box, the value _opt.diff.vehicle_breakdowns never becomes 0.
Code: Select all
/* disabled breakdowns? */
if (_opt.diff.vehicle_breakdowns < 1)
return;
I have yet to find out exactly what causes this, but I was able to kill the breakdowns by just removing the if and letting it always return ;P
Posted: 05 Mar 2005 23:09
by henrik
Another observation: As cities expand, they will destroy any industries in their way... I find this extremely annoying.
EDIT: Fixed, i think, by changing
Code: Select all
if (ti.tileh == 0 || ti.type == MP_HOUSE)
return;
to
Code: Select all
if (ti.tileh == 0 || ti.type == MP_HOUSE || ti.type == MP_INDUSTRY)
return;
in town_cmd.c
EDIT again: Nope, that didn't do it.
EDIT again: There, did it. Not sure if I did it "right" however so I suggest the maintainers do it themselves, it was easy

Posted: 06 Mar 2005 01:31
by Darkvater
You mean in the editor towns destroy industries

Posted: 06 Mar 2005 01:52
by henrik
Nope, in-game. And I found the cause: I've been playing with the magic bulldozer cheat. This caused cities and competitors to simply kill industries where they wanted to build like they were trees or something ;P
So, new fix, in ClearTile_Industry in industry_cmd.c:
Code: Select all
if ((_current_player != OWNER_WATER && _game_mode != GM_EDITOR &&
!(_cheats.magic_bulldozer.value && IS_HUMAN_PLAYER(_current_player))) ||
(_current_player == OWNER_WATER && i->type == IT_OIL_RIG) ) {
Posted: 06 Mar 2005 16:58
by tecxx
henrik, please read this posting:
http://www.tt-forums.net/viewtopic.php?t=13686
it describes the same thing you found out, and the very interesting fact that this problem occures only after loading a game.
Posted: 06 Mar 2005 16:58
by tecxx
it seems that after loading a game the struct's of the difficulty window and the one of the game are no longer the same.
Posted: 06 Mar 2005 18:55
by henrik
Indeed. I'm too lazy to dig out the real cause, I don't know the codebase, after I killed breakdowns completely I'm happy

I'll let the maintainers fix the parameter savings bug properly.
Posted: 07 Mar 2005 14:57
by Dune
Henrik, can you tell me how i fix the breakdowns thing? or send me a file that fix it or something...im frustrated over those damn trains stopping in my networks
Please help
Posted: 07 Mar 2005 19:26
by henrik
Send me a PM with your e-mail address and I'll send you an exe with breakdowns killed when I go to these boards the next time.
Posted: 07 Mar 2005 20:08
by Darkvater
henrik wrote:Nope, in-game. And I found the cause: I've been playing with the magic bulldozer cheat. This caused cities and competitors to simply kill industries where they wanted to build like they were trees or something ;P
Cheat is a cheat, so that's your own fault

. Don't play with cheats or accept that the AI and Towns will both love to destroy your industries.
Posted: 07 Mar 2005 20:30
by Dune
Henrik: the no breakdowns "fix" that you made only triggers more synch failures in multiplayer
I hope the developers/bug fixers manage to fix this bug soon. Its not much playable as it is right now.