OpenTTD doesn't see AIs

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

Post Reply
User avatar
Core Xii
Traffic Manager
Traffic Manager
Posts: 228
Joined: 08 Apr 2008 09:47
Location: Finland

OpenTTD doesn't see AIs

Post by Core Xii »

AI libraries, but not AIs themselves. I can even download AIs from Bananas and confirm them present in the ai directory, yet OpenTTD does not find them there. All other content (NewGRFs etc.) have always worked fine...
User avatar
Zuu
OpenTTD Developer
OpenTTD Developer
Posts: 4553
Joined: 09 Jun 2003 18:21
Location: /home/sweden

Re: OpenTTD doesn't see AIs

Post by Zuu »

Please try to give us some more clues if you want help.
  • Version of OpenTTD
  • How do you know that OpenTTD finds the libraries but not the AIs?
  • Does Game Scripts work for you?
  • Layout of your installation (eg. how did you install it, do you keep openttd.cfg at some exotic place?)
My OpenTTD contributions (AIs, Game Scripts, patches, OpenTTD Auto Updater, and some sprites)
Junctioneer (a traffic intersection simulator)
User avatar
Core Xii
Traffic Manager
Traffic Manager
Posts: 228
Joined: 08 Apr 2008 09:47
Location: Finland

Re: OpenTTD doesn't see AIs

Post by Core Xii »

Zuu wrote:Version of OpenTTD
I use Chill's patch pack h4f8131fc, but also tried with vanilla 1.1.5.
Zuu wrote:How do you know that OpenTTD finds the libraries but not the AIs?
The libraries have the green circle next to them on the online content browser. Any AIs I try to download do not.
Zuu wrote:Does Game Scripts work for you?
I see no mention of "game scripts" anywhere on the online content browser. What are you referring to?
Zuu wrote:Layout of your installation (eg. how did you install it, do you keep openttd.cfg at some exotic place?)
Pretty simple Windows XP setup; extract a zipped binary release into program files, keep config and all NewGRF etc. content in my documents. I also tried copying the AIs into the program directory without avail.
User avatar
Level Crossing
Tycoon
Tycoon
Posts: 1187
Joined: 07 Feb 2011 22:04
Location: East Coast, United States

Re: OpenTTD doesn't see AIs

Post by Level Crossing »

Core Xii wrote:
Zuu wrote:Does Game Scripts work for you?
I see no mention of "game scripts" anywhere on the online content browser. What are you referring to?
1.2.0+ only feature, distributed similar to AIs.
Like my avatar? See my screenshot thread
User avatar
Zuu
OpenTTD Developer
OpenTTD Developer
Posts: 4553
Joined: 09 Jun 2003 18:21
Location: /home/sweden

Re: OpenTTD doesn't see AIs

Post by Zuu »

