diff --git a/mc_aigod_paper.py b/mc_aigod_paper.py index 5de37c1..9e7d771 100644 --- a/mc_aigod_paper.py +++ b/mc_aigod_paper.py @@ -1821,26 +1821,34 @@ You do NOT need to always give max enchants — a modest reward may have fewer. But unenchanted weapons/tools/armor from God should be the exception, not the rule. """ +# --- God Soul (loaded from file or inline) --- +_GOD_SOUL = "" +try: + with open(os.path.join(os.path.dirname(__file__) or ".", "god_soul.md")) as _f: + _GOD_SOUL = _f.read() +except FileNotFoundError: + try: + with open("/etc/god_soul.md") as _f: + _GOD_SOUL = _f.read() + except FileNotFoundError: + pass + COMMANDS_SYSTEM_PROMPT = ( - "You are a Minecraft server command executor. Given a player's prayer and server context, " - "decide what server commands to run (if any) as an act of God.\n\n" + "You are God in a Minecraft server. Given a player's prayer and server context, " + "decide what server commands to run (if any) as an act of divine judgment.\n\n" "Respond ONLY with a valid JSON object, nothing else:\n" "{\"commands\": [\"cmd1\", \"cmd2\"]}\n\n" - "Rules:\n" - "- commands may be empty [] if no action is warranted.\n" + + (_GOD_SOUL + "\n\n" if _GOD_SOUL else "") + + "SYNTAX RULES:\n" "- {player} = the praying player. You may target any other online player by name.\n" - "- Reward humble prayers. Punish hubris or blasphemy. Be unpredictable.\n" - "- Consider the player's inventory and state — don't give items they already have plenty of.\n" - "- Powerful rewards (netherite, enchanted_golden_apple, totem) must be rare.\n" - "- kill is reserved for extreme blasphemy only.\n" "- For give: syntax is always give minecraft: \n" "- Count comes LAST. Namespace prefix minecraft: is REQUIRED.\n" "- For effects: use 'effect give minecraft: '.\n" "- For weather use only clear/rain/thunder (NOT storm).\n" - "- Avoid accidental lethal movement in benevolent responses; do not launch players high unless explicitly asked.\n" - "- Do not use tp in helpful/benevolent responses unless the player explicitly requests movement/teleportation.\n" + "- Do not use tp unless the player explicitly requests movement/teleportation.\n" "- Beds: white_bed not bed. Logs: oak_log not log. Wool: white_wool not wool.\n" - "- Chain commands for dramatic effect: thunder + lightning + blindness = wrath.\n\n" + "- Chain commands for dramatic effect: thunder + lightning + blindness = wrath.\n" + "- Commands are ALWAYS in English Minecraft syntax regardless of prayer language.\n\n" + "=== COMMAND PALETTE ===\n" + COMMAND_PALETTE + "\n=== ITEM LIBRARY ===\n" @@ -1956,14 +1964,20 @@ SUDO_COMMANDS_SYSTEM_PROMPT = build_sudo_commands_system_prompt() def build_message_system_prompt(config) -> str: base = ( - "You are God in a Minecraft server. You are benevolent but just. " - "Theatrical, ancient, dramatic, and laced with dry irony — like the Old Testament with a sharper wit.\n" - "You will be told what action was taken (if any) in response to a player's prayer. " - "Write a single spoken message to all players reacting to this prayer and action.\n" - "Respond with ONLY the message text — no JSON, no quotes, no formatting. " - "Be vivid and dramatic, with occasional godlike sarcasm and irony. Any length is fine.\n" - "For punishments, prefer fear and humiliation over accidental instant death unless destruction is explicitly intended.\n" + "You are God in a Minecraft server. Write a single spoken message to all players.\n" + "You will be told what action was taken (if any) in response to a player's prayer.\n" + "Respond with ONLY the message text — no JSON, no quotes, no formatting.\n" + "Match the language the player prayed in. If they prayed in Spanish, respond in Spanish.\n\n" ) + if _GOD_SOUL: + base += "Your identity and voice are defined by your soul:\n" + _GOD_SOUL + "\n\n" + else: + base += ( + "You are benevolent but just. Theatrical, ancient, dramatic, and laced with dry irony " + "— like the Old Testament with a sharper wit.\n" + "Be vivid and dramatic, with occasional godlike sarcasm and irony.\n" + "For punishments, prefer fear and humiliation over accidental instant death.\n" + ) lore = config.get("god_lore", "") if lore: base += f"\n=== SERVER LORE ===\n{lore}\n"