RandomEvents
EventSet
Event sets are sets of random events that occur within a level (most commonly, monster spawns and scripted events). Event sets can also be nested: a “parent set” can choose from several “subsets”, either randomly or by some kind of criteria.
Attributes
Attribute | Type | Default value | Description |
---|---|---|---|
Biome | Identifier | Empty | If set, the event set can only be chosen in this biome. |
MinLevelDifficulty | float | 0 | The difficulty of the current level must be equal to or higher than this for this set to be chosen. |
MaxLevelDifficulty | float | 100 | The difficulty of the current level must be equal to or less than this for this set to be chosen. |
Additive | bool | false | Additive sets are important to be aware of when creating custom event sets! If an additive set gets chosen for a level, the game will also select a non-additive one. This means you can for example configure an additive set that spawns custom monsters (and make it very common if you want the monsters to spawn frequently), which will spawn those custom monsters in addition to the vanilla monsters spawned by vanilla sets, without you having to add your custom monsters to every single vanilla set. |
Faction | Identifier | ”” | If set, the event set can only be chosen in locations that belong to this faction. |
MinIntensity | float | 0 | the events in this set are delayed if the current EventManager intensity is not between these values |
MaxIntensity | float | 100 | the events in this set are delayed if the current EventManager intensity is not between these values |
ChooseRandom | bool | false | If set, one event, or a sub event set, is chosen randomly from this set. |
eventCount | int | 1 | Only valid if ChooseRandom is enabled. How many random events to choose from the set? |
Exhaustible | bool | false | ‘Exhaustible’ sets won’t appear in the same level until after one world step (~10 min, see Map.ProgressWorld) has passed. |
MinDistanceTraveled | float | 0 | The event set won’t become active until the submarine has travelled at least this far. A value between 0-1, where 0 is the beginning of the level and 1 the end of the level (e.g. 0.5 would mean the sub needs to be half-way through the level). |
MinMissionTime | float | 0 | The event set won’t become active until the round has lasted at least this many seconds. |
AllowAtStart | bool | false | If the event is not allowed at start, it won’t become active until the submarine has moved at least 50 meters away from the beginning of the level. Only valid in LocationConnections (levels between locations). |
PerRuin | bool | false | The set is applied once per each ruin in the level. Can be used to ensure there’s a consistent amount of monster spawns in the ruins in the level regardless of how many there are (and that no ruin monsters spawn if there are no ruins). |
PerCave | bool | false | The set is applied once per each cave in the level. Can be used to ensure there’s a consistent amount of monster spawns in the cave in the level regardless of how many there are (and that no cave monsters spawn if there are no caves). |
PerWreck | bool | false | The set is applied once per each wreck in the level. Can be used to ensure there’s a consistent amount of monster spawns in the wreck in the level regardless of how many there are (and that no wreck monsters spawn if there are no wreck). |
DisableInHuntingGrounds | bool | false | If enabled, this event will not be applied if the level contains hunting grounds. |
IgnoreCoolDown | bool | - | Normally an event (such as a monster spawn) triggers a cooldown during which no new events are created. This can be used to ignore the cooldown. |
IgnoreIntensity | bool | - | Normally events can only trigger if the intensity of the situation is low enough (e.g. you won’t get new monster spawns if the submarine is already facing a disaster). This can be used to ignore the intensity. |
DelayWhenCrewAway | bool | - | Should the event set be delayed if at least half of the crew is away from the submarine? The maximum amount of time the events can get delayed is defined in event manager settings (EventManagerSettings.FreezeDurationWhenCrewAway) |
OncePerLevel | bool | - | If enabled, events from this set can only occur once in the level. |
TriggerEventCooldown | bool | true | Should this event set trigger the event cooldown (during which no new events are created) when it becomes active? |
Campaign | bool | - | If enabled, this set can only be chosen in the campaign mode. |
ResetTime | float | 0 | If set, the event set can trigger again after this amount of seconds has passed since it last triggered. |
CampaignTutorialOnly | bool | false | If enabled, this set can only occur when the campaign tutorial is enabled (generally used for the tutorial events). |
ForceAtDiscoveredNr | int | -1 | Used to force an event set based on how many other locations have been discovered before this (used for campaign tutorial event sets). |
ForceAtVisitedNr | int | -1 | Used to force an event set based on how many other outposts have been visited before this (used for campaign tutorial event sets). |
Commonness | float | 1 | The commonness of the event set (i.e. how likely it is for this specific set to be chosen). |
Elements
Element | Type | Description |
---|---|---|
commonness | float | The commonness of the event set (i.e. how likely it is for this specific set to be chosen). |
eventset | EventSet |
EventPrefab
Attributes
Attribute | Type | Default value | Description |
---|---|---|---|
Commonness | float | 1 | The commonness of the event (i.e. how likely it is for this specific event to be chosen from the event set it’s configured in). Only valid if the event set is configured to choose a random event (as opposed to just executing all the events in the set). |
Probability,spawnprobability | float | 1 | The probability for the event to do something if it gets selected. |
TriggerEventCooldown | bool | - | When this event occurs, should it trigger the event cooldown during which no new events are triggered? |
UnlockPathEvent | bool | false | If set, this event is used as an event that can unlock a path to the next biome. |
UnlockPathTooltip | string | “lockedpathtooltip” | Only valid if UnlockPathEvent is set to true. The tooltip displayed on the pathway this event is blocking. |
UnlockPathReputation | int | 0 | Only valid if UnlockPathEvent is set to true. The reputation requirement displayed on the pathway this event is blocking. |
MonsterEvent
Attributes
Attribute | Type | Default value | Description |
---|---|---|---|
MinAmount | int | Same as defaultAmount | Minimum amount of monsters to spawn. You can also use “Amount” if you want to spawn a fixed number of monsters. |
MaxAmount | int | 1 | Maximum amount of monsters to spawn. You can also use “Amount” if you want to spawn a fixed number of monsters. |
MaxAmountPerLevel | int | MaxValue | Maximum number of the specific type of monster in the entire level. Can be used to prevent the event from spawning more monsters if there’s already enough of that type of monster, e.g. spawned by another event or by a mission. |
SpawnType | Level.PositionType | MainPath | Where should the monster spawn? |
spawnPointTag | string | Empty | If set, the monsters will spawn at a spawnpoint that has this tag. Only relevant for events that spawn monsters in a submarine, beacon station, wreck, outpost or ruin. |
SpawnDistance | float | 0 | The monsters are spawned at least this distance away from the players and submarines. |
offset | float | 0 | The minimum amount of variance applied to the spawn position. |
scatter | float | 500 | Amount of random variance in the spawn position, in pixels. Can be used to prevent all the monsters from spawning at the exact same position. |
delayBetweenSpawns | float | 0.1 | Delay between spawning the monsters. Only relevant if the event spawns more than one monster. |
resetTime | float | 0 | Number seconds before the event resets after all the monsters are dead. Can be used to make the event spawn monsters multiple times. |