[GS] NoCarGoal

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

Gothvan
Engineer
Engineer
Posts: 6
Joined: 09 Jun 2013 20:24

Re: [GS] NoCarGoal

Post by Gothvan » 16 Jun 2013 16:33

Noob here: does it works with FIRS?

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

Re: [GS] NoCarGoal

Post by Alberth » 16 Jun 2013 17:18

yes
(in general, just try it, instead of asking)

User avatar
Zuu
OpenTTD Developer
OpenTTD Developer
Posts: 4553
Joined: 09 Jun 2003 18:21
Location: /home/sweden

Re: [GS] NoCarGoal

Post by Zuu » 16 Jun 2013 17:45

Yes indeed it works with FIRS. There is no special code to handle FIRS so engineering supplies can end up being a goal cargo even if that is much harder than eg. passengers.

What exist is a classification of cargoes (primary, secondary) and the cargo selection will pick one from each group and one random. So it should balance it out a bit, but you can have more or less bad/good luck with the goal cargoes.
Zuu wrote:Feature: The selected cargoes have been constrained so that at least one cargo come from a raw industry and at least one from a processing industry. The third cargo is obtained by random from the remaining cargoes. Hopefully this should balance the cargo selection better.
My OpenTTD contributions (AIs, Game Scripts, patches, OpenTTD Auto Updater, and some sprites)
Junctioneer (a traffic intersection simulator)

Gothvan
Engineer
Engineer
Posts: 6
Joined: 09 Jun 2013 20:24

Re: [GS] NoCarGoal

Post by Gothvan » 16 Jun 2013 21:11

Okay thank you very much and yes, sorry I should have tried before.

matsydoodles
Engineer
Engineer
Posts: 10
Joined: 22 Jun 2013 13:08

Re: [GS] NoCarGoal

Post by matsydoodles » 22 Jun 2013 18:02

First of all, I want to say a big Thank You to Zuu for making this!

I've been playing OpenTTD on and off for years now, and I've always said the one thing that was lacking was goals within the game. This Game Script / Mode definitely adds that!

Anyway I've been playing it regularly the last couple of days with a few friends and I’ve noticed with a few additions it would greatly improve our enjoyment of the script.

As a software developer by trade I know things are never as simple as it looks. So with no knowledge of the ability of game scripts within Openttd I don't even know if these are possible or planned.

So here goes;

1. The ability to configure which industries to use, or limit industries that won't be randomly selected. Not a fan of Valuables, especially when you start in 1950 with no Banks.

2. Notifications of how the other players are doing.
Had a few ideas of possibly implementations.

A. A second message after your own goal progress of other players, if there is any.
B. A message at the end of the game displaying the ranking, currently having to rely on how honest we are...
C. Company League Table being sorted by most medals, then closet to medals etc

So sorting would be, Number of Medals, then % left for the medals, then total %..

3. Leading on from how other players are doing but via graphs.
Is there the ability to add a graph plotting, or is that out of the scope of GameScripts?

4. Further targets, only happened a few times but I've reached gold with a year to go with the only incentive to rack up the transported! Could be worth having the option to set number of targets, or additional ones that turn on once you've hit gold, Platinum / Diamond?

Now I guess some of these ideas aren't possible but food for thought, sorry for rambling on!

p.s.

I figured it maybe handy to state how we were playing with the GS, as I stumbled across a blog post by PlanetMaker - http://blog.openttdcoop.org/2012/08/24/ ... nocargoal/ where it was played Co-op.

So we've played from 2 to 4 players, usually on a map size 256 * 512 on four years, with the target amount being 3,750 in an hour. Bronze / Silver is usually comfortably done and had seen a few golds.

User avatar
Zuu
OpenTTD Developer
OpenTTD Developer
Posts: 4553
Joined: 09 Jun 2003 18:21
Location: /home/sweden

Re: [GS] NoCarGoal

Post by Zuu » 21 Jul 2013 20:16

Update - Version 9

Changes
  • Breaks savegame compatibility. You will not get version 9 when loading old save games. Thus, it is only for new games.
  • When you use OpenTTD 1.4 or trunk version >= r25621 you get:
    • New goal texts that are more slimmed so that the goal window can be used to monitor the progress of your goals. (new players will see the story book which explains the goals)
    • At the end of each year, a page is added to the story book with a company league.
    • When you score a medal, that is now shown in the story book
    • The game end message shows in the story book
  • Setting to disable pausing at game end. As long as the game has not been saved+loaded, you can go to the GS settings and turn this setting off to continue the game after the game has been paused. If you continue to play past the end, NoCarGoal will not provide any gameplay. This feature only exist because you might want to continue improving your network etc. after the end of a NoCarGoal game.
  • Fix: The AI-GS Communication specification in readme.txt had swapped the parameter location of "goal" and "transported". This fix updates the docs. No change in the actual behaviour.

