I can't found that setting?!Aphid wrote:Did you by any chance turn on 'towns build roads'?
CityBuilder Release Topic
Moderator: OpenTTD Developers
Re: CityBuilder Release Topic
Re: CityBuilder Release Topic
I also had looked there, but i didn't found it. But now i found it. First, only the basic settings where show, but this setting was hidden. It was on. But with this game script, towns/cities build no roads?
Re: CityBuilder Release Topic
v76.
Any chance the same bug you fixed in previous versions got reintroduced? City is growing, but shows 0%

Re: CityBuilder Release Topic
To Help you figuring out what is wrong I will give deeper description how it happened: http://josh.c-servers.com/web/example.savstinkyfax wrote:
v76.
Any chance the same bug you fixed in previous versions got reintroduced? City is growing, but shows 0%
Here is save-game in which it shows 0%, I have been using it to teach friends some basics. There were just 6 cities and 0 towns, so we did not claim any town. I assume it might have caused the issue.
(In normal play % are shown correctly)
Interestingly that color still worked (0% was green for growing, and red for not growing).
Re: CityBuilder Release Topic
Congratulations with Version 78
I believe you are coming very close to bug-free version.

Re: CityBuilder Release Topic
Have been playing v78 with a friend whole evenign yesterday, and decided to continue the game from the save-file today, though the script won't load up!
When we try to load the game with exactly same config, same version, everything untouched it won't.
Here is a screenshot: http://josh.c-servers.com/web/2013_04_1 ... _1.3.0.png
Here is a saved game: http://josh.c-servers.com/web/aurora_one_company.sav
Downgraded to v76 and savegame works, eventhough it was started with v78. I believe the reason is hidden in the changes done to v77 or v78.
Strangely v76 workaround only worked in a single-player, once I tried doing same on dedicated linux server it would refuse to load saying the SaveGame is for v78.
Am hoping you will pin-point the error soon.
When we try to load the game with exactly same config, same version, everything untouched it won't.
Here is a screenshot: http://josh.c-servers.com/web/2013_04_1 ... _1.3.0.png
Here is a saved game: http://josh.c-servers.com/web/aurora_one_company.sav
Downgraded to v76 and savegame works, eventhough it was started with v78. I believe the reason is hidden in the changes done to v77 or v78.
Strangely v76 workaround only worked in a single-player, once I tried doing same on dedicated linux server it would refuse to load saying the SaveGame is for v78.
Am hoping you will pin-point the error soon.
Re: CityBuilder Release Topic
Found the bug.
You can fix it by replacing line 193 in main.nut
with this:
Game_length = 0 means infinite to the script, except when it loads a game. Just a case of forgetting a detail and not testing a specific scenario.
Hence it will conclude that it has finished.
Next version will have it fixed.
Note that it may be necessary to manually fix it in your version if you want to play that particular savegame. That is because openTTD will automatically run the same version with the same save-game.
You can fix it by replacing line 193 in main.nut
Code: Select all
if(start_year + game_length > GSDate.GetYear(GSDate.GetCurrentDate())) go = true;
Code: Select all
if(start_year + game_length > GSDate.GetYear(GSDate.GetCurrentDate()) || game_length == 0) go = true;
Hence it will conclude that it has finished.
Next version will have it fixed.
Note that it may be necessary to manually fix it in your version if you want to play that particular savegame. That is because openTTD will automatically run the same version with the same save-game.
Re: CityBuilder Release Topic
Thank you AphidAphid wrote:Found the bug.
You can fix it by replacing line 193 in main.nut
with this:Code: Select all
if(start_year + game_length > GSDate.GetYear(GSDate.GetCurrentDate())) go = true;
Game_length = 0 means infinite to the script, except when it loads a game. Just a case of forgetting a detail and not testing a specific scenario.Code: Select all
if(start_year + game_length > GSDate.GetYear(GSDate.GetCurrentDate()) || game_length == 0) go = true;
Hence it will conclude that it has finished.
Next version will have it fixed.
Note that it may be necessary to manually fix it in your version if you want to play that particular savegame. That is because openTTD will automatically run the same version with the same save-game.

Re: CityBuilder Release Topic
Here's a screenshot of the new things one can do; both towns are from the same game:
- Attachments
-
- CB_Newstuff.jpg (65.37 KiB) Viewed 5836 times
Re: CityBuilder Release Topic
[offtopic]
Hi Aphid,
I notice from your screenshot that you managed to change the game font. How did you do that? I'd like to use a non-proportional gamefont for debugging my AI-under-development.
Thanks!
[/offtopic]
Hi Aphid,
I notice from your screenshot that you managed to change the game font. How did you do that? I'd like to use a non-proportional gamefont for debugging my AI-under-development.
Thanks!
[/offtopic]
A game worth playing is a game worth modding 

Re: CityBuilder Release Topic
http://wiki.openttd.org/FAQ_troubleshoo ... ll_to_read explains how to set a font
Re: CityBuilder Release Topic
Thanks, Alberth. I'm happily debugging my code now 

A game worth playing is a game worth modding 

