com.iron-mountain.conditions
v1.5.9
Published
Scriptable-object conditions that make it easy to reuse gameplay logic. SOME CODING REQUIRED When implementing abstract systems that require conditional logic (i.e. quests, dialogue, story events), it is helpful to separate conditional logic from the sy
Downloads
23
Readme
Scriptable Conditions
Version: 1.5.9
Description:
Scriptable-object conditions that make it easy to reuse gameplay logic.
SOME CODING REQUIRED
When implementing abstract systems that require conditional logic (i.e. quests, dialogue, story events), it is helpful to separate conditional logic from the systems themselves. For example, each of my Dialogue Interaction objects references a Condition that determines if the interaction should play or not.
This separation of responsibilities makes it easy to reuse conditional logic and conditional objects across multiple systems.
Use Cases:
- Abstract systems that require conditional logic.
- Determining what dialogue to play.
- Determining when quests or missions should activate.
- Determining when quest/mission requirements have been satisfied.
- Anytime anything needs to be decided ¯_(ツ)_/¯
Dependencies:
- com.iron-mountain.save-system (1.0.4)
Package Mirrors:
Key Scripts & Components:
- public enum BooleanComparisonType : Enum
- public abstract class Condition : ScriptableObject
- Actions:
- public event Action OnConditionStateChanged
- Properties:
- public Sprite Depiction { get; }
- Methods:
- public abstract Boolean Evaluate()
- public abstract Boolean HasErrors()
- Actions:
- public class ConditionFalse : Condition
- Properties:
- public Sprite Depiction { get; }
- Methods:
- public override Boolean Evaluate()
- public override Boolean HasErrors()
- public override String ToString()
- Properties:
- public class ConditionTrue : Condition
- Properties:
- public Sprite Depiction { get; }
- Methods:
- public override Boolean Evaluate()
- public override Boolean HasErrors()
- public override String ToString()
- Properties:
- public enum ConditionalOperatorType : Enum
- public static class EvaluationUtilities
- public interface ICondition
- Actions:
- public event Action OnConditionStateChanged
- Methods:
- public abstract Boolean Evaluate()
- Actions:
- public enum NullComparisonType : Enum
- public enum NumericalComparisonType : Enum
Groups
- public class ConditionChecklist : Condition
- Properties:
- public Boolean AllRequired { get; }
- public Int32 AmountRequired { get; }
- public List Conditions { get; }
- public Sprite Depiction { get; }
- Methods:
- public override Boolean Evaluate()
- public override Boolean HasErrors()
- public override String ToString()
- Properties:
- public class ConditionEquation : Condition
- Properties:
- public List Conditions { get; }
- public Sprite Depiction { get; }
- Methods:
- public override Boolean Evaluate()
- public override Boolean HasErrors()
- public override String ToString()
- Properties:
Scripted Values
- public class ConditionScriptedBool : Condition
- Properties:
- public Sprite Depiction { get; }
- Methods:
- public override Boolean Evaluate()
- public override Boolean HasErrors()
- public override String ToString()
- Properties:
- public class ConditionScriptedFloat : Condition
- Properties:
- public Sprite Depiction { get; }
- Methods:
- public override Boolean Evaluate()
- public override Boolean HasErrors()
- public override String ToString()
- Properties:
- public class ConditionScriptedInt : Condition
- Properties:
- public Sprite Depiction { get; }
- Methods:
- public override Boolean Evaluate()
- public override Boolean HasErrors()
- public override String ToString()
- Properties:
- public class ConditionScriptedString : Condition
- Properties:
- public Sprite Depiction { get; }
- Methods:
- public override Boolean Evaluate()
- public override Boolean HasErrors()
- public override String ToString()
- Properties: