GS: Industry Constructor
Moderator: OpenTTD Developers
Re: GS: Industry Constructor
Found this script very interesting.
Is it possible to modify it to only build new industry if town has enough population?
For example:
1000 - max 1 industry
2000 - max 2 industry
4000 - max 3 industry
...
With this change and industry building set to town type only, the player will have to grow towns to get new industries, representing economy deveolpment and the fact that industry needs workers.
For example, if towns are allowed to grow to 1000 by only passenger/mail service, this will give starting set of industries, then if you want to develop country more, deliver food/goods to a group of towns to allow towns grow to 2000, this will allow opening of new industries and so on.
Is it possible to modify it to only build new industry if town has enough population?
For example:
1000 - max 1 industry
2000 - max 2 industry
4000 - max 3 industry
...
With this change and industry building set to town type only, the player will have to grow towns to get new industries, representing economy deveolpment and the fact that industry needs workers.
For example, if towns are allowed to grow to 1000 by only passenger/mail service, this will give starting set of industries, then if you want to develop country more, deliver food/goods to a group of towns to allow towns grow to 2000, this will allow opening of new industries and so on.
I like trains. They are soothing.
Re: GS: Industry Constructor
There seems to be a problem with the game script, I look at the debug menu and it repeatedly says that the Town List is empty.
- JacobD88
- Chief Executive
- Posts: 708
- Joined: 16 Aug 2008 17:51
- Location: Long Eaton, Nottinghamshire. UK
- Contact:
Re: GS: Industry Constructor
A wee bit of a necro
However, i have found a previously unreported crash with the Map Constructor update given on Page 2 of this thread
To replicate, add the Map Constructor GS, create a new game (i used 512x512 with industry generation set to "funded only") the script crashes shortly after launch
However, i have found a previously unreported crash with the Map Constructor update given on Page 2 of this thread
To replicate, add the Map Constructor GS, create a new game (i used 512x512 with industry generation set to "funded only") the script crashes shortly after launch
High-Functioning Autistic & Proud... National Autistic Society * Asperger Foundation
My (O)TTD Work...BIGGER DEPOTS (REL.) & SERVICING-STATIONS (WIP) * Advanced DEPOT DESIGNS * SCREENSHOTS
My personal website is occasionally here - sometimes it's just the family site - it's basically a lucky dip
My (O)TTD Work...BIGGER DEPOTS (REL.) & SERVICING-STATIONS (WIP) * Advanced DEPOT DESIGNS * SCREENSHOTS
My personal website is occasionally here - sometimes it's just the family site - it's basically a lucky dip
Re: GS: Industry Constructor
Why do you use version 1 while there is a version 3 both on BaNaNaS and on the first message of the thread?
- JacobD88
- Chief Executive
- Posts: 708
- Joined: 16 Aug 2008 17:51
- Location: Long Eaton, Nottinghamshire. UK
- Contact:
Re: GS: Industry Constructor
Because version 0.9/1.0 of MAP Constructor on Page 2 of this thread (second download at the bottom of page) is newer than version 3 of Industry Constructor with new features like town generation and road linking
As the original dev said, it's far more than an Industry Creation script now, so was rebranded
But sadly not uploaded to BaNaNaS
High-Functioning Autistic & Proud... National Autistic Society * Asperger Foundation
My (O)TTD Work...BIGGER DEPOTS (REL.) & SERVICING-STATIONS (WIP) * Advanced DEPOT DESIGNS * SCREENSHOTS
My personal website is occasionally here - sometimes it's just the family site - it's basically a lucky dip
My (O)TTD Work...BIGGER DEPOTS (REL.) & SERVICING-STATIONS (WIP) * Advanced DEPOT DESIGNS * SCREENSHOTS
My personal website is occasionally here - sometimes it's just the family site - it's basically a lucky dip
Re: GS: Industry Constructor
I see in the code the program throw an error when the industry it tries to build is not build-able.
According to the NewGRF and some other parameters (game date, etc.) industries actually can't be unavailable and I wonder why the author thrown an error in this case.
I "fixed" it by simply aborting industry construction.
But I didn't tested it.
According to the NewGRF and some other parameters (game date, etc.) industries actually can't be unavailable and I wonder why the author thrown an error in this case.
I "fixed" it by simply aborting industry construction.
But I didn't tested it.
- Attachments
-
- MapConstructor.tar
- (180.5 KiB) Downloaded 141 times
- JacobD88
- Chief Executive
- Posts: 708
- Joined: 16 Aug 2008 17:51
- Location: Long Eaton, Nottinghamshire. UK
- Contact:
Re: GS: Industry Constructor
Many thanks, will try out and report back
Have you halted all industry building or just the failed industry?
Have you halted all industry building or just the failed industry?
High-Functioning Autistic & Proud... National Autistic Society * Asperger Foundation
My (O)TTD Work...BIGGER DEPOTS (REL.) & SERVICING-STATIONS (WIP) * Advanced DEPOT DESIGNS * SCREENSHOTS
My personal website is occasionally here - sometimes it's just the family site - it's basically a lucky dip
My (O)TTD Work...BIGGER DEPOTS (REL.) & SERVICING-STATIONS (WIP) * Advanced DEPOT DESIGNS * SCREENSHOTS
My personal website is occasionally here - sometimes it's just the family site - it's basically a lucky dip
Re: GS: Industry Constructor
Just the building attempt when it occurs.
So the next time the script would try to create industries it should try again.
So the next time the script would try to create industries it should try again.
- JacobD88
- Chief Executive
- Posts: 708
- Joined: 16 Aug 2008 17:51
- Location: Long Eaton, Nottinghamshire. UK
- Contact:
Re: GS: Industry Constructor
Hmmm, odd
Your modified script appears to be missing all of the newer Map Constructor features (like road linking)
Your modified version Unedited version from bottom of Page 2 Did you definitely modify the Map Constructor Script?
Your modified script appears to be missing all of the newer Map Constructor features (like road linking)
Your modified version Unedited version from bottom of Page 2 Did you definitely modify the Map Constructor Script?
High-Functioning Autistic & Proud... National Autistic Society * Asperger Foundation
My (O)TTD Work...BIGGER DEPOTS (REL.) & SERVICING-STATIONS (WIP) * Advanced DEPOT DESIGNS * SCREENSHOTS
My personal website is occasionally here - sometimes it's just the family site - it's basically a lucky dip
My (O)TTD Work...BIGGER DEPOTS (REL.) & SERVICING-STATIONS (WIP) * Advanced DEPOT DESIGNS * SCREENSHOTS
My personal website is occasionally here - sometimes it's just the family site - it's basically a lucky dip
Re: GS: Industry Constructor
I see only one MapConstructor download at page 2 and I downloaded it.
Are you sure you use this one ?
Are you sure you use this one ?
- JacobD88
- Chief Executive
- Posts: 708
- Joined: 16 Aug 2008 17:51
- Location: Long Eaton, Nottinghamshire. UK
- Contact:
Re: GS: Industry Constructor
I did
It's very very odd that your modified one removes those options unintentionally
But the one from page 2 still has them
But there's a 110KB difference between the page 2 tar (290kb) and your one (180KB) also
It's very very odd that your modified one removes those options unintentionally
But the one from page 2 still has them
But there's a 110KB difference between the page 2 tar (290kb) and your one (180KB) also
High-Functioning Autistic & Proud... National Autistic Society * Asperger Foundation
My (O)TTD Work...BIGGER DEPOTS (REL.) & SERVICING-STATIONS (WIP) * Advanced DEPOT DESIGNS * SCREENSHOTS
My personal website is occasionally here - sometimes it's just the family site - it's basically a lucky dip
My (O)TTD Work...BIGGER DEPOTS (REL.) & SERVICING-STATIONS (WIP) * Advanced DEPOT DESIGNS * SCREENSHOTS
My personal website is occasionally here - sometimes it's just the family site - it's basically a lucky dip
Re: GS: Industry Constructor
Actually, there are 2 downloads, also here: viewtopic.php?p=1110996#p1110996
Re: GS: Industry Constructor
Doh!
That explains many things!
Here is the modified version of this second download...
That explains many things!
Here is the modified version of this second download...
- Attachments
-
- MapConstructor.tar
- (290 KiB) Downloaded 134 times
Re: GS: Industry Constructor
Here is another big rewrite to this script, it was used to populate a big 4096 map in 1820 with FIRS 3
updated: v3.5 contains multiple fixes, improvements, and simple nice sampling example, which is used to place marine industries fast, contains some auto-debug too
Warnings!:
- this one is editor-only (SS) branch of this script, not like it was originally created as GS script;
it's supposed to be used only for industry generation as last part of scenario creating (keeping clean map without industries is a good practice)
to use, add script to scenario, reload, re-run if it does nothing, check logs. After it finishes, the game will show error, which is actually in most cases correct result
after crash, it's supposed to be replaced with any other script you would like to use during game while still in editor
4096 map is supposed to have result about 20 of each primary, 6 of each secondary, 2 others etc
- In game industry generation is supposed to be disabled most of the time, except for small intervals to generate newly available industries or without them (and with only-prospect-by-player mode)
- all presets which we used are for hard mode, other presets (easy, normal from info.nut) may not work well
- if script hangs (it happens more and more rarely with each clean-up, but can), then re-load clean scenario without any scripts and re-apply and re-run script; it's in general not recommended switching scripts too much or run them twice, may damage scenario
- will work only on pause by now
There is still a lot of things to clean up / simplify /improve in this script in general, very far from perfect, may lockup sometimes, however most cases are now much easier to fix because of how industries declared and all routines reorganized.
Also works much faster in lots of cases.
Change settings at your own risk (some of them may work fine in 3.5)
May be worse than script attached above, because based on much older files uploaded here, but it's not clear.
Having such script even in raw shape was great, and thanks for uploading it back then.
updated: v3.5 contains multiple fixes, improvements, and simple nice sampling example, which is used to place marine industries fast, contains some auto-debug too
Warnings!:
- this one is editor-only (SS) branch of this script, not like it was originally created as GS script;
it's supposed to be used only for industry generation as last part of scenario creating (keeping clean map without industries is a good practice)
to use, add script to scenario, reload, re-run if it does nothing, check logs. After it finishes, the game will show error, which is actually in most cases correct result
after crash, it's supposed to be replaced with any other script you would like to use during game while still in editor
4096 map is supposed to have result about 20 of each primary, 6 of each secondary, 2 others etc
- In game industry generation is supposed to be disabled most of the time, except for small intervals to generate newly available industries or without them (and with only-prospect-by-player mode)
- all presets which we used are for hard mode, other presets (easy, normal from info.nut) may not work well
- if script hangs (it happens more and more rarely with each clean-up, but can), then re-load clean scenario without any scripts and re-apply and re-run script; it's in general not recommended switching scripts too much or run them twice, may damage scenario
- will work only on pause by now
There is still a lot of things to clean up / simplify /improve in this script in general, very far from perfect, may lockup sometimes, however most cases are now much easier to fix because of how industries declared and all routines reorganized.
Also works much faster in lots of cases.
Change settings at your own risk (some of them may work fine in 3.5)
May be worse than script attached above, because based on much older files uploaded here, but it's not clear.
Having such script even in raw shape was great, and thanks for uploading it back then.
- Attachments
-
- SS_Industry_Constructor-3.5.tar
- after multiple updates&bugfixes in recent days, this version is most promising
- (113.5 KiB) Downloaded 88 times
Who is online
Users browsing this forum: No registered users and 28 guests