CityBuilder Release Topic

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

Aphid
Traffic Manager
Traffic Manager
Posts: 168
Joined: 16 Dec 2011 17:08

Re: CityBuilder Release Topic

Post by Aphid »

By the way, I'm looking for people that want to help test this in different configurations. It should support any combination of newGRFs openTTD can support itself.
Also, I'm a bit unsure about the default settings, these might be too easy/hard.
LSky
Traffic Manager
Traffic Manager
Posts: 170
Joined: 25 Jun 2005 10:44
Location: The Netherlands

Re: CityBuilder Release Topic

Post by LSky »

I'm currently running r24662, combined with the extended daylength patch and cargodist.
I'm getting this error at the beginning of the second month.

Image

Is there a certain setting that I ought to change? I've tried setting up the configuration the way I had envisioned it to run, it gives me this error. Then I decided to run this with the default settings, still gives the same error.
Aphid
Traffic Manager
Traffic Manager
Posts: 168
Joined: 16 Dec 2011 17:08

Re: CityBuilder Release Topic

Post by Aphid »

This should be fixed, thanks for the report.

There was a default 'max' function somewhere in the script, and that isn't overloaded with float for some reason.
zazzn
Engineer
Engineer
Posts: 19
Joined: 16 Jun 2007 10:52

Re: CityBuilder Release Topic

Post by zazzn »

Hi Guys,

I'm trying to set this up for me and my buddy to play in a private game, however, I'm having issues, figuring out how to install the script.

I followed the readme as best as I could but got lost at the section below...

- Find the correct cargo IDs of the cargoes on the landscape.
- Set the cargo promilles of the cargoes towns cannot accept in this landscape to 0. This is done per ID.
(cargo #01 would be coal in temperate, for example).

Do I need to have a dedicated server to play this with my buddy (If so it's fine, i'll set up my Windows Home Server to run TTD). Just not sure how to configure this script.

I placed it in the scripts directory in c:\games\openttd\scripts\citybulider but doesn't show up in the GUI

Any help would be appreciated.
User avatar
Zuu
OpenTTD Developer
OpenTTD Developer
Posts: 4553
Joined: 09 Jun 2003 18:21
Location: /home/sweden

Re: CityBuilder Release Topic

Post by Zuu »

zazzn wrote:I placed it in the scripts directory in c:\games\openttd\scripts\citybulider but doesn't show up in the GUI
Move it to c:\games\openttd\game\citybulider

The "game" directory is for Game Scripts.
The "script" directory is for another type of scripts that can be used to issue console commands on certain events.


In addition to CityBuilder, you also need to ensure that the server have Aystar version 6 (GameScript edition) and "SuperLib for NoGo" version 27. Both can currently be downloaded from here: http://bananas.openttd.org/en/gslibrary/ or use the online content button in the game to get the libraries and preferable also the CityBuilder script as that will automatically get the correct version of the libraries which in some cases is not the last version. Also for SuperLib to work you need the RoadPathfinder library too. As you see, if you can start OpenTTD with the gui on your server, and download using that, then you get all dependencies automatically downloaded and stored at the right location.
My OpenTTD contributions (AIs, Game Scripts, patches, OpenTTD Auto Updater, and some sprites)
Junctioneer (a traffic intersection simulator)
zazzn
Engineer
Engineer
Posts: 19
Joined: 16 Jun 2007 10:52

Re: CityBuilder Release Topic

Post by zazzn »

Citybulider doesn't show up in the online content though....

So I moved the files to the dir you specified and it doesn't show up also, I downloaded the pathfinder road4 since that was the only one missing, however, I can't find that on the online content button as well.. More over, where do I place that file now? Do I leave them tared? Because I've been de-compressing the files.
User avatar
XfrankX
Engineer
Engineer
Posts: 19
Joined: 08 Aug 2011 09:56
Location: The Netherlands
Contact:

Re: CityBuilder Release Topic

Post by XfrankX »

Note that you need OpenTTD 1.3.0 Beta 1 or the latest Nightly version of OpenTTD to be able to run the CityBuilder script.

I agree that it's not easy to setup, but when it's running its pretty cool :-)

Anyway, start with downloading 1.3.0 beta 1 from openttd.org and download CityBuilder from the online content system.
zazzn
Engineer
Engineer
Posts: 19
Joined: 16 Jun 2007 10:52

Re: CityBuilder Release Topic

Post by zazzn »

