[NoGo] TransportGoals

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

[NoGo] TransportGoals

Post by Zuu »

A GameScript which provides goals regarding amount of transported cargo divided by amount of vehicles.
bananas wrote:Creates a goal per company:
- Transport at least X cargo items per vehicle during a period of three months

Displays a sign over each HQ with the last achieved level per company.
Additionally this NoGo/GameScript demonstrates how to
  • Use translations
  • Use SuperLib for NoGo
  • Set individual goals for each company
You find the the last version on Bananas. Preferable use online content within OpenTTD to ensure you have a new enough OpenTTD version and that you get the required dependencies.
Last edited by Zuu on 18 May 2012 17:34, edited 1 time in total.
My OpenTTD contributions (AIs, Game Scripts, patches, OpenTTD Auto Updater, and some sprites)
Junctioneer (a traffic intersection simulator)
User avatar
Zuu
OpenTTD Developer
OpenTTD Developer
Posts: 4553
Joined: 09 Jun 2003 18:21
Location: /home/sweden

Re: [NoGo] TransportGoals

Post by Zuu »

Update - version 2

New in version 2:
  • Save/load support
  • Move sign when HQ is moved
  • Lower step between levels
In case you want to translate for your language, I've attached the english.txt. To translate, download english.txt and rename it to [your language].txt, and edit the file with a text editor in UTF-8 mode. Please go to the lang directory of your OpenTTD installation to find out exactly which file name to use for your language.

STR_SCORE appears as a sign on top of the HQ of each company
STR_GOAL appear once for each company in the goal window
Attachments
english.txt
(156 Bytes) Downloaded 475 times
swedish.txt
(160 Bytes) Downloaded 249 times
My OpenTTD contributions (AIs, Game Scripts, patches, OpenTTD Auto Updater, and some sprites)
Junctioneer (a traffic intersection simulator)
Terkhen
OpenTTD Developer
OpenTTD Developer
Posts: 1034
Joined: 11 Sep 2008 07:32
Location: Spain

Re: [NoGo] TransportGoals

Post by Terkhen »

Here you go :)

EDIT: UTF-8
Attachments
spanish.txt
(175 Bytes) Downloaded 278 times
Last edited by Terkhen on 28 Dec 2011 18:42, edited 1 time in total.
Alberth
OpenTTD Developer
OpenTTD Developer
Posts: 4763
Joined: 09 Sep 2007 05:03
Location: home

Re: [NoGo] TransportGoals

Post by Alberth »

And a Dutch translation :)

I must say I don't understand the goal though "X cargo items PER VEHICLE" ?

In other words, just 1 vehicle is sufficient?
Attachments
dutch.txt
(155 Bytes) Downloaded 296 times
User avatar
Zuu
OpenTTD Developer
OpenTTD Developer
Posts: 4553
Joined: 09 Jun 2003 18:21
Location: /home/sweden

Re: [NoGo] TransportGoals

Post by Zuu »

Thanks,

Yes, you could use just one vehicle and try to deliver as much cargo as possible with that vehicle.
My OpenTTD contributions (AIs, Game Scripts, patches, OpenTTD Auto Updater, and some sprites)
Junctioneer (a traffic intersection simulator)
User avatar
planetmaker
OpenTTD Developer
OpenTTD Developer
Posts: 9432
Joined: 07 Nov 2007 22:44
Location: Sol d

Re: [NoGo] TransportGoals

Post by planetmaker »

German translation :-)
Attachments
german.txt
(178 Bytes) Downloaded 395 times
lucas92
Engineer
Engineer
Posts: 8
Joined: 26 Jun 2010 00:51

Re: [NoGo] TransportGoals

Post by lucas92 »

French translation
Attachments
French.txt
(163 Bytes) Downloaded 268 times
User avatar
Zuu
OpenTTD Developer
OpenTTD Developer
Posts: 4553
Joined: 09 Jun 2003 18:21
Location: /home/sweden

Re: [NoGo] TransportGoals

Post by Zuu »

Thanks for the translations. However the French translation was not encoded in UTF8 so I had to convert it (otherwise the translation would cause the entire game script to not work)

