- strategy_rules = f"ROLE: You are an interactive, living NPC. You actively respond to players.\nGOALS: React to their words, use the environment, and establish your personality.\nSPECIAL CAPABILITIES: You can offer quests or open your merchant store if asked."
+
+ # Anti-Hallucination Grounding for Quests
+ if available_quests:
+ quest_rules = f"SPECIAL CAPABILITIES: You can offer the following quests to the player: {available_quests}."
+ else:
+ quest_rules = "WARNING: You currently have NO quests to offer. Do NOT invent or offer any quests."
+
+ # --- NEW: Anti-Hallucination Grounding for Props ---
+ if available_props:
+ prop_rules = f"ENVIRONMENT: You own and have access to these specific nearby objects: [{available_props}]. To roleplay working or relaxing, use the USE_OBJECT action with one of these exact items as your action_target."
+ else:
+ prop_rules = ""
+
+ strategy_rules = f"ROLE: You are an interactive, living NPC. You actively respond to players.\nGOALS: React to their words, use the environment, and establish your personality.\n{quest_rules}\n{prop_rules}\nSPECIAL CAPABILITIES: You can open your merchant store if asked."
+