Re: Trans AI .:10.03.07 :. (Rail-less)
Posted: 17 Dec 2012 21:45
fanioz has been gone over 2 years now, i don't think he'll be coming back
The place to talk about Transport Tycoon
https://www.tt-forums.net/
Code: Select all
if (!_Mgr_B.AllowTryStation(_S_Type)) return 2;
ThanksSteffl wrote:Hi,
There's a new version of Trans AI on bananas and no word about it in this thread?
Time to mention it here,
but I'm sorry that my true intention was to make a bug report:
TransAI v. 130711, OpenTTD 1.3.1
This is the line in code where the bug happens:
The value of _Mgr_B could be 'null', I think it's not enough protected that this don't can happen.Code: Select all
if (!_Mgr_B.AllowTryStation(_S_Type)) return 2;
which NewGrf ?Steffl wrote: And I had to disallow Planes for Trans or it bancrupts after short time because of the high infrastructure costs of airports.
Infrastructure maintenance is a new setting in OpenTTD 1.2+(?) itself. High infrastructure maintenance costs for airports might thus happen without any NewGRF being used.fanioz wrote: which NewGrf ?
And yeah, his right. Your AI always bankrupt because airport's maintenance cost.Steffl wrote:And I had to disallow Planes for Trans or it bancrupts after short time because of the high infrastructure costs of airports.
Code: Select all
// Patch: unsupported events, keep AI running
case AIEvent.ET_TOWN_FOUNDED:
Warn ("Unsupported event: ET_TOWN_FOUNDED");
break
case AIEvent.ET_AIRCRAFT_DEST_TOO_FAR:
Warn ("Unsupported event: ET_AIRCRAFT_DEST_TOO_FAR");
break
case AIEvent.ET_ADMIN_PORT:
Warn ("Unsupported event: ET_ADMIN_PORT");
break
case AIEvent.ET_WINDOW_WIDGET_CLICK:
Warn ("Unsupported event: ET_WINDOW_WIDGET_CLICK");
break
case AIEvent.ET_GOAL_QUESTION_ANSWER:
Warn ("Unsupported event: ET_GOAL_QUESTION_ANSWER");
break
// Patch end
if (counter % My.ID != 0) continue;
dbg: [script] [1] [W] [Water Connector] failed: ERR_SITE_UNSUITABLE
dbg: [script] [1] [W] [Water Connector] failed: ERR_SITE_UNSUITABLE
dbg: [script] [1] [W] [Water Connector] failed: ERR_SITE_UNSUITABLE
dbg: [script] [1] [W] [Water Connector] failed: ERR_SITE_UNSUITABLE
dbg: [script] [1] [W] [Water Connector] failed: ERR_SITE_UNSUITABLE
dbg: [script] [1] [W] [Water Connector] failed: ERR_SITE_UNSUITABLE
dbg: [script] [1] [W] [Water Connector] failed: ERR_SITE_UNSUITABLE
dbg: [script] [1] [W] [Water Connector] failed: ERR_SITE_UNSUITABLE
dbg: [script] [1] [W] [Water Connector] failed: ERR_SITE_UNSUITABLE
dbg: [script] [1] [W] [Water Connector] failed: ERR_SITE_UNSUITABLE
dbg: [script] [1] [W] [Water Connector] failed: ERR_SITE_UNSUITABLE
dbg: [script] [1] [Water Tracker] sources: 1 dests: 1
dbg: [script] [1] [Water Tracker] max len: 42
dbg: [script] [1] [Water Tracker] original max len: 42
dbg: [script] [1] [Water Tracker] calculated multiplier: 1
dbg: [script] [1] [Water Tracker] Opening tile 1
dbg: [script] [1] [Water Tracker] nautical max len: 38
dbg: [script] [1] [Water Tracker] path finding # -1
dbg: [script] [1] [Events Check] No more event to save
dbg: [script] [1] [Water Tracker] path finding succeed
dbg: [script] [1] [Water Connector] est. Cost 262
dbg: [script] [1] [I] [Water Connector] Have 262 [true] -> Good Job ^_^
dbg: [script] [1] [W] [Water Connector] failed: ERR_SITE_UNSUITABLE
dbg: [script] [1] [W] [Water Connector] failed: ERR_SITE_UNSUITABLE
dbg: [script] [1] [W] [Water Connector] failed: ERR_SITE_UNSUITABLE
dbg: [script] [1] [W] [Water Connector] failed: ERR_SITE_UNSUITABLE
dbg: [script] [1] [W] [Water Connector] failed: ERR_SITE_UNSUITABLE
dbg: [script] [1] [W] [Water Connector] failed: ERR_SITE_UNSUITABLE
dbg: [script] [1] [W] [Water Connector] failed: ERR_SITE_UNSUITABLE
dbg: [script] [1] [W] [Water Connector] failed: ERR_SITE_UNSUITABLE
dbg: [script] [1] [W] [Water Connector] failed: ERR_SITE_UNSUITABLE
dbg: [script] [1] [W] [Water Connector] failed: ERR_SITE_UNSUITABLE
dbg: [script] [1] [W] [Water Connector] failed: ERR_SITE_UNSUITABLE
dbg: [script] [1] [W] [Water Connector] failed: ERR_SITE_UNSUITABLE
dbg: [script] [1] [W] [Water Connector] failed: ERR_SITE_UNSUITABLE
dbg: [script] [1] [W] [Water Connector] failed: ERR_SITE_UNSUITABLE
dbg: [script] [1] [W] [Water Connector] failed: ERR_SITE_UNSUITABLE
dbg: [script] [1] [W] [Water Connector] failed: ERR_SITE_UNSUITABLE
dbg: [script] [1] [W] [Water Connector] failed: ERR_SITE_UNSUITABLE
dbg: [script] [1] [W] [Water Connector] failed: ERR_SITE_UNSUITABLE
dbg: [script] [1] [W] [Water Connector] failed: ERR_SITE_UNSUITABLE
dbg: [script] [1] [W] [Water Connector] failed: ERR_SITE_UNSUITABLE
dbg: [script] [1] [I] [Water Tracker] sources: 1 dests: 1
dbg: [script] [1] [I] [Water Tracker] max len: 44
dbg: [script] [1] [I] [Water Tracker] original max len: 44
dbg: [script] [1] [I] [Water Tracker] calculated multiplier: 1
dbg: [script] [1] [I] [Water Tracker] Opening tile 1
dbg: [script] [1] [I] [Water Tracker] nautical max len: 40
dbg: [script] [1] [I] [Water Tracker] path finding # -1
dbg: [script] [1] [I] [Events Check] No more event to save
dbg: [net] [udp] advertising to master server
dbg: [script] [1] [I] [Events Check] No more event to save
dbg: [script] [1] [E] This script took too long to Save.
dbg: [script] The script died unexpectedly.
One of the running scripts crashed. Please report this to the script author with a screenshot of the AI/Game Script Debug Window
dbg: [script] [1] [I] Please report the error to the following URL:
dbg: [script] [1] [I] http://dev.openttdcoop.org/projects/ai-trans/issues
dbg: [script] [1] [W] [Water Connector] failed: ERR_SITE_UNSUITABLE
dbg: [script] [1] [W] [Water Connector] failed: ERR_SITE_UNSUITABLE
dbg: [script] [1] [W] [Water Connector] failed: ERR_SITE_UNSUITABLE
dbg: [script] [1] [W] [Water Connector] failed: ERR_SITE_UNSUITABLE
dbg: [script] [1] [W] [Water Connector] failed: ERR_SITE_UNSUITABLE
dbg: [script] [1] [W] [Water Connector] failed: ERR_SITE_UNSUITABLE
dbg: [script] [1] [W] [Water Connector] failed: ERR_SITE_UNSUITABLE
dbg: [script] [1] [W] [Water Connector] failed: ERR_SITE_UNSUITABLE
dbg: [script] [1] [W] [Water Connector] failed: ERR_SITE_UNSUITABLE
dbg: [script] [1] [W] [Water Connector] failed: ERR_SITE_UNSUITABLE
dbg: [script] [1] [W] [Water Connector] failed: ERR_SITE_UNSUITABLE
dbg: [script] [1] [W] [Water Connector] failed: ERR_SITE_UNSUITABLE
dbg: [script] [1] [Water Tracker] sources: 1 dests: 1
dbg: [script] [1] [Water Tracker] max len: 20
dbg: [script] [1] [Water Tracker] original max len: 20
dbg: [script] [1] [Water Tracker] calculated multiplier: 1
dbg: [script] [1] [Water Tracker] Opening tile 1
dbg: [script] [1] [Water Tracker] nautical max len: 20
dbg: [script] [1] [Water Tracker] path finding # -1
dbg: [script] [1] [W] [Water Tracker] path finding failed
dbg: [script] [1] [Water Tracker] sources: 1 dests: 1
dbg: [script] [1] [Water Tracker] max len: 20
dbg: [script] [1] [Water Tracker] original max len: 20
dbg: [script] [1] [I] [Water Tracker] calculated multiplier: 1
dbg: [script] [1] [I] [Water Tracker] Opening tile 1
dbg: [script] [1] [I] [Water Tracker] nautical max len: 20
dbg: [script] [1] [I] [Water Tracker] path finding # -1
dbg: [script] [1] [W] [Water Tracker] path finding failed
dbg: [script] [1] [I] [Water Tracker] sources: 1 dests: 1
dbg: [script] [1] [I] [Water Tracker] max len: 39
dbg: [script] [1] [I] [Water Tracker] original max len: 39
dbg: [script] [1] [I] [Water Tracker] calculated multiplier: 1
dbg: [script] [1] [I] [Water Tracker] Opening tile 1
dbg: [script] [1] [I] [Water Tracker] nautical max len: 35
dbg: [script] [1] [I] [Water Tracker] path finding # -1
dbg: [script] [1] [I] [Events Check] No more event to save
dbg: [script] [1] [E] This script took too long to Save.
dbg: [script] The script died unexpectedly.
One of the running scripts crashed. Please report this to the script author with a screenshot of the AI/Game Script Debug Window
dbg: [script] [1] [I] Please report the error to the following URL:
dbg: [script] [1] [I] http://dev.openttdcoop.org/projects/ai-trans/issues
workaround:xarick wrote:Trans crashes with Modulo by Zero error when trying to place an HQ while being Company #1 (0 in code).
if (counter % My.ID != 0) continue;
Code: Select all
if (My.ID !=0 && counter % My.ID != 0) continue;
Hello, I've not try CargoDist yet. I can't comment on this.Akip Nax Dhagadoe wrote:Hey man, will this AI works with CargoDist?
Akip Nax Dhagadoe wrote:And yeah, his right. Your AI always bankrupt because airport's maintenance cost.Steffl wrote:And I had to disallow Planes for Trans or it bancrupts after short time because of the high infrastructure costs of airports.
Regards, Akip
Thanks, I'll look into "ET_AIRCRAFT_DEST_TOO_FAR" to see what can I do with that. The reason for deleting "dont call me" line was because I dont want to handle every AIEvent brodcasted.HGus wrote:Hi Fanioz, nice to see you again.
I see you fixed the "dont call me" error at events class (by deleting the lines).
I had done my own fix some time ago, by adding the missing events that triggered the try-catch, check it (currently there are dummy actions, but maybe you can do it better if needed) Actually, I think the only useful for you could be ET_AIRCRAFT_DEST_TOO_FAR, to check bad behaviour, the others are only for AI/GS that can manage interactive stuff...
Thanks, noted for the later-than-sooner versionHGus wrote: BTW, your AI works pretty well when starting from early eras (tested so far from 1700), but when it gets enough money it starts buying every competitor thats goes bankrupcy, taking over more and more useless stations around the map, making the game very ugly. Also it builds a ship depot for every sea route, wich leads to blockades in small water areas, and then I am forced to restart the AI to clean the messing...
Thanks, fixed.xarick wrote:Trans crashes with Modulo by Zero error when trying to place an HQ while being Company #1 (0 in code).if (counter % My.ID != 0) continue;
xarick wrote:crashed: it took too long to save, while testing only ships for 100 years.
xarick wrote:Trans is massing ships on the same route, but they get lost.
xarick wrote:Crashed right after buying Chopper
xarick wrote:Another cpu evaluator crash
Thanks for the report. But I have no idea what was wrong. Is this related to #opcode limit or there was another thing that "limit" the valuator. I'll try to figure it out.xarick wrote:CPU evaluator crash