In the other thread, a judgment system gives characters:
-
An importance value for each Motivation (Security, Pleasure)
-
Affinity values (like/dislike) toward other characters.
Characters also have other data that I’ll describe by way of an example quest:
Farmer Fred offers the player 50 gold to kill 5 wolves in his field.
- World State Observers: Information the NPC is interested in tracking (e.g., the number of hostiles in the farmer’s field). World State Observers are semi-hardcoded right now. This is a weak point in the system.
- Quest Assets: Prefabs the NPC can spawn when creating quests (e.g., a wolf spawner). They have motivation values, and some other attributes to help choose appropriate assets.
- Rewards: Things the NPC can offer the player to take the quest, such as currency.
- Dialect: A lookup table of phrases. The “Hello” lookup for a knight could be “Salutations, good sir,” while for a pirate it could be “Ahoy, matey!”
The system (not individual NPCs) also has a library of Quest Templates and Conversation Templates.
A Quest Template defines a generic quest structure. For example:
Quest Template: KillTargets
- Conversation: KillTargetsConversation (one or more quest conversations; see below)
- Description: “[giver] has offered you [reward] to [kill] [count] [targets].”
A Quest Conversation defines a generic conversation that can be used by quest templates.
Quest Conversation: KillTargetsConversation
-
Giver: (new) “[Hello] If you [kill] [count] [targets], I’ll give you [reward].”
-
Player: Okay.
-
Giver: (active) “Have you killed [count] [targets] yet?”
-
Player: No.
-
Player: Yes.
-
Giver: “[Thanks] Here’s [reward].”
-
Giver: (done) “Thanks for completing the quest!”
So for the farmer’s quest: He has positive affinity for the player, so he’ll offer a quest. His field is empty, but he has a wolf spawner in his assets. The KillTargets quest, combined with the wolf spawner, meets his primary motivation, which is Security. His resources include 50 gold, so he offers a 20 gold reward, which is equivalent to the difficulty value of the wolf spawner. The generated quest looks like this:
Description: “Farmer Fred has offered you 20 gold to exterminate 5 wolves.”
-
Farmer Fred: (new) “Greetin’s! If you exterminate 5 wolves, I’ll give you 20 gold.”
-
Player: Okay.
-
Farmer Fred: (active) “Have you killed 5 wolves yet?”
-
Player: No.
-
Player: Yes.
-
Giver: “My thanks to ye! Here’s 20 gold.”
-
Farmer Fred: (done) “Thanks for completing the quest!”
In practice, the quest templates and especially quest conversations are more elaborate. But, even so, my test scenes have just felt very artificial and meaningless. Perhaps I haven’t leveraged affinities enough. But I’m afraid that if all of the quests involve asking the player to act against other NPCs that the quest giver dislikes, everyone will end up dead. What am I missing?