How to get AI develop environment working

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
Mayday21
Engineer
Engineer
Posts: 11
Joined: 01 Sep 2005 07:39

How to get AI develop environment working

Post by Mayday21 »

Hi,

I want to test programming an OpenTTD AI.
But I had some problems comming to this point ...

At last I got it to install SQDev in Eclipse. And I am able to write an AI as provided in the wiki.
But I got no IntelliSense in SQDev. Even more, if I mouseover the keyword "AIController" Eclipse say: "No matches for AIController". Seems the dev environment does not get this interface.
Anyone knows what to do to fix this?

Greetings, Max
Attachments
nomatchesforaicontroller.PNG
nomatchesforaicontroller.PNG (2.26 KiB) Viewed 1351 times
User avatar
fanioz
Transport Coordinator
Transport Coordinator
Posts: 320
Joined: 19 Dec 2008 05:03
Location: Indonesia
Contact:

Re: How to get AI develop environment working

Post by fanioz »

Hi, :D
AIController, and other API calls are OpenTTD modification specific. Its not a built in - native squirrel keyword.
Correct me If I am wrong - PM me if my English was bad :D

**[OpenTTD AI]** Image
***[NewGRF] *** Image
Yexo
Tycoon
Tycoon
Posts: 3663
Joined: 20 Dec 2007 12:49

Re: How to get AI develop environment working

Post by Yexo »

If you can find out how you can add custom syntax highlighting, maybe we can figure out a way to generate that documentation for you.
isk
Engineer
Engineer
Posts: 4
Joined: 05 Oct 2007 16:56

Re: How to get AI develop environment working

Post by isk »

According to this post something like the file in attachment should add api classes to IntelliSense, but I don't know how to use it in Eclipse - I've tested it in MSVC 2008. Moreover classes don't contain inherited methods. I will try to add these if I find some time later this week.
If this problem bothers you, you can always copy the entries in AIAbstractList to all classes that should contain them.

PS. In the first post of the linked thread there are instructions how to use this file in MSVC:
you can configure it from Tool/Options/Squirrel/General
Attachments
openttd_noai_api.xml
(71.23 KiB) Downloaded 71 times
Post Reply

Return to “OpenTTD AIs and Game Scripts”

Who is online

Users browsing this forum: No registered users and 17 guests