Mods / No Ocean Translocators

Tags: #Tweak #Worldgen
Author: Burneddi
Side: Server
Created: Jan 22nd at 12:43 PM
Last modified: Jan 22nd at 12:55 PM
Downloads: 2234
Follow Unfollow 42

Latest release (for Vintage Story 1.20.1, outdated):
NoOceanTranslocators-1.0.1.zip  1-click install


In worlds that have large oceans, the other side of repaired translocators frequently ends up being in the middle of a huge ocean. This mod changes translocators to make that much less likely to happen.

How it works

When a translocator is repaired (in vanilla as well as this mod), it picks a random position within its search range (by default between 400 and 8000 blocks; configurable with the translocator distance config mod) and generates a chunk there that has 10x higher odds of containing a translocator. If the chunk ends up containing a translocator, a pair is created; if not, the translocator tries again next tick.

This mod modifies the behaviour so that only the terrain of the chunk is generated. Then the mod checks if the chunk's ocean map exceeds the configured threshold, and if yes, a new chunk is picked until a suitable one is found. Only after a suitable, non-oceanic chunk is found are the structures in the chunk generated, which (hopefully) means that no redundant translocators get created under the ocean because of the 10x higher odds thing mentioned above.

Configuration

The following options are configurable in NoOceanTranslocators.json:

  • oceanThreshold: (0-255; default 128) Minimum value in ocean map to consider the chunk ocean. At 0, every chunk will be considered ocean. The default may still pick very shallow ocean chunks, but this should be rare.
  • failMaxRangeIncrease: (default 200) Every time we generate a chunk that's in the ocean, increase the maximum search range of the translocator by this many blocks.
  • failMinRangeIncrease: (default 0) Every time we generate a chunk that's in the ocean, increase the minimum search range of the translocator by this many blocks.
  • oceanAcceptChance: (0.0-1.0; default 0.0) Every time we generate a chunk that's in the ocean, accept it anyway at these odds.

Enable the mod and load into a world once to initialize the config file with default values if it doesn't exist.

Configuration tips for different worlds

The default settings should be suitable for a world with reasonable ocean settings, e.g. 50% of the world being ocean. On such worlds, even if there are no suitable chunks in range, the translocator's search range will keep increasing until it picks a chunk that is not oceanic (e.g. on another "continent").

If you run this on a very oceanic world, the odds of hitting an acceptable chunk may be very low. For such worlds, consider setting failRangeIncrease to 0 to prevent the search range of the translocator ballooning very high, and setting oceanAcceptChance to a value such as 0.01 (1% of the time an oceanic chunk is accepted) to ensure that the translocator doesn't get stuck looking for a suitable chunk forever. You may also want to consider adjusting oceanThreshold up to e.g. 200 on such worlds.

Compatibility notes

This mod does a fairly invasive patch by replacing the entire implementation of one of the translocator's methods. This means that it's prone to breakage with future game versions. If you're from the future and this mod hasn't been updated for your game version, you should make extra sure that it still works either by testing or reading the relevant source code.

The following translocator-related mods are confirmed compatible at the time of writing:

  • Translocator Engineering - Redux
  • translocator distance config

Mod Version Mod IdentifierFor Game version Downloads Released Changelog Download 1-click mod install*
1.0.1 nooceantranslocators 2187 Jan 22nd at 12:55 PM NoOceanTranslocators-1.0.1.zip 1-click install

Adjust default oceanThreshold config value.

1.0.0 nooceantranslocators 47 Jan 22nd at 12:45 PM Empty NoOceanTranslocators-1.0.0.zip 1-click install

3 Comments (oldest first | newest first)

💬 Shinji170981, Jun 11th at 11:49 AM

Ah, okay. Thanks for clarifying.
That does however put some load on the server, right? Since it's generating new chunks like a player would, when exploring, right?

💬 Burneddi , Jun 11th at 10:11 AM

Shinji170981 sometimes it can take a long time for translocators to find a matching pair with this mod. With the default configuration they will eventually find a match because their range will keep increasing with every failed attempt, but it may take a fairly long time, and until they do, they will report as "Warping spacetime"—while they say this, the game is generating chunks behind the scenes until it finds a non-ocean chunk that can hold a translocator.

💬 Shinji170981, Mar 23rd at 5:46 PM

Quick question. We have had the issue already a few times that translocators weren't connecting and incidentely they are underneath the ocean.
They are stuck on "Warping spacetime".

Is it possible that the mod prevents those translocators from connecting, because they are underwater?

 (edit comment delete)
Основной веб-сайт | Почтовый сервер | FTP сервер | Административная панель | API интерфейс | Content Delivery Network | Статические файлы | Ресурсы сайта | Изображения | Файловое хранилище | Блог | Интернет-магазин | Техническая поддержка | Справочная система | Документация | Форум | Новости | Загрузки | Демонстрация | Тестовая среда | Приложение | Медиа контент | Разработка | Промежуточная среда | Бета версия | Безопасная зона | Вход в систему | Панель управления | Портал | Система управления контентом