Space Engineers

Space Engineers

评价数不足
Understanding Vanilla Planetary Encounters
由 S Boogy 制作
This guide is intended to help you understand the vanilla planetary spawning system in Space Engineers, allowing for better integration with MES and MES mods, or simply populating more prefabs for you to explore and interact with.
   
奖励
收藏
已收藏
取消收藏
Getting started
All you really need is a text editor. VS code or notepad++ will work just fine.

As a side note, be sure to make all the file tweaks before loading your save or in the main menu, as making tweaks, saving, then quick loading may discard any changes you've made.

Pandemic Playground made a pretty good video covering a lot things in this guide. I'de recommend watching his video for more information I may not cover. I will be expanding on what he covers and how it pertains to MES. You can also check out the Space Engineers Wiki[spaceengineers.wiki.gg] for more information


Meat and Potatoes
You'll need to navigate to your save file. For windows users this is typically defaulted under "C:\Users\"your name"\AppData\Roaming\SpaceEngineers\Saves\" followed by a string of numbers. Alternatively you can open up steam, right click space engineers in your library, and select browse local files. Find the save file you want to edit and open it up.

Once there you'll be looking for the Sandbox_config file. Open that up using your text editor of choice, press ctrl + F (assuming your using windows) to use the "Find" function, type in "Encounter"



There will be several different instances of "Encounter"; the one highlighted in particular dictates how much PCU is allocated to the Global Encounters. For this guide we're more interested in the PiratePCU. This limit will influence drones and static grids, allowing more to spawn within a certain area. In most cases 25000 PCU is enough, but you can increase or decrease this number to.. whatever your machine can handle. 50000 is probably plenty and I doubt the game would use more than that in most scenarios unless you're really just going wild.

Continue cycling down until you find the following:



The save file in this guide is what I use for testing my MVE mod and has already been edited, so your values wont look like this but you'll be tailoring it to your preferences anyway. The lines that i'll be focusing on the most will be these 3:

Existing Structures

<PlanetaryEncounterExistingStructuresRange></PlanetaryEncounterExistingStructuresRange> // Min distance in meters from existing structures new ones can spawn around.

This is basically the amount of space you want grids to have from one another and pertains to NON planetary encounter grids. I set it to 3000 meters as that typically prevents any defense blocks on grids from triggering their setup actions as their range is about 2500 meters. Any drones that spawn from these structures will typically notice nearby grids and start attacking them. Use your discretion, 5000 meters might be better or you can leave this alone.

Lock-down Range

<PlanetaryEncounterAreaLockdownRange></PlanetaryEncounterAreaLockdownRange> // Spawn area limit in meters, nothing spawns within this range.

This is basically an occupation zone defined by a spawned structure, a grid will spawn and create a lockdown area around it based off of this number. Additional grids will only spawn outside of this range. It is not centered around the player but rather considers if other grids are occupying this zone. This is to prevent PE's (Planetary Encounters) from spawning too close to other grids. Higher numbers can prevent additional spawns. I'de recommend setting this anywhere between 3000 and 10000

Spawn Range

<PlanetaryEncounterDesiredSpawnRange></PlanetaryEncounterDesiredSpawnRange> // Distance Spawn from player in meters

Kind of self explanatory, this is how far you want grids to spawn from you and depends entirely on how far you want to travel to reach those encounters. Default is 6000 and you will not get any spawns if you set this to a value that is within the lockdown range of other PE's. So if the Lockdown range is set to 10k, and spawn range set to 6k, you'll have to travel 10k km from any other PE before another encounter will spawn within 6km of you

The Rest

All of this is influenced by EncounterDensity and your min and max timers. Encounter density is basically how much grids will spawn in an area and is more of a volume that doesn't exceed 1. you could probably think of this like a percentage and that might be half right? I believe this value acts as a "how full do you want your spawn area to be" kind of thing. .25 = 25% full, .5 = 50%, 1 = 100%, but I may be wrong and am open to correction but to my knowledge setting this beyond 1 doesn't do anything.

The timers Min, Max, and First are exactly that. What's the soonest you want a grid to spawn, whats the latest you want it to spawn and when do you want your first one to spawn in upon loading the save. These are in minutes so if you set them all to say "1" you will get a new encounter every minute until the lockdown prevents new spawns. Otherwise by default it will spawn 1 grid at 5 minutes in, then anywhere between 5 and 15 minutes. Set these ranges to suite your play style.

