NoAI FAQs

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

User avatar
smallfly
Chairman
Chairman
Posts: 884
Joined: 19 Oct 2009 13:29
Location: Germany

Re: NoAI FAQs

Post by smallfly »

cmoiromain wrote:[Off topic]You could have copied the line and pasted it somewhere else to read it[/Off topic]

Because it doesn't answer you questions, it's only a complement for the curious people. The important part of the message is in normal size.
[Off topic]I thought, that perhaps the text is only extremely small on my screen, because of custom browser settings, so I prefered to screenshot it ;) [/Off topic]
www.p1sim.org - P1SIM - Traffic, Logistics, City-Building & more
Join the discussions here on tt-forums.net!
User avatar
Emperor Jake
Tycoon
Tycoon
Posts: 3427
Joined: 24 Apr 2007 09:37
Skype: Discord: Emperor Jake #4106
Location: Not Actually Japan
Contact:

Re: NoAI FAQs

Post by Emperor Jake »

Hi,
I was wondering, is there any AI that builds passenger trains?

Thanks,
Jake
User avatar
fanioz
Transport Coordinator
Transport Coordinator
Posts: 320
Joined: 19 Dec 2008 05:03
Location: Indonesia
Contact:

Re: NoAI FAQs

Post by fanioz »

Emperor Jake wrote:Hi,
I was wondering, is there any AI that builds passenger trains?

Thanks,
Jake
Have you tried TConvoy(v.12) or Chooco?
Correct me If I am wrong - PM me if my English was bad :D

**[OpenTTD AI]** Image
***[NewGRF] *** Image
griffin71
Traffic Manager
Traffic Manager
Posts: 142
Joined: 31 Mar 2007 13:11
Location: Amsterdam

Re: NoAI FAQs

Post by griffin71 »

Hi,

Could somebody please post a link to the API for Squirrel based-AIs?

Thanks.
A game worth playing is a game worth modding :-)
Yexo
Tycoon
Tycoon
Posts: 3663
Joined: 20 Dec 2007 12:49

Re: NoAI FAQs

Post by Yexo »

griffin71 wrote:Hi,

Could somebody please post a link to the API for Squirrel based-AIs?

Thanks.
Just follow the link to the FAQ in the first post and there is a box with links on the right site with a link to the API documentation.
griffin71
Traffic Manager
Traffic Manager
Posts: 142
Joined: 31 Mar 2007 13:11
Location: Amsterdam

Re: NoAI FAQs

Post by griffin71 »

Thanks, Yexo.
A game worth playing is a game worth modding :-)
User avatar
luk3Z
Traffic Manager
Traffic Manager
Posts: 197
Joined: 25 Dec 2005 17:42
Location: Kielce, Poland (Mars sometimes)

Re: NoAI FAQs

Post by luk3Z »

Some AI cause errors in my game and I wish to replace it (in loaded game) by other AI - how can I do that ?
I didn't find any command for console to replace AI and change AI settings don't help.
Find new graphics easier:
GRFCrawler -> http://grfcrawler.tt-forums.net
BaNaNaS -> https://bananas.openttd.org/
32 bit gfx in OTTD (32bpp) -> https://wiki.openttd.org/en/Community/N ... 20graphics
TTDPatch 2.6 -> viewtopic.php?f=19&t=67694
How to subtract tax from income (workaround) -> viewtopic.php?t=89763&start=20
How to ban distance from income -> Simple Cargo Decay Override
User avatar
Zuu
OpenTTD Developer
OpenTTD Developer
Posts: 4553
Joined: 09 Jun 2003 18:21
Location: /home/sweden

Re: NoAI FAQs

Post by Zuu »

From memory of design discussions of NoAI:

