[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 » 20 Dec 2011 23:36

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 » 21 Dec 2011 22:52

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 363 times
swedish.txt
(160 Bytes) Downloaded 141 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 » 22 Dec 2011 08:24

Here you go :)

EDIT: UTF-8
Attachments
spanish.txt
(175 Bytes) Downloaded 164 times
Last edited by Terkhen on 28 Dec 2011 18:42, edited 1 time in total.

Alberth
OpenTTD Developer
OpenTTD Developer
Posts: 4740
Joined: 09 Sep 2007 05:03
Location: home

Re: [NoGo] TransportGoals

Post by Alberth » 22 Dec 2011 11:11

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 185 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 » 22 Dec 2011 11:17

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: 9293
Joined: 07 Nov 2007 22:44
Location: Sol d

Re: [NoGo] TransportGoals

Post by planetmaker » 22 Dec 2011 11:36

German translation :-)
Attachments
german.txt
(178 Bytes) Downloaded 283 times

lucas92
Engineer
Engineer
Posts: 8
Joined: 26 Jun 2010 00:51

Re: [NoGo] TransportGoals

Post by lucas92 » 28 Dec 2011 16:02

French translation
Attachments
French.txt
(163 Bytes) Downloaded 158 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 » 28 Dec 2011 19:15

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 189 times
english.txt
(145 Bytes) Downloaded 174 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 » 04 Jan 2012 20:12

Russian translation below.
russian.txt
(230 Bytes) Downloaded 161 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 » 04 Jan 2012 20:20

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 » 04 Jan 2012 20:53

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 195 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 » 16 Apr 2012 18:18

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 » 16 Apr 2012 19:34

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: 1244
Joined: 17 Jul 2007 01:36
Skype: moonray_zdo
Location: Teh matrix, duh.
Contact:

Re: [NoGo] TransportGoals

Post by Zhall » 24 Apr 2012 22:48

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: 13189
Joined: 03 Dec 2002 10:36
Location: The Netherlands
Contact:

Re: [NoGo] TransportGoals

Post by Hyronymus » 25 Apr 2012 10:58

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 2 guests