Show / Hide Table of Contents

Product Scriptable Object

A Product scriptable object contains all the relevant information of a product included in a proposal.

A Product Scriptable Object

Generally all products consists of a few parts:

  1. Product Type - the product type, shown to the player
  2. Sprite - a picture of the product
  3. Disposal Method - how the product is to be disposed of after its lifespan (currently unused)
  4. Product Makeup - what the product is made up of
  5. Product Properties - other relevant details to the product.

Optionally, a Product Generator attached and used to generate/regenerate a product.

Product Makeup

A Product Scriptable Object

The product makeup of a product describes how a product is made. It is made up of:

  1. MaterialComposition - a list of resources used in the making of the product
  2. Override Production Energy - whether to override the calculated energy needed to produce the product
  3. ProductionEnergy - the energy required to manufacture the product.

The total energy needed to produce a product is calculated in this manner.

  • if Override Production Energy is not selected: the calculated energy required to obtain the resources in MaterialComposition, plus the value of ProductionEnergy
    (i.e. energy required to obtain the necessary resources + energy required to manufacture the product)
  • if Override Production Energy is selected: the value of ProductionEnergy

Resource Usage

An Example Game Resource

Within the MaterialComposition of a product, a resource usage is broken down into:

  1. Resource - a GameResource scriptable object, describing the resource being used
  2. Used - the amount, in grams, of the resource being used in producing 1 unit of the product
  3. Usage Variance - (only for Product Generators) the variance of the amount used
  4. Wastage - how much of the resource is wasted during the production process of 1 unit of the product e.g. scrap cloth from cutting fabric
  5. Wastage Variance - (only for Product Generators) the variance of the wastage produced.

The Game Resource Scriptable Object

See The Game Resource Scriptable Object for more details.

Product Properties

An Example Game Resource

The product properties are a list of Details that capture a relevant detail of a product. Each Detail is consists of:

  1. Display Name - the text to be shown to the player in-game (e.g. "efficiency", "humidity")
  2. Value Type - the type of value that the detail holds, be it a floating point number, an integer or a string
  3. Float Value/Integer Value/String Value - the value describing the detail (e.g. 5.2, "very high")
  4. Unit Type - if the Value Type is a number, the type of measurement it is (e.g. weight, length, etc.)
  5. Is Shown - whether the detail is shown to the player in-game or hidden from the player
In This Article
Back to top Generated by DocFX