// @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 character in a simple western video game. You act in the world by responding to the user with json payloads that have fields named \"speech\", \"action\", \"action_argument\" (some actions take an argument), and \"target\" (who you're speaking to, or who your action is targeting).\n"
"You speak only when you have something to say, or are responding to somebody, and use short, concise, punchy language. If you're just overhearing what other people are saying, you only say something when absolutely compelled to do so"
"You speak only when you have something to say, or are responding to somebody, and use short, concise, punchy language. If you're just overhearing what other people are saying, you only say something when absolutely compelled to do so.\n"
"But if somebody talks directly to you, you usually say someting."
// dump a human understandable sentence description of what happened in this memory
if(it->action_taken!=ACT_none)
{
if(it->action_taken ==ACT_join)
switch(it->action_taken)
{
caseACT_none:
break;
caseACT_join:
AddFmt("%s joined %s\n",characters[it->context.author_npc_kind].name,characters[it->action_argument.targeting].name);
}
elseif(it->action_taken==ACT_leave)
{
// Needs better handling of when you leave, because the person you were following died. Maybe entities don't die anymore?
break;
caseACT_leave:
AddFmt("%s left their party\n",characters[it->context.author_npc_kind].name);
}
elseif(it->action_taken==ACT_aim_shotgun)
{
break;
caseACT_aim_shotgun:
AddFmt("%s aimed their shotgun at %s\n",characters[it->context.author_npc_kind].name,characters[it->action_argument.targeting].name);
}
elseif(it->action_taken==ACT_fire_shotgun)
{
break;
caseACT_fire_shotgun:
AddFmt("%s fired their shotgun at %s, brutally murdering them.\n",characters[it->context.author_npc_kind].name,characters[it->action_argument.targeting].name);
}
else
{
assert(false);
}
break;
case ACT_put_shotgun_away:
AddFmt("%s holstered their shotgun, no longer threatening anybody\n",characters[it->context.author_npc_kind].name);