Screenshot
Screenshot with todays OpenTTD nightly, NoCarGoal v9 and three CluelessPlus v36.
NoCarGoal-version9.png
(28.83 KiB) Downloaded 5 times
OpenTTD Version
A nightly from today (2013-07-21) or later is recommended, but down to 1.3 is supported. You need todays nightly to get most of the new features in this update. (reason to not use story book of older nightlies: r25620 and r25621)


Are you an author of an AI and want to support NoCarGoal?
Check out the SCPClient_NoCarGoal AI Library. Using that library, CluelessPlus now supports NoCarGoal in that it will focus on the goal cargoes that are not yet completed when choosing new connections to build. In the thread of SCPClient_NoCarGoal (linked above), there is a step-by-step instruction on how to get started using it.

If you rather want to deal with the SCP AI interface directly, see readme.txt of NoCarGoal which includes a specification of all commands that NoCarGoal will respond to, how to subscribe to monthly updates etc. Not everything in the SCP AI interface is included in the library mentioned above as it was made to abstract away as much details as possible to simplify usage in AIs.
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: [GS] NoCarGoal

Post by Zuu » 21 Jul 2013 20:45

matsydoodles wrote:First of all, I want to say a big Thank You to Zuu for making this!

I've been playing OpenTTD on and off for years now, and I've always said the one thing that was lacking was goals within the game. This Game Script / Mode definitely adds that!
Thanks for the warm words. I'm sure that by now, you have also checked out also the other Game Scripts available for OpenTTD via the in-game content download dialog.
matsydoodles wrote:1. The ability to configure which industries to use, or limit industries that won't be randomly selected. Not a fan of Valuables, especially when you start in 1950 with no Banks.
If you don't like the automatic selection, pull down the console and do a 'newgame'. This generates a new game using a new random seed.

Since NewGRFs can alter the available cargoes, it is hard to make goal cargo selector in the settings dialog from main menu. Another option is that there is a GS setting to enable in-game selection of goals. Then the script can in the game show a dialog for selecting goal cargoes to the first company in the game. Currently however scripts are limited to displaying questions with at most 3 answers from a pre-defined list of common dialog buttons. (So it is possible to have [prev] [select] [next] and showing one cargo at the time, but that will not be very user friendly if there are many cargoes)

matsydoodles wrote:2. Notifications of how the other players are doing.
Had a few ideas of possibly implementations.

A. A second message after your own goal progress of other players, if there is any.
B. A message at the end of the game displaying the ranking, currently having to rely on how honest we are...
C. Company League Table being sorted by most medals, then closet to medals etc

So sorting would be, Number of Medals, then % left for the medals, then total %..
If you play with nightlies since a few weeks back, you can view the goals of any company. This is now a built in feature in OpenTTD.

If you play with todays nightly (or later) and NoCarGoal v9, you will get a yearly company league table in the story book. This both gives a summary on the standings between all companies during the game as well as serves as a ranking of companies at the end of the game.

If you however play with 1.3.x, you cannot see the standings of other companies. This will not change as you can download last nightly from http://www.openttd.org. For windows, you can also use OpenTTD Auto Update to help maintaining a fresh nightly install on your computer. (Sorry if I sound harsh, but I focus my script development on the new features available in trunk, and also maintain the script so that existing features should continue to work at current stable)
matsydoodles wrote:3. Leading on from how other players are doing but via graphs.
Is there the ability to add a graph plotting, or is that out of the scope of GameScripts?
This is not (currently) possible. It is a nice idea though.
matsydoodles wrote:4. Further targets, only happened a few times but I've reached gold with a year to go with the only incentive to rack up the transported! Could be worth having the option to set number of targets, or additional ones that turn on once you've hit gold, Platinum / Diamond?
If two companies both score gold, they will now get ranked differently depending on total amount of transported cargo (of the three goal cargoes). Thus, there can still be some thing to fight for after you scored gold (to get the top place in the league table)
matsydoodles wrote:Now I guess some of these ideas aren't possible but food for thought, sorry for rambling on!
Thanks for your feedback. Even if not all is possible, it is always nice to get some feedback from someone who has played through a game with the goal script.
My OpenTTD contributions (AIs, Game Scripts, patches, OpenTTD Auto Updater, and some sprites)
Junctioneer (a traffic intersection simulator)

Kogut
Tycoon
Tycoon
Posts: 2493
Joined: 26 Aug 2009 06:33
Location: Poland

Re: [GS] NoCarGoal

Post by Kogut » 22 Jul 2013 05:16

It may be too late for this but maybe using word "delivered" may be better than "transported".
Correct me If I am wrong - PM me if my English is bad
AIAI - AI for OpenTTD

