Gamescript: Auto Pause

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
PikkaBird
Graphics Moderator
Graphics Moderator
Posts: 5472
Joined: 13 Sep 2004 13:21
Location: The Moon
Contact:

Gamescript: Auto Pause

Post by PikkaBird »

This is an extremely basic gamescript, mainly for testing AIs and NewGRF town expansion.

The script opens the storybook and pauses the game after a number of years (configurable, default 10) have passed. This lets you put a game in fast-forward and walk away, to see how the game grows over the period. Closing the storybook unpauses the game and restarts the counter.

It is available from Bananas. :)

User avatar
planetmaker
OpenTTD Developer
OpenTTD Developer
Posts: 9415
Joined: 07 Nov 2007 22:44
Location: Sol d

Re: Gamescript: Auto Pause

Post by planetmaker »

That indeed sounds like a useful script for AI testing. Thanks for sharing it with us :)

User avatar
PikkaBird
Graphics Moderator
Graphics Moderator
Posts: 5472
Joined: 13 Sep 2004 13:21
Location: The Moon
Contact:

Re: Gamescript: Auto Pause

Post by PikkaBird »

v2! :lol:

v2 adds save/load compatibility.

- the script now remembers the date counter through save/load, rather than restarting the counter each time.
- If the game is save/loaded after counter has reached 0, the game is no longer irreparably paused - rather, the storybook will open and closing it will restart the counter and unpause the game as usual.

Available now on the fruit stand.

Post Reply

Return to “OpenTTD AIs and Game Scripts”

Who is online

Users browsing this forum: No registered users and 1 guest