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.
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)
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
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).
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)
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.
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)
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 .