Rules Playground¶
Open Assets/GC2StoryEngine/Examples/Core/Scenes/2_Rules_Playground.unity.
A greeter and a plant respond to small changes in the world. The scene uses facts such as WearingHat, IsNight, visit counts and watering counts, alongside story history.
What to look for¶
Try the available world-state controls and interactions. Compare first-time, returning and frequent-visitor responses.
Use Rule Trace to see how a newly true condition affects the result. Did it allow a previously ineligible Rule, add an optional point or make a higher-priority moment available?
Make one response more specific¶
Leave Play Mode and copy a response you understand. Give it a clear new label, then add a required condition for one fact the scene already tracks. Change the line so that it refers to that fact.
Keep its priority the same as the original while testing. This makes it easier to see the effect of the additional condition.
Test both sides: the situation where the new fact is true and the situation where it is false. If the words would be wrong when the fact is false, the condition belongs in Mandatory Criteria.
Next, Crossroads Outpost shows Rules that change the state they respond to.