Re: CityBuilder Release Topic
Regarding debugging: did you know about AIController.Break, introduced in 1.3?
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
No, I didn't. I've been on a "holiday" for quite a while....
Looks useful, thanks.
Looks useful, thanks.
A game worth playing is a game worth modding 

Re: CityBuilder Release Topic
What is the problem? Maybe I can help with debugging.Aphid wrote:<One game-breaking bug remains>
Correct me If I am wrong - PM me if my English is bad
AIAI - AI for OpenTTD
AIAI - AI for OpenTTD
Re: CityBuilder Release Topic
Hi, i'm currently working on a german translation to this Script and stumbled over the following line:
How is one able to delegate areas? Can you explain what is meant here?Perhaps delegating important areas might improve your success?
Re: CityBuilder Release Topic
"Delegating important areas" is a bit of a subtle hint for an idea with co-op gameplay where a company focuses on a particular section of the map, or say a particular cargo, or what have you. Maybe the terminology chosen was a bit vague on purpose here. The idea of the co-op mode is to have multiple companies working together to grow the map or a single town.
So in the sense that it's meant you could translate it also as 'giving a role to the companies'.
For instance, you could have a map with CB metro mode, and YACD or CargoDist with one company that only does inner-city metro transport.
I consider this a game-breaking bug because it makes injections possible even when you turn them off. For example, a player stalls all the entrance stations to their town by stopping the trains or deleting the entrance track tiles. A giant pile of trains will queue up in front of the stations. After 3-6 months the player rebuilds the tiles or uncloggs the stations. The result is a massive influx of goods, 3-6 times the normal amount. By repeatedly doing this trick the user can get their town to grow to a larger size than otherwise possible.
Another way is by using transfers and road vehicles and stopping the road vehicles. The principle remains the same.
If houses were deleted in the months that the town is running dry, the technique would simply stop working because the town is longer dry than it is actually receiving stuff, whence it will shrink when you try to 'cheat' like this.
There's some more minor things like the town UI not working properly in multiplayer when the message is longer than 255 characters, or the message becoming no longer well-formed when it has 4 cargoes. That is related to weird arbitrary string library limits and also outside my control. Last, as with all town grow scripts, 'fund buildings' is a sort of cheat as well as it will circumvent the script and build a house no matter whether the town is growing or not.
Any ideas for better handling of the three bugbears are very welcome
So in the sense that it's meant you could translate it also as 'giving a role to the companies'.
For instance, you could have a map with CB metro mode, and YACD or CargoDist with one company that only does inner-city metro transport.
Well, the major problem is in regards to properly allowing removing of houses. I don't know of a way to remove a house (e.g. 'shrink' a town). Calling Town.ExpandTown with a negative number doesn't work, and the bulldozer requires a company context. I have decided to go without any company contexts because that makes it much more difficult to use this script in single-player. You basically need to setup a scenario or a multi-player server with an infinite-money company to handle housing deletion.Kogut wrote:What is the problem? Maybe I can help with debugging.Aphid wrote:<One game-breaking bug remains>
I consider this a game-breaking bug because it makes injections possible even when you turn them off. For example, a player stalls all the entrance stations to their town by stopping the trains or deleting the entrance track tiles. A giant pile of trains will queue up in front of the stations. After 3-6 months the player rebuilds the tiles or uncloggs the stations. The result is a massive influx of goods, 3-6 times the normal amount. By repeatedly doing this trick the user can get their town to grow to a larger size than otherwise possible.
Another way is by using transfers and road vehicles and stopping the road vehicles. The principle remains the same.
If houses were deleted in the months that the town is running dry, the technique would simply stop working because the town is longer dry than it is actually receiving stuff, whence it will shrink when you try to 'cheat' like this.
There's some more minor things like the town UI not working properly in multiplayer when the message is longer than 255 characters, or the message becoming no longer well-formed when it has 4 cargoes. That is related to weird arbitrary string library limits and also outside my control. Last, as with all town grow scripts, 'fund buildings' is a sort of cheat as well as it will circumvent the script and build a house no matter whether the town is growing or not.
Any ideas for better handling of the three bugbears are very welcome

Re: CityBuilder Release Topic
I remember old citybuilder running thanks to patched server that required 3 months of continuous supply before expanding city. It was still possible to use this exploit but it is far less efficient.
It may be possible to fake negative growth by storing growth value for city and if it is negative - increase it instead of growing the city.
It may be possible to fake negative growth by storing growth value for city and if it is negative - increase it instead of growing the city.
Correct me If I am wrong - PM me if my English is bad
AIAI - AI for OpenTTD
AIAI - AI for OpenTTD
Re: CityBuilder Release Topic
Started a new game after a long break from this game. and got this error when loading a new game.
Running 1.3.2 and some newgrfs at the same time. older version didnt have this bug..
Edit: narrowed the bug. it happens even in the older versions also. if i put the game mode Metropolis and timelimit to infinite ihe bug will occur only then.
Running 1.3.2 and some newgrfs at the same time. older version didnt have this bug..
Edit: narrowed the bug. it happens even in the older versions also. if i put the game mode Metropolis and timelimit to infinite ihe bug will occur only then.
- Attachments
-
- Untitled.png (22.31 KiB) Viewed 5214 times
Who is online
Users browsing this forum: No registered users and 9 guests