Barotrauma Client
|
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. More...
Classes | |
class | EventDebugStats |
struct | SubEventPrefab |
Public Member Functions | |
EventSet (ContentXElement element, RandomEventsFile file, EventSet parentSet=null) | |
void | CheckLocationTypeErrors () |
float | GetCommonness (Level level) |
int | GetEventCount (Level level) |
override string | ToString () |
override void | Dispose () |
![]() | |
Prefab (ContentFile file, Identifier identifier) | |
Prefab (ContentFile file, ContentXElement element) | |
void | Dispose () |
Static Public Member Functions | |
static List< EventPrefab > | GetAllEventPrefabs () |
static void | AddSetEventPrefabsToList (List< EventPrefab > list, EventSet set) |
static EventPrefab | GetEventPrefab (Identifier identifier) |
static List< string > | GetDebugStatistics (int simulatedRoundCount=100, Func< MonsterEvent, bool > filter=null, bool fullLog=false) |
![]() | |
static void | DisallowCallFromConstructor () |
Public Attributes | |
readonly bool | IsCampaignSet |
If enabled, this set can only be chosen in the campaign mode. | |
readonly float | MinLevelDifficulty |
The difficulty of the current level must be equal to or higher than this for this set to be chosen. | |
readonly float | MaxLevelDifficulty |
The difficulty of the current level must be equal to or less than this for this set to be chosen. | |
readonly Identifier | BiomeIdentifier |
If set, the event set can only be chosen in this biome. | |
readonly LevelData.LevelType | LevelType |
If set, the event set can only be chosen in this type of level (outpost level or a connection between outpost levels). | |
readonly Identifier | RequiredLayer |
If set, this layer must be present somewhere in the level. | |
readonly ImmutableArray< Identifier > | LocationTypeIdentifiers |
If set, the event set can only be chosen in locations of this type. | |
readonly Identifier | Faction |
If set, the event set can only be chosen in locations that belong to this faction. | |
readonly bool | ChooseRandom |
If set, one event, or a sub event set, is chosen randomly from this set. | |
readonly int | SubSetCount = 1 |
readonly bool | Exhaustible |
'Exhaustible' sets won't appear in the same level until after one world step (~10 min, see Map.ProgressWorld) has passed. | |
readonly float | MinDistanceTraveled |
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). | |
readonly float | MinMissionTime |
The event set won't become active until the round has lasted at least this many seconds. | |
readonly float | MinIntensity |
readonly float | MaxIntensity |
readonly bool | AllowAtStart |
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). | |
readonly bool | IgnoreCoolDown |
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. | |
readonly bool | TriggerEventCooldown |
Should this event set trigger the event cooldown (during which no new events are created) when it becomes active? | |
readonly bool | IgnoreIntensity |
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. | |
readonly bool | PerRuin |
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). | |
readonly bool | PerCave |
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). | |
readonly bool | PerWreck |
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). | |
readonly bool | DisableInHuntingGrounds |
If enabled, this event will not be applied if the level contains hunting grounds. | |
readonly bool | OncePerLevel |
If enabled, events from this set can only occur once in the level. | |
readonly bool | DelayWhenCrewAway |
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) | |
readonly bool | Additive |
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. | |
readonly float | DefaultCommonness |
The commonness of the event set (i.e. how likely it is for this specific set to be chosen). | |
readonly ImmutableDictionary< Identifier, float > | OverrideCommonness |
readonly float | ResetTime |
If set, the event set can trigger again after this amount of seconds has passed since it last triggered. | |
readonly int | ForceAtDiscoveredNr |
Used to force an event set based on how many other locations have been discovered before this (used for campaign tutorial event sets). | |
readonly int | ForceAtVisitedNr |
Used to force an event set based on how many other outposts have been visited before this (used for campaign tutorial event sets). | |
readonly bool | CampaignTutorialOnly |
If enabled, this set can only occur when the campaign tutorial is enabled (generally used for the tutorial events). | |
readonly ImmutableArray< SubEventPrefab > | EventPrefabs |
readonly ImmutableArray< EventSet > | ChildSets |
![]() | |
readonly Identifier | Identifier |
readonly ContentFile | ContentFile |
Static Public Attributes | |
static readonly PrefabCollection< EventSet > | Prefabs = new PrefabCollection<EventSet>() |
![]() | |
static readonly ImmutableHashSet< Type > | Types |
Additional Inherited Members | |
![]() | |
virtual Identifier | DetermineIdentifier (XElement element) |
![]() | |
ContentPackage? | ContentPackage [get] |
ContentPath | FilePath [get] |
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.
Barotrauma.EventSet.EventSet | ( | ContentXElement | element, |
RandomEventsFile | file, | ||
EventSet | parentSet = null ) |
|
static |
void Barotrauma.EventSet.CheckLocationTypeErrors | ( | ) |
override void Barotrauma.EventSet.Dispose | ( | ) |
|
static |
float Barotrauma.EventSet.GetCommonness | ( | Level | level | ) |
|
static |
int Barotrauma.EventSet.GetEventCount | ( | Level | level | ) |
|
static |
override string Barotrauma.EventSet.ToString | ( | ) |
readonly bool Barotrauma.EventSet.Additive |
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.
readonly bool Barotrauma.EventSet.AllowAtStart |
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).
readonly Identifier Barotrauma.EventSet.BiomeIdentifier |
If set, the event set can only be chosen in this biome.
readonly bool Barotrauma.EventSet.CampaignTutorialOnly |
If enabled, this set can only occur when the campaign tutorial is enabled (generally used for the tutorial events).
readonly ImmutableArray<EventSet> Barotrauma.EventSet.ChildSets |
readonly bool Barotrauma.EventSet.ChooseRandom |
If set, one event, or a sub event set, is chosen randomly from this set.
readonly float Barotrauma.EventSet.DefaultCommonness |
The commonness of the event set (i.e. how likely it is for this specific set to be chosen).
readonly bool Barotrauma.EventSet.DelayWhenCrewAway |
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)
readonly bool Barotrauma.EventSet.DisableInHuntingGrounds |
If enabled, this event will not be applied if the level contains hunting grounds.
readonly ImmutableArray<SubEventPrefab> Barotrauma.EventSet.EventPrefabs |
readonly bool Barotrauma.EventSet.Exhaustible |
'Exhaustible' sets won't appear in the same level until after one world step (~10 min, see Map.ProgressWorld) has passed.
readonly Identifier Barotrauma.EventSet.Faction |
If set, the event set can only be chosen in locations that belong to this faction.
readonly int Barotrauma.EventSet.ForceAtDiscoveredNr |
Used to force an event set based on how many other locations have been discovered before this (used for campaign tutorial event sets).
readonly int Barotrauma.EventSet.ForceAtVisitedNr |
Used to force an event set based on how many other outposts have been visited before this (used for campaign tutorial event sets).
readonly bool Barotrauma.EventSet.IgnoreCoolDown |
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.
readonly bool Barotrauma.EventSet.IgnoreIntensity |
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.
readonly bool Barotrauma.EventSet.IsCampaignSet |
If enabled, this set can only be chosen in the campaign mode.
readonly LevelData.LevelType Barotrauma.EventSet.LevelType |
If set, the event set can only be chosen in this type of level (outpost level or a connection between outpost levels).
readonly ImmutableArray<Identifier> Barotrauma.EventSet.LocationTypeIdentifiers |
If set, the event set can only be chosen in locations of this type.
readonly float Barotrauma.EventSet.MaxIntensity |
readonly float Barotrauma.EventSet.MaxLevelDifficulty |
The difficulty of the current level must be equal to or less than this for this set to be chosen.
readonly float Barotrauma.EventSet.MinDistanceTraveled |
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).
readonly float Barotrauma.EventSet.MinIntensity |
readonly float Barotrauma.EventSet.MinLevelDifficulty |
The difficulty of the current level must be equal to or higher than this for this set to be chosen.
readonly float Barotrauma.EventSet.MinMissionTime |
The event set won't become active until the round has lasted at least this many seconds.
readonly bool Barotrauma.EventSet.OncePerLevel |
If enabled, events from this set can only occur once in the level.
readonly ImmutableDictionary<Identifier, float> Barotrauma.EventSet.OverrideCommonness |
readonly bool Barotrauma.EventSet.PerCave |
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).
readonly bool Barotrauma.EventSet.PerRuin |
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).
readonly bool Barotrauma.EventSet.PerWreck |
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).
|
static |
readonly Identifier Barotrauma.EventSet.RequiredLayer |
If set, this layer must be present somewhere in the level.
readonly float Barotrauma.EventSet.ResetTime |
If set, the event set can trigger again after this amount of seconds has passed since it last triggered.
readonly int Barotrauma.EventSet.SubSetCount = 1 |
readonly bool Barotrauma.EventSet.TriggerEventCooldown |
Should this event set trigger the event cooldown (during which no new events are created) when it becomes active?