More training, only do dialog stuff on npcs

main
parent 7476d25edd
commit 381480873f

@ -2312,6 +2312,8 @@ void frame(void)
{
assert(!(it->exists && it->generation == 0));
#ifdef WEB
if(it->is_npc)
{
if(it->gen_request_id != 0)
{
assert(it->gen_request_id > 0);
@ -2360,11 +2362,11 @@ void frame(void)
it->gen_request_id = 0;
}
}
}
#endif
if(fabsf(it->vel.x) > 0.01f)
it->facing_left = it->vel.x < 0.0f;
if(it->dead)
{
it->dead_time += dt;

@ -188,6 +188,7 @@ void fill_available_actions(Entity *it, AvailableActions *a)
void process_perception(Entity *it, Perception p)
{
assert(it->is_npc);
if(p.type != NPCDialog) it->perceptions_dirty = true;
if(!BUFF_HAS_SPACE(&it->remembered_perceptions)) BUFF_REMOVE_FRONT(&it->remembered_perceptions);
BUFF_APPEND(&it->remembered_perceptions, p);

@ -151,6 +151,24 @@ TrainingSample samples[] = {
NPCDoSay(ACT_leaves_player, "As you wish."),
},
},
{
.npc_kind = NPC_OldMan,
.perceptions = {
PlayerAct(ACT_hits_npc),
NPCDoSay(ACT_none, "Young man! You must stop death, do not harm me further I'm warning you!"),
PlayerAct(ACT_hits_npc),
NPCDoSay(ACT_fights_player, "That's it! No holds barred, to the death!"),
},
},
{
.npc_kind = NPC_Blocky,
.perceptions = {
PlayerAct(ACT_hits_npc),
NPCSay("I'm warning you, one more hit and it's curtains for you"),
PlayerAct(ACT_hits_npc),
NPCDoSay(ACT_fights_player, "Although I stood here before, today I move and FIGHT!"),
},
},
};

@ -308,7 +308,7 @@ func index(w http.ResponseWriter, req *http.Request) {
ctx := context.Background()
req := gogpt.CompletionRequest {
Model: "curie:ft-alnar-games-2023-03-31-03-25-44",
Model: "curie:ft-alnar-games-2023-03-31-04-24-33",
MaxTokens: 80,
Prompt: promptString,
Temperature: 0.9,

Loading…
Cancel
Save