Maiky
Engineer
Engineer
Posts: 11
Joined: 18 Jul 2013 09:30

Re: [GS] NoCarGoal

Post by Maiky » 22 Jul 2013 07:34

When I download NoCarGoal script, script crashes because game doesn't download Queue.FibonacciHeap GS library. Bad cross connection in NoCarGoal script for download library? I must download it manually.
Attachments
Error report
Error report
Bez názvu, 11. Aug 1950.png (25.45 KiB) Viewed 2740 times

User avatar
planetmaker
OpenTTD Developer
OpenTTD Developer
Posts: 9309
Joined: 07 Nov 2007 22:44
Location: Sol d

Re: [GS] NoCarGoal

Post by planetmaker » 22 Jul 2013 07:37

Maiky wrote:When I download NoCarGoal script, script crashes because game doesn't download Queue.FibonacciHeap GS library. Bad cross connection in NoCarGoal script for download library? I must download it manually.
Did you download NoCarGoal using ingame content download? If you downloaded the GS manually, you need to go the whole way manual and obtain its dependencies also manually.

User avatar
Zuu
OpenTTD Developer
OpenTTD Developer
Posts: 4553
Joined: 09 Jun 2003 18:21
Location: /home/sweden

Re: [GS] NoCarGoal

Post by Zuu » 22 Jul 2013 07:56

Maiky wrote:When I download NoCarGoal script, script crashes because game doesn't download Queue.FibonacciHeap GS library. Bad cross connection in NoCarGoal script for download library? I must download it manually.
Sorry, I forgot to mark Queue.FibonacciHeap as new dependency for NoCarGoal. I uploaded possible 5+ content items to bananas (our content service) yesterday, so while I meant to set this dependency, it must have forgotten that while uploading NoCarGoal.

This has now been fixed so that other users who download NoCarGoal 9 should get the library automatically.

Thank you for your report.
My OpenTTD contributions (AIs, Game Scripts, patches, OpenTTD Auto Updater, and some sprites)
Junctioneer (a traffic intersection simulator)

Kogut
Tycoon
Tycoon
Posts: 2493
Joined: 26 Aug 2009 06:33
Location: Poland

Re: [GS] NoCarGoal

Post by Kogut » 22 Jul 2013 10:59

I think that in story book "Game end" chapter should be at the end, not before chapter about the previous year.
Attachments
Bez tytułu.png
Bez tytułu.png (22.4 KiB) Viewed 2715 times
Correct me If I am wrong - PM me if my English is bad
AIAI - AI for OpenTTD

User avatar
Zuu
OpenTTD Developer
OpenTTD Developer
Posts: 4553
Joined: 09 Jun 2003 18:21
Location: /home/sweden

Re: [GS] NoCarGoal

Post by Zuu » 22 Jul 2013 12:12

I have though about adding a text at the bottom that suggest users to go to next page to view the final results. However, so far I've not done so as the string used for that page is shared with the non-story book GUI of NoCarGoal. In the later, there will not be any next page. (yes, it is possible to do both, but it is a minor obstacle)

My motivation is that the "end game" message should be shown first and then you may want to view the company league table to compare with your competitors. I think that a user that follows the though time line should only need to click on "next".
My OpenTTD contributions (AIs, Game Scripts, patches, OpenTTD Auto Updater, and some sprites)
Junctioneer (a traffic intersection simulator)

Mtlbss
Engineer
Engineer
Posts: 10
Joined: 29 Aug 2013 22:37

Re: [GS] NoCarGoal

Post by Mtlbss » 29 Aug 2013 22:48

