CityBuilder Release Topic
Moderator: OpenTTD Developers
Re: CityBuilder Release Topic
Indeed, gamescripts just pass on the data they want saved as an object similar to a python dictionary to OpenTTD (with key-value pairs), which will add it to the save file. And then they parse the result in the predescribed format when loading a save game.
Do you have a backup of the save game, and have you tried using that (on the off chance that file really got corrupted)?
Try using the 'stable' version of openTTD with your save game, located at https://www.openttd.org/en/download-stable, instead of using an update program. Just follow the instructions in the installer for your platform. On linux, you can also use your distribution's packages, although they may be out of date for more conservative distro's like Mint. This version should be save-game compatible with any other stable version, as well as most of the trunk versions from long enough ago.
As noted above, if you modified your openTTD with patches, there's a good chance these broke save-game compatibility. (Even if a patch follows best-practice, which is supporting save-game transitions from all openttd versions from before the patch, thing is that trunk will add new things to saveload.cpp, breaking compatibility with a patched earlier version at some point in the future, e.g. you can't 'upgrade' your openttd and expect savegames to work using patches.)
Do you have a backup of the save game, and have you tried using that (on the off chance that file really got corrupted)?
Try using the 'stable' version of openTTD with your save game, located at https://www.openttd.org/en/download-stable, instead of using an update program. Just follow the instructions in the installer for your platform. On linux, you can also use your distribution's packages, although they may be out of date for more conservative distro's like Mint. This version should be save-game compatible with any other stable version, as well as most of the trunk versions from long enough ago.
As noted above, if you modified your openTTD with patches, there's a good chance these broke save-game compatibility. (Even if a patch follows best-practice, which is supporting save-game transitions from all openttd versions from before the patch, thing is that trunk will add new things to saveload.cpp, breaking compatibility with a patched earlier version at some point in the future, e.g. you can't 'upgrade' your openttd and expect savegames to work using patches.)
Re: CityBuilder Release Topic
i have a bug please help me

