Constant train breakdowns

Got a problem with OpenTTD? Find some help here.

Moderator: OpenTTD Developers

Post Reply
henrik
Engineer
Engineer
Posts: 19
Joined: 05 Mar 2005 12:53

Constant train breakdowns

Post 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
Attachments
Fort Chedham Transport, 25th Aug 2028.zip
(19.92 KiB) Downloaded 210 times
haakon99
Traffic Manager
Traffic Manager
Posts: 155
Joined: 15 Apr 2004 20:54

Post 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
henrik
Engineer
Engineer
Posts: 19
Joined: 05 Mar 2005 12:53

Post 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
henrik
Engineer
Engineer
Posts: 19
Joined: 05 Mar 2005 12:53

Post 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 :P
User avatar
Darkvater
Tycoon
Tycoon
Posts: 3053
Joined: 24 Feb 2003 18:45
Location: Hong Kong

Post by Darkvater »

You mean in the editor towns destroy industries :)
TrueLight: "Did you bother to read any of the replies, or you just pressed 'Reply' and started typing?"
<@[R-Dk]FoRbiDDeN> "HELP, this litte arrow thing keeps following my mouse, and I can't make it go away."
henrik
Engineer
Engineer
Posts: 19
Joined: 05 Mar 2005 12:53

Post 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) ) {
tecxx
Engineer
Engineer
Posts: 106
Joined: 23 Jun 2003 19:31
Location: Tirol/Austria
Contact:

Post 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.
to everyone who's coding on openttd: YOU ROCK !!!
tecxx
Engineer
Engineer
Posts: 106
Joined: 23 Jun 2003 19:31
Location: Tirol/Austria
Contact:

Post 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.
to everyone who's coding on openttd: YOU ROCK !!!
henrik
Engineer
Engineer
Posts: 19
Joined: 05 Mar 2005 12:53

Post 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.
Dune
Engineer
Engineer
Posts: 45
Joined: 14 Dec 2003 15:23
Location: Norway

Post 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 :x

Please help
henrik
Engineer
Engineer
Posts: 19
Joined: 05 Mar 2005 12:53

Post 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.
User avatar
Darkvater
Tycoon
Tycoon
Posts: 3053
Joined: 24 Feb 2003 18:45
Location: Hong Kong

Post 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.
TrueLight: "Did you bother to read any of the replies, or you just pressed 'Reply' and started typing?"
<@[R-Dk]FoRbiDDeN> "HELP, this litte arrow thing keeps following my mouse, and I can't make it go away."
Dune
Engineer
Engineer
Posts: 45
Joined: 14 Dec 2003 15:23
Location: Norway

Post by Dune »

Henrik: the no breakdowns "fix" that you made only triggers more synch failures in multiplayer :cry:

I hope the developers/bug fixers manage to fix this bug soon. Its not much playable as it is right now.
Post Reply

Return to “OpenTTD Problems”

Who is online

Users browsing this forum: No registered users and 1 guest