Story Book - a new GS feature

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
User avatar
Zuu
OpenTTD Developer
OpenTTD Developer
Posts: 4553
Joined: 09 Jun 2003 18:21
Location: /home/sweden

Story Book - a new GS feature

Post by Zuu »

Hello,

In the shadow of CargoDist, recently trunk has got another new feature - the Story Book. It is basically a window that displays pages with text and references to tiles and goals. What is nice about it is that any GS can add content to this book. Actually, without that, the book is just a boring empty book.
T. Nelson Transport, 6th Feb 1950.png
T. Nelson Transport, 6th Feb 1950.png (27.06 KiB) Viewed 3408 times
For more help on how to get started with the Story Book I recommend this wiki article. See also the API docs.

If you want to see the story book in action with some content, you can upgrade to NoCarGoal version 8 which I released yesterday. It is not perfect in its use of the story book and goal window as it still maintains backward compatibility, but could be a starting point and example.

And, last I have also released a new SuperLib version with some helpers to work with the Story Book as well as a method that displays a text in the story book but falls back to GSGoal.Question for users of older OpenTTD versions. If you miss something there and write your own additional helper, I wouldn't mind including that helper in SuperLib if it is something that may be useful for other script authors.
Last edited by kamnet on 04 Feb 2023 00:02, edited 1 time in total.
Reason: Updated links
My OpenTTD contributions (AIs, Game Scripts, patches, OpenTTD Auto Updater, and some sprites)
Junctioneer (a traffic intersection simulator)
TinyMusic
Tycoon
Tycoon
Posts: 1422
Joined: 02 Feb 2013 02:03

Re: Story Book - a new GS feature

Post by TinyMusic »

I should try it soon. Happy about Cargodist in trunk, but I never tried GameScript

PS: Is that TTDPatch graphics I see in the top toolbar? Doesn't look like my normal ones.
Formerly known as UseYourIllusion.
Java Scenario Found Here - Version 2 out
[tweɪ̂ pû tɕʰì wɔ̀ mǐlɤ lû tɕʰìŋ nì pɑ́ŋmɑ̌ŋ]
User avatar
Zuu
OpenTTD Developer
OpenTTD Developer
Posts: 4553
Joined: 09 Jun 2003 18:21
Location: /home/sweden

Re: Story Book - a new GS feature

Post by Zuu »

A game script is like a game leader. It can set up goals and rules of the game. There are already quite a few different types of games that you can play using the various different game scripts on bananas. (but download them using the in-game download client - that will save you from much hassle)

The graphics are the TTD graphics.
My OpenTTD contributions (AIs, Game Scripts, patches, OpenTTD Auto Updater, and some sprites)
Junctioneer (a traffic intersection simulator)
Aphid
Traffic Manager
Traffic Manager
Posts: 168
Joined: 16 Dec 2011 17:08

Re: Story Book - a new GS feature

Post by Aphid »

Could this be added to the NoGo changelog?
User avatar
Zuu
OpenTTD Developer
OpenTTD Developer
Posts: 4553
Joined: 09 Jun 2003 18:21
Location: /home/sweden

Re: Story Book - a new GS feature

Post by Zuu »

Aphid wrote:Could this be added to the NoGo changelog?
Yes, it should be added there. I just forgot it among all other things that needed to be done. (update GSWindow etc.)
My OpenTTD contributions (AIs, Game Scripts, patches, OpenTTD Auto Updater, and some sprites)
Junctioneer (a traffic intersection simulator)
krinn
Transport Coordinator
Transport Coordinator
Posts: 339
Joined: 29 Dec 2010 19:36

Re: Story Book - a new GS feature

Post by krinn »

Just to say it's a real good addition, thanks zuu.
Post Reply

Return to “OpenTTD AIs and Game Scripts”

Who is online

Users browsing this forum: No registered users and 15 guests