Make a new character (with dialogue) - smkmth/RPG2 GitHub Wiki

kind of wish i had an easier way to do this - but whatever.

  1. make a new character object. i use the prefab for someguy, rename it, and delete the someguy component.
  2. use the npc component in that character object to fill out the details of that character
  3. Make a new Topic scriptable object in a folder (right click, dialogue, topic). call it 'Start Topic'
  4. in that scriptable object, fill in the first speach the player will hear when encountering this character
  5. fill in the speakers name.
  6. back in the project view, create a responce scriptable object(right clck, dialogue, responce). drag and drop the responce you made into the Topic scriptable object. make as many responces as you like for a particular topic (the limit is 10, thats not like a hard limit, its just as high as i wanted to go for now.)
  7. these responces lead to new topics, which inturn lead to new responces and so on and so on. the game will dynamically work out when the dialogue is exhausted, and provide a quit button. ]
  8. Drag the start topic to the npc component of the character object, and drop it in the box which says Start Topic.
  9. Change the tag for the character object to 'npc'.

thats it. when you click on your character, the playercharacter should move over to the npc, and start having a conversation.

NOTES Special markers. in both the topic and responce are a space for special markers. you can write anything inside this space, and it will be written to the player character as a string - in the list SpecialTopics.

you can then access and check this value later. if you need to check a special topic in dialogue, select the bool SRequirement, then carefully type the special marker you need

Requirements. responces somtimes have requirements, like if you want an option to only appear if the player character has high strength, you can set that in the requirements part.

  1. tick the bool which asks 'requirement'
  2. write what kind of requirement it is specificaly atm : Strength, Dexterity, Constitution, Wisdom, Intetellgence Charisma are the challanges available
  3. write the requirement level in the requirement challange part.