Transport Tycoon Forums

The place to talk about Transport Tycoon
It is currently Tue Sep 25, 2018 6:13 am

All times are UTC




Post new topic  Reply to topic  [ 3 posts ] 
Author Message
PostPosted: Sat Jun 30, 2018 10:17 am 
Offline
Transport Coordinator
Transport Coordinator
User avatar

Joined: Wed Jan 08, 2003 11:09 pm
Posts: 372
Location: Denmark
Ever wanted to have a scenario that does something a bit unusual, but thought it would be too bothersome to write a unique Game Script for it? This is a toolbox for encoding some types of commands/events into a scenario by using signs.

Right now it can found towns and industries at specific dates, and force towns to grow at specific dates. This is mostly for proof of concept, I hope to expand this much more with useful features.

Image


Known bugs/problems:
- Random placement of towns doesn't work
- I'm not sure town growth actions ever stop acting
- Prints red errors in the GS debug window during some of the sign parsing (need to do a pcall or something)
- Will eat signs even during the scenario editor, if you click the Pause or FFwd buttons

This is my first foray into writing GS so any tips and criticism is appreciated. Wishlists are also welcome.


Attachments:
File comment: Demo scenario
scntoolstest.scn [12.27 KiB]
Downloaded 15 times
File comment: Proof of concept version of the GS
ScenarioTools.zip [14.1 KiB]
Downloaded 18 times
File comment: Screenshot of demo scenario
sctldemo.png [116.1 KiB]
Not downloaded yet
Top
   
PostPosted: Mon Jul 30, 2018 8:48 am 
Offline
OpenTTD Developer
OpenTTD Developer
User avatar

Joined: Mon Jun 09, 2003 6:21 pm
Posts: 4537
Location: /home/sweden
Coding help:
You do not need to import libraries at the beginning of each .nut-file. It is enough to do this once, preferable in the top of main.nut. What you assign at the global scope there, will be available in all files.

You are also welcome to change the name from MinimalGS and author in the copyright notice in top of main.nut to yourself.

_________________
My OpenTTD contributions (AIs, Game Scripts, patches, OpenTTD Auto Updater, and some sprites)
Junctioneer (a traffic intersection simulator)


Top
   
PostPosted: Mon Jul 30, 2018 9:23 am 
Offline
Engineer
Engineer

Joined: Fri Apr 14, 2017 3:51 pm
Posts: 108
Location: Czech Republic
Quote:
Known bugs/problems:
- Random placement of towns doesn't work


I did not look at your gamescript, but in my gamescript "City Founder GS" I use random city deployment. You might be inspired.

_________________
Owner and admin of servers:
Experimental games 01 (92.63.57.152:3979), Experimental games 02 (92.63.57.152:3879), Experimental games 03 (92.63.57.152:3779).
My heightmaps: Flat Earth Map and United nations logo
My scenarios: Game Fallout 1,2,3 Map scenario
My gamescripts: City Founder GS
My newGRFs: ---


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic  [ 3 posts ] 

All times are UTC


Who is online

Users browsing this forum: Google Adsense [Bot] and 3 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000-2018 phpBB Limited

Copyright © Owen Rudge/The Transport Tycoon Forums 2001-2018.
Hosted by Zernebok Hosting.