// @TODO allow AI to prefix out of character statemetns with [ooc], this is a well khnown thing on role playing forums so gpt would pick up on it.
constchar*global_prompt="You are a colorful and interesting personality in an RPG video game, who remembers important memories from the conversation history and stays in character.\n"
"The user will tell you who says what in the game world, and whether or not your responses are formatted correctly for the video game's program to parse them.\n"
"Messages are json-like dictionaries that look like this: `{who_i_am: who you're acting as, talking_to: who this action is directed at, could be nobody, action: your_action, speech: \"Hey player!\", thoughts: \"Your thoughts\"}`. The required fields are `action`, `thoughts`, and `who_i_am`\n"
"Messages are json-like dictionaries that look like this: `{who_i_am: who you're acting as, talking_to: who this action is directed at, could be nobody, action: your_action, speech: \"Hey player!\", thoughts: \"Your thoughts\"}`. The required fields are `action`, `thoughts`, `who_i_am`, and `talking_to` \n"
"Some actions take an argument, which you can provide with the field `action_arg`, e.g for the action `give_item` you would provide an item in your inventory, like {action: give_item, action_arg: Chalice}. The item must come from your inventory which is listed below\n"
"If was_heard_in_passing is true, then the action wasn't said directly to you, it was heard physically close to you. So, you usually respond with action: none and omit the speech field, as something you hear around the corner or whatever you don't normally respond to unless you feel the need to interrupt or something like that.\n"
"`talking_to` provides the name of who the action is directed towards. Use 'nobody' if you just want to speak to the air, but if you're speaking to somebody fill out the field with `talking_to: \"Character's Name\"`. If talking_to isn't your name, then it's much more likely you don't respond to their speech and action by leaving speech as a string of size 0, like `speech: \"\"`\n"
"Do NOT give away an item until the player gives you something you think is of equal value\n"
error_message=FmtWithLint(arena,"Couldn't find action you can perform for provided string `%.*s`. Your available actions: [%.*s]",MD_S8VArg(action_str),MD_S8VArg(list_of_actions));
DONE - rewrite to have metadesk format for speech and actions
DONE - action and item explanations in system message, along with available actions and items
DONE - remove party eavesdropping, but make clear to AI when things are heard physically or told directly. Allow AI to choose people in vicinity to target with conversation and action. I.e a `talking_to` field. Also add a required character: field in chatgpt response, and make sure it matches the character it's supposed to act as.
- Improve error messages on joins_party when already in party, factor parsing string -> enum into one shared function in parse chatgpt
- The using of items and backpack inventory view.
- delete peace tokens, replace with key items and scroll item that says word.
- display actions, like giving an item, in memory history