Question..

Game is installed C:\games\openttd
Other game files are C:\Users\zazzn\Documents\OpenTTD\content_download\game

I see the Tar files there of the content I downloaded before though the GUI, should I just simply drop the Tar file there after extracting it from the GZ?

Thanks,

Also downloading the latest beta. Currently on 1.2.3
zazzn
Engineer
Engineer
Posts: 19
Joined: 16 Jun 2007 10:52

Re: CityBuilder Release Topic

Post by zazzn »

Ok it found it when I updated to the beta :)

However, i'm getting an error about missing sprites. Any idea how I can determine what module it is that is doing that?

Thanks,
Aphid
Traffic Manager
Traffic Manager
Posts: 168
Joined: 16 Dec 2011 17:08

Re: CityBuilder Release Topic

Post by Aphid »

You can safely ignore this error and still play with some of the new buttons missing graphics.

To resolve it, download the latest version of OpenGFX from Bananas. Make sure to download the version intended for nightly builds.

Please note that, when using nightly builds, you may from time to time see this error coming back and may need to download a new version of openGFX by yourself manually. For a guide on how to properly manually install graphics, please consult the openTTD wiki. You can find the latest Stable Graphics on the main page at http://www.openttd.org/en/download-opengfx. Newer beta versions (the one you need with a beta client) at http://bananas.openttd.org/en/base/ and the latest nightly graphics at http://dev.openttdcoop.org/.

Please note that sometimes some of these links may lead to the same version. The exact updating scheme is a bit unclear to me, but most of the time, ottdcoop has the latest, newest, least tested thing, while the main page usually has the oldest, but stable releases for their newest version.
zazzn
Engineer
Engineer
Posts: 19
Joined: 16 Jun 2007 10:52

Re: CityBuilder Release Topic

Post by zazzn »

Thanks a lot for all the HELP!!!
Final question, I am trying to set goals and it looks like I need Nogo for that, but I have that, and I believe city bulider uses it, but I don't see anywhere to set the actual goals, like for instnace I'd like the game to end after someone hits 5000 pop in their city.

I take it Zbase does not work with the beta either? Unless I want to see the missing sprites?
Last edited by zazzn on 16 Jan 2013 22:07, edited 1 time in total.
User avatar
Zuu
OpenTTD Developer
OpenTTD Developer
Posts: 4553
Joined: 09 Jun 2003 18:21
Location: /home/sweden

Re: CityBuilder Release Topic

Post by Zuu »

zazzn wrote:Thanks a lot for all the HELP!!!
Final question, I am trying to set goals and it looks like I need Nogo for that, but I have that, and I believe city bulider uses it, but I don't see anywhere to set the actual goals, like for instnace I'd like the game to end after someone hits 5000 pop in their city.
NoGo is the name of the Game Script API framework. Just as NoAI is the name of the framework for programming AIs for OpenTTD. However, from your context, it doesn't seem to be what you mean.
My OpenTTD contributions (AIs, Game Scripts, patches, OpenTTD Auto Updater, and some sprites)
Junctioneer (a traffic intersection simulator)
zazzn
Engineer
Engineer
Posts: 19
Joined: 16 Jun 2007 10:52

Re: CityBuilder Release Topic

Post by zazzn »

When my friend tries to join he has a mismatch because obviously i'm running beta and he is not. How come I can join the pub server http://www.openttd.org/en/server/58528 which is running the release version and city builder test?
Aphid
Traffic Manager
Traffic Manager
Posts: 168
Joined: 16 Dec 2011 17:08

Re: CityBuilder Release Topic

Post by Aphid »

Let me try to answer both questions:
Thanks a lot for all the HELP!!!
Final question, I am trying to set goals and it looks like I need Nogo for that, but I have that, and I believe city bulider uses it, but I don't see anywhere to set the actual goals, like for instnace I'd like the game to end after someone hits 5000 pop in their city.

I take it Zbase does not work with the beta either? Unless I want to see the missing sprites?
Yes, the citybuilder gamescript uses the NoGo framework to implement its code. NoGo is a part of openTTD itself, and any users with a recent enough version (1.2.0) will automatically also have NoGo. Because CityBuilder uses some later additions to the API, the only supported client version is 1.3.0 beta (or a nightly that is new enough). You can set a goal in the script itself through its many parameters. As there are more than one hundred of these parameters, please consult the readme included in the first post for what they all do. Current version of the script supports setting any time limit in years up to several thousand years, or infinite.
When my friend tries to join he has a mismatch because obviously i'm running beta and he is not. How come I can join the pub server http://www.openttd.org/en/server/58528 which is running the release version and city builder test?
There are currently various citybuilder servers active on the internet, not all of which use my script. Some have a modified version of OpenTTD to support citybuilding, others have their own private script(s). The server you mentioned has one of the latter. A server that runs my script is, for example, http://www.openttd.org/en/server/65582


