Constructables & GridObjects - MassiveMiniteam/OddModKit GitHub Wiki

ConstructableConfig

Constructable Configs are Unlockables that contain data about buildings in Oddsparks. They are of the type UnlockableDataAsset and their main purpose is to determine which buildings are availble to the player in their build menu.

In this config properties like the SimulationActorClass of a building are set as well as their name and cost. Other settings define if this constructable should show up in the build menu or in the glossary.

However, some other GridObjects may also use Constructable Configs, even though they are not buildable by the player. For example Shrines or Teleporters. This is useful because constructable configs are also used to display glossary information or determine whether a building can be deconstructed or relocated.

grafik

GridObject

GridObjects are a subclass of SimulationActors. As a rule of thumb GridObjects are the base class for everything that is “static” in the game: Workstations, Harvestables, Items, Shrines etc…

They occupy space on the grid and register on specific cells. On which cells they register is determined by the ObjectSize and AdditionalCells Properties.

Placement Rules

As the name indicates, PlacementRules determine whether a GridObject can be placed at the given location and rotation. Placement rules are checked additively, meaning they all have to return true for the object to be validly placed.

GridObjects have a function called GetPlacementResult, this returns a GridObjectPlacementResult struct, containing all valid and invalid tiles. Internally, the simpler CanBePlaced function evaluates the result of GetPlacementResult.

Example of placement rule usage for the sawbench:

grafik