Presence range is the amount of distance traveled from a PE before it will despawn. Its gps location is typically stored and will be called upon later when returning nearby the coordinates to free up resources and PCU. Despawn timeout is the ammount of time taken to despawn the PE after its been interacted with, its how much time you have to claim the grid and its PCU for yourself after interacting with a control panel on it.

An Example:

<EncounterDensity>0.25</EncounterDensity>
<EncounterGeneratorVersion>6</EncounterGeneratorVersion>
<EnablePlanetaryEncounters>true</EnablePlanetaryEncounters>
<PlanetaryEncounterTimerMin>0.1</PlanetaryEncounterTimerMin> 6 second min time
<PlanetaryEncounterTimerMax>1</PlanetaryEncounterTimerMax> 1 min max time
<PlanetaryEncounterTimerFirst>0.5</PlanetaryEncounterTimerFirst> 30 sec for first encounter
<PlanetaryEncounterExistingStructuresRange>7000</PlanetaryEncounterExistingStructuresRange> grids can spawn 7km away from existing PE's else will reroll in different area
<PlanetaryEncounterAreaLockdownRange>7000</PlanetaryEncounterAreaLockdownRange> 7km occupation zone around spawned PE
<PlanetaryEncounterDesiredSpawnRange>6000</PlanetaryEncounterDesiredSpawnRange>
spawns will attempt to be within 6km of player when outside lockdown range of nearby PE's
<PlanetaryEncounterPresenceRange>20000</PlanetaryEncounterPresenceRange> PE will despawn when moving 20km away from it.
<PlanetaryEncounterDespawnTimeout>120</PlanetaryEncounterDespawnTimeout> PE will despawn in 2 hours after being accessed by a terminal.

Drones

The last thing I'll talk about in this section is Drones(use ctrl + f and type drone). <MaxDrones></MaxDrones> is the maximum amount of drones a grid will spawn using the antenna system. This is an older framework that revolves around keywords in the pirateantennas.sbc file. The default value is a max of 5 drones, which can be called in by these antennas and is dependent on the pirate PCU covered earlier. These encounters also spawn under a timer and when a player reaches the broadcast range of the antenna. Changing this value depends entirely on how much combat you want, I set mine to 15, you do what you want.

Once your done making your edits, save the Sandbox_config file and load your save. The changes will take effect on reload but keep an eye on the config file as I've had values reset to default at times.
MES and Vanilla Spawns
Most SE players and veterans are familiar with MES and how it works. For those of you who don't know, MES operates under km's traveled, threat scores, and I think timers as well, whereas the vanilla spawning system operates under player proximity and timers. They do not directly interfere with one another but MES can prevent vanilla grids from spawning based off of the parameters we discussed in the above sections.

It's a tad old but I don't think the framework has changed that much, correct me if I'm wrong, but you can watch a guide on how MES works by Splitsie here:


The main culprit that prevents new grids from spawning while you have MES enabled would be PlanetaryEncounterExistingStructuresRange. If this value is set to say 10000, and MES is set to spawn encounters per every 6km traveled then vanilla encounters may not spawn at all because MES encounters are taking up all the land. Setting this to a lower number will allow you to get more out of your vanilla spawns and cause MES and the Vanilla spawning systems to work "nicer" together. I want to be clear, MES does NOT directly interfere with the vanilla spawns, they are two different systems. It can indirectly block vanilla encounters from spawning though.
TLDR
Conclusion:

MES and Vanilla spawns are compatible but MES may block vanilla spawns from happening by taking up all the land. Change these values in your saves sandbox_config file, and you change the world.

<PiratePCU></PiratePCU>

<MaxDrones></MaxDrones>
<EnableDrones></EnableDrones>

<EncounterDensity></EncounterDensity>
<EncounterGeneratorVersion></EncounterGeneratorVersion>
<EnablePlanetaryEncounters></EnablePlanetaryEncounters>
<PlanetaryEncounterTimerMin></PlanetaryEncounterTimerMin>
<PlanetaryEncounterTimerMax></PlanetaryEncounterTimerMax>
<PlanetaryEncounterTimerFirst></PlanetaryEncounterTimerFirst>

<PlanetaryEncounterExistingStructuresRange></PlanetaryEncounterExistingStructuresRange>
<PlanetaryEncounterAreaLockdownRange></PlanetaryEncounterAreaLockdownRange>
<PlanetaryEncounterDesiredSpawnRange></PlanetaryEncounterDesiredSpawnRange>
<PlanetaryEncounterPresenceRange></PlanetaryEncounterPresenceRange>
<PlanetaryEncounterDespawnTimeout></PlanetaryEncounterDespawnTimeout>