EDIT: For questions regarding ZBase, please consult the discussion over at http://www.tt-forums.net/viewtopic.php?f=36&t=61581

EDIT 2: In regards to these questions being asked, I added some extra information to the wiki page at http://wiki.openttd.org/Game_script. It might be a good idea to include this page in the OpenTTD manual, or perhaps split the extra material into a page at http://wiki.openttd.org/Game_script_Settings and include this page. Even though the result will be quite similar to http://wiki.openttd.org/AI_Settings, it may be necessary to avoid confusion.
Acol
Engineer
Engineer
Posts: 14
Joined: 21 Jan 2013 13:00

Re: CityBuilder Release Topic

Post by Acol »

Script stops working when loading scenario on the server. And it always stops working when i load the game. I`m using 1.3.0-beta1 client.
User avatar
planetmaker
OpenTTD Developer
OpenTTD Developer
Posts: 9432
Joined: 07 Nov 2007 22:44
Location: Sol d

Re: CityBuilder Release Topic

Post by planetmaker »

Scripts are part of the savegame just like NewGRFs. Thus you need to configure the usage of that script in the scripts / AI settings before you create a scenario or a new map.

You cannot apply it afterwards to an existing map or scenario.
Acol
Engineer
Engineer
Posts: 14
Joined: 21 Jan 2013 13:00

Re: CityBuilder Release Topic

Post by Acol »

planetmaker wrote:Scripts are part of the savegame just like NewGRFs. Thus you need to configure the usage of that script in the scripts / AI settings before you create a scenario or a new map.

You cannot apply it afterwards to an existing map or scenario.
i meant just that i have made a game whith the script enabled and saved it and so i did to scenrario, but loading savegame/scenraio it still stops working.
Attachments
Untitled.jpg
Untitled.jpg (46.65 KiB) Viewed 4416 times
Aphid
Traffic Manager
Traffic Manager
Posts: 168
Joined: 16 Dec 2011 17:08

Re: CityBuilder Release Topic

Post by Aphid »

Instead of constructing the objects in the 'Load' function, I now construct them after the 'Load' function in version 64.
This does mean I had to break savegame compatibility. V64 savegames are incompatible with previous versions of the script, and vice versa.
You should be able to save and load larger maps now. I've just tested it with 128 towns on the map. I'm unsure about even larger amounts of towns.

Edit: Thanks for the bug report and screenshot. Whenever you encounter another problem, feel free to report here. Please include a screenshot of the script log as you did above.
Acol
Engineer
Engineer
Posts: 14
Joined: 21 Jan 2013 13:00

Re: CityBuilder Release Topic

Post by Acol »

thx works really nicely now.

second problem what i found was the scenario loading in MP servers. It somehow just stops at same point when trying to spawn more industries.
But i found roundabout way to load scenraio map in MP server. First loading it on SP game and save it as normal savegame. Then i load the savegame on MP server and it works.
Attachments
Untitled2.jpg
Untitled2.jpg (41.87 KiB) Viewed 4381 times
Last edited by Acol on 23 Jan 2013 10:56, edited 1 time in total.
Aphid
Traffic Manager
Traffic Manager
Posts: 168
Joined: 16 Dec 2011 17:08

Re: CityBuilder Release Topic

Post by Aphid »

This may be caused by some combination of settings and NewGRF that causes the script not to be able to prospect industries at the game start.
You can fix this problem by turning off prospecting.
Set the following settings in your config file:
  • Industry_Density = 63
    Industry_S_Density = 63
where you have your citybuilder settings.

Alternatively, go to the script configuration and set the 'Amount of tiles per XXXary industry' settings to '63' (this disables prospecting).
I will try to change the behaviour of the script if it fails to prospect a bit. It will do 66,000 attempts instead of 1,000,000 in the next version.
Post Reply

Return to “OpenTTD AIs and Game Scripts”

Who is online

Users browsing this forum: No registered users and 12 guests