CleverRaven/Cataclysm-DDA

NPC starting quests mismatch with NPC traits

Open

#27.657 aperta il 16 gen 2019

Vedi su GitHub
 (2 commenti) (7 reazioni) (0 assegnatari)C++ (3991 fork)batch import
(P4 - Low)<Suggestion / Discussion>Good First IssueMissionsNPC / Factions[JSON]

Metriche repository

Star
 (9264 star)
Metriche merge PR
 (Merge medio 6g 5h) (292 PR mergiate in 30 g)

Descrizione

Is your feature request related to a problem? Please describe.
NPC starting quests are totally random and do not relate to the more complex NPC backstory system we now have. As a result NPCs get weird combinations of backstory and mission that make no sense.

Describe the solution you'd like
Make starting missions select based on NPC backstory, so each backstory has one or a couple of possible missions the NPC starts with. The game first checks if the NPC is going to ask you to do a mission, and if they are, it chooses from the list of ok missions (probably defined by trait flags in the backstory trait). This is nice because it lets starting missions be defined in any mutation, so for example asthma can get the trait flag "random_mission_inhaler", and we could add missions via JSON pretty easily.

So the algorithm goes:

  1. Check to see if the NPC is going to approach the player with a mission or not.
  2. If so, check what "random_mission_" flags the NPC has in its trait flags.
  3. Randomly select a mission from among those allowed.

If someone starts work on this I can add the mission flags to appropriate traits.

Describe alternatives you've considered
Missions could instead be selected first and then cancelled if the NPC has an incompatible trait, but this would greatly reduce the number of starting missions.

If you get a mission that doesn't match your backstory or other traits, the game could instead assign you an appropriate trait somehow. This seems clunky to me.

Additional context
At some point I can go through and add some triggers in talk_chat to discuss the circumstances in which you met your friend. This might require a few more conversation flags or conditionals, we'll see.

Guida contributor