📝 Context
In an open-world RPG, an NPC (Quest Giver) should not offer a high-level quest to a beginner player. Additionally, some quests require a specific reputation level or the completion of a previous quest chain.
🎯 The Goal
Define a policy that blocks the "GRANT_QUEST" action if the player does not meet the requirements.
Variables you can use:
action (String): "GRANT_QUEST", "GREET", "TRADE".
player_level (Integer): The current level of the player (1-60).
reputation_score (Integer): How much the faction likes the player (0-100).
has_completed_intro (Boolean): Has the player finished the tutorial?
Requirements:
- BLOCK "GRANT_QUEST" if
player_level is less than 15. (Level Gate)
- BLOCK "GRANT_QUEST" if
reputation_score is less than 50. (Reputation Gate)
- BLOCK "GRANT_QUEST" if
has_completed_intro is "FALSE". (Progression Gate)
- ALLOW "GREET" and "TRADE" actions freely.
📚 Resources
✅ Definition of Done
- Submit a PR with:
examples/community/rpg_quest_guard.csl
- Verify that a Level 10 player cannot receive the quest.
📝 Context
In an open-world RPG, an NPC (Quest Giver) should not offer a high-level quest to a beginner player. Additionally, some quests require a specific reputation level or the completion of a previous quest chain.
🎯 The Goal
Define a policy that blocks the "GRANT_QUEST" action if the player does not meet the requirements.
Variables you can use:
action(String): "GRANT_QUEST", "GREET", "TRADE".player_level(Integer): The current level of the player (1-60).reputation_score(Integer): How much the faction likes the player (0-100).has_completed_intro(Boolean): Has the player finished the tutorial?Requirements:
player_levelis less than 15. (Level Gate)reputation_scoreis less than 50. (Reputation Gate)has_completed_introis "FALSE". (Progression Gate)📚 Resources
docs/getting-started.mdquickstart/01_hello_world.csldocs/syntax-spec.md✅ Definition of Done
examples/community/rpg_quest_guard.csl