* Save your game
* Remove all compatible versions of the used AI (easiest if you don't know which ones that are compatible is to remove all versions of AIs with the same name). You need to remove the tar files or directories with .nut files of the AI from the search paths of OpenTTD (see the Readme for all search paths).
* Restart OpenTTD (not sure if it is needed, but doesn't hurt. Doing this you can verify that the AI has actually been removed in the AI Settings dialog)
* Load your save game

Now the game should pick a random AI.


Note again that I haven't tried this myself and I don't know if this actually works. It was the proposal that I think got implemented but I haven't checked myself.


Edit: We are of course interested to hear from you which AI is it that you have problem with?
My OpenTTD contributions (AIs, Game Scripts, patches, OpenTTD Auto Updater, and some sprites)
Junctioneer (a traffic intersection simulator)
User avatar
luk3Z
Traffic Manager
Traffic Manager
Posts: 197
Joined: 25 Dec 2005 17:42
Location: Kielce, Poland (Mars sometimes)

Re: NoAI FAQs

Post by luk3Z »

Zuu wrote: (...)

Note again that I haven't tried this myself and I don't know if this actually works. It was the proposal that I think got implemented but I haven't checked myself.


Edit: We are of course interested to hear from you which AI is it that you have problem with?
Thanks for advices - I'll try it (hopefully I use only 1 newest version of each AI).
Choochoo caused some errors (I send pm with screenshot to author already).
Some AIs didn't started yet but present AIs in game are: AdmiralAI.22 and CluelessPlus-v15 (AdmiralAI going to bankrupt again - probably due to Modified Building Costs grf and hard difficulty).
BTW *.gz files are read in the same way like *.tar by the game ?
Find new graphics easier:
GRFCrawler -> http://grfcrawler.tt-forums.net
BaNaNaS -> https://bananas.openttd.org/
32 bit gfx in OTTD (32bpp) -> https://wiki.openttd.org/en/Community/N ... 20graphics
TTDPatch 2.6 -> viewtopic.php?f=19&t=67694
How to subtract tax from income (workaround) -> viewtopic.php?t=89763&start=20
How to ban distance from income -> Simple Cargo Decay Override
User avatar
MagicBuzz
Tycoon
Tycoon
Posts: 1354
Joined: 15 Feb 2003 17:32
Location: Vergezac, France

Re: NoAI FAQs

Post by MagicBuzz »

Hello,

I have a question about version and bananas.

If I do a minor change (small fix, optimisation, etc.) that doesn't break save/load version and does not change OTTD API version nor libraries dependencies, do I need to increment the version of my script?
Or bananas will check upload date and propose to upgrade regardless the version?
User avatar
Firrel
Engineer
Engineer
Posts: 118
Joined: 13 Aug 2019 17:06

Re: NoAI FAQs

Post by Firrel »

MagicBuzz wrote: 21 Jul 2020 14:59 Hello,

I have a question about version and bananas.

If I do a minor change (small fix, optimisation, etc.) that doesn't break save/load version and does not change OTTD API version nor libraries dependencies, do I need to increment the version of my script?
Or bananas will check upload date and propose to upgrade regardless the version?
I could not find this information as well, so I tried it. I tried to use subversion for a fix release and it worked fine. I did not change the gamescript version, but I increased the version in BaNaNaS and it is proposing the newer version correctly. But I don't know if it was chosen by version or date.

Screenshot from 2020-08-04 18-01-53.png
Screenshot from 2020-08-04 18-01-53.png (7.09 KiB) Viewed 9047 times
Screenshot from 2020-08-04 18-07-33.png
Screenshot from 2020-08-04 18-07-33.png (8.64 KiB) Viewed 9047 times
Screenshot from 2020-08-04 18-08-49.png
Screenshot from 2020-08-04 18-08-49.png (10.45 KiB) Viewed 9047 times
User avatar
Firrel
Engineer
Engineer
Posts: 118
Joined: 13 Aug 2019 17:06

Re: NoAI FAQs

Post by Firrel »

Firrel wrote: 04 Aug 2020 16:12
MagicBuzz wrote: 21 Jul 2020 14:59 Hello,

I have a question about version and bananas.

If I do a minor change (small fix, optimisation, etc.) that doesn't break save/load version and does not change OTTD API version nor libraries dependencies, do I need to increment the version of my script?
Or bananas will check upload date and propose to upgrade regardless the version?
I could not find this information as well, so I tried it. I tried to use subversion for a fix release and it worked fine. I did not change the gamescript version, but I increased the version in BaNaNaS and it is proposing the newer version correctly. But I don't know if it was chosen by version or date.
Update: This statement in the GS API documentation is exactly correct (checked the source code as well):
When OpenTTD finds, during starting, a duplicate GS with the same version number one is randomly chosen. So it is important that this number is regularly updated/incremented.

Which means what I said was incorrect and the version in Info.nut (GSInfo) must be incremented with each new release. If you want to make savegame compatible update, you should increment the version and keep the MinVersionToLoad from the previous release.
smurfix
Engineer
Engineer
Posts: 11
Joined: 29 Sep 2013 13:26

Re: NoAI FAQs

Post by smurfix »

User avatar
Chrill
Moderator
Moderator
Posts: 15974
Joined: 18 Dec 2004 17:35
Location: Stockholm, Sweden
Contact:

Re: NoAI FAQs

Post by Chrill »

Thanks, smurfix. I added it to the first post. :)
Image
My Scenarios:
Archipiélago Hermoso (Latest Release: Version 3.2)
Turnpike Falls (Latest Release: Version 0.91)
Post Reply

Return to “OpenTTD AIs and Game Scripts”

Who is online

Users browsing this forum: Michiel and 8 guests