[GS] RCG - A city growth GameScript for OTTD
Moderator: OpenTTD Developers
Re: [GS] RCG - A city growth GameScript for OTTD
OpenTTD aborting a GS that takes longer than some fixed amount of time to generate its savegame data is by design. It's impossible for OpenTTD to know whether the GS just has a lot of data to save, or if it has a bug that causes it to get stuck/infinite loop. Because of that, there has to be a limit somewhere where the GS is just assumed to be stuck. You could argue that the time limit should increase when the map size increases, I don't know if that happens but it could make sense to do.
-
- Engineer
- Posts: 2
- Joined: 02 Apr 2020 01:07
Re: [GS] RCG - A city growth GameScript for OTTD
Yep, commenting out the save and load code does fix the issue. Thanks!
Re: [GS] RCG - A city growth GameScript for OTTD
Hiya,
I am using your game script combined with FIRS on extreme mode and I am having tons of fun with it!
I do however get a bug on the town information window after population increase beyond 4000 and Raw industrial goods (cat 4) should start showing up on the town information part. it says " (too many parameters):0:0"
I am not sure if it is only a visual bug or also something else.
See the image for the bug.
Thanks anyway for this GameScript combo it is great!
*edit1* After some searching on the forum I found the bug. It is indeed visual with a max of xx number of strings for the town information panel. I'll assume it works as required with just a visual bug. Is there any other way I can track, cargo requirements per town?
- Attachments
-
- Bug on town information
- Capture.JPG (131.84 KiB) Viewed 5703 times
It takes either 1 train with 8 carriages or 500 cars to move 1000 people. Simple math.
Re: [GS] RCG - A city growth GameScript for OTTD
Hey Boukev,
Thank you for pointing it out. The RCG script was using all slots for town information that I did not know, it was limited and I added two new strings to it. So you are correct, it is only visual and all calculations should match. I will need to find a workaround as it cannot be easily fixed. So hopefully in the near future, I will upload a fixed version.
You can check the town requirements when you enable debug logging in game script settings in the game and open AI/Game Script Debug window. But it is not suited for tracking, as you will see.
Thank you for pointing it out. The RCG script was using all slots for town information that I did not know, it was limited and I added two new strings to it. So you are correct, it is only visual and all calculations should match. I will need to find a workaround as it cannot be easily fixed. So hopefully in the near future, I will upload a fixed version.
You can check the town requirements when you enable debug logging in game script settings in the game and open AI/Game Script Debug window. But it is not suited for tracking, as you will see.
Re: [GS] RCG - A city growth GameScript for OTTD
Thanks for the reply and the tip and all the work for this script. It has given openttd a new challenge which has renewed my joy for it.
It takes either 1 train with 8 carriages or 500 cars to move 1000 people. Simple math.
-
- Route Supervisor
- Posts: 385
- Joined: 08 Nov 2019 23:54
Re: [GS] RCG - A city growth GameScript for OTTD
I used to test probably all scripts and the problem with too many parameters I have seen in two of them: Balanced City Growth and City Buildier 111. In both scripts the authors somehow found a solution.
In CB, when the city begins to require more deliveries, the window layout changes. In BCG this layout looks like this from the beginning. Unfortunately, in both cases it does not look good and is very illegible.
I am not able to do more, but maybe just removing one of the required groups would be the solution? For example, Passengers and Post, whose transport will still be required.
I am sorry for may English. I know is bed.
Re: [GS] RCG - A city growth GameScript for OTTD
I assume both those solutions work because they changed all the data into one string thus reducing the amount of strings needed to below the limit.
One data string probably also means no additional formatting (colors etcetera) so that is why it looks that basic.
I have found the bug-report-window to have the required information so I can spot the issues that I don't understand just from playing.
*edit*
Wow! You already made an update! Much appreciated. Will try tonight.
*edit2*
Works like a charm Thanks
One data string probably also means no additional formatting (colors etcetera) so that is why it looks that basic.
I have found the bug-report-window to have the required information so I can spot the issues that I don't understand just from playing.
*edit*
Wow! You already made an update! Much appreciated. Will try tonight.
*edit2*
Works like a charm Thanks
Last edited by Boukev on 13 May 2020 18:33, edited 2 times in total.
It takes either 1 train with 8 carriages or 500 cars to move 1000 people. Simple math.
Re: [GS] RCG - A city growth GameScript for OTTD
Updated version of Renewed Village Growth v2 (RVG) is here.
Fixed issue with town text parameter count by scrolling categories.
More information about changes in changelog.
More information about changes in changelog.
- Attachments
-
- town_scroll.png (94.79 KiB) Viewed 1885 times
Re: [GS] RCG - A city growth GameScript for OTTD
how does it scroll? automatically?
also: is there any way to remove the 'passengers' and 'mail ' lines from the default information? it's not very relevant information for the GS.
also: is there any way to remove the 'passengers' and 'mail ' lines from the default information? it's not very relevant information for the GS.
Creator of the Openttd Challenge Spinoff, Town Demand patch
After action reports: The path to riches, A dream of skyscrapers
After action reports: The path to riches, A dream of skyscrapers
Re: [GS] RCG - A city growth GameScript for OTTD
The category lines scroll every 5 game days by shifting by one line. It does not scroll faster because it could hinder the performance on big maps.
It would be great if the default text could be altered. But it is not possible without altering the source code.
-
- Route Supervisor
- Posts: 385
- Joined: 08 Nov 2019 23:54
Re: [GS] RCG - A city growth GameScript for OTTD
An interesting solution, but somehow I'm not convinced. This makes it difficult to observe the changes that occur at the beginning of the month. In addition, just when you want to look at something, the view will change.
Would that be difficult? Easy? I do not know, but I think the best option would be to add to the game the ability to show more information in city window.
I am sorry for may English. I know is bed.
Re: [GS] RCG - A city growth GameScript for OTTD
I understand it is not the ideal solution. I am opposed to not formatted text, even thought it would be an easier fix. First I want to explore other options. For now the game script is fully functional and can be iterated upon.LaChupacabra wrote: ↑14 May 2020 00:01 An interesting solution, but somehow I'm not convinced. This makes it difficult to observe the changes that occur at the beginning of the month. In addition, just when you want to look at something, the view will change.
These are my other ideas:
1. Make the scrolling faster and independent of game days. This would require lot of testing, because the whole town info text is rewritten each time. This could lead to lower performance on high town count maps.
2. Switch between pax/mail transported and cargo categories. You will still not get all of the information at first glance, but you can check all categories at once.
3. Put pax/mail transported to town sign. But it would clutter the town sign. If you turn off the sign in gs parameters, we are back at the same problem.
4. Invest time into checking source code and modifying the parameter count / possibility to change default data. If got the time and successful, the earliest it would be in 1.11.
It was already discussed here:LaChupacabra wrote: ↑14 May 2020 00:01 Would that be difficult? Easy? I do not know, but I think the best option would be to add to the game the ability to show more information in city window.
Zuu wrote: ↑17 Aug 2014 22:26
Now it was some time ago I looked on this, but as far as I remember, raising this limit is non-trivial. Some script authors have worked this around by adding up strings and number as a raw text string and sending that to OpenTTD. That is not very pretty as you lose the capability to get translated strings by sending the data as parameter. Another way is to stay below the limit and if you need to display more, put that in in a story book page, a monthly news message or even as signs next to the town.
It have been suggested to allow a Town window to refer to a story page (click to show page) or add something similar as story page elements to the town window to work around the 20 parameter limit. There is also a limit on how long a string can be. I'm not really against these ideas, I even got some other ideas on related things, I just haven't had time to work on it more than the time I have put into creating the story book.
Re: [GS] RCG - A city growth GameScript for OTTD
Hi Firrel, I have a feature request. If it's too much work I'll fork and try and do it myself
I really like the generic way you've approached the cargo categories, but it results in all towns being the same-old same-old. I would love to see an option where for each town it picks a random *specific* cargo from each cargo category to request. This means each town will have its own 'personality' because they all want slightly different subsets of cargo to grow. You could try and hunt for the ideal town on the map for the local industries, or pick one that's much more of a challenge because it wants stuff you can only get from the other side of the map.
This selection could be done by explicitly storing the randomised choice per town, or by using a hash on relevant town data so it can be reconstructed on load.
As an added bonus, if there's only one cargo possible in a category it would default to displaying that instead of the cargo category.
I really like the generic way you've approached the cargo categories, but it results in all towns being the same-old same-old. I would love to see an option where for each town it picks a random *specific* cargo from each cargo category to request. This means each town will have its own 'personality' because they all want slightly different subsets of cargo to grow. You could try and hunt for the ideal town on the map for the local industries, or pick one that's much more of a challenge because it wants stuff you can only get from the other side of the map.
This selection could be done by explicitly storing the randomised choice per town, or by using a hash on relevant town data so it can be reconstructed on load.
As an added bonus, if there's only one cargo possible in a category it would default to displaying that instead of the cargo category.
Creator of the Openttd Challenge Spinoff, Town Demand patch
After action reports: The path to riches, A dream of skyscrapers
After action reports: The path to riches, A dream of skyscrapers
Re: [GS] RCG - A city growth GameScript for OTTD
The forum thread for Renewed Village Growth (RVG) is moved to its specific page.
The latest release is version 3, which changes once again the way the town information is displayed and some minor tweaks. You can find it on BaNaNaS. Please let me know about bugs/tweaks in the new thread.
The latest release is version 3, which changes once again the way the town information is displayed and some minor tweaks. You can find it on BaNaNaS. Please let me know about bugs/tweaks in the new thread.
Who is online
Users browsing this forum: No registered users and 9 guests