[Cities: Skylines 2 - Scripts - Gameplay] ScaledStorageDemand


Recommended Posts

ScaledStorageDemand


Mod Description

Function

  • In CS2, the likelihood of spawning a storage company in the industrial zone is determined by the city's overall storage demand, which is linear to the throughput of all resources and visible products. As the city's industry thrives, throughput of individual resources (or visible products) can easily reach thousands if not tens of thousands. In this case, newly-built industrial zones would always be completely occupied by storage companies, which is ridiculous in terms of both city simulation and gameplaying.
  • This mod modifies how storage demand affects the spawning probabilities of storage companies by performing a log transformation on the storage demand before it affects game simulation.
  • The transformation is mathmatically formalized as:
    • StorageDemand = log2(StorageDemandFactor * StorageDemand + 1) / StorageDemandFactor.
    • StorageDemandFactor is configurable. The larger this factor is, the less likely storage companies appear in industrial zones.

Effect

  • Test environment: a city with an average resource/visible product throughput of thousands, with 10 newly-planned 6*6 industrial regions very close to outside connections.
  • Without this mod, 8 out of 10 regions are occupied by storage companies.
  • With the mod enabled and StorageDemandFactor set to 1, 4 out of 10 are storage companies.
  • With the mod enabled and StorageDemandFactor set to 10, 1 out of 10 are storage companies.
  • With the mod enabled and StorageDemandFactor set to 100, 0 out of 10 are storage companies.

Installation

  • Mod file for BepInEx 5: ScaledStorageDemand_b5.dll.
  • Mod file for BepInEx 6: ScaledStorageDemand_b6.dll.
  • Choose one of them and put it into ...\Cities Skylines II\BepInEx\plugins\.

Configuring the StorageDemandFactor

  • Launch the game with this mod loaded, and close the game (to generate the configuration file).
  • Open the configuration file (..\Cities Skylines II\BepInEx\config\ScaledStorageDemand.cfg) and modify StorageDemandFactor to the desired value.
  • Now launch the game again with this mod loaded and enjoy it!

Disclaimer

  • This mod has not been fully tested yet. Please use at your own risk.
  • This mod does not affect game balance. It is just a quality-of-life improvement.

 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.