MailAI

Discuss the new AI features ("NoAI") introduced into OpenTTD 0.7, allowing you to implement custom AIs, and the new Game Scripts available in OpenTTD 1.2 and higher.

Moderator: OpenTTD Developers

Hephi
Engineer
Engineer
Posts: 72
Joined: 25 Oct 2009 09:56
Location: Belgium

Re: MailAI

Post by Hephi »

You're absolutely right, didn't see it properly. Then it's more then likely an index out of bounds thing as the concat function takes the first four letters of the town name.
I'll probably have time tomorrow to take a look. Thanks for pointing this out guys/girls. :)

Edited to let you know the patched version is up.
--------------------------------------------------
MailAI, a casual postal service for openTTD.
--------------------------------------------------
Kogut
Tycoon
Tycoon
Posts: 2493
Joined: 26 Aug 2009 06:33
Location: Poland

Re: MailAI

Post by Kogut »

A crash.
Attachments
Przechwytywanie.PNG
Przechwytywanie.PNG (41.81 KiB) Viewed 3822 times
Correct me If I am wrong - PM me if my English is bad
AIAI - AI for OpenTTD
Hephi
Engineer
Engineer
Posts: 72
Joined: 25 Oct 2009 09:56
Location: Belgium

Re: MailAI

Post by Hephi »

Thank you for reporting Kogut. In two months I'll be home again and will take a look. Hope you enjoyed MailAI so far.
--------------------------------------------------
MailAI, a casual postal service for openTTD.
--------------------------------------------------
User avatar
kamnet
Moderator
Moderator
Posts: 8532
Joined: 28 Sep 2009 17:15
Location: Eastern KY
Contact:

Re: MailAI

Post by kamnet »

Started a save game and MailAI crashed.
Attachments
mailai-error.png
mailai-error.png (12.76 KiB) Viewed 12394 times
Hephi
Engineer
Engineer
Posts: 72
Joined: 25 Oct 2009 09:56
Location: Belgium

Re: MailAI

Post by Hephi »

Thanks Kamnet,

I'm back on land and probably will be fiddling around with openttd soon (although I'm trying to get the hang of Unity as well).

Hope you've enjoyed the AI in other games.
--------------------------------------------------
MailAI, a casual postal service for openTTD.
--------------------------------------------------
Benstein
Engineer
Engineer
Posts: 1
Joined: 03 Dec 2017 23:19

Re: MailAI

Post by Benstein »

Hallo,

Ik kreeg bijgevoegde foutmelding en dacht: Geweldig spel, kan alleen maar beter worden maar wel dmv feedback. Dus bij dezen :)
Attachments
error.jpg
error.jpg (224.91 KiB) Viewed 11527 times
User avatar
acs121
Tycoon
Tycoon
Posts: 1956
Joined: 03 Nov 2017 18:57
Location: Courbevoie, near Paris, France

Re: MailAI

Post by acs121 »

Are road vehicles or trains disabled in your game ? Check the parameters.
xarick
Transport Coordinator
Transport Coordinator
Posts: 335
Joined: 26 Feb 2015 00:52

Re: MailAI

Post by xarick »

cpu valuator crash
dbg: [script] [0] Renewing: Road Vehicle 8
dbg: [script] [0] Renewed: Road Vehicle 8 as Road Vehicle 11
dbg: [script] [0] 12 towns with enough population for Mail Service.
dbg: [script] [0] Found 9 possible road routes. (broad search)
dbg: [script] [0] 12 towns with enough population for Mail Service.
dbg: [script] [0] Found 9 possible road routes. (broad search)
dbg: [script] [0] 12 towns with enough population for Mail Service.
dbg: [script] [0] Found 9 possible road routes. (broad search)
dbg: [script] [0] 12 towns with enough population for Mail Service.
dbg: [script] [0] Found 9 possible road routes. (broad search)
dbg: [script] [0] [I] 13 towns with enough population for Mail Service.
dbg: [script] [0] [I] Found 9 possible road routes. (broad search)
dbg: [script] [0] [I] 14 towns with enough population for Mail Service.
dbg: [script] [0] [I] Found 11 possible road routes. (broad search)
dbg: [script] [0] [I] Re-using existing truck station in Sunninghall.
dbg: [script] [0] [I] ----------------------------------------------
dbg: [script] [0] [W] Route created connecting Sunninghall, Guntborough,
dbg: [script] [0] [I] Using Reynard Mail Truck at max. speed: 55
dbg: [script] [0] [I] Distance travelled: 57 in 18 days.
dbg: [script] [0] [I] ----------------------------------------------
dbg: [script] [0] Your script made an error: excessive CPU usage in valuator function
dbg: [script] [0]
dbg: [script] [0] *FUNCTION [GetNewTruckStopList()] mailai-2.22\TownManager.nut line [185]
dbg: [script] [0] *FUNCTION [HasTruckStopPotential()] mailai-2.22\TownManager.nut line [158]
dbg: [script] [0] *FUNCTION [BuildLine()] mailai-2.22\BuildManager.nut line [28]
dbg: [script] [0] *FUNCTION [BuildNewRoute()] mailai-2.22\RoutePlanner.nut line [164]
dbg: [script] [0] *FUNCTION [Start()] mailai-2.22\main.nut line [145]
dbg: [script] [0]
dbg: [script] [0] [dist] 14
dbg: [script] [0] [tile_list] INSTANCE
dbg: [script] [0] [S] [result_list] INSTANCE
dbg: [script] [0] [S] [articulated] false
dbg: [script] [0] [S] [town] 11
dbg: [script] [0] [S] [this] INSTANCE
dbg: [script] [0] [S] [town_id] 11
dbg: [script] [0] [S] [this] INSTANCE
dbg: [script] [0] [S] [town_id2] 13
dbg: [script] [0] [S] [town_id1] 11
dbg: [script] [0] [S] [engine] 127
dbg: [script] [0] [S] [route_array] ARRAY
dbg: [script] [0] [S] [this] INSTANCE
dbg: [script] [0] [S] [route_object] NULL
dbg: [script] [0] [S] [engine] NULL
dbg: [script] [0] [S] [next_route] ARRAY
dbg: [script] [0] [S] [this] INSTANCE
dbg: [script] [0] [S] [month] 12
dbg: [script] [0] [S] [route_planner] INSTANCE
dbg: [script] [0] [S] [this] INSTANCE
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] [0] [I] Please report the error to the following URL:
dbg: [script] [0] [I] http://www.tt-forums.net/viewtopic.php?t=52478
Attachments
Mail AI, 1st Dec 2016.sav
(163.6 KiB) Downloaded 180 times
openttdCore5log.txt
(90.83 KiB) Downloaded 168 times
Formerly known as Samu
xarick
Transport Coordinator
Transport Coordinator
Posts: 335
Joined: 26 Feb 2015 00:52

