Unity Development

I have made a system in Unity which will read a text file into an NPC and give them everything they will have to say to the player.

  • Each line of dialogue for an NPC has a number of requirements and a number of responses.
  • If a line's requirements are not all met then the NPC will not say this line.
  • Each response the player can give has a number of requirements and a number of effects.
  • If a responses requirements are not met then it will not be an option for the player.
  • Requirements and effects are linked inasmuch as anything that can be a requirement (for example the player's health above a certain threshold), can also be an effect (for example healing the player to a certain health).
  • Requirements and effects have 5 types:
    • Previous response (The last response given by the player)
    • Player stat (A particular value on the player's 'stat sheet')
    • NPC stat (Some information unique to this NPC, such as how much they like the player)
    • World condition (Information which belongs neither to the player nor the NPC, for example the time of day, which doors are unlocked, or the game's difficulty setting)
    • Item in inventory (How much of a particular item is in the player's inventory)