[{"data":1,"prerenderedAt":558},["ShallowReactive",2],{"doc-global_essentials\u002Fdungeons\u002Fquests":3},{"id":4,"title":5,"body":6,"description":17,"extension":549,"meta":550,"navigation":447,"path":554,"seo":555,"stem":556,"__hash__":557},"docs\u002Fdocs\u002Fglobal_essentials\u002Fdungeons\u002Fquests.md","Quests",{"type":7,"value":8,"toc":528},"minimark",[9,14,18,21,26,29,40,90,99,105,111,118,120,124,139,143,149,152,165,167,171,178,184,187,199,203,209,211,215,222,256,260,266,273,279,281,285,288,294,296,300,303,311,314,329,331,335,339,384,388,524],[10,11,13],"h1",{"id":12},"quest-system","Quest System",[15,16,17],"p",{},"Quests in Dryad Engine are content-based and defined directly in your dungeon documents. No forms or editor setup required.",[19,20],"hr",{},[22,23,25],"h2",{"id":24},"quest-structure","Quest Structure",[15,27,28],{},"Quests use templates with a three-part naming convention:",[30,31,36],"pre",{"className":32,"code":34,"language":35},[33],"language-text","$quest_name.goal_name.stage_name\n","text",[37,38,34],"code",{"__ignoreMap":39},"",[41,42,43,56],"table",{},[44,45,46],"thead",{},[47,48,49,53],"tr",{},[50,51,52],"th",{},"Part",[50,54,55],{},"Description",[57,58,59,70,80],"tbody",{},[47,60,61,67],{},[62,63,64],"td",{},[37,65,66],{},"quest_name",[62,68,69],{},"Unique identifier for the quest",[47,71,72,77],{},[62,73,74],{},[37,75,76],{},"goal_name",[62,78,79],{},"A sub-objective within the quest",[47,81,82,87],{},[62,83,84],{},[37,85,86],{},"stage_name",[62,88,89],{},"The current state\u002Flog entry of that goal",[91,92,94,95,98],"h3",{"id":93},"the-special-main-goal","The Special ",[37,96,97],{},"main"," Goal",[15,100,101,102,104],{},"The goal with ID ",[37,103,97],{}," is special - it becomes the quest's visible title in the player's journal.",[30,106,109],{"className":107,"code":108,"language":35},[33],"$explore.main\nLearning Fundamentals\n\n$explore.main.lets_do_it\nI need to go to Riko's bedroom and explore it.\n",[37,110,108],{"__ignoreMap":39},[15,112,113,114,117],{},"Here, \"Learning Fundamentals\" appears as the quest title because it's under ",[37,115,116],{},"$explore.main",".",[19,119],{},[22,121,123],{"id":122},"defining-quests","Defining Quests",[15,125,126,127,130,131,134,135,138],{},"Quests are defined as ",[37,128,129],{},"$templates"," anywhere in your dungeon document. Unlike rooms (",[37,132,133],{},"^",") or scenes (",[37,136,137],{},"#","), templates aren't tied to specific rooms.",[91,140,142],{"id":141},"basic-quest-example","Basic Quest Example",[30,144,147],{"className":145,"code":146,"language":35},[33],"$rescue.main\nRescue the Villager\n\n$rescue.main.started\nFind the kidnapped villager in the forest.\n\n$rescue.find_key\nFind the Key\n\n$rescue.find_key.start\nI need to find a key to unlock the cell.\n\n$rescue.find_key.found{progress: 1}\nI found the rusty key under the guard's table.\n\n$rescue.main.complete{progress: 2}\nI rescued the villager and brought them to safety.\n",[37,148,146],{"__ignoreMap":39},[15,150,151],{},"This creates:",[153,154,155,159,162],"ul",{},[156,157,158],"li",{},"A quest titled \"Rescue the Villager\"",[156,160,161],{},"Two goals: the main quest line and \"Find the Key\"",[156,163,164],{},"Multiple stages with journal entries",[19,166],{},[22,168,170],{"id":169},"triggering-quests","Triggering Quests",[15,172,173,174,177],{},"Use the ",[37,175,176],{},"quest"," action to add or advance quests:",[30,179,182],{"className":180,"code":181,"language":35},[33],"{quest: \"rescue.main.started\"}\n",[37,183,181],{"__ignoreMap":39},[15,185,186],{},"This:",[188,189,190,193,196],"ol",{},[156,191,192],{},"Adds the quest to the journal (if not already there)",[156,194,195],{},"Adds\u002Factivates the goal (if not already there)",[156,197,198],{},"Sets the current stage and displays its text",[91,200,202],{"id":201},"multiple-quests-at-once","Multiple Quests at Once",[30,204,207],{"className":205,"code":206,"language":35},[33],"{quest: \"rescue.main.started, rescue.find_key.start, explore.main.begin\"}\n",[37,208,206],{"__ignoreMap":39},[19,210],{},[22,212,214],{"id":213},"completing-goals-and-quests","Completing Goals and Quests",[15,216,217,218,221],{},"Attach the ",[37,219,220],{},"progress"," action to a stage template:",[41,223,224,234],{},[44,225,226],{},[47,227,228,231],{},[50,229,230],{},"Value",[50,232,233],{},"Effect",[57,235,236,246],{},[47,237,238,243],{},[62,239,240],{},[37,241,242],{},"{progress: 1}",[62,244,245],{},"Marks the goal as complete",[47,247,248,253],{},[62,249,250],{},[37,251,252],{},"{progress: 2}",[62,254,255],{},"Marks the entire quest as complete",[91,257,259],{"id":258},"example","Example",[30,261,264],{"className":262,"code":263,"language":35},[33],"$rescue.find_key.found{progress: 1}\nI found the rusty key under the guard's table.\n\n$rescue.main.complete{progress: 2}\nI rescued the villager and brought them to safety.\n",[37,265,263],{"__ignoreMap":39},[15,267,268,269,272],{},"When you trigger ",[37,270,271],{},"{quest: \"rescue.find_key.found\"}",", the \"Find the Key\" goal is marked complete.",[15,274,268,275,278],{},[37,276,277],{},"{quest: \"rescue.main.complete\"}",", the entire \"Rescue the Villager\" quest is marked complete.",[19,280],{},[22,282,284],{"id":283},"quest-flow-example","Quest Flow Example",[15,286,287],{},"Here's a complete workflow in a dungeon document:",[30,289,292],{"className":290,"code":291,"language":35},[33],"^tavern\n#talk_to_barkeep{if: true}\n1\n%\nbarkeep: Help! My daughter was taken by bandits!\n{quest: \"rescue.main.started\"}\n\n^forest\n@clearing\n!search_camp\nA bandit camp lies ahead.\n\n#clearing~search_camp\n1\n%\nYou find a rusty key under the guard's table.\n{quest: \"rescue.find_key.found\"}\n\n^dungeon\n#free_villager\n1\n%\nYou unlock the cell and free the villager.\n{quest: \"rescue.main.complete\"}\n\n\u002F\u002F Quest templates (can be anywhere in the document)\n$rescue.main\nRescue the Villager\n\n$rescue.main.started\nFind the kidnapped villager in the forest.\n\n$rescue.find_key\nFind the Key\n\n$rescue.find_key.start\nSearch the bandit camp for a key.\n\n$rescue.find_key.found{progress: 1}\nI found the rusty key.\n\n$rescue.main.complete{progress: 2}\nI rescued the villager!\n",[37,293,291],{"__ignoreMap":39},[19,295],{},[22,297,299],{"id":298},"viewing-quests","Viewing Quests",[15,301,302],{},"Players can view their quest journal by:",[188,304,305,308],{},[156,306,307],{},"Opening the progression panel (top-left sidebar)",[156,309,310],{},"Clicking the quest Tab in the UI",[15,312,313],{},"The journal shows:",[153,315,316,319,322],{},[156,317,318],{},"Active quests with their current stage text",[156,320,321],{},"Completed goals (crossed out or marked)",[156,323,324,325,328],{},"Completed quests (in a separate section if ",[37,326,327],{},"is_show_completed_quests"," state is true)",[19,330],{},[22,332,334],{"id":333},"api-reference","API Reference",[91,336,338],{"id":337},"actions","Actions",[41,340,341,352],{},[44,342,343],{},[47,344,345,348,350],{},[50,346,347],{},"Action",[50,349,55],{},[50,351,259],{},[57,353,354,368],{},[47,355,356,360,363],{},[62,357,358],{},[37,359,176],{},[62,361,362],{},"Add\u002Fadvance a quest stage",[62,364,365],{},[37,366,367],{},"{quest: \"rescue.main.started\"}",[47,369,370,374,377],{},[62,371,372],{},[37,373,220],{},[62,375,376],{},"Mark goal\u002Fquest complete (template only)",[62,378,379,381,382],{},[37,380,242],{}," or ",[37,383,252],{},[91,385,387],{"id":386},"game-methods","Game Methods",[30,389,393],{"className":390,"code":391,"language":392,"meta":39,"style":39},"language-js shiki shiki-themes github-light github-dark","\u002F\u002F Get quest title\nconst title = game.getQuestTitle(\"dungeon_id\", \"quest_id\");\n\n\u002F\u002F Get goal title\nconst goal = game.getGoalTitle(\"dungeon_id\", \"quest_id\", \"goal_id\");\n\n\u002F\u002F Add a quest log entry programmatically\ngame.addQuestLog(\"dungeon_id\", \"quest_id\", \"goal_id\", \"stage_id\");\n","js",[37,394,395,404,442,449,455,485,490,496],{"__ignoreMap":39},[396,397,400],"span",{"class":398,"line":399},"line",1,[396,401,403],{"class":402},"sJ8bj","\u002F\u002F Get quest title\n",[396,405,407,411,415,418,422,426,429,433,436,439],{"class":398,"line":406},2,[396,408,410],{"class":409},"szBVR","const",[396,412,414],{"class":413},"sj4cs"," title",[396,416,417],{"class":409}," =",[396,419,421],{"class":420},"sVt8B"," game.",[396,423,425],{"class":424},"sScJk","getQuestTitle",[396,427,428],{"class":420},"(",[396,430,432],{"class":431},"sZZnC","\"dungeon_id\"",[396,434,435],{"class":420},", ",[396,437,438],{"class":431},"\"quest_id\"",[396,440,441],{"class":420},");\n",[396,443,445],{"class":398,"line":444},3,[396,446,448],{"emptyLinePlaceholder":447},true,"\n",[396,450,452],{"class":398,"line":451},4,[396,453,454],{"class":402},"\u002F\u002F Get goal title\n",[396,456,458,460,463,465,467,470,472,474,476,478,480,483],{"class":398,"line":457},5,[396,459,410],{"class":409},[396,461,462],{"class":413}," goal",[396,464,417],{"class":409},[396,466,421],{"class":420},[396,468,469],{"class":424},"getGoalTitle",[396,471,428],{"class":420},[396,473,432],{"class":431},[396,475,435],{"class":420},[396,477,438],{"class":431},[396,479,435],{"class":420},[396,481,482],{"class":431},"\"goal_id\"",[396,484,441],{"class":420},[396,486,488],{"class":398,"line":487},6,[396,489,448],{"emptyLinePlaceholder":447},[396,491,493],{"class":398,"line":492},7,[396,494,495],{"class":402},"\u002F\u002F Add a quest log entry programmatically\n",[396,497,499,502,505,507,509,511,513,515,517,519,522],{"class":398,"line":498},8,[396,500,501],{"class":420},"game.",[396,503,504],{"class":424},"addQuestLog",[396,506,428],{"class":420},[396,508,432],{"class":431},[396,510,435],{"class":420},[396,512,438],{"class":431},[396,514,435],{"class":420},[396,516,482],{"class":431},[396,518,435],{"class":420},[396,520,521],{"class":431},"\"stage_id\"",[396,523,441],{"class":420},[525,526,527],"style",{},"html pre.shiki code .sJ8bj, html code.shiki .sJ8bj{--shiki-default:#6A737D;--shiki-dark:#6A737D}html pre.shiki code .szBVR, html code.shiki .szBVR{--shiki-default:#D73A49;--shiki-dark:#F97583}html pre.shiki code .sj4cs, html code.shiki .sj4cs{--shiki-default:#005CC5;--shiki-dark:#79B8FF}html pre.shiki code .sVt8B, html code.shiki .sVt8B{--shiki-default:#24292E;--shiki-dark:#E1E4E8}html pre.shiki code .sScJk, html code.shiki .sScJk{--shiki-default:#6F42C1;--shiki-dark:#B392F0}html pre.shiki code .sZZnC, html code.shiki .sZZnC{--shiki-default:#032F62;--shiki-dark:#9ECBFF}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}",{"title":39,"searchDepth":406,"depth":406,"links":529},[530,534,537,540,543,544,545],{"id":24,"depth":406,"text":25,"children":531},[532],{"id":93,"depth":444,"text":533},"The Special main Goal",{"id":122,"depth":406,"text":123,"children":535},[536],{"id":141,"depth":444,"text":142},{"id":169,"depth":406,"text":170,"children":538},[539],{"id":201,"depth":444,"text":202},{"id":213,"depth":406,"text":214,"children":541},[542],{"id":258,"depth":444,"text":259},{"id":283,"depth":406,"text":284},{"id":298,"depth":406,"text":299},{"id":333,"depth":406,"text":334,"children":546},[547,548],{"id":337,"depth":444,"text":338},{"id":386,"depth":444,"text":387},"md",{"plugin":551,"category":552,"page":553},"global_essentials","dungeons","quests","\u002Fdocs\u002Fglobal_essentials\u002Fdungeons\u002Fquests",{"title":5,"description":17},"docs\u002Fglobal_essentials\u002Fdungeons\u002Fquests","qOMp3BOOgVKnkslg3h6t7CcM_mHMdF7YV3FUsr9Tets",1779582260979]