Hi all, i wana thank you for the script that i use on my server and thx for the recent update that i see change some thing very confortably (don't know how to say that...) thanks a lot^^

matsydoodles
Engineer
Engineer
Posts: 10
Joined: 22 Jun 2013 13:08

Re: [GS] NoCarGoal

Post by matsydoodles » 18 Sep 2013 11:58

Upgrading to the nightly build has implemented all the things I've wished for :bow:

Only thing I would like to request is on the 'Company League' page of the story book, could there be a total field of what you have over gold to illustrate the difference between gold players, and maybe a % of how far you are behind in terms of difference to that player? I'm just being lazy with maths now while I'm playing!

For example.

Winner Gold (152%, 120%, 107%) [+79%] [ - ]
Second (142%, 110%, 101%) [+53%] [-26%]
Loser (102%, 120%, 100%) [+22%] [-57%]

I guess this would only really work if the new bits of data could be shown if the player has gold..

Also the 'League Order' could be better suited to the 'Introduction' page possibly.

Do you have any planned updates for this mode?

User avatar
Zuu
OpenTTD Developer
OpenTTD Developer
Posts: 4553
Joined: 09 Jun 2003 18:21
Location: /home/sweden

Re: [GS] NoCarGoal

Post by Zuu » 18 Sep 2013 14:56

matsydoodles wrote:Upgrading to the nightly build has implemented all the things I've wished for :bow:

Only thing I would like to request is on the 'Company League' page of the story book, could there be a total field of what you have over gold to illustrate the difference between gold players, and maybe a % of how far you are behind in terms of difference to that player? I'm just being lazy with maths now while I'm playing!

For example.

Winner Gold (152%, 120%, 107%) [+79%] [ - ]
Second (142%, 110%, 101%) [+53%] [-26%]
Loser (102%, 120%, 100%) [+22%] [-57%]

I guess this would only really work if the new bits of data could be shown if the player has gold..
The more numbers you add, the more text you need to add that explains all the numbers. This will make it harder to read for newbies etc. Thus it is not always better to add more. I'm not convinced that this is important. The player with best gold score is already sorted first - so you can already see the ranking order.

matsydoodles wrote:Also the 'League Order' could be better suited to the 'Introduction' page possibly.
That would require two versions of the introduction page. One for trunk users and one for stable users. Currently it uses the same content on the first page for both stable and trunk.

It is not impossible to make also the first page diverge between trunk and stable, but it adds up to the differences between when the script is used on different OpenTTD versions.

matsydoodles wrote:Do you have any planned updates for this mode?
No. I see NoCarGoal as fairly complete. If new API additions allow new things that I may see useful, then possible there will be an update. Or if bugs are found or so. But currently I don't see that NoCarGoal as a game mode is missing anything.
My OpenTTD contributions (AIs, Game Scripts, patches, OpenTTD Auto Updater, and some sprites)
Junctioneer (a traffic intersection simulator)

Mtlbss
Engineer
Engineer
Posts: 10
Joined: 29 Aug 2013 22:37

Re: [GS] NoCarGoal

Post by Mtlbss » 19 Sep 2013 10:37

NoCarGoal is my prefered script and even if the randomly selected cargo force me to restart lot's of time to have a good choice (all my game is with FIRS that's why) i use it on all my scenario thx Zuu :bow:

User avatar
Zuu
OpenTTD Developer
OpenTTD Developer
Posts: 4553
Joined: 09 Jun 2003 18:21
Location: /home/sweden

Re: [GS] NoCarGoal

Post by Zuu » 21 Sep 2013 13:33

Mtlbss wrote:NoCarGoal is my prefered script
If you like NoCarGoal, and want some variation you could also try the Silicon Valley script. It is similar but different. :-)
Mtlbss wrote:and even if the randomly selected cargo force me to restart lot's of time to have a good choice (all my game is with FIRS that's why) i use it on all my scenario thx Zuu :bow:
Somewhen in future, I might look into adding an in-game cargo selection dialog where the first company in the game is given the choice to select the three goal cargoes.

It is however not likely to happen before interactive Story Page Elements.
My OpenTTD contributions (AIs, Game Scripts, patches, OpenTTD Auto Updater, and some sprites)
Junctioneer (a traffic intersection simulator)

Mtlbss
Engineer
Engineer
Posts: 10
Joined: 29 Aug 2013 22:37

Re: [GS] NoCarGoal

Post by Mtlbss » 21 Sep 2013 16:55

Silicon valey is a scenario isn't it? I use Nocargoal to add fun in my scenario on my dedicated server, and i pass long time to build map, i try to find new concept of placing industrie a bit like silicon valey. I'm very impatient to use the story book in the stable version, bcse i try it in the nightly that was so good, and if you make the option like you said the NoCarGoal, gonna be really essential thx for all your work^^.

User avatar
Zuu
OpenTTD Developer
OpenTTD Developer
Posts: 4553
Joined: 09 Jun 2003 18:21
Location: /home/sweden

Re: [GS] NoCarGoal

Post by Zuu » 21 Sep 2013 17:14

Mtlbss wrote:Silicon valey is a scenario isn't it?
Silicon Valley is also a Game Script that you can download via the in-game content download window. It also focus on amount of transported cargo, but here you focus on one cargo but need to transport it to a town decided by the script. If you finish by the time period you get gold. If not you get a new target date where you will get silver. (and a third chance to get bronze)

Read more about Silicon Valley here:
http://dev.openttdcoop.org/projects/siliconvalley

Mtlbss wrote:I'm very impatient to use the story book in the stable version, bcse i try it in the nightly that was so good, and if you make the option like you said the NoCarGoal, gonna be really essential thx for all your work^^
Thank you for the warm words.
My OpenTTD contributions (AIs, Game Scripts, patches, OpenTTD Auto Updater, and some sprites)
Junctioneer (a traffic intersection simulator)

Post Reply

Return to “OpenTTD AIs and Game Scripts”

Who is online

Users browsing this forum: No registered users and 3 guests