Install Steam
login
|
language
简体中文 (Simplified Chinese)
繁體中文 (Traditional Chinese)
日本語 (Japanese)
한국어 (Korean)
ไทย (Thai)
Български (Bulgarian)
Čeština (Czech)
Dansk (Danish)
Deutsch (German)
Español - España (Spanish - Spain)
Español - Latinoamérica (Spanish - Latin America)
Ελληνικά (Greek)
Français (French)
Italiano (Italian)
Bahasa Indonesia (Indonesian)
Magyar (Hungarian)
Nederlands (Dutch)
Norsk (Norwegian)
Polski (Polish)
Português (Portuguese - Portugal)
Português - Brasil (Portuguese - Brazil)
Română (Romanian)
Русский (Russian)
Suomi (Finnish)
Svenska (Swedish)
Türkçe (Turkish)
Tiếng Việt (Vietnamese)
Українська (Ukrainian)
Report a translation problem
About 2 years ago or so I opened a "feature request" to the UG devs anywhere - could have been here on Steam or on transportfever.net - that the map generator could have underground resource areas like many other games also have - for decades.
Those may be paintable with a brush.
This would mean not everywhere is coal, or iron ore, or even stone.
A mod dev could add more areas, like clay, limestone etc.
If this would exist, the map generator could/should only place a coal mine where coal is etc.
This way the cluttering of industries at absurd places would stop.
And the player should have to look where a coal mine could be placed - even without sending out geologists like in "Settlers"
As you're already here, @phobos2077:
I have another thing that I "demanded" from UG some time ago - a better terrain paint brush filter.
Actually brushes are only to be filtered by slope, positive or negative logic.
What is missing badly is a filter by altitude, simply as that.
It is such a boring and dumb work to paint mountain tops properly.
Is a filter like this also possible with modding?
Regarding built-in industry opening/closure, also see this analysis: https://steamhost.cn/steamcommunity_com/workshop/discussions/18446744073709551615/4997318143963632130/?appid=1066780
https://www.transportfever.net/index.php?thread/14523-logistische-herausforderung-logistic-challenge/&postID=374282#post374282
My idea is much smaller in scope. I just want to solve one issue of more "lore-friendly" and varied placement of industries when using industry spawn/closure.
Additional optional goals for the mod:
- Dynamically spawn/close towns. I want to enhance the feeling of industrialization and growth over the decades. Starting with small number of towns that you can realistically connect in early game, then remove cities that you neglected and add more.
- Make industry spawn/closure more dynamic. When new era is arrived, make sure these new industries are spawned faster. Historically, when new big industry is invented, it expands very quickly to the point of bubble, then collapses back into it's balanced state.
- (optionally) Add challenge to player by sometimes closing even connected industries or disrupting output, etc.
Overall by having complete control over how, when and where industries are spawned you can make gameplay more varied.
I'm not yet sure if I would do it as an addon for Senseless Industries (since it introduces industry eras), or make it vanilla-compatible.
Exactly the kind of attitude I like and try to follow myself in regards to modding! Thanks.
Btw, just tested your mod with above-maximum chances of industry closures - I think it can actually make your mod better because of new industries will appear with higher chance. So a tiny mod that can partially achieve the goal of more rapid industry era change. If only you could dynamically change game config parameters...
https://steamhost.cn/steamcommunity_com/sharedfiles/filedetails/?id=2810826371
- Industries created via BuildProposal command work just like game-spawned industries. They can be connected to cities via ConnectTownsAndIndustries command. They can be removed via built-in industry closure (along with roads connecting them to towns).
- I could also remove industries no problem via the same command. The only problem is that in this case roads connecting industry to the city will remain. This can probably be addressed with more code, but it's extra work.
- I could create a custom notification window with any content. The only issue so far is that I couldn't find how to interact with built-in Popup Manager so that custom notifications stack properly with built-in notifications.
- I can draw polygon zones for player (circles) and prevent him from building certain industries at certain zones.
So what remains to do:
- Create a custom "industry zone" construction that can be placed during map creation with a parameter to specify category and radius.
- Distribute all industries between these categories (like separate category for every type of ore, one for all farms, one for all processing industries, one for distribution centers to make sure they're closer to towns)
- Write script that will partly replicate built-in industry spawn logic: calculate the target number of industries total and per type (according to placementParams), get all existing industries, find an industry type that's lacking the most, then take all "zone" constructions of compatible category and try to place a new industry inside it's radius.
- Create custom notification that new industry is available and try to integrate it with built-in notifications.
- Test it. Figure out if it will perform on maps with lots of industries (especially road connections). Figure out if I can use built-in industry closure logic or replace it as well.
https://steamhost.cn/steamcommunity_com/sharedfiles/filedetails/?id=2812918376
https://steamhost.cn/steamcommunity_com/sharedfiles/filedetails/?id=2812918333
https://steamhost.cn/steamcommunity_com/sharedfiles/filedetails/?id=2812918345
https://steamhost.cn/steamcommunity_com/sharedfiles/filedetails/?id=2812920531
Industry clusters are special type of industry that you place in map editor (or during game) that doesn't do anything on it's own, but you can set a radius and category of industries to spawn inside it.
Once in a while, a script will find all industries and clusters on map. Then try to replicate vanilla industry distribution like this:
1. Calculate total desired number of industries by multiplying terrain size in square km to industry density target set in basic game settings.
2. Using placementParams.initWeight of industries, calculate target number of every industry and difference to target (how much industries of this type are missing).
3. Industry types with highest difference are selected first, then one with the lowest buildOrder is selected to spawn next.
Industries are names similarly to vanilla - closest town is found and multiple industries of the same type will be denoted with a number.
Now the best part - it seems if you set game.config.economy.industryDevelopment.spawnIndustries to true, then creating industry via scripts for some weird reason shows "Industry founded" notification! Seems like some code gets confused and thinks it was spawned by the game. Unexpected but very desirable behavior!!! (I set probability exponent to 0, and hope that the built-in spawn will never happen)
Finally, I call connectTownsAndIndustries on the closest town and it seems to work most of the time connecting the industry just like the built-in spawning would do.
That is the minimum viable mod that I wanted in the beginning. I'd use the built-in industry closure for now, maybe it will be enough. Considering how spawn logic works, in case of Senseless, new era industries should spawn very quickly as target year is reached - as soon as some industry is closed.
I think I might post this as an experimental mod after some polishing.
Can a script get the slope and altitude values within an area to avoid building at the steepest spot? Perhaps only in map editor and create a blacklist of coordinates within an area for later use?
Yes, and it's already done, but in a very simple way. I take 5 points (center and 4 corners of box with a diagonal of 300m) and check the difference between lowest and highest points. Seems to work.
The only problem is if you place clusters of a certain category covering mountains or water, you can get in situation where the script can't spawn any industry of this type and will get stuck. (it selects a random point and checks if it's valid, and has 10 attempts to do so before failing). Shouldn't be an issue though if you place enough clusters on the map, so that's up to the player (map creator).