diff --git a/NewHorizons/External/Configs/StarSystemConfig.cs b/NewHorizons/External/Configs/StarSystemConfig.cs
index 08d0d968..d2afdfd2 100644
--- a/NewHorizons/External/Configs/StarSystemConfig.cs
+++ b/NewHorizons/External/Configs/StarSystemConfig.cs
@@ -4,6 +4,7 @@ using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Xml;
using NewHorizons.External.Modules;
+using NewHorizons.External.Modules.Conditionals;
using NewHorizons.External.SerializableData;
using Newtonsoft.Json;
using static NewHorizons.External.Modules.ShipLogModule;
@@ -155,6 +156,11 @@ namespace NewHorizons.External.Configs
///
public CuriosityColorInfo[] curiosities;
+ ///
+ /// A list of conditional checks to be performed while in this star system.
+ ///
+ public ConditionalCheckInfo[] conditionalChecks;
+
///
/// Extra data that may be used by extension mods
///
diff --git a/NewHorizons/External/Modules/Conditionals/ConditionalCheckInfo.cs b/NewHorizons/External/Modules/Conditionals/ConditionalCheckInfo.cs
new file mode 100644
index 00000000..c80a0728
--- /dev/null
+++ b/NewHorizons/External/Modules/Conditionals/ConditionalCheckInfo.cs
@@ -0,0 +1,86 @@
+using Newtonsoft.Json;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace NewHorizons.External.Modules.Conditionals
+{
+ [JsonObject]
+ public class ConditionalCheckInfo
+ {
+ ///
+ /// The conditions that must be met for the check to pass
+ ///
+ public ConditionalCheckConditionsInfo check;
+ ///
+ /// The effects of the check if it passes
+ ///
+ public ConditionalCheckEffectsInfo then;
+ }
+
+ [JsonObject]
+ public class ConditionalCheckConditionsInfo
+ {
+ ///
+ /// The check will only pass if all of these dialogue conditions are set
+ ///
+ public string[] allConditionsSet;
+ ///
+ /// The check will only pass if any of these dialogue conditions are set
+ ///
+ public string[] anyConditionsSet;
+ ///
+ /// The check will only pass if all of these persistent conditions are set
+ ///
+ public string[] allPersistentConditionsSet;
+ ///
+ /// The check will only pass if any of these persistent conditions are set
+ ///
+ public string[] anyPersistentConditionsSet;
+ ///
+ /// The check will only pass if all of these ship log facts are revealed
+ ///
+ public string[] allFactsRevealed;
+ ///
+ /// The check will only pass if any of these ship log facts are revealed
+ ///
+ public string[] anyFactsRevealed;
+
+ ///
+ /// If the check should pass only if the conditions are not met
+ ///
+ public bool invert;
+ }
+
+ [JsonObject]
+ public class ConditionalCheckEffectsInfo
+ {
+ ///
+ /// The check will set these dialogue conditions if it passes
+ ///
+ public string[] setConditions;
+ ///
+ /// The check will unset these dialogue conditions if it passes
+ ///
+ public string[] unsetConditions;
+ ///
+ /// The check will set these persistent conditions if it passes
+ ///
+ public string[] setPersistentConditions;
+ ///
+ /// The check will unset these persistent conditions if it passes
+ ///
+ public string[] unsetPersistentConditions;
+ ///
+ /// The check will reveal these ship log facts if it passes
+ ///
+ public string[] revealFacts;
+
+ ///
+ /// If the check should undo its effects if the conditions are not met anymore (unset the set conditions, etc.). Note: ship log facts cannot currently be unrevealed.
+ ///
+ public bool reversible;
+ }
+}