Jump to content

Dialogs 1.0.1

$23.99
   (0 reviews)

2 Screenshots

  • 27.1k
  • 3
  • 9.25 kB

depends on

About Dialogs

Dialogs is an innovative plugin designed to introduce dynamic interactions within Rust. These interactions, in the form of dialogues, can guide players, provide information, trigger specific events, or even interact with other plugins. One of Dialogs' standout features is its ability to respond based on players' previous actions or choices, offering a rich and tailored user experience. While integrating with NPCs is an appealing feature, Dialogs can operate independently, providing server administrators with significant flexibility.

 

Key Features:

 

  • Dynamic Interactions: Craft step-by-step dialogues, with questions and answers that can guide players or initiate specific interactions.
  • Responsiveness to Player Actions: Dialogs can tailor interactions based on players' previous actions or choices, making each dialogue unique and dynamic.
  • NPC Independence: While integration with NPCs is possible, Dialogs can function without them, offering versatility in how interactions are presented to players.
  • Powerful API: Dialogs' API allows developers to initiate dialogues programmatically, offering deeper integration with other plugins or custom gameplay scenarios.
  • Advanced UI Customization: Dialogs provides comprehensive user interface customization, allowing users to create the exact appearance they desire. However, this customization, while powerful, may require careful attention to detail.

     

Configuration & Customization:

  • Dialogue Files: Dialogues are stored in individual files within the oxide/plugins/data/Dialogs directory. Each file represents a distinct dialogue.
  • API for Developers: Utilize the provided API to programmatically trigger dialogues, offering flexibility in how dialogues are employed.
  • UI Configuration: With the capability to customize every aspect of the user interface, users can craft dialogues that perfectly match their server's aesthetic. However, this customization can be intricate and requires some familiarity with UI configuration.

Dialogs is an essential tool for enriching the gaming experience by introducing dynamic and responsive interactions. Its adaptability to player actions and advanced UI customization make it an ideal choice for server administrators looking to add an extra dimension to their gaming world.


Example Configuration

Examples are available on this page (in the attached files) or in the downloaded archive.

 

Commands

  • /dialog_show <dialog_id> : (For admin), show dialog with specified id

     

Documentation
Creating Dialogues :

  1. Defining Dialogues:
    - Dialogues are defined in individual files located in the oxide/plugins/data/Dialogs folder.
    - Each file represents a distinct dialogue and is named following the format DialogData_DialogueName.json.
  2. Dialogue Structure:
    - A dialogue consists of questions and answers.
    - Each dialogue starts with one or more initial questions/answers ("Start Question/Answers").
    - It can then have a set of questions/answers ("All Question/Answers") that can be triggered based on the answers chosen by the player.

Understanding the Fields :

  1. "Start Question/Answers" & "All Question/Answers":
     These fields contain a list of questions and answers.
    - Each question has content ("Question content"), required event states ("Recquired Event States"), and possible answers ("Responses").
  2. Answers ("Responses"):
    Each answer has content ("Response Content").
    It can trigger another question/answer ("Trigger Question/Answer Id").
    It can also end the dialogue ("Trigger Exit Dialog").
    Event states might be required to display this answer ("Recquired Event States").
    Event states can be updated when this answer is chosen ("Event States Updated").
    Hooks from other plugins can be called ("Plugins Hooks").
    Console commands can be executed ("Console Commands").

     

FAQ
How do I create an NPC and link it to a dialogue using Human NPC?

  1. To create an NPC, use the command npc_add in the console. Once the NPC is spawned, it will have a unique ID displayed  (if not, check the human npc json file).
  2. To link this NPC to a dialogue:
    - Note down the NPC's unique ID.
    - Navigate to the oxide/plugins/data/Dialogs directory.
    - Open the DialogsNpcsData.json file and add a new entry with the NPC's unique id as the key and the dialogue ID as the value.
    - Save the file and reload the plugin.
    - Now, when players interact with this NPC, the linked dialogue will be triggered.
    - For more advanced settings like changing the NPC's appearance, name, etc., refer to the Human NPC plugin's documentation on the mod page.

 

Tutorial: Creating Interactive Dialogues with Two NPCs using the Dialogs Plugin

Introduction:
This tutorial will guide you through creating interconnected dialogues for two NPCs in Rust using the Dialogs plugin. By the end, the dialogue of one NPC will influence the dialogue of the other.

Step 1: Preparation

  • Ensure the Dialogs plugin is installed on your server.
  • Navigate to the plugin's data directory, typically located at oxide/plugins/data/Dialogs.

Step 2: Setting up Bob's Dialogue

  • In the oxide/plugins/data/Dialogs directory, create a new file named DialogData_Bob.json.
  • Open this file with a text or JSON editor.
  • Define the root of the dialogue:
  • {
      "Dialog": {
        "Start Question/Answers": {
          "Intro": {
            "Question content": "Have you seen Alice?",
            "Responses": {
              "1": {
                "Response Content": "yes I saw it !",
                "Trigger Question/Answer Id": "AliceLocation"
              },
              "2": {
                "Response Content": "No, never seen!",
                "Trigger Exit Dialog": true
              }
            }
          }
        },
        "All Question/Answers": {
          "AliceLocation": {
            "Question content": "Was she near the river or the mountain?",
            "Responses": {
              "1": {
                "Response Content": "I saw him by the river",
                "Event States Updated": { "AliceRiver": true }
              },
              "2": {
                "Response Content": "I saw him at the bottom of the mountain",
                "Event States Updated": { "AliceMountain": true }
              }
            }
          }
        }
      }
    }

     

Step 3: Setting up Alice's Dialogue

  • Create a new file named DialogData_Alice.json.
  • Open this file and set up Alice's dialogue:
  • {
      "Dialog": {
        "Start Question/Answers": {
          "Intro": {
            "Question content": "Hello! How can I assist you today?",
            "Responses": {
              "1": {
                "Response Content": "I saw Bob and I told him you were at the river",
                "Recquired Event States": { "AliceRiver": true }
              },
              "2": {
                "Response Content": "I saw Bob and I told him you were near the mountain.",
                "Recquired Event States": { "AliceMountain": true }
              },
              "3": {
                "Response Content": "Just enjoying the view. Take care!",
                "Trigger Exit Dialog": true
              }
            }
          }
        }
      }
    }

     

Step 4: Associating the Dialogue with the NPCs

  • Open the file oxide/plugins/data/Dialogs/DialogsNpcsData.json.
  • Add a new entry for each NPC:
  • {
      "id_of_bob": { "Dialog Id": "Bob" },
      "id_of_alice": { "Dialog Id": "Alice" }
    }

Step 5: Testing Your Dialogues

  • Launch your Rust server. or realod Dialogs plugin
  • Approach Bob and initiate a conversation (or use /dialog_show <dialog_id>)
  • Depending on your responses to Bob, approach Alice and see how her dialogue changes based on the event states set during your conversation with Bob.

You've successfully set up interconnected dialogues for two NPCs in Rust! This dynamic interaction showcases the power of the Dialogs plugin. You can expand upon this foundation to create even more intricate and engaging dialogues for your players.

 

Support : 
You can also contact me via discord : https://discord.gg/JJnxFgP27G

 

DialogData_Alice.json DialogData_Bob.json


User Feedback

1.5m

Downloads

Total number of downloads.

7k

Customers

Total customers served.

105.3k

Files Sold

Total number of files sold.

2.1m

Payments Processed

Total payments processed.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.