When tech works for you. (minimum effort)

Daestrum

Expert
Licensed User
Longtime User
Just writing an NPC system for games - where AI generates the dialogues to show to user.

1) I start with simple definition in a tool for AI

Code: Copy
case "100":
    reply.Add(@"{
""id_number"":""100"",
""name"":""Gorim Ironhammer"",
""profession"":""blacksmith"",
""knowledge"":""smithing and metals"",
""friends"":[""103"",""101""],
""gender"":""m"",
""traits"":[""gruff"",""honest"",""superstitious"",""balding""]
}");
    break;
Here - tech helps - Autocomplete in VS Studio adds new ones for every "case " I type just 'case' - it adds all the rest (including names and all other details)

2) Model reads the data via tool

3) I ask model to design DB table to hold the data - does it and creates the table for me.

4) Ask model to write a query to get data back from DB in same format as in 2



Sometimes I amaze myself how lazy I can be.
 
Follow up - current state of NPC system - it uses a simple database for facts yet turns out dialogue like this (has debug info in at present - explains where data comes from)

Note: This is only using a 4B param model to generate the dialogues. There is no pre-written dialogues at all - just data about entities (as shown in first post - but now in DB ).

You: If I asked npc 100 where I can get potions made - what might he reply
ChattyNET: If asked NPC 100 (Gorim Ironhammer) where he can get potions made, he might reply:
> "Potions? I don’t make them — that’s the herbalist’s job. You’ll find **Selene Starwhisper** at the herbalist cottage near the riverbank to the east of town. She’s the one who knows about healing brews, restorative elixirs, and even the rare moonflower tincture. She’s got a well-tended garden, and her cottage has a distinctive green door. I’ve seen her brews before — they’re strong, but only if you give her the right herbs. If you’re looking for a health potion, just go to her place and ask her directly. She might even give you one if you help her with a few chores, like tending the garden or fetching flowers."

**Why this response makes sense**:- Gorim is a blacksmith, not a potion-maker, so he naturally redirects to the correct person (Selene Starwhisper). - His tone remains consistent with his gruff yet honest personality — he doesn’t over-explain, but gives practical, grounded advice. - He references the location and environment (the herbalist cottage with the green door), reinforcing the world-building details. - He adds a layer of community interaction — offering a small incentive (helping with chores) to encourage engagement.

This reply aligns with the original context, maintains Gorim’s voice, and supports the narrative ecosystem of the game world.
 
Back
Top