Core Xii wrote:
Zuu wrote:Layout of your installation (eg. how did you install it, do you keep openttd.cfg at some exotic place?)
Pretty simple Windows XP setup; extract a zipped binary release into program files, keep config and all NewGRF etc. content in my documents. I also tried copying the AIs into the program directory without avail.
If you undo that move (so that you don't have any AI files in your program directory) and rename C:Documents and settings<your name>My DocumentsOpenTTD into C:Documents and settings<your name>My Documents_OpenTTD, and then start OpenTTD, it shouldn't find any of your configs etc. Try to start OpenTTD and see how that works.

If you resolve the problem, the problem is related to files in your now _OpenTTD directory. If that didn't resolve your issue, you have a problem elsewhere. (but could have one also in _OpenTTD)


Edit: Did you try to go to the AI settings and in there bring up the list of installed AIs?
My OpenTTD contributions (AIs, Game Scripts, patches, OpenTTD Auto Updater, and some sprites)
Junctioneer (a traffic intersection simulator)
User avatar
Core Xii
Traffic Manager
Traffic Manager
Posts: 228
Joined: 08 Apr 2008 09:47
Location: Finland

Re: OpenTTD doesn't see AIs

Post by Core Xii »

Zuu wrote:If you [...] Try to start OpenTTD and see how that works.

If that didn't resolve your issue, you have a problem elsewhere. (but could have one also in _OpenTTD)
Done, no effect. Still fails to detect AIs.
Zuu wrote:Did you try to go to the AI settings and in there bring up the list of installed AIs?
Yes. It complains that no suitable AIs are available, and the 'Select AI' list contains only 'Random AI'.
User avatar
Core Xii
Traffic Manager
Traffic Manager
Posts: 228
Joined: 08 Apr 2008 09:47
Location: Finland

Re: OpenTTD doesn't see AIs

Post by Core Xii »

Huh, I should've been more thorough. I downloaded AdmiralAI and it worked! I had only tried WmDOT, which, for whatever reason, OpenTTD fails to detect. My own AI which I was writing had a problem where a setting defined in the info had what was probably an invalid name (containing spaces and stuff). When I changed that, my AI showed up as well.
User avatar
Core Xii
Traffic Manager
Traffic Manager
Posts: 228
Joined: 08 Apr 2008 09:47
Location: Finland

Re: OpenTTD doesn't see AIs

Post by Core Xii »

I think it's got to do with the API version defined in the info.nut. OpenTTD just silently ignores all AIs with API versions higher than available.
User avatar
planetmaker
OpenTTD Developer
OpenTTD Developer
Posts: 9432
Joined: 07 Nov 2007 22:44
Location: Sol d

Re: OpenTTD doesn't see AIs

Post by planetmaker »

Core Xii wrote:I think it's got to do with the API version defined in the info.nut. OpenTTD just silently ignores all AIs with API versions higher than available.
It does that, yes. By intention.
User avatar
Core Xii
Traffic Manager
Traffic Manager
Posts: 228
Joined: 08 Apr 2008 09:47
Location: Finland

Re: OpenTTD doesn't see AIs

Post by Core Xii »

Well, I'm of the opinion that there should be some way to find out why an AI isn't loading. If it just silently ignores, how is one supposed to know what exactly is wrong?
User avatar
Zuu
OpenTTD Developer
OpenTTD Developer
Posts: 4553
Joined: 09 Jun 2003 18:21
Location: /home/sweden

Re: OpenTTD doesn't see AIs

Post by Zuu »

You could ask the author of wmDOT to in Bananas indicate a correct minimum OpenTTD version so that it will not be visible for download on OpenTTD < 1.2.
My OpenTTD contributions (AIs, Game Scripts, patches, OpenTTD Auto Updater, and some sprites)
Junctioneer (a traffic intersection simulator)
Yexo
Tycoon
Tycoon
Posts: 3663
Joined: 20 Dec 2007 12:49

Re: OpenTTD doesn't see AIs

Post by Yexo »

Core Xii wrote:Well, I'm of the opinion that there should be some way to find out why an AI isn't loading. If it just silently ignores, how is one supposed to know what exactly is wrong?
There is:
http://wiki.openttd.org/AI:Introduction wrote:Any errors that are found, both compile-time and run-time, are send to the AI Debug Window. If your info.nut doesn't load, you won't see the errors unless you enable the debug console from the command line of the game. -d ai=5.
User avatar
MinchinWeb
Traffic Manager
Traffic Manager
Posts: 225
Joined: 01 Feb 2011 12:41
Contact:

Re: OpenTTD doesn't see AIs

Post by MinchinWeb »

WmDOT v9 is indeed set to require version 1.2 of the API. Anyone know what revision of the nightly builds first supported v1.2 of the API?

@Core Xii - try version 8 of WmDOT. It should work with version 1.1.5 of OpenTTD. For now, you can download it off the first post of the WmDOT thread.
Alberta Town Names - 1500+ real names from 'Acme' to 'Zama City'
MinchinWeb's Random Town Name Generator - providing 2 million plus names...
WmDOT v13 - An AI that doubles as your highway department
Yexo
Tycoon
Tycoon
Posts: 3663
Joined: 20 Dec 2007 12:49

Re: OpenTTD doesn't see AIs

Post by Yexo »

MinchinWeb wrote:WmDOT v9 is indeed set to require version 1.2 of the API. Anyone know what revision of the nightly builds first supported v1.2 of the API?
The first nightly after the creation of the 1.1 branch, which means a nightly from over a year ago. However the 1.2 API only became "stable" with 1.2.0-RC1 (-beta1 can be argued too).
User avatar
MinchinWeb
Traffic Manager
Traffic Manager
Posts: 225
Joined: 01 Feb 2011 12:41
Contact:

Re: OpenTTD doesn't see AIs

Post by MinchinWeb »

Yexo wrote:
MinchinWeb wrote:WmDOT v9 is indeed set to require version 1.2 of the API. Anyone know what revision of the nightly builds first supported v1.2 of the API?
The first nightly after the creation of the 1.1 branch, which means a nightly from over a year ago. However the 1.2 API only became "stable" with 1.2.0-RC1 (-beta1 can be argued too).
I was hoping for an actual number... Bananas gives you options of v1.1.5, or nightly (but requires you to specify which one), with no options for beta or RC builds....
Alberta Town Names - 1500+ real names from 'Acme' to 'Zama City'
MinchinWeb's Random Town Name Generator - providing 2 million plus names...
WmDOT v13 - An AI that doubles as your highway department
User avatar
Zuu
OpenTTD Developer
OpenTTD Developer
Posts: 4553
Joined: 09 Jun 2003 18:21
Location: /home/sweden

Re: OpenTTD doesn't see AIs

Post by Zuu »

Here you can see when 1.2 was branched off trunk: http://finger.openttd.org/branches.txt
Here you can see which revision that the betas corresponds to: http://finger.openttd.org/tags.txt

As you can see it actually looks like 1.2 was branched off trunk after 1.2-RC3.

If you want to have 1.2-beta4 as minimum I would guess that you set r23879 as minimum nightly.
My OpenTTD contributions (AIs, Game Scripts, patches, OpenTTD Auto Updater, and some sprites)
Junctioneer (a traffic intersection simulator)
User avatar
MinchinWeb
Traffic Manager
Traffic Manager
Posts: 225
Joined: 01 Feb 2011 12:41
Contact:

Re: OpenTTD doesn't see AIs

Post by MinchinWeb »

Thanks Zuu :)
Alberta Town Names - 1500+ real names from 'Acme' to 'Zama City'
MinchinWeb's Random Town Name Generator - providing 2 million plus names...
WmDOT v13 - An AI that doubles as your highway department
Rubidium
OpenTTD Developer
OpenTTD Developer
Posts: 3815
Joined: 09 Feb 2006 19:15

Re: OpenTTD doesn't see AIs

Post by Rubidium »

Zuu wrote:As you can see it actually looks like 1.2 was branched off trunk after 1.2-RC3.
The logic you used here is incorrect. You can't say that because the revision of 1.2 is higher than a release candidate the branch was branched after that. The files just show the last changed revision of each of the branches. Or do you want to claim that 1.1 was branched after 1.2.0-bet2? Anyhow, 1.2 was branched just before 1.2.0-RC1.
User avatar
Core Xii
Traffic Manager
Traffic Manager
Posts: 228
Joined: 08 Apr 2008 09:47
Location: Finland

Re: OpenTTD doesn't see AIs

Post by Core Xii »

I now notice warnings in the game console. It's indeed saying that some AIs failed to compile. Might be useful to know why, though!
Post Reply

Return to “OpenTTD AIs and Game Scripts”

Who is online

Users browsing this forum: Google Adsense [Bot] and 18 guests