Semi-automatically generated modding documentation for Barotrauma

LevelObjectPrefabs

Relevant files: [Shared:LevelObjectPrefabsFile.cs] [Shared:LevelObjectPrefab.cs]

This page was generated automatically.

  • Required by core package: Yes

Attributes

Attribute Type Default value Description
MinSize float 1.0  
MaxSize float 1.0  
Alignment Alignment (Alignment.Top, Alignment.Bottom, Alignment.Left, Alignment.Right) Which sides of a wall the object can spawn on.
SpawnPos SpawnPosType SpawnPosType.Wall  
MaxCount int 10000 Maximum number of this specific object per level.
DepthRange Vector2 “0.0,1.0” The sprite depth of the object (min, max). Values of 0 or less make the object render in front of walls, values larger than 0 make it render behind walls with a parallax effect.
ClusteringAmount float 0.0 The tendency for the prefab to form clusters. Used as an exponent for perlin noise values that are used to determine the probability for an object to spawn at a specific position.
ClusteringGroup float 0.0 A value between 0-1 that determines the z-coordinate to sample perlin noise from when determining the probability for an object to spawn at a specific position. Using the same (or close) value for different objects means the objects tend to form clusters in the same areas.
RandomOffset Vector2 “0,0” Random offset from the surface the object spawns on.
AlignWithSurface bool false Should the object be rotated to align it with the wall surface it spawns on.
AllowAtStart bool true Can the object be placed near the start of the level.
AllowAtEnd bool true Can the object be placed near the end of the level.
MinSurfaceWidth float 0.0 Minimum length of a graph edge the object can spawn on.
RandomRotation Vector2 “0.0,0.0” How much the rotation of the object can vary (min and max values in degrees).
SwingAmount float 0.0 How much the object swings (in degrees).
SwingFrequency float 0.0 How fast the object swings.
ScaleOscillation Vector2 “0.0,0.0” How much the scale of the object oscillates on each axis. A value of 0.5,0.5 would make the object’s scale oscillate from 100% to 150%.
ScaleOscillationFrequency float 0.0 How fast the object’s scale oscillates.
Commonness float 1.0 How likely it is for the object to spawn in a level. This is relative to the commonness of the other objects - for example, having an object with a commonness of 1 and another with a commonness of 10 would mean the latter appears in levels 10 times as frequently as the former. The commonness value can be overridden on specific level types.
SonarDisruption float 0.0 How much the object disrupts submarine’s sonar.
TakeLevelWallDamage bool false Can the object take damage from weapons/attacks that damage level walls.
HideWhenBroken bool false Should the object disappear if the object is destroyed? Only relevant if TakeLevelWallDamage is true.
Health float 100.0 Amount of health the object has. Only relevant if TakeLevelWallDamage is true.
SpriteColor Color “1.0,1.0,1.0,1.0”