The International Simutrans Forum

Development => Patches & Projects => Incorporated Patches and Solved Bug Reports => Topic started by: jk271 on October 16, 2012, 08:47:19 PM

Title: r5984 and earlier: AI does not obey option allow_buying_obsolete_vehicles=off
Post by: jk271 on October 16, 2012, 08:47:19 PM
Hi,
I have been playing sim-r5984 with several AIs. My game began in 1930 and I have been playing with timeline. Purchase of obsolete vehicles was disabled in settings. But one of AI created train having obsolete vehicles.

Option enable/disable allow_buying_obsolete vehicles probably does not apply to AI.

It might be a feature, but I think, it is a bug. Such a feature/bug is being in game for a long time.

OS: 32bit Linux on 32bit CPU
pakset: pak64, other not tested
severity: low
link to saved game:
http://simutrans-germany.com/files/upload/r5984-m1521-1931.sve

Regards jk271


P.S. I like improvement of AI goods. AI goods is able to make money with pak64 now !
Title: Re: r5984 and earlier: AI does not obey option allow_buying_obsolete_vehicles=off
Post by: Dwachs on October 19, 2012, 06:56:15 PM
Quote from: jk271 on October 16, 2012, 08:47:19 PM
Option enable/disable allow_buying_obsolete vehicles probably does not apply to AI.

It might be a feature, but I think, it is a bug. Such a feature/bug is being in game for a long time.
Yes indeed, this is very old behavior of AI player. I do not know, whether this is intended or not.

The no-obsolete-vehicle option was introduced years later.
Title: Re: r5984 and earlier: AI does not obey option allow_buying_obsolete_vehicles=off
Post by: paichtis on October 19, 2012, 08:18:20 PM
On the other hand players can (sometimes) also bypass this option.
(not posting here how but if a dev wants to know how to fix the hole I'll send him a private message)
Title: Re: r5984 and earlier: AI does not obey option allow_buying_obsolete_vehicles=off
Post by: jk271 on October 19, 2012, 09:07:06 PM
Quote from: Dwachs on October 19, 2012, 06:56:15 PM
Yes indeed, this is very old behavior of AI player. I do not know, whether this is intended or not.

The no-obsolete-vehicle option was introduced years later.

I have not known about succession of changes leading to current state of game. Thank you for point it out.

In my opinion is, that AI should not do it. Rules should be same for all players (except some differences for public player).

On the other hand the change probably needs voice from other simutrans comunity members. At least from developers.
Title: Re: r5984 and earlier: AI does not obey option allow_buying_obsolete_vehicles=off
Post by: prissi on October 19, 2012, 10:16:44 PM
Initially the replacer for unknow vehicles on load time was the same than the AI seach. And the former must find a vehicle or simutrans would have crashed. So it was without timeline. Even though the AI does not use depots (There was a patch, but it had some problems) it should use no obsolete vehicles of not allowed.
Title: Re: r5984 and earlier: AI does not obey option allow_buying_obsolete_vehicles=off
Post by: Dwachs on November 15, 2012, 02:40:34 PM
here is a patch. I did not find a more elegant solution. any comments?
Title: Re: r5984 and earlier: AI does not obey option allow_buying_obsolete_vehicles=off
Post by: prissi on November 15, 2012, 03:15:41 PM
I do not find this very inelegant. Especially since the scripted AI may want such a function too.
Title: Re: r5984 and earlier: AI does not obey option allow_buying_obsolete_vehicles=off
Post by: Dwachs on November 29, 2012, 07:47:17 AM
In r6087.