[{"data":1,"prerenderedAt":992},["ShallowReactive",2],{"doc-global_essentials\u002Fbuiltins\u002Factions":3},{"id":4,"title":5,"body":6,"description":17,"extension":983,"meta":984,"navigation":214,"path":988,"seo":989,"stem":990,"__hash__":991},"docs\u002Fdocs\u002Fglobal_essentials\u002Fbuiltins\u002Factions.md","Actions",{"type":7,"value":8,"toc":969},"minimark",[9,14,18,21,26,175,180,228,230,234,460,462,466,496,498,504,510,518,528,534,538,778,789,796,823,843,845,849,965],[10,11,13],"h1",{"id":12},"actions-reference","Actions Reference",[15,16,17],"p",{},"All built-in actions for scenes and choices.",[19,20],"hr",{},[22,23,25],"h2",{"id":24},"core-actions","Core Actions",[27,28,29,48],"table",{},[30,31,32],"thead",{},[33,34,35,39,42,45],"tr",{},[36,37,38],"th",{},"Action",[36,40,41],{},"Description",[36,43,44],{},"Example",[36,46,47],{},"Delayed",[49,50,51,70,87,104,126,155],"tbody",{},[33,52,53,60,63,68],{},[54,55,56],"td",{},[57,58,59],"code",{},"notification",[54,61,62],{},"Display a notification popup",[54,64,65],{},[57,66,67],{},"\"Hello!\"",[54,69],{},[33,71,72,77,80,85],{},[54,73,74],{},[57,75,76],{},"flash",[54,78,79],{},"Display a flash message",[54,81,82],{},[57,83,84],{},"\"Item received!\"",[54,86],{},[33,88,89,94,97,102],{},[54,90,91],{},[57,92,93],{},"state",[54,95,96],{},"Set game states",[54,98,99],{},[57,100,101],{},"\"game_state=battle, disable_ui=true\"",[54,103],{},[33,105,106,111,114,123],{},[54,107,108],{},[57,109,110],{},"popup",[54,112,113],{},"Open a popup or close current popup",[54,115,116,119,120],{},[57,117,118],{},"\"my-popup\""," or ",[57,121,122],{},"false",[54,124,125],{},"✓",[33,127,128,133,148,153],{},[54,129,130],{},[57,131,132],{},"property",[54,134,135,136,139,140,143,144,147],{},"Modify game properties (",[57,137,138],{},"="," set, ",[57,141,142],{},">"," add, ",[57,145,146],{},"\u003C"," subtract)",[54,149,150],{},[57,151,152],{},"\"gold>100, score=0\"",[54,154],{},[33,156,157,162,165,173],{},[54,158,159],{},[57,160,161],{},"discover_lore",[54,163,164],{},"Mark one or more lore records as discovered",[54,166,167,119,170],{},[57,168,169],{},"\"kingdom_of_luminaria\"",[57,171,172],{},"\"goblins, orcs, trolls\"",[54,174],{},[176,177,179],"h3",{"id":178},"property-examples","property Examples",[181,182,187],"pre",{"className":183,"code":184,"language":185,"meta":186,"style":186},"language-javascript shiki shiki-themes github-light github-dark","\u002F\u002F String format (= set, > add, \u003C subtract)\n{ property: \"gold>100\" }           \u002F\u002F add 100 to gold\n{ property: \"score=0, lives\u003C1\" }   \u002F\u002F set score to 0, subtract 1 from lives\n\n\u002F\u002F Object format (for setting complex values)\n{ property: { settings: { volume: 80, theme: \"dark\" } } }\n","javascript","",[57,188,189,197,203,209,216,222],{"__ignoreMap":186},[190,191,194],"span",{"class":192,"line":193},"line",1,[190,195,196],{},"\u002F\u002F String format (= set, > add, \u003C subtract)\n",[190,198,200],{"class":192,"line":199},2,[190,201,202],{},"{ property: \"gold>100\" }           \u002F\u002F add 100 to gold\n",[190,204,206],{"class":192,"line":205},3,[190,207,208],{},"{ property: \"score=0, lives\u003C1\" }   \u002F\u002F set score to 0, subtract 1 from lives\n",[190,210,212],{"class":192,"line":211},4,[190,213,215],{"emptyLinePlaceholder":214},true,"\n",[190,217,219],{"class":192,"line":218},5,[190,220,221],{},"\u002F\u002F Object format (for setting complex values)\n",[190,223,225],{"class":192,"line":224},6,[190,226,227],{},"{ property: { settings: { volume: 80, theme: \"dark\" } } }\n",[19,229],{},[22,231,233],{"id":232},"dungeon-actions","Dungeon Actions",[27,235,236,248],{},[30,237,238],{},[33,239,240,242,244,246],{},[36,241,38],{},[36,243,41],{},[36,245,44],{},[36,247,47],{},[49,249,250,267,284,304,327,342,359,376,393,410,426,443],{},[33,251,252,257,260,265],{},[54,253,254],{},[57,255,256],{},"music",[54,258,259],{},"Play background music",[54,261,262],{},[57,263,264],{},"\"battle_theme\"",[54,266],{},[33,268,269,274,277,282],{},[54,270,271],{},[57,272,273],{},"sound",[54,275,276],{},"Play a sound effect",[54,278,279],{},[57,280,281],{},"\"sword_slash\"",[54,283],{},[33,285,286,291,294,302],{},[54,287,288],{},[57,289,290],{},"asset",[54,292,293],{},"Add, update, or remove assets(!)",[54,295,296,119,299],{},[57,297,298],{},"\"bg1, alice(x=50)\"",[57,300,301],{},"\"!bg1\"",[54,303],{},[33,305,306,311,320,325],{},[54,307,308],{},[57,309,310],{},"flag",[54,312,313,314,139,316,143,318,147],{},"Set flags (",[57,315,138],{},[57,317,142],{},[57,319,146],{},[54,321,322],{},[57,323,324],{},"\"gold>10, count=5\"",[54,326],{},[33,328,329,334,337,340],{},[54,330,331],{},[57,332,333],{},"exit",[54,335,336],{},"Exit current scene",[54,338,339],{},"true",[54,341,125],{},[33,343,344,349,352,357],{},[54,345,346],{},[57,347,348],{},"enter",[54,350,351],{},"Enter a room",[54,353,354],{},[57,355,356],{},"\"room5\"",[54,358,125],{},[33,360,361,366,369,374],{},[54,362,363],{},[57,364,365],{},"scene",[54,367,368],{},"Play a scene",[54,370,371],{},[57,372,373],{},"\"intro_scene\"",[54,375,125],{},[33,377,378,383,386,391],{},[54,379,380],{},[57,381,382],{},"redirect",[54,384,385],{},"Redirect to a scene",[54,387,388],{},[57,389,390],{},"\"&alt_scene\"",[54,392],{},[33,394,395,400,403,408],{},[54,396,397],{},[57,398,399],{},"choices",[54,401,402],{},"Load choices from a scene",[54,404,405],{},[57,406,407],{},"\"&choice_scene\"",[54,409],{},[33,411,412,417,420,424],{},[54,413,414],{},[57,415,416],{},"choices_over",[54,418,419],{},"Load choices (override mode: hide default scene ~choices)",[54,421,422],{},[57,423,407],{},[54,425],{},[33,427,428,433,436,441],{},[54,429,430],{},[57,431,432],{},"actor",[54,434,435],{},"Add, move, or remove actors",[54,437,438],{},[57,439,440],{},"\"alice->center, bob->left\"",[54,442],{},[33,444,445,450,453,458],{},[54,446,447],{},[57,448,449],{},"quest",[54,451,452],{},"Add quest log entry",[54,454,455],{},[57,456,457],{},"\"main_quest.goal1.log1\"",[54,459],{},[19,461],{},[22,463,465],{"id":464},"scene-params","Scene Params",[27,467,468,479],{},[30,469,470],{},[33,471,472,475,477],{},[36,473,474],{},"Param",[36,476,41],{},[36,478,44],{},[49,480,481],{},[33,482,483,488,491],{},[54,484,485],{},[57,486,487],{},"intro",[54,489,490],{},"Play block 1 on first visit, block 2 on repeat visits",[54,492,493],{},[57,494,495],{},"{intro: true}",[176,497,487],{"id":487},[15,499,500,501,503],{},"Add ",[57,502,495],{}," to the first paragraph of a scene. On the first visit, column 1 plays normally. On any subsequent visit, the engine skips column 1 and plays column 2 instead.",[15,505,506],{},[507,508,509],"strong",{},"Example (DryadScript):",[181,511,516],{"className":512,"code":514,"language":515},[513],"language-text","#npc~talk{intro: true}\n1\n%\nThe old man looks up from his desk.\n\nold_man: Ah, a visitor. I am Gareth, the keeper of this archive.\n\nold_man: What brings you here?\n%\nGareth nods as you approach.\n\nold_man: Back again? What do you need?\n","text",[57,517,514],{"__ignoreMap":186},[15,519,520,521,524,525,527],{},"Column 1 (before ",[57,522,523],{},"%",") plays on first visit. Column 2 (after ",[57,526,523],{},") plays on every subsequent visit. Both share the same choices below.",[15,529,530,533],{},[507,531,532],{},"Note:"," Column 2 must exist. If missing, the engine logs an error.",[22,535,537],{"id":536},"character-actions","Character Actions",[27,539,540,552],{},[30,541,542],{},[33,543,544,546,548,550],{},[36,545,38],{},[36,547,41],{},[36,549,44],{},[36,551,47],{},[49,553,554,571,588,605,622,639,664,687,717,739,761],{},[33,555,556,561,564,569],{},[54,557,558],{},[57,559,560],{},"join_party",[54,562,563],{},"Add character to party",[54,565,566],{},[57,567,568],{},"\"alice, bob\"",[54,570],{},[33,572,573,578,581,586],{},[54,574,575],{},[57,576,577],{},"leave_party",[54,579,580],{},"Remove character from party",[54,582,583],{},[57,584,585],{},"\"alice\"",[54,587],{},[33,589,590,595,598,603],{},[54,591,592],{},[57,593,594],{},"create_character",[54,596,597],{},"Create a new character",[54,599,600],{},[57,601,602],{},"{ id: \"npc1\", template: \"villager\" }",[54,604],{},[33,606,607,612,615,620],{},[54,608,609],{},[57,610,611],{},"update_character",[54,613,614],{},"Update character properties",[54,616,617],{},[57,618,619],{},"{ id: \"alice\", party: true }",[54,621],{},[33,623,624,629,632,637],{},[54,625,626],{},[57,627,628],{},"delete_character",[54,630,631],{},"Delete a character",[54,633,634],{},[57,635,636],{},"{ id: \"npc1\" }",[54,638],{},[33,640,641,646,657,662],{},[54,642,643],{},[57,644,645],{},"status",[54,647,648,649,652,653,656],{},"Apply \u002F remove status effects per target. ",[57,650,651],{},"&"," separates items; ",[57,654,655],{},"!"," prefix removes",[54,658,659],{},[57,660,661],{},"\"alice->buff1 & buff2, bob->!debuff\"",[54,663],{},[33,665,666,671,680,685],{},[54,667,668],{},[57,669,670],{},"char",[54,672,673,674,139,676,143,678,147],{},"Modify character property (",[57,675,138],{},[57,677,142],{},[57,679,146],{},[54,681,682],{},[57,683,684],{},"\"alice.resource.health>10\"",[54,686],{},[33,688,689,691,710,715],{},[54,690],{},[54,692,693,694,697,698,697,701,697,704,697,707],{},"Types: ",[57,695,696],{},"trait",", ",[57,699,700],{},"attribute",[57,702,703],{},"stat",[57,705,706],{},"resource",[57,708,709],{},"skinStyle",[54,711,712],{},[57,713,714],{},"\"mc.attribute.belly=2\"",[54,716],{},[33,718,719,724,732,737],{},[54,720,721],{},[57,722,723],{},"skin_layer",[54,725,726,727,729,730,656],{},"Add \u002F remove skin layers per target. ",[57,728,651],{}," separates layers; ",[57,731,655],{},[54,733,734],{},[57,735,736],{},"\"alice->armor & helmet, bob->!cloak\"",[54,738],{},[33,740,741,746,754,759],{},[54,742,743],{},[57,744,745],{},"item_slot",[54,747,748,749,751,752,656],{},"Add \u002F remove equipment slots per target. ",[57,750,651],{}," separates slots; ",[57,753,655],{},[54,755,756],{},[57,757,758],{},"\"alice->ring & necklace, bob->!belt\"",[54,760],{},[33,762,763,768,771,776],{},[54,764,765],{},[57,766,767],{},"skill",[54,769,770],{},"Learn a skill for character",[54,772,773],{},[57,774,775],{},"\"alice.fire_magic.fireball\"",[54,777],{},[176,779,781,782,697,784,697,786,788],{"id":780},"targeted-spec-syntax-status-skin_layer-item_slot","Targeted-spec syntax (",[57,783,645],{},[57,785,723],{},[57,787,745],{},")",[15,790,791,792,795],{},"Each action takes a string of the form ",[57,793,794],{},"targetId->item & item & ..., targetId->!item, ...",":",[797,798,799,803,809],"ul",{},[800,801,802],"li",{},"Comma separates per-target groups.",[800,804,805,806,808],{},"Within a group, ",[57,807,651],{}," separates items.",[800,810,811,812,814,815,818,819,822],{},"Items prefixed with ",[57,813,655],{}," are ",[507,816,817],{},"removed","; bare items are ",[507,820,821],{},"added",".",[181,824,826],{"className":183,"code":825,"language":185,"meta":186,"style":186},"{ status: \"alice->blessed & focused, bob->!cursed\" }\n{ skin_layer: \"mc->armor_dirty, mc->!armor_clean\" }\n{ item_slot: \"alice->extra_ring, bob->!ring_3\" }\n",[57,827,828,833,838],{"__ignoreMap":186},[190,829,830],{"class":192,"line":193},[190,831,832],{},"{ status: \"alice->blessed & focused, bob->!cursed\" }\n",[190,834,835],{"class":192,"line":199},[190,836,837],{},"{ skin_layer: \"mc->armor_dirty, mc->!armor_clean\" }\n",[190,839,840],{"class":192,"line":205},[190,841,842],{},"{ item_slot: \"alice->extra_ring, bob->!ring_3\" }\n",[19,844],{},[22,846,848],{"id":847},"item-actions","Item Actions",[27,850,851,863],{},[30,852,853],{},[33,854,855,857,859,861],{},[36,856,38],{},[36,858,41],{},[36,860,44],{},[36,862,47],{},[49,864,865,881,897,914,931,948],{},[33,866,867,872,875,879],{},[54,868,869],{},[57,870,871],{},"equip_item",[54,873,874],{},"Equip item to character",[54,876,877],{},[57,878,339],{},[54,880],{},[33,882,883,888,891,895],{},[54,884,885],{},[57,886,887],{},"unequip_item",[54,889,890],{},"Unequip item from character",[54,892,893],{},[57,894,339],{},[54,896],{},[33,898,899,904,907,912],{},[54,900,901],{},[57,902,903],{},"add_item",[54,905,906],{},"Add item to inventory",[54,908,909],{},[57,910,911],{},"\"sword, potion#5\"",[54,913],{},[33,915,916,921,924,929],{},[54,917,918],{},[57,919,920],{},"loot",[54,922,923],{},"Open loot exchange",[54,925,926],{},[57,927,928],{},"\"chest_inventory\"",[54,930,125],{},[33,932,933,938,941,946],{},[54,934,935],{},[57,936,937],{},"trade",[54,939,940],{},"Open trade exchange",[54,942,943],{},[57,944,945],{},"\"merchant_inventory\"",[54,947,125],{},[33,949,950,955,958,963],{},[54,951,952],{},[57,953,954],{},"learn_recipe",[54,956,957],{},"Learn a crafting recipe",[54,959,960],{},[57,961,962],{},"\"iron_sword, steel_sword\"",[54,964],{},[966,967,968],"style",{},"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":186,"searchDepth":199,"depth":199,"links":970},[971,974,975,978,982],{"id":24,"depth":199,"text":25,"children":972},[973],{"id":178,"depth":205,"text":179},{"id":232,"depth":199,"text":233},{"id":464,"depth":199,"text":465,"children":976},[977],{"id":487,"depth":205,"text":487},{"id":536,"depth":199,"text":537,"children":979},[980],{"id":780,"depth":205,"text":981},"Targeted-spec syntax (status, skin_layer, item_slot)",{"id":847,"depth":199,"text":848},"md",{"plugin":985,"category":986,"page":987},"global_essentials","builtins","actions","\u002Fdocs\u002Fglobal_essentials\u002Fbuiltins\u002Factions",{"title":5,"description":17},"docs\u002Fglobal_essentials\u002Fbuiltins\u002Factions","U8pwepHxqQcupSoooeR2B2dz9Hm2wVHuBVP3IFsw9Eo",1779582262241]