Search Your Map!

If you liked this item, please rate it up on Steam Workshop page.

Author: clearlove

Last revision: 2 Oct, 2024 at 15:18 UTC (1)

File size: 505.58 KB

On Steam Workshop

Description:

Set your ideal map requirements, and this mod will automatically attempt to generate maps using different seeds until it finds a map seed that meets your criteria. You can set various random attributes of the world or search for a map where you can find a convenient enough place to build your base.
It supports any world settings and (theoretically) any mods. Record the discovered random seed and share it with others!

Feature Introduction
1. Forest Properties

You can set types of basic resources (mutations of grass, twigs, berries), types of terrains. You can also specify what Easter eggs you want (eg. tallbird Easter eggs). Additionally, you can define the number of entities you want.
You can search for a special world where the moonisland is directly connected to the mainland (at most, with only two tiles apart).

2. Convenient base

Even more useful is finding a map that’s "ideal for setting up a base" meaning there’s a spot on the map that’s convenient to travel from. You can assign different weights to the places you’re interested in (e.g., Pig King) and terrain (e.g., swamps), and the mod will score each map based on the importance you provide. Afterward, you can set the number of repetitions, and the mod will automatically generate maps multiple times, keeping the one with the highest score.
Furthermore, you can strictly constrain the distance between your base and the points or areas of interest to be within a specific value, allowing for more precise control over the generated map.

3. Cave World Properties

You can configure the random terrain in the caves.
You can also set what "rooms" make up ancient area (a room is a small square unit on the map). This helps you find ancients with more statues.
You can look for maps with fewer monkeys.
You can also require that the ancients be near a staircase, allowing you to reach the ancient area as soon as you enter the caves.

Configuration Guide
1. Master World Properties

For setting the " Weights of points of interest", you can assign weights based on how important different locations are to you. For example, if you visit the Pig King twice as often as you visit the Dragonfly, you can set the weight of the former to be twice that of the latter.
For the "base location (hard constraint)" setting, if you want to build your home somewhere specific, such as near the lunar portal, you can set the distance to the portal to be 0. In other cases, use this cautiously; it’s hard to gauge the appropriate values. If the values are too large, the map quality will decrease; if too small, it may greatly increase search time, so it’s not recommended to adjust these settings excessively.

2. Cave World Properties

If you want to limit the number of monkeys, it’s best to set "Never have" for those random terrains containing monkeys (Residential Area 2, Residential Area 3, Jungle).
If you want to customize the composition of a certain random terrain’s rooms, set that random terrain as "Must have."
For the ancients to be near a staircase, choose 20 tiles or more; otherwise, the time cost will be unbearable.

Run Guide
1. Log Viewing

The log contains the results of the seeds found, suggestions for base locations, and an estimate of the expected time. The log file is located in the `data` folder under the game directory, with the file name `worldgen_log_****.txt` (for the forest it is `worldgen_log_SURVIVAL_TOGETHER`, and for the caves, it is `worldgen_log_CAVE`).
This log also shows the success rate of each setting. For "Base Location (Hard Constraint)," if the success rate of a setting is low, it does not necessarily mean that the setting is too strict. It’s likely that earlier settings are too strict, leaving very few valid locations.
You can also find the current best seed, which may be usable, so you don’t have to abandon everything if you stop midway. Or, if your point of interest weights aren’t ideal and lead to poor map quality, you can see other results here.(Scores represent distances, the lower the better)
The log is updated every 15 generation.

2. Using with Other Mods

This mod should have excellent compatibility. I believe it should be compatible with all map-generating mods (and any world settings). However, users should still carefully check compatibility before using it.
By compatibility, I mean that seeds generated using this mod should result in the same world when using the same seed after disabling the mod (there are many tutorials online on how to use seeds). Specifically, you can enable other mods and this mod (with default settings), generate the world, and record the seed. Then, enable other mods, disable this mod, and use the API Gem Core to set the recorded seed and generate the world again to check if both worlds are the same. If they are not, please avoid using this mod and leave feedback.
Successfully tested with Legion and UM (2024.9.12).

3. Effect of Options on Time

The “Master Optional Biomes” and "Type of resources" option does not increase the time cost of generation.
"Setpieces" have about a 50% chance of not being inserted into the map, leading to a regeneration, which may double the time.
"Moon Island Connected" occurs about once in every 40 maps.
"Ancient Near the Stairs" require generating 5 maps to find one (when set to 20 tiles).

4. Custom Options

I provide a way to customize options. Configure them according to the given format (specific format details can be found in the mod configuration interface). You can customize entity numbers and proximity to certain entities. In "Convenient base-Repeat times" if the preset weights aren’t precise enough, you can customize any positive number as the weight. You can customize "repeat times".
If you don’t want to edit the mod configuration file, you can subscribe to my other client mod, Text Mod Config. Using that mod, you can click the option you want to customize, and input your personalized configuration in the pop-up dialog.

Advanced Knowledge
1. Map Scoring Principle

For each map, the mod automatically finds the point with the minimum weighted distance to the entities and areas, which is the recommended base location. The weighted distance of this base location is used as a measure of the map’s convenience. The map with the smallest weighted distance is kept. Only maps that satisfy the conditions in "Master World Properties" and "Hard Constraints" will count towards the "number of searches."
The distance calculation typically accounts for wormholes as shortcuts. You can also disable this in the settings.

2. Base Location (hard Constraint) Parameters

Currently, distance is set in tile units. As a reference, a screen can display approximately 8 tiles. The current distance path is the Euclidean distance and considers the possibility of using wormholes. However, for efficiency reasons, the distance for Lobster Mounds and Salt Mines is calculated using Manhattan distance. Don’t be too greedy, or it may take too long to search.

Notes:

1. Since this mod generates maps multiple times, rare bugs from the game or other mods may be constantly triggered. You can check the game log (not the mod log) to see if a seed consistently triggers the bug. Generally, the mod is quite stable.
2. Known issue: Klei’s cave generation has a bug that may cause world generation failure at a low probability. If the cave conditions are too strict, this bug is likely to be triggered.
3. It is normal for the game prompt to not respond; Check the log to see if it is still searching.
4.When generating with this mod, the cancel button will not work. You need force close the game

Download
Revisions:

Old revisions of this mod are available below. Click the link to download.