Deliverance game script

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: 5601
Joined: 13 Sep 2004 13:21
Location: The Moon

Deliverance game script

Post by PikkaBird »

I have just uploaded a GS to bananas.

It's a very simple goal script - transport passengers, mail, and optionally goods and food to win!
Attachments
Unnamed, 1970-01-12.png
(901.64 KiB) Not downloaded yet
User avatar
2TallTyler
Route Supervisor
Route Supervisor
Posts: 487
Joined: 11 Aug 2019 18:15
Contact:

Re: Deliverance game script

Post by 2TallTyler »

This is a very nice script.

It doesn't like FIRS Steeltown though -- possibly because "Goods" is not defined. :)
Attachments
deliverance_firs.png
(52.34 KiB) Not downloaded yet
User avatar
PikkaBird
Graphics Moderator
Graphics Moderator
Posts: 5601
Joined: 13 Sep 2004 13:21
Location: The Moon

Re: Deliverance game script

Post by PikkaBird »

Thanks! This was a typo (I missed changing one Food to Good). I've updated with a fixed v2.
User avatar
2TallTyler
Route Supervisor
Route Supervisor
Posts: 487
Joined: 11 Aug 2019 18:15
Contact:

Re: Deliverance game script

Post by 2TallTyler »

Would you be willing to add Vehicles as an optional cargo delivery goal (either as a parameter, or automatically replacing Goods), for use with FIRS Steeltown? This GS could be the rocket that Andy always dreamt of. :)
User avatar
PikkaBird
Graphics Moderator
Graphics Moderator
Posts: 5601
Joined: 13 Sep 2004 13:21
Location: The Moon

Re: Deliverance game script

Post by PikkaBird »

Feel free to change it yourself. In the Start function in main.nut, the first thing the script does is find the cargos by label:

Code: Select all

	Paxo = FindCargo("PASS");
	Mail = FindCargo("MAIL");
	Good = FindCargo("GOOD");
	Food = FindCargo("FOOD");
	

Simply changing the cargo labels there should change the cargos that the script tracks, afaict.
User avatar
2TallTyler
Route Supervisor
Route Supervisor
Posts: 487
Joined: 11 Aug 2019 18:15
Contact:

Re: Deliverance game script

Post by 2TallTyler »

Well, that was easy. Thanks! :D
Post Reply

Return to “OpenTTD AIs and Game Scripts”

Who is online

Users browsing this forum: No registered users and 3 guests