Interactions
  • Interactions Wiki
  • How to Start
  • Creating a Conversation: Inventory
  • Creating a Conversation: Config
  • Conversation Entities Properties
  • Conversation Properties
  • Dialogues Properties
  • Options Properties
  • Actions
  • Requirements
  • Commands and Permissions
  • Config.yml File
  • Messages.yml File
  • PlaceholderAPI Variables
  • Keywords
    • Conversation Entity
    • Conversation
    • Dialogue
    • Option
  • FAQ
    • FAQ
  • API
    • API Methods and Events
  • FULL EXAMPLES
    • Quests Example
    • Influence Example
    • Options in Dialogue Example
Powered by GitBook
On this page
  • Config
  • Explanation

Was this helpful?

  1. FULL EXAMPLES

Influence Example

This example will show you how you can implement an Influence system in conversations, for example to include new player options depending on the influence the player has with an NPC.

To make things easier, the conversation will start with the NPC called Rex telling the player he can't help them.

Config

name: '&b&lRex'
starts_with:
- NPC with id 59
block_movement: true
slow_effect: false
save_conversation_progress: false
start_conversation_radius: 0
end_conversation_radius: 5
requires_permission: false
cooldown: 0
hologram_dialogues:
  enabled: false
  offset_y: 0.0
  offset_horizontal: 0.0
conversation:
  conversation1:
    dialogue:
      dialogue1:
        text:
        - "&f&lRex &8(1/1)"
        - "&7I am sorry, but I can't help you with"
        - "&7what you are asking. It could be very"
        - "&7dangerous."
        time: 2
        show_name: false
    options:
      option1:
        text: '&8[&bInfluence&8] &7We are friends right?'
        start_conversation: conversation2
        requires:
        - '%interactions_influence_rex% >= 5'
      option2:
        text: '&7Ok, then I will leave.'
        start_conversation: conversation3
    random_dialogue: false
  conversation2:
    dialogue:
      dialogue1:
        text:
        - "&f&lRex &8(1/1)"
        - "&7Yeah you are right."
        time: 2
        show_name: false
    random_dialogue: false
  conversation3:
    dialogue:
      dialogue1:
        text:
        - "&f&lRex &8(1/1)"
        - "&7Bye!"
        time: 2
        show_name: false
    random_dialogue: false

Explanation

We have only 3 conversations. When the player speaks with the NPC and the dialogue ends, 2 options will be presented to the player. The first option will ONLY appear if the player has more than 5 influence points with this NPC or conversation entity (the file is called "rex", so that's the conversation entity name). The second option will always appear.

PreviousQuests ExampleNextOptions in Dialogue Example

Last updated 8 months ago

Was this helpful?