Re: MailAI

Post by xarick »

Mail AI was attempting to resize a train, but there seems to be issues when attaching dual-headed engines. The resulting train became longer and could no longer fit the station. When trying to reverse from the station, it became stuck between it and the one-way path signal.
Attachments
Sem nome, 31 Dez 1967.png
(72.18 KiB) Not downloaded yet
Sem nome, 15 Nov 1967.sav
(82.29 KiB) Downloaded 152 times
Formerly known as Samu
Baldy's Boss
Tycoon
Tycoon
Posts: 1396
Joined: 23 Feb 2014 22:02

Re: MailAI

Post by Baldy's Boss »

I'm getting recurring "Excessive CPU usage in valuator" crashes on this AI.
WESCO United
Engineer
Engineer
Posts: 1
Joined: 11 Mar 2020 10:42

Re: MailAI

Post by WESCO United »

Baldy's Boss wrote: 21 Dec 2018 23:27 I'm getting recurring "Excessive CPU usage in valuator" crashes on this AI.
I, too, have been getting the same recurring error. The only time it worked to any extend was my first successful game. It functioned for about 3 years before crashing, and no matter how many times I reload it, it'd crash immediately afterwards.
Image
If possible I'd like to know of any possible fixes, as I like having AI running about doing miscelaneous stuff while I manage my own industry.
Baldy's Boss
Tycoon
Tycoon
Posts: 1396
Joined: 23 Feb 2014 22:02

Re: MailAI

Post by Baldy's Boss »

WESCO United wrote: 11 Mar 2020 10:55
Baldy's Boss wrote: 21 Dec 2018 23:27 I'm getting recurring "Excessive CPU usage in valuator" crashes on this AI.
I, too, have been getting the same recurring error. The only time it worked to any extend was my first successful game. It functioned for about 3 years before crashing, and no matter how many times I reload it, it'd crash immediately afterwards.
Image
If possible I'd like to know of any possible fixes, as I like having AI running about doing miscelaneous stuff while I manage my own industry.
Well,the author appears to have last posted in 2014,so the Version 21 that keeps generating that error is presumably still the most recent.
ZDevil
Engineer
Engineer
Posts: 1
Joined: 14 May 2021 01:26

Re: MailAI

Post by ZDevil »

It crashed -- not sure why. I'm running a few graphical changers, but nothing that actually effects gameplay. I'm getting the overuse of CPU error as well.
Attachments
Screenshot 2021-05-13 212824.jpg
(639.89 KiB) Not downloaded yet
Hephi
Engineer
Engineer
Posts: 72
Joined: 25 Oct 2009 09:56
Location: Belgium

Re: MailAI

Post by Hephi »

Hi, thank you all for posting. I have abandonned development of MailAI years ago. I have seen openTTD on Steam today and was having a look. I'm surprised to see MailAI is still being tried out. I might take a look at the code again but I haven't coded in years so I'm a bit afraid of the re-learning curve. Seems like my spaghetti code eats up the CPU.
--------------------------------------------------
MailAI, a casual postal service for openTTD.
--------------------------------------------------
kurt_at
Engineer
Engineer
Posts: 1
Joined: 08 Jun 2022 13:15

Error

Post by kurt_at »

Error Report Screenshots
Attachments
T, 1934-01-22#1.png
(2.51 MiB) Not downloaded yet
T, 1934-01-22#2.png
(2.5 MiB) Not downloaded yet
T, 1934-01-22#3.png
(2.5 MiB) Not downloaded yet
Last edited by kurt_at on 08 Jun 2022 13:21, edited 1 time in total.
Post Reply

Return to “OpenTTD AIs and Game Scripts”

Who is online

Users browsing this forum: No registered users and 7 guests