[GS] RCG - A city growth GameScript for OTTD
Moderator: OpenTTD Developers
Re: [GS] RCG - A new city growth GS for OTTD/FIRS
Just tried the r39 and getting the following error: "Your script made an error: "STR_TOWNBOX_NOGROWTH" does not exist"
I also tried to take out all the GRF, thinking that it might be something to do with them, but even with an empty list, get the same error.
I am using OpenTTD version 1.4.2
Update: I think I narrowed it down to the defect in the tar - the language files are not being put in the /lang directory, which causes the error.
I also tried to take out all the GRF, thinking that it might be something to do with them, but even with an empty list, get the same error.
I am using OpenTTD version 1.4.2
Update: I think I narrowed it down to the defect in the tar - the language files are not being put in the /lang directory, which causes the error.
Re: [GS] RCG - A new city growth GS for OTTD/FIRS
Hello,aantono wrote:Just tried the r39 and getting the following error: "Your script made an error: "STR_TOWNBOX_NOGROWTH" does not exist"
thank you for reporting this. Indeed, there was a bug in the utils which I use to build releases.
It's fixed now. You can find the corrected version on the release topic (updated to r41).
Also note that last revisions use GS SuperLib v. 38, downloadable on Bananas.
Patch - Let's timetable depot waiting time with the Wait in depot patch.
GameScript - Searching a new way to make your cities growing ? Try the Renewed City Growth GameScript.
My screenshots thread.
GameScript - Searching a new way to make your cities growing ? Try the Renewed City Growth GameScript.
My screenshots thread.
Re: [GS] RCG - A new city growth GS for OTTD
Thanks for the quick fix.
One question - is it possible to add a config property to indicate if the "Growth: xxx days" addition to the town sign should be visible or hidden? It makes the town area overwhelmed with text, especially if you happen to have a station right on the town tile, then you have the town name, the station name and the growth info all overlapping on the same area and make it cluttered and unreadable.
One question - is it possible to add a config property to indicate if the "Growth: xxx days" addition to the town sign should be visible or hidden? It makes the town area overwhelmed with text, especially if you happen to have a station right on the town tile, then you have the town name, the station name and the growth info all overlapping on the same area and make it cluttered and unreadable.
-
- Engineer
- Posts: 91
- Joined: 12 Jun 2014 14:24
Re: [GS] RCG - A new city growth GS for OTTD
Is this script able to renew buildings? Im using another city builder script which is unable to do so.
Re: [GS] RCG - A new city growth GS for OTTD
What exactly do you mean by that?Gigigonzalez wrote:Is this script able to renew buildings? Im using another city builder script which is unable to do so.
-
- Engineer
- Posts: 91
- Joined: 12 Jun 2014 14:24
Re: [GS] RCG - A new city growth GS for OTTD
Quite literally, is this script able to demolish and renew buildings, like with original growth, old buildings often get replaced by newer ones as years go by.aantono wrote:What exactly do you mean by that?Gigigonzalez wrote:Is this script able to renew buildings? Im using another city builder script which is unable to do so.
We use aphid's city builder script and he says there is no 'reliable' way for the script to demolish buildings (to make room for new ones)
Re: [GS] RCG - A new city growth GS for OTTD
Some scripts trigger town growth using a function (GSTown.ExpandTown()) which is not adapted to the purpose, because it only builds new buildings, but doesn't handle renewing (destruction/reconstruction of houses, which allows new buildings to appear). The result is that if you're using some GRF which has different time eras for houses (like TTRS), all the buildings are stuck in old times. In RCG there is not this problem, because the script does not builds houses by itself, but just redefines the town growth rate, using GSTown.SetGrowthRate().aantono wrote:What exactly do you mean by that?Gigigonzalez wrote:Is this script able to renew buildings? Im using another city builder script which is unable to do so.
So, to put it simple: yes, buildings are (also) renewed.
Yes, it is possible. And actually, I find that it is an interesting idea. I'll put that in my todo-list for a next release. I'll not add the feature for the moment, because I'd like to test and publish the actual version for now.aantono wrote:One question - is it possible to add a config property to indicate if the "Growth: xxx days" addition to the town sign should be visible or hidden? It makes the town area overwhelmed with text, especially if you happen to have a station right on the town tile, then you have the town name, the station name and the growth info all overlapping on the same area and make it cluttered and unreadable.
But waiting for the next changes, you can manage it simply by yourself, by a simple hack: just comment out (which means: add "//" in front of the lines) the corresponding part in the file town.nut (you will see the change when reloading a savegame):
Code: Select all
// local sign_text = TownSignText();
// if (this.label_sign_id == -1) {
// this.label_sign_id = GSSign.BuildSign(GSTown.GetLocation(this.id), sign_text);
// } else {
// if (GSSign.IsValidSign(this.label_sign_id)) {
// GSSign.SetName(this.label_sign_id, sign_text);
// } else {
// this.label_sign_id = GSSign.BuildSign(GSTown.GetLocation(this.id), sign_text);
// }
// }
Patch - Let's timetable depot waiting time with the Wait in depot patch.
GameScript - Searching a new way to make your cities growing ? Try the Renewed City Growth GameScript.
My screenshots thread.
GameScript - Searching a new way to make your cities growing ? Try the Renewed City Growth GameScript.
My screenshots thread.
Re: [GS] RCG - A new city growth GS for OTTD
You makes things complex.
As long as this.label_sign_id != null you'll be fine, and you seems to use -1 as default/no sign value.
Code: Select all
if (GSSign.IsValidSign(this.label_sign_id)) GSSign.SetName(this.label_sign_id, sign_text);
else this.label_sign_id = GSSign.BuildSign(GSTown.GetLocation(this.id), sign_text);
Re: [GS] RCG - A new city growth GS for OTTD
Indeed. You're right, there's one useless check on label_sign_id. I'll change that.krinn wrote:You makes things complex.As long as this.label_sign_id != null you'll be fine, and you seems to use -1 as default/no sign value.Code: Select all
if (GSSign.IsValidSign(this.label_sign_id)) GSSign.SetName(this.label_sign_id, sign_text); else this.label_sign_id = GSSign.BuildSign(GSTown.GetLocation(this.id), sign_text);
Following the original code, I use -1 and not null because if I check IsValidSign() on a null sign_id, the script crashes and complains because it wants an integer.
Related to this, I'm also thinking that I should get rid of the ClearAllSigns() call, performed during the init phase. After all, there is no reason that the saved signs aren't valid after reloading the game. And I already noted that building signs takes a huge amount of time (something like one tick per sign ?)
Edit: both changes done in r49 (here [edit: no more] attached). 50 ticks saved on initialisation due to removing ClearAllSigns() \o/ (1024*1024 map, with 50 monitored towns atm).
Last edited by keoz on 21 Aug 2014 12:18, edited 1 time in total.
Patch - Let's timetable depot waiting time with the Wait in depot patch.
GameScript - Searching a new way to make your cities growing ? Try the Renewed City Growth GameScript.
My screenshots thread.
GameScript - Searching a new way to make your cities growing ? Try the Renewed City Growth GameScript.
My screenshots thread.
Re: [GS] RCG - A new city growth GS for OTTD
I made some graphics and explanations about calculations internals, for who is actually wondering what has to be expected from the script about town growing.
They are presented in the repository's wiki, which you can consult there: http://dev.openttdcoop.org/projects/gs-rcg/wiki/Wiki
Hoping that everything is clear and, from a specialized mathematical-lexical POV, correct (I'm historian, not mathematician).
Additional note: I just noticed a bug on signs, which is fixed now. I also removed some heavy initializing stuff, which revealed as unnecessary. Savegame loading is really fast now (6 ticks on a 1024*1024 map). Should be bug free, but only fast tested.
They are presented in the repository's wiki, which you can consult there: http://dev.openttdcoop.org/projects/gs-rcg/wiki/Wiki
Hoping that everything is clear and, from a specialized mathematical-lexical POV, correct (I'm historian, not mathematician).
Additional note: I just noticed a bug on signs, which is fixed now. I also removed some heavy initializing stuff, which revealed as unnecessary. Savegame loading is really fast now (6 ticks on a 1024*1024 map). Should be bug free, but only fast tested.
Last edited by keoz on 22 Aug 2014 19:40, edited 1 time in total.
Patch - Let's timetable depot waiting time with the Wait in depot patch.
GameScript - Searching a new way to make your cities growing ? Try the Renewed City Growth GameScript.
My screenshots thread.
GameScript - Searching a new way to make your cities growing ? Try the Renewed City Growth GameScript.
My screenshots thread.
Re: [GS] RCG - A new city growth GS for OTTD
About savegame compatibility when using RCG
Some of you may have been a little bit disappointed by the fact that sometime, subsequent revisions weren't compatible between them, which means that changing your RCG revision caused savegames to crash on loading. That was generally caused by changes in saved data.
Hence I just decided to introduce a method allowing further revisions to be compatible between them. This allows to update your script in ongoing games, without starting a new one. The loading might take some extra time, because the script needs to reset some datas. Check in the AI/Gamescript log for the end of initialization.
If there are any problems with updates, just tell me and I see what can be done.
Please, report bugs. Going for version 3 now (I want it clean ).
Some of you may have been a little bit disappointed by the fact that sometime, subsequent revisions weren't compatible between them, which means that changing your RCG revision caused savegames to crash on loading. That was generally caused by changes in saved data.
Hence I just decided to introduce a method allowing further revisions to be compatible between them. This allows to update your script in ongoing games, without starting a new one. The loading might take some extra time, because the script needs to reset some datas. Check in the AI/Gamescript log for the end of initialization.
If there are any problems with updates, just tell me and I see what can be done.
Please, report bugs. Going for version 3 now (I want it clean ).
Last edited by keoz on 24 Aug 2014 16:49, edited 2 times in total.
Patch - Let's timetable depot waiting time with the Wait in depot patch.
GameScript - Searching a new way to make your cities growing ? Try the Renewed City Growth GameScript.
My screenshots thread.
GameScript - Searching a new way to make your cities growing ? Try the Renewed City Growth GameScript.
My screenshots thread.
Re: [GS] RCG - A new city growth GS for OTTD
Any idea what's gone wrong here?
I've been trying for aaaages to get it working but it just looks messy / has no colours.
Just downloaded r59 and superlib 38.
Look forward to using this great looking mod
Added:
Nevermind, just got r62 and it's working now! lol
I've been trying for aaaages to get it working but it just looks messy / has no colours.
Just downloaded r59 and superlib 38.
Look forward to using this great looking mod
Added:
Nevermind, just got r62 and it's working now! lol
Re: [GS] RCG - A new city growth GS for OTTD
That's strange. Did you eventually use any other script in this game before loading RCG ? IIRC, some of the strings that I see there never existed in my script. (The upper part. The lower is mine).
Edit: ok, fine. I have just seen your edited message.
Edit bis: Here the last revision -r72 (updated 24/8).
Edit: ok, fine. I have just seen your edited message.
Edit bis: Here the last revision -r72 (updated 24/8).
Patch - Let's timetable depot waiting time with the Wait in depot patch.
GameScript - Searching a new way to make your cities growing ? Try the Renewed City Growth GameScript.
My screenshots thread.
GameScript - Searching a new way to make your cities growing ? Try the Renewed City Growth GameScript.
My screenshots thread.
Re: [GS] RCG - A city growth GameScript for OTTD
After some last bugfixes and testing ...
Version 4 is ready now.
Changes:
- added support for baseset industries (temperate, arctic, tropical,
toyland), all FIRS' economies and ECS (all vectors)
- introducing GSText and lang files
- townboxes text formatting improved
- added a method to check savegame compatibility between revisions
- savegame code completely rewritten and simplified
- code cleanup and additional comments
- readme.txt completely rewritten
- updated to SuperLib v. 38
- setting up hg repository
- fix: game is no more crashing when new towns are founded. Thanks to
krinn.
- fix: game is no more crashing when saving immediately after loading
- fix: the script now correctly counts the deliveries from all
companies
- fix: lot of bugs and even better ... No more known bugs.
Note: you can safely switch from either last revisions, either last versions, just by downloading the new version from BaNaNas. When reloading the game, it may take some extra time for initialisation, to reset some data. Also note that the (included) readme has been completely rewritten, so that you can find more detailed explanations there.
Thanks a lot to:
- planetmaker, Zuu for their help
- specially krinn, who suggested a lot of code improvments !
EDIT. I Spot out a problem when loading from old version. It's normally solved in last uploaded version. If someone has problems to reload savegames, complain here.
EDIT2. Looks like OTTD really doesn't like minor GS version numbers. Version 4 then.
Version 4 is ready now.
Changes:
- added support for baseset industries (temperate, arctic, tropical,
toyland), all FIRS' economies and ECS (all vectors)
- introducing GSText and lang files
- townboxes text formatting improved
- added a method to check savegame compatibility between revisions
- savegame code completely rewritten and simplified
- code cleanup and additional comments
- readme.txt completely rewritten
- updated to SuperLib v. 38
- setting up hg repository
- fix: game is no more crashing when new towns are founded. Thanks to
krinn.
- fix: game is no more crashing when saving immediately after loading
- fix: the script now correctly counts the deliveries from all
companies
- fix: lot of bugs and even better ... No more known bugs.
Note: you can safely switch from either last revisions, either last versions, just by downloading the new version from BaNaNas. When reloading the game, it may take some extra time for initialisation, to reset some data. Also note that the (included) readme has been completely rewritten, so that you can find more detailed explanations there.
Thanks a lot to:
- planetmaker, Zuu for their help
- specially krinn, who suggested a lot of code improvments !
EDIT. I Spot out a problem when loading from old version. It's normally solved in last uploaded version. If someone has problems to reload savegames, complain here.
EDIT2. Looks like OTTD really doesn't like minor GS version numbers. Version 4 then.
Patch - Let's timetable depot waiting time with the Wait in depot patch.
GameScript - Searching a new way to make your cities growing ? Try the Renewed City Growth GameScript.
My screenshots thread.
GameScript - Searching a new way to make your cities growing ? Try the Renewed City Growth GameScript.
My screenshots thread.
Re: [GS] RCG - A city growth GameScript for OTTD
Hi, thank you for your nice script!
Would it be possible to make the categories optional?
I really like the concept of those categories,
but i would like to leave out category 4 in my game.
Edit:
i don't know if that is already planned, but what about a story book page explaining the categories?
Would it be possible to make the categories optional?
I really like the concept of those categories,
but i would like to leave out category 4 in my game.
Edit:
i don't know if that is already planned, but what about a story book page explaining the categories?
Re: [GS] RCG - A city growth GameScript for OTTD
Upgraded the script (use hg to pull from trunk), reloaded the game to get the new version initialized and got this error:
Edit: After the error, I've saved the game again, then reloaded it, and after a month the script reset itself without any visible errors.Re: [GS] RCG - A city growth GameScript for OTTD
I'm glad you likelugo wrote:Hi, thank you for your nice script!
About proposal 1: that'd be a non trivial change. I am still thinking about the possibility of simplifying categories (maybee by giving the choice between 3 or 5 categories). It is not impossible that further changes in this direction also leads to the possibility of just removing a category, but all of this will take some time and reflexion.lugo wrote:Would it be possible to make the categories optional?
I really like the concept of those categories,
but i would like to leave out category 4 in my game.
i don't know if that is already planned, but what about a story book page explaining the categories?
About proposal 2: that's already on the top of my TODO list and I'm right working on it.
Today I made a lot of changes in development version for including new features and last revisions are potentially quite unstable. Could you eventually post a savegame ?aantono wrote:Upgraded the script (use hg to pull from trunk), reloaded the game to get the new version initialized and got this error:Edit: After the error, I've saved the game again, then reloaded it, and after a month the script reset itself without any visible errors.
Patch - Let's timetable depot waiting time with the Wait in depot patch.
GameScript - Searching a new way to make your cities growing ? Try the Renewed City Growth GameScript.
My screenshots thread.
GameScript - Searching a new way to make your cities growing ? Try the Renewed City Growth GameScript.
My screenshots thread.
Re: [GS] RCG - A city growth GameScript for OTTD
Output of hg log is this:keoz wrote: Today I made a lot of changes in development version for including new features and last revisions are potentially quite unstable. Could you tell me what revision did you use ?
Code: Select all
changeset: 84:921db6d25d7c
tag: tip
user: keoz
date: Sat Aug 30 15:55:29 2014 +0200
summary: Introducing a bunch of expert settings for finetuning.
Re: [GS] RCG - A city growth GameScript for OTTD
Could you eventually post the savegame ? (the one of 1949-06-19, which is gonna 11 days later).aantono wrote:Output of hg log is this:[...]
Patch - Let's timetable depot waiting time with the Wait in depot patch.
GameScript - Searching a new way to make your cities growing ? Try the Renewed City Growth GameScript.
My screenshots thread.
GameScript - Searching a new way to make your cities growing ? Try the Renewed City Growth GameScript.
My screenshots thread.
Re: [GS] RCG - A city growth GameScript for OTTD
There you go.
- Attachments
-
- Total Transport, 19th Jun 1949.sav
- (179.83 KiB) Downloaded 139 times
Who is online
Users browsing this forum: No registered users and 30 guests