Advertisement
Nialna

Folks Quest example

Jan 6th, 2018
114
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
JSON 3.48 KB | None | 0 0
  1. `id : "tuto_01", // Unique quest ID
  2. name : "Bienvenue dans Folks", // Quest name, for the quest diary
  3. pnj : "Julie", //Principal NPC name: his/her icon will be shown in the diary
  4. description : "Apprends à planter un arbre avec Julie !", // Quest description, for the diary
  5. unlock : {
  6.     type : "autostart" // Special unlocking conditions
  7. },
  8. rewards : [ //Given once the quest is finished
  9. {
  10.     type : "item",
  11.     item : "apple",
  12.     quantity : 2
  13. },
  14. {
  15.     type : "xp",
  16.     category : "fleurie",
  17.     quantity : 100
  18. }
  19. ],
  20. objectives : [ // The quest steps
  21. {
  22.     id : "tuto_01_01", //Unique objective ID
  23.     text : "Cueillir un fruit", //Objective text for the diary
  24.     startDialog : "tutoQuest0101", // Dialog launched at start, optionnal
  25.     activateActions : { // Script launched at objective activation
  26.         type : "sequence", // Script type
  27.         script : {
  28.             id : "tuto_01_00_script",
  29.             content : [ // We can either put it here or specify a script name
  30.             'playState(state : "tuto_00");', // Special game states, created to block some of the player's actions during the tutorial
  31.             'movePNJToPlayer(pnjName : "julie");'
  32.             ]
  33.         }
  34.     },
  35.     startActions : { // Script launched at start
  36.         type : "sequence",
  37.         script : {
  38.             id : "tuto_01_01_script",
  39.             content : [
  40.             'playState(state : "tuto_01");',
  41.             'highlightUI(item : "shovel");', // Highlights a UI element
  42.             'highlightCase(x : 32, y : 32);',
  43.             'waitAction(type : "gameobjecthand", object : "tree");', // Waits for the player to use the "hand" tool on a "tree"
  44.             'playState(state : "normal");'
  45.             ]
  46.             }
  47.         },
  48.         starter : "launch", // Objective optionnal start behaviour
  49.         ender : "startScript" // Dialog launched at the end of the objective
  50.     },
  51.     {
  52.         id : "tuto_01_02",
  53.         text : "Ramasser une graine",
  54.         startpnj : "julie",
  55.         autostart : true,
  56.         startDialog : "tutoQuest0102",
  57.         startActions : {
  58.             type : "sequence",
  59.             script : {
  60.                 id : "tuto_01_02_script",
  61.                 content : [
  62.                 'waitAction(type : "gameobjectPick", object : "apple");' // Waits for the player to pick an Apple
  63.                 ]
  64.             }
  65.         },
  66.         starter : "launch",
  67.         ender : "startScript"
  68.     },
  69.     {
  70.         id : "tuto_01_03",
  71.         text : "Creuser un trou",
  72.         startpnj : "julie",
  73.         autostart : true,
  74.         startDialog : "tutoQuest0103",
  75.         startActions : {
  76.             type : "sequence",
  77.             script : {
  78.                 id : "tuto_01_03_script",
  79.                 content : [
  80.                 'normal();',
  81.                 'movePNJToPlayer(pnjName: "julie");',
  82.                 'sequence();',
  83.                 'waitAction(type : "gameobjectshovel", object : "ground");', // Waits for the player to dig a hole on the ground
  84.             ]
  85.             }
  86.         },
  87.         starter : "launch",
  88.         ender : "startScript"
  89.     },
  90.     {
  91.         id : "tuto_01_04",
  92.         text  : "Planter une graine",
  93.         startpnj : "julie",
  94.         autostart : true,
  95.         startDialog : "tutoQuest0104",
  96.         startActions : {
  97.             type : "sequence",
  98.             script : {
  99.                 id : "tuto_01_04_script",
  100.                 content : [
  101.                 'waitAction(type : "gameobjectobject", object: "hole");' // Waits for the player to put something on the hole
  102.                 ]
  103.             }
  104.         },
  105.         starter : "launch",
  106.         ender : "startScript"
  107.     },
  108.     {
  109.         id : "tuto_01_05",
  110.         text : "Arroser un arbre",
  111.         startpnj : "julie",
  112.         autostart : true,
  113.         startDialog : "tutoQuest0105",
  114.         startActions : {
  115.             type : "sequence",
  116.             script : {
  117.                 id : "tuto_01_05_script",
  118.                 content : [
  119.                 'waitAction(type : "gameobjectwateringcan", object : "buried");' // Waits for the player to water a burried seed
  120.                 ]
  121.             }
  122.         },
  123.         starter : "launch",
  124.         ender : "startScript",
  125.         endpnj : "julie",
  126.         endDialog : "tutoQuest0106"
  127.     }
  128. ]`
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement