Page 1 of 1

Creating New AI

Posted: 12 Oct 2017 23:30
by TheFlame8
Hey everybody! I've been a lurker for a while but I'm trying to create my own AI.

I followed all the basic instructions with the info.nut and main.nut files, but my AI doesn't show up as an option when it's in either the Program Files or the documents sub folders (under the AI folder). What do I have to do to fix this? Thank you in advance!

(Note: I've compared my files to other AI ones and the intro stuff and I've done the code correctly, so I'm just confused if I need to compress it or something)

Re: Creating New AI

Posted: 13 Oct 2017 14:12
by Alberth
First check whether the files are detected, by running the openttd program with a -dmisc=9 option (open a command window and type "openttd -dmisc=9" without quotes).
The program dumps files that it finds, which should include your AI files.

For ease of debugging, you may want to move your regular content out of the way temporarily, to avoid too much output.

I am not sure what happens if your files have errors, likely they get reported somewhere, perhaps at the comand window too?

Re: Creating New AI

Posted: 06 Nov 2017 13:40
by HGus
Please post a copy of your info.nut, maybe the problem is there. Also check that your AI is in his own folder in the AIs folder.

Re: Creating New AI

Posted: 15 Feb 2021 07:11
by Vegotenks
Good Morning,

I recently did the same as the thread-creator and now I have exactly the same problems.
I'm running on Win10, the openttd directory is outside of the user structure created by Windows.
My "OpenTTD" directory is within this user-thing, under documents.
But my AI does not show up when I put it inside the directory <somepath>/openttd-1-10-3/ai/<AI-namespace> or C:Users/<my_username>/Documents/OpenTTD/ai/<AI-namespace>.

I already tried the command line suggested but it didn't work anyway.
Following now the files, as HGus said it could help, because there may be Errors inside.

When increasing the number of AIs, I get a red Error Window saying there are no AIs available, but i could download some via the online content system.


Has anyone experienced this before and would help in some way?

Thank you for your attention.

Re: Creating New AI

Posted: 15 Feb 2021 17:23
by Firrel
Vegotenks wrote: 15 Feb 2021 07:11
The short name has to have 4 letters, try if that helps.

Re: Creating New AI

Posted: 15 Mar 2021 12:49
by Vegotenks
Yes, thank you.

Must have missed it in the wiki...