- Attachments
-
- error.jpg
- error
- (539.76 KiB) Downloaded 9 times
Re: CityBuilder Release Topic
file comp.nut (company object), - wrong MoveHQ signature call in line 139.
if(hq != GSMap.TILE_INVALID)
{
[139] //MoveHQ(hq, towns); wrong signature ( real signature is MoveHQ(tile) )
// set the town's text
GSTown.SetText(my_town,GSText(GSText.STR_CITYBUILDER_TOWNOWNER, this.id));
if(GSController.GetSetting("Town_Labels"))
{
local tile = GSTown.GetLocation(my_town);
MoveHQ(tile); call here with tile
local X = GSMap.GetTileX(tile);
local Y = GSMap.GetTileY(tile);
if(label_sign_id == -1)
{
label_sign_id = GSSign.BuildSign(GSMap.GetTileIndex(X,Y), GSText(GSText.STR_CITYBUILDER_TOWNOWNER_SIGN, this.id));
}
else
{
if(GSSign.IsValidSign(label_sign_id))
{
GSSign.SetName(label_sign_id, GSText(GSText.STR_CITYBUILDER_TOWNOWNER_SIGN, this.id));
}
else
{
label_sign_id = GSSign.BuildSign(GSMap.GetTileIndex(X,Y), GSText(GSText.STR_CITYBUILDER_TOWNOWNER_SIGN, this.id));
}
}
}
}
}
if(hq != GSMap.TILE_INVALID)
{
[139] //MoveHQ(hq, towns); wrong signature ( real signature is MoveHQ(tile) )
// set the town's text
GSTown.SetText(my_town,GSText(GSText.STR_CITYBUILDER_TOWNOWNER, this.id));
if(GSController.GetSetting("Town_Labels"))
{
local tile = GSTown.GetLocation(my_town);
MoveHQ(tile); call here with tile
local X = GSMap.GetTileX(tile);
local Y = GSMap.GetTileY(tile);
if(label_sign_id == -1)
{
label_sign_id = GSSign.BuildSign(GSMap.GetTileIndex(X,Y), GSText(GSText.STR_CITYBUILDER_TOWNOWNER_SIGN, this.id));
}
else
{
if(GSSign.IsValidSign(label_sign_id))
{
GSSign.SetName(label_sign_id, GSText(GSText.STR_CITYBUILDER_TOWNOWNER_SIGN, this.id));
}
else
{
label_sign_id = GSSign.BuildSign(GSMap.GetTileIndex(X,Y), GSText(GSText.STR_CITYBUILDER_TOWNOWNER_SIGN, this.id));
}
}
}
}
}
- Attachments
-
- CityBuilder-113.tar
- script with that fix
- (266 KiB) Downloaded 295 times
Re: CityBuilder Release Topic
marhex, your error is likely only visual, I'll check the code for your particular settings for the town window. The 'goals' is the correct one, you're only transporting 37% of the generated passengers. Did you set a passenger requirement for your own town at above this 37%? I believe the default is 60 or 70%, so that's likely the culprit.
The script can limit town growth based on these sources:
- Any specific cargo ID delivered 'to' your town
- Passengers/mail delivered 'from' your town (generated by the town's buildings). << this is turned on.
The script can limit town growth based on these sources:
- Any specific cargo ID delivered 'to' your town
- Passengers/mail delivered 'from' your town (generated by the town's buildings). << this is turned on.
Re: CityBuilder Release Topic
ther is a bug in the town window and in goals window it say the tawn is not growing but in the town window it grow evry 23 daysAphid wrote:marhex, your error is likely only visual, I'll check the code for your particular settings for the town window. The 'goals' is the correct one, you're only transporting 37% of the generated passengers. Did you set a passenger requirement for your own town at above this 37%? I believe the default is 60 or 70%, so that's likely the culprit.
The script can limit town growth based on these sources:
- Any specific cargo ID delivered 'to' your town
- Passengers/mail delivered 'from' your town (generated by the town's buildings). << this is turned on.
Re: CityBuilder Release Topic
i made a french traduction
- Attachments
-
- french.txt
- (18.95 KiB) Downloaded 300 times
Re: CityBuilder Release Topic
I am getting this error, and have no idea how to solve the problem, please advise
- Attachments
-
- Unavngivet.png (10.55 KiB) Viewed 9550 times
Re: CityBuilder Release Topic
Did you download city builder, using in game content download or manually in your browser?
If the later, mind that you by hand also need to download and install the libraries used by city builder.
If the later, mind that you by hand also need to download and install the libraries used by city builder.
My OpenTTD contributions (AIs, Game Scripts, patches, OpenTTD Auto Updater, and some sprites)
Junctioneer (a traffic intersection simulator)
Junctioneer (a traffic intersection simulator)
Re: CityBuilder Release Topic
could you guide me on how to do it with a content download?Zuu wrote:Did you download city builder, using in game content download or manually in your browser?
If the later, mind that you by hand also need to download and install the libraries used by city builder.
Re: CityBuilder Release Topic
Download city builder using online content, and the system will install also all dependencies of city builder and dependencies to the dependencies.
This wiki page give you some help
https://wiki.openttd.org/Online_content
You may have to remove city builder if you added it manually to the file system in order for OpenTTD to download it again, now with all dependencies.
This wiki page give you some help
https://wiki.openttd.org/Online_content
You may have to remove city builder if you added it manually to the file system in order for OpenTTD to download it again, now with all dependencies.
My OpenTTD contributions (AIs, Game Scripts, patches, OpenTTD Auto Updater, and some sprites)
Junctioneer (a traffic intersection simulator)
Junctioneer (a traffic intersection simulator)
Re: CityBuilder Release Topic
Any solution? I get this everytime i start a game both new and saved.
- Attachments
-
- err.png (58.71 KiB) Viewed 9407 times
Re: CityBuilder Release Topic
aeqh open citybuilder-113\comp.nut
in the line 139 change MoveHQ(hq, towns); to MoveHQ(hq);
or download my fix
in the line 139 change MoveHQ(hq, towns); to MoveHQ(hq);
or download my fix
- Attachments
-
- comp.nut
- my fix
- (15.98 KiB) Downloaded 372 times
Re: CityBuilder Release Topic
i have a new question... how do i make my trains deliver fx. steel and coal to a city if it doesnt accept it, but says it needs it?
Re: CityBuilder Release Topic
Deliver those cargo to the steel mill/power plant etc that share the town's name. If Town of Tena require coal, deliver coal to Tena Power Station. If there's no power station associated with Tena, you might have to either wait until one is built, or fund your own.Aridorn wrote:i have a new question... how do i make my trains deliver fx. steel and coal to a city if it doesnt accept it, but says it needs it?
Re: CityBuilder Release Topic
thx, i figured it out before you posted this, still thanks for the reply, i have now played through an entire game without any problems, so thats awesome.Sylf wrote:Deliver those cargo to the steel mill/power plant etc that share the town's name. If Town of Tena require coal, deliver coal to Tena Power Station. If there's no power station associated with Tena, you might have to either wait until one is built, or fund your own.Aridorn wrote:i have a new question... how do i make my trains deliver fx. steel and coal to a city if it doesnt accept it, but says it needs it?
Thanks to all the people who replied to my questions and helped me, you are the unsung heroes of everyday problems, i salute you all.
Re: CityBuilder Release Topic
Now I have a serious question. I am trying to get CityBuilder working on my client, so I can host a non-dedicated server for me and my friends to have a little fun on. Now I have played through one attempt myself, but there seems to be a problem. I started in a 700 population town and after 10 years of constantly fullfilling the requirement I set (75per1k passengers) the town 'grew' to 400 population. Is there a setting I missed or f*cked up?\
Also normal cities do not grow at all, anybody an explanation or setting to get that working as well?
Thanks in advance!
Also normal cities do not grow at all, anybody an explanation or setting to get that working as well?
Thanks in advance!
Re: CityBuilder Release Topic
Is that one remaining game-breaking bug by any chance that a town demands coal, but no station accepts it, no matter where in town it is? And yes, I mean freight stations 

Beer is not the answer. It's the question, and the answer is YES.
Re: CityBuilder Release Topic
The remaining thing I want to solve is that the 'towns' don't remove houses when you don't provide enough stuff, which allows for 'stockpiling' exploits to be rather effective.
E.g. let's say your network provides 2000 goods/month (cargoID 5), and you have a '100' goods requirement (promilles). No other requirements are set in this example. Your town will grow until it has 20,000 population, and then stop growing. It'll still build out some more houses, so say it's population climbs to ~22,500.
At this point, the town wants 2,250 goods. Since your network only supplies 2000, you stop all road vehicles in the town, letting goods pile up in the station for say 3 months. At this point, 6,000 goods have piled up in the station. Then you re-start your road vehicles, suddenly delivering an influx of goods as fast as they can. Suppose your road vehicles could transport 3,000 units/month (the bottleneck in the network occurs earlier, e.g. at the supply side of things). Suddenly you can grow your town up to 30,000 by repeatedly doing this trick.
Edit: New version is out.
This new version uses 'economy' files and detects your industry newGRF for you -- no more having to manually look up cargo IDs and what not. By default the script will task you for ~400 units of cargo per month per 1000 people. Distribution of the various cargoes is done in accordance to what an average map spawns. There's now just two parameters to tune, One for how quick goals appear, and a multiplier for the total amount.
E.g. let's say your network provides 2000 goods/month (cargoID 5), and you have a '100' goods requirement (promilles). No other requirements are set in this example. Your town will grow until it has 20,000 population, and then stop growing. It'll still build out some more houses, so say it's population climbs to ~22,500.
At this point, the town wants 2,250 goods. Since your network only supplies 2000, you stop all road vehicles in the town, letting goods pile up in the station for say 3 months. At this point, 6,000 goods have piled up in the station. Then you re-start your road vehicles, suddenly delivering an influx of goods as fast as they can. Suppose your road vehicles could transport 3,000 units/month (the bottleneck in the network occurs earlier, e.g. at the supply side of things). Suddenly you can grow your town up to 30,000 by repeatedly doing this trick.
Edit: New version is out.
This new version uses 'economy' files and detects your industry newGRF for you -- no more having to manually look up cargo IDs and what not. By default the script will task you for ~400 units of cargo per month per 1000 people. Distribution of the various cargoes is done in accordance to what an average map spawns. There's now just two parameters to tune, One for how quick goals appear, and a multiplier for the total amount.
Re: CityBuilder Release Topic
I can't get CityBuilder to work:
Fresh install (tried both Stable and Nightly). Deleted all the settings (Documents/OpenTTD folder).
No additional packages except CityBuilder and automatically downloaded dependencies for it.

Let me know how I could help you find the issue.
Fresh install (tried both Stable and Nightly). Deleted all the settings (Documents/OpenTTD folder).
No additional packages except CityBuilder and automatically downloaded dependencies for it.

Let me know how I could help you find the issue.
Who is online
Users browsing this forum: No registered users and 5 guests