What GS CAN do?

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
speeder
Engineer
Engineer
Posts: 28
Joined: 16 Jul 2014 05:57

What GS CAN do?

Post by speeder »

So... lots of people keep telling me GS is heavily limited and whatnot.

I found out GS can create news, and setup goals and write to a storybook.

What else it can do, that affects all players or the scenario itself?

Can it generate subsidies and other events?
Can it start or end recession?
Can it generate disasters?
Can it demolish industries? (I know it can build them)
Can it... and so on.
Yexo
Tycoon
Tycoon
Posts: 3663
Joined: 20 Dec 2007 12:49

Re: What GS CAN do?

Post by Yexo »

speeder wrote: 28 May 2020 05:36Can it generate subsidies and other events?
Not yet, this has been recently discussed as an interesting addition. (viewtopic.php?f=65&t=87022)
Can it start or end recession?
AFAIK not, but again, wouldn't be too hard to add probably.
Can it generate disasters?
No. Could be interesting, but might be slightly harder to code.
Can it demolish industries? (I know it can build them)
I think so, but I can't find documentation related to this. I suspect GSTile.DemolishTile() just works.
Can it... and so on.
See for yourself: https://docs.openttd.org/gs-api/annotated.html
User avatar
planetmaker
OpenTTD Developer
OpenTTD Developer
Posts: 9432
Joined: 07 Nov 2007 22:44
Location: Sol d

Re: What GS CAN do?

Post by planetmaker »

Well... the most comprehensive list always is the documentation generated from OpenTTD's source code
https://docs.openttd.org/gs-api/annotated.html

Look through it. Generally all methods with "Set" change game state, but of course there are other methods which change things like OpenCloseAirport.
Post Reply

Return to “OpenTTD AIs and Game Scripts”

Who is online

Users browsing this forum: No registered users and 31 guests