Since the bug in OpenTTD has been corrected that only the goals for your own company is displayed, I've removed the company name from the goal string. As the string started with {COMPANY}:, I have decided to just remove it from all translations as I don't think it affects them. If I'm wrong, please correct me (and the translation).

Version 3
This version has the new translations.
Attachments
TransportGoals-v3.tar
(21.5 KiB) Downloaded 295 times
english.txt
(145 Bytes) Downloaded 288 times
My OpenTTD contributions (AIs, Game Scripts, patches, OpenTTD Auto Updater, and some sprites)
Junctioneer (a traffic intersection simulator)
akasoft
Engineer
Engineer
Posts: 120
Joined: 25 Aug 2011 11:48

Re: [NoGo] TransportGoals

Post by akasoft »

Russian translation below.
russian.txt
(230 Bytes) Downloaded 273 times
User avatar
Zuu
OpenTTD Developer
OpenTTD Developer
Posts: 4553
Joined: 09 Jun 2003 18:21
Location: /home/sweden

Re: [NoGo] TransportGoals

Post by Zuu »

Is that a valid UTF-8 file? When loading with encoding=utf8 in vim I don't get any meaningful text. Not that I read Russian, but I would expect to not get all text as white filled boxes.

Please ensure that you save your file as UTF-8.
My OpenTTD contributions (AIs, Game Scripts, patches, OpenTTD Auto Updater, and some sprites)
Junctioneer (a traffic intersection simulator)
User avatar
Zuu
OpenTTD Developer
OpenTTD Developer
Posts: 4553
Joined: 09 Jun 2003 18:21
Location: /home/sweden

Re: [NoGo] TransportGoals

Post by Zuu »

My bad, the file is a perfectly fine UTF-8 file.

Here is a new version that includes the Russian translation.
Attachments
TransportGoals-v4.tar
(22.5 KiB) Downloaded 323 times
My OpenTTD contributions (AIs, Game Scripts, patches, OpenTTD Auto Updater, and some sprites)
Junctioneer (a traffic intersection simulator)
fabca2
Transport Coordinator
Transport Coordinator
Posts: 312
Joined: 14 Apr 2004 15:18
Location: Fr

Re: [NoGo] TransportGoals

Post by fabca2 »

Hi,
sorry, it's maybe a stupid question : where does the goal is displayed durring the game ?
I was waiting for a window that would appears, it's maybe somewhere else ?
I play with ottd 1.2.0

by the way, I can see in english.txt that the goal is a number of gargo item, but are there goal for cargo itself ? (I mean something like "transport 5 ton of mail durring 3 month")
Thank you,
regards.
User avatar
Zuu
OpenTTD Developer
OpenTTD Developer
Posts: 4553
Joined: 09 Jun 2003 18:21
Location: /home/sweden

Re: [NoGo] TransportGoals

Post by Zuu »

Under the same button as you find subsidaries in the main toolbar, there is a menu where you find your goals.


The goal provided by this script is fairly simple. It was the first released NoGo that I made to test the NoGo framework and provide a demonstration and test case of how to do things in NoGo. That said, future developments are not impossible although currently I don't have any work in progress for this NoGo.
My OpenTTD contributions (AIs, Game Scripts, patches, OpenTTD Auto Updater, and some sprites)
Junctioneer (a traffic intersection simulator)
User avatar
Zhall
Tycoon
Tycoon
Posts: 1237
Joined: 17 Jul 2007 01:36
Skype: moonray_zdo
Location: Teh matrix, duh.
Contact:

Re: [NoGo] TransportGoals

Post by Zhall »

I cant wait until all of these game scripts start to take off... openttd has been missing a goal system like this forever...
User avatar
Hyronymus
Tycoon
Tycoon
Posts: 13233
Joined: 03 Dec 2002 10:36
Location: The Netherlands
Contact:

Re: [NoGo] TransportGoals

Post by Hyronymus »

Sapphire united wrote:I cant wait until all of these game scripts start to take off... openttd has been missing a goal system like this forever...
I can't wait until multiple scripts are possible in one game. And I feel guilty for that because I really should be happy with having goals to begin with :( .
Post Reply

Return to “OpenTTD AIs and Game Scripts”

Who is online

Users browsing this forum: No registered users and 5 guests