how to get AI work? - OpenTTD 0.7.2-RC1

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
LoWang
Engineer
Engineer
Posts: 93
Joined: 25 Jun 2005 21:17
Contact:

how to get AI work? - OpenTTD 0.7.2-RC1

Post by LoWang »

Hello, how can I make the noAI start in the game? There is no settings about when they should start after player as it was before. I have set three random ai players in the options, but no company besides mine starts even after some time. I have allowed AI in multiplayer, but it does not start there either. Is that time longer or something's wrong and the AI does not work?
Those that are last, can yet be first...
Yexo
Tycoon
Tycoon
Posts: 3663
Joined: 20 Dec 2007 12:49

Re: how to get AI work? - OpenTTD 0.7.2-RC1

Post by Yexo »

LoWang wrote:Hello, how can I make the noAI start in the game? There is no settings about when they should start after player as it was before. I have set three random ai players in the options, but no company besides mine starts even after some time. I have allowed AI in multiplayer, but it does not start there either. Is that time longer or something's wrong and the AI does not work?
You can change the delay between the start of Ais in the AI configure window. You can find it in the main menu. The default is 2 years / 1 year / half year, depending on your difficulty level.
LoWang
Engineer
Engineer
Posts: 93
Joined: 25 Jun 2005 21:17
Contact:

Re: how to get AI work? - OpenTTD 0.7.2-RC1

Post by LoWang »

aha you mean the configure button under the AI settings window! It's not easy to find:) Thx
Those that are last, can yet be first...
User avatar
Dustin
Transport Coordinator
Transport Coordinator
Posts: 272
Joined: 07 Dec 2005 19:22

Re: how to get AI work? - OpenTTD 0.7.2-RC1

Post by Dustin »

LoWang wrote:Hello, how can I make the noAI start in the game? There is no settings about when they should start after player as it was before. I have set three random ai players in the options, but no company besides mine starts even after some time. I have allowed AI in multiplayer, but it does not start there either. Is that time longer or something's wrong and the AI does not work?

There are two other ways:

#1. create a script called "game_start.scr" in the scripts directory of OpenTTD and add a line for every AI you want to start.

Code: Select all

start_ai Name_Of_AI
#2. hit the ` key and type the same thing in the console.

If you do this, you can't configure the AI at all. It will run with the defaults (this had me confused for quite a while!). It will also "overrun" any AI's you setup to start in the AI config window on the start screen.

-Dustin
Yexo
Tycoon
Tycoon
Posts: 3663
Joined: 20 Dec 2007 12:49

Re: how to get AI work? - OpenTTD 0.7.2-RC1

Post by Yexo »

You can configure the AIs, but you'll have to do so on the same line, with
stat_ai <ainame> <ai_settings>
<ai_settings> is a list of settingname=value,settingname2=value2 pairs.
LoWang
Engineer
Engineer
Posts: 93
Joined: 25 Jun 2005 21:17
Contact:

Re: how to get AI work? - OpenTTD 0.7.2-RC1

Post by LoWang »

Thanks. Actually it took me some time to figure out that there actually isn't any AI in the game when I just download it and play:) I think this should be more clearly said for example in the AI settings window, something like "no AI found, download some from the online content offering".
Those that are last, can yet be first...
Chruker
Engineer
Engineer
Posts: 49
Joined: 01 Jun 2009 20:13

Re: how to get AI work? - OpenTTD 0.7.2-RC1

Post by Chruker »

yeah

How about a warning when you start a game with computer players and there are no AI's available. If there are some AIs available it could check if they are allowed to start (based on other settings and the info the AI provides in the info.nut file)
Yexo
Tycoon
Tycoon
Posts: 3663
Joined: 20 Dec 2007 12:49

Re: how to get AI work? - OpenTTD 0.7.2-RC1

Post by Yexo »

Chruker wrote:yeah

How about a warning when you start a game with computer players and there are no AI's available. If there are some AIs available it could check if they are allowed to start (based on other settings and the info the AI provides in the info.nut file)
How about the fact that there already is a warning as soon as an AI starts when you have none.
Post Reply

Return to “OpenTTD AIs and Game Scripts”

Who is online

Users browsing this forum: No registered users and 7 guests