Problems with one of the AIs? read this!

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
Yexo
Tycoon
Tycoon
Posts: 3653
Joined: 20 Dec 2007 12:49

Problems with one of the AIs? read this!

Post by Yexo » 05 Mar 2009 16:40

For nearly all problems with AIs, you need to open the AI debug panel. It can be found under the red question mark (rightmost item of the toolbar ingame). AIs can print debug information there, and also openttd will print the crash information to that window.

Before you try any of the things below, make sure you have the latest version of the AI that is available!

All AIs I download just sit around doing nothing
Open the AI debug panel, do you see a line like: "Your script made an error: couldn't find library <some_library_name>"? In that case, you've most likely downloaded the AIs via this forum. Easiest fix is to remove all your downloaded tars and downloaded them again via the in-game content-system. This will make sure you also have all required libraries and also it'll make sure you can only download AIs that work in your version of openttd. If for some reason the content-system doesn't work, you can download all libraries here. If your downloaded AIs go in <somepath>\ai, then the libraries go in <somepath>\ai\library.

One of the AIs I have does nothing
Please check if the AI you have is still available via the in-game content system. If there is an update available, download the update and try again. If the AI is not available at all via the content-system, then there most likely was an API update that made that AI no longer work. Make sure you don't start it again untill you downloaded an update.
In case the AI is available, make a screenshot[0] of the AI debug panel and post that in the relevant AI thread. In case there are a lot of red lines, the AI crashed. Make sure you include as many of the red lines as possible in the screenshot.

One of the AIs builds very strange road/rail/docks/airports
Make a screenshot[0] of what's build and post that in the relevant AI thread.

I have a suggestion for one of the AIs
Write your suggestion down, possible with screenshots and post it in the relevant AI thread.

I have a wonderful idea for a new AI
Is your idea really novel? Maybe it already fits in with an existing AI, if so, see the previous question. If it's really completely new, feel free to open a new thread, where you explain your idea. However, if you don't want to code it yourself, there is only a very small chance someone else will actually code it.

I need some help with coding my AI
Make a new thread and describe your problem. Please do some searching yourself first.

I have a suggestion for the API
Just make a new thread and write down why you think the API benefits from your idea.

I found a problem with the API / with squirrel
Either make a bugreport at bugs.openttd.org (if you're sure it's a problem), or open a new thread here (if you think it's a problem, but it could be a mistake in your code).

[0]You can make a screenshot by pressing ctrl+s. Please post screenshots in png format, don't convert them to jpg.

Samu
Traffic Manager
Traffic Manager
Posts: 236
Joined: 17 Apr 2007 14:28

Re: Problems with one of the AIs? read this!

Post by Samu » 26 Apr 2010 21:42

Hi. I have a newbie question, so please forgive me for that, I'm still new here and not computer savy.

On this page http://noai.openttd.org/downloads/Libraries/ I see copies of the same libraries but with just a different character to differentiate their versions, like for example:

Graph.AyStar-4.tar.gz
Graph.AyStar-5.tar.gz
Graph.AyStar-6.tar.gz
Graph.AyStar.4.tar.gz
Graph.AyStar.5.tar.gz
Graph.AyStar.6.tar.gz

Does it have anything to do with the operating system? I am on Windows XP Pro 32-bit. Also what is the difference between .tar and .tar.gz? When I download content via the game, it comes with .tar, but from this site, it comes in .tar.gz. Will these work with the game or must I convert to .tar and how do I do so?

Thanks for your patience.

User avatar
planetmaker
OpenTTD Developer
OpenTTD Developer
Posts: 9278
Joined: 07 Nov 2007 22:44
Location: Sol d

Re: Problems with one of the AIs? read this!

Post by planetmaker » 26 Apr 2010 22:19

Samu wrote: Graph.AyStar-4.tar.gz
Graph.AyStar-5.tar.gz
Graph.AyStar-6.tar.gz
Graph.AyStar.4.tar.gz
Graph.AyStar.5.tar.gz
Graph.AyStar.6.tar.gz
Those are different version of the library. It has nothing to do with your OS.

All those files are (still) packed, they'll need (g)unzip-ing in order to extract the enclosed tar files. Most windows zip programmes should be able to handle it.

User avatar
einsteinyh
Engineer
Engineer
Posts: 35
Joined: 15 Feb 2016 01:22
Location: Bogotá

Re: Problems with one of the AIs? read this!

Post by einsteinyh » 03 Mar 2016 22:15

Why doesn't any AI company autoreplace vehicles? (neither when I take their control and set lists up to do it) :cry:

Alberth
OpenTTD Developer
OpenTTD Developer
Posts: 4720
Joined: 09 Sep 2007 05:03
Location: home

Re: Problems with one of the AIs? read this!

Post by Alberth » 04 Mar 2016 15:00

einsteinyh wrote:Why doesn't any AI company autoreplace vehicles? (neither when I take their control and set lists up to do it) :cry:
None of the AI authors apparently programmed that in their AI.
Being a OpenTTD developer does not mean I know what I am doing.
Also, other OpenTTD developers may have different opinions.

User avatar
Zuu
OpenTTD Developer
OpenTTD Developer
Posts: 4553
Joined: 09 Jun 2003 18:21
Location: /home/sweden

Re: Problems with one of the AIs? read this!

Post by Zuu » 05 Mar 2016 11:12

AI API has support for autorenew.

Autoreplace, may still be there, but with a quick look in the API I didn't see it. My AI CluelessPlus do replace vehicles, but I don't remember if it is the human way. It is probably more like send one for sale, and buy a new one at the same time. The one going for sale get just the depot in its order and has its name changed to mark it up that it is going for sale so the depot cleaning code then finds it and actually sells it.
My OpenTTD contributions (AIs, Game Scripts, patches, OpenTTD Auto Updater, and some sprites)
Junctioneer (a traffic intersection simulator)

Post Reply

Return to “OpenTTD AIs and Game Scripts”

Who is online

Users browsing this forum: No registered users and 1 guest