Skip to content
toxicity188 edited this page Sep 2, 2023 · 2 revisions

Dialog refers to a conversation with NPC.

test-npc:
  class: npc
  id: 0
  name: test npc
  dialog:
    - test-dialog-1

test-dialog-1:
  talk:
    - hello world!

2023-08-24_15 38 25

Talk

test-dialog-1:
  talk:
    - hello world!
    - I'm glad to see you!
    - if you want to put delay, ***just use this word!
    - <gradient:yellow-green>you can use variouse text effect!
    - <color:purple><decoration:bold,italic>Like this!
    - your health is %health(player())%! *****you can use function!

녹화_2023_08_24_15_42_34_824
Talk refers to the sentence that the talker will talk.

Talker

test-dialog-1:
  talk:
    - hello %name(player())%!
    - "%name(player())%:: nice to see you."

녹화_2023_08_24_15_45_29_275
Talker refers to the talker that will talk.

Dialog

test-dialog-1:
  talk:
    - hello %name(player())%!
  dialog:
    - test-dialog-2
    - test-dialog-3

test-dialog-2:
  talk:
    - next dialog!
test-dialog-3:
  talk:
    - you can randomize your dialog!

녹화_2023_08_24_15_47_38_474
Dialog refers to the dialog that ready to start after current dialog ends successfully.

Interface

test-dialog-1:
  talk:
    - hello %name(player())%!
    - this is a title interface!
    - this is a text interface!
  interface:
    2: title
    3: text

녹화_2023_08_24_15_52_58_587
Interface refers to the interface that text will shown.
There are 3 interface here.

  • default
  • title
  • text

Action

test-dialog-1:
  talk:
    - hello %name(player())%!
    - nice to see you!
  interface:
    1: title
  action:
    1:
      - message{m="hello!"}
      - delay 20
      - message{m="nice to see you!"}

녹화_2023_08_24_15_54_46_797
Action refers to the action script in QuestAdder.

Gesture

test-dialog-1:
  talk:
    - hello %name(player())%!
    - nice to see you!
  gesture:
    1: steve.wave
  interface:
    1: title

녹화_2023_08_24_15_57_18_75
Gesture refers to the gesture that NPC will play.

Variable

test-dialog-1:
  talk:
    - let's start to set variable.
  variable:
    - round(random(0,100)) @set:luck
  dialog:
    - test-dialog-2
test-dialog-2:
  talk:
    - your number is %numOf(player(),'luck')%!
  variable:
    - 0 @delete:luck

녹화_2023_08_24_16_03_03_926
Variable refers to the player's variable.

QuestAdder supports three type of primitive variable.

  • Number(0,1,2...)
  • Boolean(true, false)
  • String('string')

Condition

test-dialog-1:
  talk:
    - test success!
  condition:
    - random(0,100) > 66 @cast:test-dialog-2
test-dialog-2:
  talk:
    - test failure!

녹화_2023_08_24_16_06_47_170
Condition refers to the condition of the dialog. if any condition is not matched, dialog will no start.

Sub-Dialog

test-dialog-1:
  talk:
    - test success!
  condition:
    - random(0,100) > 66
  sub-dialog:
    - test-dialog-2
test-dialog-2:
  talk:
    - test failure!

Sub-Dialog refers to the dialog that start when current dialog is fail to start by any reason.

QnA

test-dialog-1:
  talk:
    - which one is better?
  qna:
    - test-qna

test-qna:
  class: qna
  items:
    11:
      item:
        type: green_wool
        display: dog
      dialog:
        - test-dialog-2
    15:
      item:
        type: red_wool
        display: cat
      dialog:
        - test-dialog-3

test-dialog-2:
  talk:
    - oh, do you like dog?
test-dialog-3:
  talk:
    - oh, do you like cat?

녹화_2023_08_24_16_11_13_0
QnA refers to the QnA that start when current dialog is end.

Sound

test-dialog-1:
  talk:
    - Hello!
  Sound:
    1: entity.ender_dragon.flap

Sound refers to the sound that start with talk.

Index

test-npc:
  class: npc
  id: 0
  name: test npc
  dialog:
    - test-dialog-1
    - test-dialog-2

test-dialog-1:
  talk:
    - talk 1!
  index:
    - 1 @set:test-npc
test-dialog-2:
  talk:
    - talk 2!
  index:
    - 0 @set:test-npc

녹화_2023_08_24_16_13_24_275
Index refers to the index of NPC's dialog.
If index is 1, second dialog of that NPC will start.

Quest

Quest manipulate the quest state of player.

there are 3 operation here.

  • give
  • complete
  • remove

Check

Check refers to check the player's quest state.

there are 4 operation here.

  • has (whether player has this quest)
  • complete (whether player fulfill all of condition of this quest)
  • ready (whether player have an enough inventory to get reward)
  • clear (whether player cleared this quest) if you plus '!' to first char of it, this function will be reversed. For example, !complete is not complete.
Clone this wiki locally