How can I get AI in my server

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
Beleg
Engineer
Engineer
Posts: 3
Joined: 16 Aug 2018 14:56

How can I get AI in my server

Post by Beleg »

Hi,

I'm currently renting/running a server from "Elite Game Server", and I'm wondering how I should write the AI code to get a random one to enter at given year:

In the openttd.cfg file I find the:
[ai_players]
none = start_date=730
none = start_date=730
none = start_date=730

I've tried something like this?
Advanced Capital Ventures = start_date = 1950
Trans Winter = start_date = 1950
ChooChoo = start_date = 1970
Mogul Trans Corp ltd. = start_date = 1970

I get some AI's to join, but they have no name, and they don't do anyting...
I've changed the:
[ai]
ai_in_multiplayer = true
ai_disable_veh_train = false
ai_disable_veh_roadveh = false
ai_disable_veh_aircraft = false
ai_disable_veh_ship = false

Can someone help me

Regards
Beleg :)
User avatar
acs121
Tycoon
Tycoon
Posts: 1956
Joined: 03 Nov 2017 18:57
Location: Courbevoie, near Paris, France

Re: How can I get AI in my server

Post by acs121 »

The start date corresponds to when the AI starts after the foundation of your company in days.
So if you found your company in 1881 and want the AI to start in 1921, you should enter 29200 instead of 730.
Beleg
Engineer
Engineer
Posts: 3
Joined: 16 Aug 2018 14:56

Re: How can I get AI in my server

Post by Beleg »

aha, and how can I use specific AI's from Forums, or get them to have random "stats" so tha everygame is different? :)
User avatar
acs121
Tycoon
Tycoon
Posts: 1956
Joined: 03 Nov 2017 18:57
Location: Courbevoie, near Paris, France

Re: How can I get AI in my server

Post by acs121 »

AIs have their own stats, unless you know how to code AIs you cannot modify them.
Beleg
Engineer
Engineer
Posts: 3
Joined: 16 Aug 2018 14:56

Re: How can I get AI in my server

Post by Beleg »

Just to be sure, this should work then:

[ai_players]
Nordlandsbanen = start_date=5
Fjellinjen = start_date=5
Norwegian Transport Network Holding = start_date=300
Vegamot = start_date=300
Vegfinans = start_date=600
Kvikkas = start_date=730
Nordtrafikk = start_date=850
Sporveien? = start_date=900
J�senfjord Rutelag = start_date=900
Hydro Transport? = start_date=1000
Torghatten Trafikkselskap = start_date=1000
Ivan Ulsund Rederi= start_date=1250
Brummen�s & Torgersen= start_date=1250
Buks�r og Berging = start_date=150
Fjord2 = start_date=1500
User avatar
acs121
Tycoon
Tycoon
Posts: 1956
Joined: 03 Nov 2017 18:57
Location: Courbevoie, near Paris, France

Re: How can I get AI in my server

Post by acs121 »

Normally yes.
User avatar
PikkaBird
Graphics Moderator
Graphics Moderator
Posts: 5601
Joined: 13 Sep 2004 13:21
Location: The Moon

Re: How can I get AI in my server

Post by PikkaBird »

Beleg wrote:how can I use specific AI's from Forums
You need to use the actual name of the AI (eg AdmiralAI, SimpleAI, CivilAI) rather than made-up company names.

In a running game, you can also use the console command start_ai <AIName>, or just start_ai to add a random AI.
Post Reply

Return to “OpenTTD AIs and Game Scripts”

Who is online

Users browsing this forum: No registered users and 3 guests