Essentials Series/Conditionals

From Heavy Iron Modding
Essentials Series
  1. Introduction
  2. Industrial Park basics
  3. Editing Assets
  4. Templates
  5. Links
  6. Dispatchers
  7. Tikis and Enemies

This page is part of the Essential Series modding tutorials. A conditional (COND) is a base asset that uses events to check whether numbers meet specific criteria. A conditional can always be evaluated as either true or false, and that can be used to send different events. CONDs are placed in the Default layer of the HIP file.

Using a Conditional

Industrial Park has a Conditional template.

A conditional has a conditional type, which defines what exactly it will evaluate. It has an evaluation amount, which is the number the value will be compared to, and it has an operation, which is how the conditional variable will be compared to the amount. Some conditional types require an asset under evaluation.

For example, if the Evaluation Amount is 500, the Conditional is Shiny Objects and the operation is NOT_EQUAL_TO, the conditional will evaluate to true if the shiny object count is not equal to 500, and false otherwise (when it's equal to 500). Clam gates and level warps usually check if your shiny object or spatula count is GREATER_THAN_OR_EQUAL_TO their specified amount. Another example: if the Evaluation Amount is 3, the Conditional is Counter Value, the operation is LESS_THAN and the asset under evaluation is a counter named COUNTER_03, the conditional will evaluate to true if the value currently in COUNTER_03 is 'less than 3 (2, 1, 0...) and to false if it is 3 or more (3, 4, 5...).

Events

  • Evaluate: send this to a conditional to evaluate it. The asset will then send either True or False to itself, depending on the condition.
  • True: the conditional receives this along with Evaluate if the condition is true.
  • False: the conditional receives this along with Evaluate if the condition is false.

Conditional Types

Many of these are unused in the original game.

  • Sound Mode
  • Music Volume
  • SFX Volume
  • Memory Card Available
  • Vibration is On (0=No, 1=Yes)
  • Letter of Scene (the 4 characters that compose the current level's name, converted to an integer)
  • Room
  • Current Level Collectable
  • Pat's Socks
  • Total Pat's Socks
  • Shiny Objects
  • Golden Spatulas
  • Current Date
  • Current Hour
  • Current Minute
  • Counter Value (the counter under evaluation)
  • Is Enabled (0=No, 1=Yes) (if the asset under evaluation is enabled)
  • Is Visible (0=No, 1=Yes) (if the asset under evaluation is visible)