Hi guys, i have been playing OpenTTD for quite a while now and have decided to have a go at creating my own AI, i have followed the Wiki introduction to creating AI's and spent a good hour or so browsing this subforum to fix my problem, the problem being i just cant seem to get OpenTTD to recognise my AI (which currently consists of the 2 wiki example files), when using the command 'list_ai' it produces a blank list, even after trying to force it to reload wth 'rescan_ai'
the current locations of my *.nut files are as follows:
%USERPROFILE%\My Documents\OpenTTD\ai\MyNewAI
as well as
%USERPROFILE%\My Documents\OpenTTD\content_download\ai\MyNewAI
so any ideas if i'm being blind and making a silly mistake, or if they are in the right location.
ps.i have placed them in the 2 seperate directories just to see if they load, no other reason
pps. its a Windows machine.
AI Development Problems....AI not seen
Moderator: OpenTTD Developers
Re: AI Development Problems....AI not seen
i had that problem with my ai as well except that i had made mine into a .tar and for some reason ottd wouldn't read it
i untared it (is that the right word?) and then ottd would read it again
i untared it (is that the right word?) and then ottd would read it again

AroAI - A really feeble attempt at an AI
It is practically impossible to teach good programming to students that have had a prior exposure to BASIC: as potential programmers they are mentally mutilated beyond hope of regeneration. --Edsger Dijkstra
It is practically impossible to teach good programming to students that have had a prior exposure to BASIC: as potential programmers they are mentally mutilated beyond hope of regeneration. --Edsger Dijkstra
Re: AI Development Problems....AI not seen
This should be enough. Better just have your files at one location so that you can be sure that OpenTTD sees the last edits.%USERPROFILE%\My Documents\OpenTTD\ai\MyNewAI
It could be that the AI do not get past the compile/recognition stage that makes it appear in openttd --help and the other AI lists. You could run OpenTTD with debug level set to 5 for 'ai' and read what it says about your AI when it tries to compile it.
Code: Select all
openttd -d ai=5
My OpenTTD contributions (AIs, Game Scripts, patches, OpenTTD Auto Updater, and some sprites)
Junctioneer (a traffic intersection simulator)
Junctioneer (a traffic intersection simulator)
Re: AI Development Problems....AI not seen
ahh perfect...cheers zuu, i mis-typed a function name
- MinchinWeb
- Traffic Manager
- Posts: 225
- Joined: 01 Feb 2011 12:41
- Contact:
Re: AI Development Problems....AI not seen
This has been great in getting my own basic AI into OpenTTD. However, how do you decrypt the error statements? Do they give you the line numbers of the code that is failing? I get output in the console window like (with four lines of the same thing...):
Code: Select all
Error C:\Users\Wm\Documents\OpenTTD\ai\WmDOT\info.nut:15/3: expression expecteddbg: [misc] [squirrel] Failed to compile 'C:\Users\Wm\Documents\OpenTTD\ai\WmDOT\info.nut'
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
MinchinWeb's Random Town Name Generator - providing 2 million plus names...
WmDOT v13 - An AI that doubles as your highway department
Re: AI Development Problems....AI not seen
info.nut:15/3
file: info nut
line number 15, column 3
file: info nut
line number 15, column 3
Correct me If I am wrong - PM me if my English is bad
AIAI - AI for OpenTTD
AIAI - AI for OpenTTD
Who is online
Users browsing this forum: No registered users and 10 guests