[{"data":1,"prerenderedAt":949},["ShallowReactive",2],{"doc-global_essentials\u002Fmiscellaneous\u002Flore":3},{"id":4,"title":5,"body":6,"description":939,"extension":940,"meta":941,"navigation":606,"path":945,"seo":946,"stem":947,"__hash__":948},"docs\u002Fdocs\u002Fglobal_essentials\u002Fmiscellaneous\u002Flore.md","Lore & Encyclopedia",{"type":7,"value":8,"toc":920},"minimark",[9,13,26,29,48,51,56,61,64,163,169,185,189,192,234,241,244,246,250,253,317,328,330,334,337,361,364,376,379,386,389,399,405,407,411,415,421,456,460,469,475,485,489,494,518,525,527,531,551,670,695,697,701,819,821,825,916],[10,11,5],"h1",{"id":12},"lore-encyclopedia",[14,15,16,17,21,22,25],"p",{},"The lore system gives you ",[18,19,20],"strong",{},"inline hover tooltips"," and a browseable ",[18,23,24],{},"Encyclopedia"," tab from a single source of records. Use it for lore terms (\"Kingdom of Luminaria\"), tutorial concepts (\"Freeze status\"), bestiary entries, NPC profiles – anything the player should be able to look up.",[14,27,28],{},"One source of truth, two render surfaces:",[30,31,32,41],"ul",{},[33,34,35,36,40],"li",{},"Inline ",[37,38,39],"code",{},"[[link]]"," in any text → hover popup with the record's summary, anchored to the link. Supports nested links (popup-in-popup, BG3 \u002F CK3 style).",[33,42,43,44,47],{},"The Encyclopedia tab → browseable codex grouped by tabs and groups, showing the long-form ",[37,45,46],{},"content",".",[49,50],"hr",{},[52,53,55],"h2",{"id":54},"key-concepts","Key Concepts",[57,58,60],"h3",{"id":59},"records","Records",[14,62,63],{},"A record is a single lore\u002Ftutorial entry. It has:",[65,66,67,80],"table",{},[68,69,70],"thead",{},[71,72,73,77],"tr",{},[74,75,76],"th",{},"Field",[74,78,79],{},"Description",[81,82,83,98,108,118,130,143,153],"tbody",{},[71,84,85,91],{},[86,87,88],"td",{},[37,89,90],{},"id",[86,92,93,94,97],{},"Stable id used in ",[37,95,96],{},"[[id]]"," links and from the Encyclopedia trees",[71,99,100,105],{},[86,101,102],{},[37,103,104],{},"title",[86,106,107],{},"Display name shown in tooltips and the Encyclopedia",[71,109,110,115],{},[86,111,112],{},[37,113,114],{},"summary",[86,116,117],{},"Short HTML shown in the inline hover popup",[71,119,120,124],{},[86,121,122],{},[37,123,46],{},[86,125,126,127,129],{},"Long HTML shown in the Encyclopedia tab. Falls back to ",[37,128,114],{}," if empty",[71,131,132,137],{},[86,133,134],{},[37,135,136],{},"image",[86,138,139,140,142],{},"Optional illustration shown above ",[37,141,46],{}," in the Encyclopedia",[71,144,145,150],{},[86,146,147],{},[37,148,149],{},"auto_discovery",[86,151,152],{},"If true, unlocked from game start. If false, must be discovered first (see Discovery below)",[71,154,155,160],{},[86,156,157],{},[37,158,159],{},"tags",[86,161,162],{},"Free-form tags for searching\u002Ffiltering",[14,164,165,166,47],{},"Records are authored in the editor under ",[18,167,168],{},"Narrative > Records",[14,170,171,173,174,176,177,180,181,184],{},[37,172,114],{}," and ",[37,175,46],{}," go through the full text resolution pipeline, so they can contain placeholders, ",[37,178,179],{},"if{}"," conditions, narrative slots, and even nested ",[37,182,183],{},"[[links]]"," to other records.",[57,186,188],{"id":187},"encyclopedia-trees","Encyclopedia Trees",[14,190,191],{},"A tree organizes records into a tab. Each tree has:",[65,193,194,202],{},[68,195,196],{},[71,197,198,200],{},[74,199,76],{},[74,201,79],{},[81,203,204,214,224],{},[71,205,206,211],{},[86,207,208],{},[37,209,210],{},"tab",[86,212,213],{},"Badge label shown in the Encyclopedia sidebar",[71,215,216,221],{},[86,217,218],{},[37,219,220],{},"order",[86,222,223],{},"Lower values appear first",[71,225,226,231],{},[86,227,228],{},[37,229,230],{},"groups[]",[86,232,233],{},"Ordered list of groups (a group is a name + ordered list of record references)",[14,235,236,237,240],{},"Trees are authored in the editor under ",[18,238,239],{},"Narrative > Encyclopedia Trees",". A record can appear in zero, one, or multiple trees – the data is reusable.",[14,242,243],{},"Records that exist but aren't referenced by any tree work fine inline as tooltips; they just won't show up in the Encyclopedia.",[49,245],{},[52,247,249],{"id":248},"inline-link-syntax","Inline Link Syntax",[14,251,252],{},"Drop a record reference into any text that goes through the text transformation pipeline (scene narrative, item descriptions, ability descriptions, quest logs, etc.):",[65,254,255,265],{},[68,256,257],{},[71,258,259,262],{},[74,260,261],{},"Syntax",[74,263,264],{},"Behavior",[81,266,267,276,293,307],{},[71,268,269,273],{},[86,270,271],{},[37,272,96],{},[86,274,275],{},"Standard link. If the record is discovered, renders as a clickable hoverable link. If not discovered, renders as plain text (the record's title). Stealth-gates lore reveals.",[71,277,278,283],{},[86,279,280],{},[37,281,282],{},"[[!id]]",[86,284,285,288,289,292],{},[18,286,287],{},"Discover-on-encounter",". The first time this token is rendered, marks the record as discovered. Useful in scene narrative that introduces a concept (\"you learn about [[!the_kingdom]]\"). After that, all subsequent ",[37,290,291],{},"[[the_kingdom]]"," references show as links.",[71,294,295,300],{},[86,296,297],{},[37,298,299],{},"[[id>label]]",[86,301,302,303,306],{},"Custom display label. Renders the link with ",[37,304,305],{},"label"," instead of the record's title. Lets you say \"the kingdom\" inline instead of always \"Kingdom of Luminaria\".",[71,308,309,314],{},[86,310,311],{},[37,312,313],{},"[[!id>label]]",[86,315,316],{},"Combined: discover-on-encounter with a custom label.",[14,318,319,321,322,324,325,327],{},[37,320,282],{}," discovery only fires for branches that survive ",[37,323,179],{}," conditional evaluation – ",[37,326,282],{}," inside a discarded branch will not unlock the record.",[49,329],{},[52,331,333],{"id":332},"discovery","Discovery",[14,335,336],{},"A record is \"discovered\" if any of these is true:",[338,339,340,349,355],"ol",{},[33,341,342,343,345,346,47],{},"Its ",[37,344,149],{}," field is ",[37,347,348],{},"true",[33,350,351,352,354],{},"A ",[37,353,282],{}," link in some rendered text marked it discovered.",[33,356,351,357,360],{},[37,358,359],{},"{discover_lore: id}"," action ran (see below).",[14,362,363],{},"Discovered records render their inline links and appear with full content in the Encyclopedia. Undiscovered records:",[30,365,366,369],{},[33,367,368],{},"Inline: render as plain text (the record's title).",[33,370,371,372,375],{},"Encyclopedia: appear as ",[37,373,374],{},"???"," in the sidebar; the entry body is locked.",[14,377,378],{},"Discovery state is persisted in saves (Set of discovered ids).",[57,380,382,385],{"id":381},"discover_lore-action",[37,383,384],{},"discover_lore"," action",[14,387,388],{},"Fires inside any event\u002Fscene action JSON. Accepts a single id or a comma-separated list:",[390,391,396],"pre",{"className":392,"code":394,"language":395},[393],"language-text","{discover_lore: \"kingdom_of_luminaria\"}\n{discover_lore: \"kingdom_of_luminaria, riko_diary, freeze_status\"}\n","text",[37,397,394],{"__ignoreMap":398},"",[14,400,401,402,404],{},"Use this when you want discovery without relying on ",[37,403,282],{}," rendering – for example, on entering a room, completing a quest, or looting an item.",[49,406],{},[52,408,410],{"id":409},"authoring-workflow","Authoring Workflow",[57,412,414],{"id":413},"step-1-create-records","Step 1: Create records",[14,416,417,418,420],{},"Go to ",[18,419,168],{},", click new, fill in:",[30,422,423,431,438,443,451],{},[33,424,425,427,428],{},[37,426,90],{},": e.g. ",[37,429,430],{},"kingdom_of_luminaria",[33,432,433,427,435],{},[37,434,104],{},[37,436,437],{},"Kingdom of Luminaria",[33,439,440,442],{},[37,441,114],{},": 1–2 sentence description shown in tooltip popups.",[33,444,445,447,448,450],{},[37,446,46],{},": Long-form description for the Encyclopedia (or leave empty to reuse ",[37,449,114],{},").",[33,452,453,455],{},[37,454,149],{},": leave on for tutorial entries that should be visible from the start; turn off for lore that's revealed progressively.",[57,457,459],{"id":458},"step-2-reference-records-inline","Step 2: Reference records inline",[14,461,462,463,465,466,468],{},"In any text content, write ",[37,464,96],{}," (or ",[37,467,299],{},"):",[390,470,473],{"className":471,"code":472,"language":395},[393],"The road leads west toward [[kingdom_of_luminaria]], past the [[!ironwood_forest]].\n",[37,474,472],{"__ignoreMap":398},[14,476,477,478,480,481,484],{},"When the player reads this scene, ",[37,479,430],{}," shows as a hoverable link if discovered, and ",[37,482,483],{},"ironwood_forest"," is automatically discovered on first read.",[57,486,488],{"id":487},"step-3-build-the-encyclopedia","Step 3: Build the Encyclopedia",[14,490,417,491,493],{},[18,492,239],{},", create one tree per top-level tab in the Encyclopedia UI. For each tree:",[30,495,496,502,507],{},[33,497,498,499,501],{},"Set ",[37,500,210],{}," (the visible badge label), e.g. \"Bestiary\", \"Lore\", \"Tutorial\"",[33,503,498,504,506],{},[37,505,220],{}," (lower = appears first)",[33,508,509,510,513,514,517],{},"Add ",[37,511,512],{},"groups",", each with a ",[37,515,516],{},"name"," and an ordered list of records",[14,519,520,521,524],{},"Records can appear in multiple trees. Order within a group is preserved (use ",[37,522,523],{},"schema[]"," with reorder controls in the editor).",[49,526],{},[52,528,530],{"id":529},"rendering-dryadscript-text-in-custom-components","Rendering DryadScript text in custom components",[14,532,533,534,537,538,543,544,547,548,550],{},"If you build your own Vue component (a plugin, a custom progression panel, etc.) that displays text containing ",[37,535,536],{},"[[lore-links]]",", placeholders, or any other DryadScript syntax, use the ",[18,539,540],{},[37,541,542],{},"v-script"," directive instead of ",[37,545,546],{},"v-html",". It runs the text through the engine's resolver and attaches the hover\u002Fclick event delegation that opens lore popups; with plain ",[37,549,546],{}," the styled link would render but it wouldn't react to hover or click.",[390,552,556],{"className":553,"code":554,"language":555,"meta":398,"style":398},"language-js shiki shiki-themes github-light github-dark","const { vue } = window.engine;\nconst { defineComponent } = vue;\n\nconst MyPanel = defineComponent({\n    props: ['choice'],\n    template: \u002F*html*\u002F `\n        \u003Cdiv v-if=\"choice?.description\" v-script=\"choice.description\" class=\"my-description\">\u003C\u002Fdiv>\n    `\n});\n","js",[37,557,558,584,601,608,626,639,652,658,664],{"__ignoreMap":398},[559,560,563,567,571,575,578,581],"span",{"class":561,"line":562},"line",1,[559,564,566],{"class":565},"szBVR","const",[559,568,570],{"class":569},"sVt8B"," { ",[559,572,574],{"class":573},"sj4cs","vue",[559,576,577],{"class":569}," } ",[559,579,580],{"class":565},"=",[559,582,583],{"class":569}," window.engine;\n",[559,585,587,589,591,594,596,598],{"class":561,"line":586},2,[559,588,566],{"class":565},[559,590,570],{"class":569},[559,592,593],{"class":573},"defineComponent",[559,595,577],{"class":569},[559,597,580],{"class":565},[559,599,600],{"class":569}," vue;\n",[559,602,604],{"class":561,"line":603},3,[559,605,607],{"emptyLinePlaceholder":606},true,"\n",[559,609,611,613,616,619,623],{"class":561,"line":610},4,[559,612,566],{"class":565},[559,614,615],{"class":573}," MyPanel",[559,617,618],{"class":565}," =",[559,620,622],{"class":621},"sScJk"," defineComponent",[559,624,625],{"class":569},"({\n",[559,627,629,632,636],{"class":561,"line":628},5,[559,630,631],{"class":569},"    props: [",[559,633,635],{"class":634},"sZZnC","'choice'",[559,637,638],{"class":569},"],\n",[559,640,642,645,649],{"class":561,"line":641},6,[559,643,644],{"class":569},"    template: ",[559,646,648],{"class":647},"sJ8bj","\u002F*html*\u002F",[559,650,651],{"class":634}," `\n",[559,653,655],{"class":561,"line":654},7,[559,656,657],{"class":634},"        \u003Cdiv v-if=\"choice?.description\" v-script=\"choice.description\" class=\"my-description\">\u003C\u002Fdiv>\n",[559,659,661],{"class":561,"line":660},8,[559,662,663],{"class":634},"    `\n",[559,665,667],{"class":561,"line":666},9,[559,668,669],{"class":569},"});\n",[14,671,672,673,678,679,681,682,685,686,685,689,685,692,450],{},"See ",[674,675,677],"a",{"href":676},"\u002Fdocs\u002Fglobal_essentials\u002Fadvanced\u002Fcustom_vue","Custom Vue Features"," for ",[37,680,542],{},"'s full options (object form with ",[37,683,684],{},"resolver",", ",[37,687,688],{},"navMode",[37,690,691],{},"onNavigate",[37,693,694],{},"disabled",[49,696],{},[52,698,700],{"id":699},"scripting-api","Scripting API",[390,702,704],{"className":553,"code":703,"language":555,"meta":398,"style":398},"\u002F\u002F Get a record's data\nconst record = game.getRecord('kingdom_of_luminaria');\n\n\u002F\u002F Mark a record discovered (persists in save)\ngame.discoverRecord('kingdom_of_luminaria');\n\n\u002F\u002F Check discovery\nif (game.isRecordDiscovered('kingdom_of_luminaria')) { ... }\n\n\u002F\u002F Get all encyclopedia trees, sorted by order\nconst trees = game.getEncyclopediaTrees();\n",[37,705,706,711,735,739,744,758,762,767,791,795,801],{"__ignoreMap":398},[559,707,708],{"class":561,"line":562},[559,709,710],{"class":647},"\u002F\u002F Get a record's data\n",[559,712,713,715,718,720,723,726,729,732],{"class":561,"line":586},[559,714,566],{"class":565},[559,716,717],{"class":573}," record",[559,719,618],{"class":565},[559,721,722],{"class":569}," game.",[559,724,725],{"class":621},"getRecord",[559,727,728],{"class":569},"(",[559,730,731],{"class":634},"'kingdom_of_luminaria'",[559,733,734],{"class":569},");\n",[559,736,737],{"class":561,"line":603},[559,738,607],{"emptyLinePlaceholder":606},[559,740,741],{"class":561,"line":610},[559,742,743],{"class":647},"\u002F\u002F Mark a record discovered (persists in save)\n",[559,745,746,749,752,754,756],{"class":561,"line":628},[559,747,748],{"class":569},"game.",[559,750,751],{"class":621},"discoverRecord",[559,753,728],{"class":569},[559,755,731],{"class":634},[559,757,734],{"class":569},[559,759,760],{"class":561,"line":641},[559,761,607],{"emptyLinePlaceholder":606},[559,763,764],{"class":561,"line":654},[559,765,766],{"class":647},"\u002F\u002F Check discovery\n",[559,768,769,772,775,778,780,782,785,788],{"class":561,"line":660},[559,770,771],{"class":565},"if",[559,773,774],{"class":569}," (game.",[559,776,777],{"class":621},"isRecordDiscovered",[559,779,728],{"class":569},[559,781,731],{"class":634},[559,783,784],{"class":569},")) { ",[559,786,787],{"class":565},"...",[559,789,790],{"class":569}," }\n",[559,792,793],{"class":561,"line":666},[559,794,607],{"emptyLinePlaceholder":606},[559,796,798],{"class":561,"line":797},10,[559,799,800],{"class":647},"\u002F\u002F Get all encyclopedia trees, sorted by order\n",[559,802,804,806,809,811,813,816],{"class":561,"line":803},11,[559,805,566],{"class":565},[559,807,808],{"class":573}," trees",[559,810,618],{"class":565},[559,812,722],{"class":569},[559,814,815],{"class":621},"getEncyclopediaTrees",[559,817,818],{"class":569},"();\n",[49,820],{},[52,822,824],{"id":823},"quick-reference","Quick Reference",[65,826,827,837],{},[68,828,829],{},[71,830,831,834],{},[74,832,833],{},"I want to...",[74,835,836],{},"Do this",[81,838,839,847,855,865,875,884,895,905],{},[71,840,841,844],{},[86,842,843],{},"Define a lore\u002Ftutorial entry",[86,845,846],{},"Narrative > Records – set id, title, summary, content",[71,848,849,852],{},[86,850,851],{},"Group entries into Encyclopedia tabs",[86,853,854],{},"Narrative > Encyclopedia Trees – set tab, order, groups",[71,856,857,860],{},[86,858,859],{},"Show a hover tooltip in scene text",[86,861,862,863],{},"Write ",[37,864,96],{},[71,866,867,870],{},[86,868,869],{},"Show a tooltip with custom label",[86,871,862,872],{},[37,873,874],{},"[[id>the kingdom]]",[71,876,877,880],{},[86,878,879],{},"Discover a record on first scene read",[86,881,862,882],{},[37,883,282],{},[71,885,886,889],{},[86,887,888],{},"Discover a record from an action",[86,890,891,892],{},"Use ",[37,893,894],{},"{discover_lore: \"id\"}",[71,896,897,900],{},[86,898,899],{},"Check discovery in a script",[86,901,902],{},[37,903,904],{},"game.isRecordDiscovered(id)",[71,906,907,910],{},[86,908,909],{},"Auto-unlock from game start",[86,911,498,912,915],{},[37,913,914],{},"auto_discovery: true"," on the record",[917,918,919],"style",{},"html pre.shiki code .szBVR, html code.shiki .szBVR{--shiki-default:#D73A49;--shiki-dark:#F97583}html pre.shiki code .sVt8B, html code.shiki .sVt8B{--shiki-default:#24292E;--shiki-dark:#E1E4E8}html pre.shiki code .sj4cs, html code.shiki .sj4cs{--shiki-default:#005CC5;--shiki-dark:#79B8FF}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 pre.shiki code .sJ8bj, html code.shiki .sJ8bj{--shiki-default:#6A737D;--shiki-dark:#6A737D}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":398,"searchDepth":586,"depth":586,"links":921},[922,926,927,931,936,937,938],{"id":54,"depth":586,"text":55,"children":923},[924,925],{"id":59,"depth":603,"text":60},{"id":187,"depth":603,"text":188},{"id":248,"depth":586,"text":249},{"id":332,"depth":586,"text":333,"children":928},[929],{"id":381,"depth":603,"text":930},"discover_lore action",{"id":409,"depth":586,"text":410,"children":932},[933,934,935],{"id":413,"depth":603,"text":414},{"id":458,"depth":603,"text":459},{"id":487,"depth":603,"text":488},{"id":529,"depth":586,"text":530},{"id":699,"depth":586,"text":700},{"id":823,"depth":586,"text":824},"The lore system gives you inline hover tooltips and a browseable Encyclopedia tab from a single source of records. Use it for lore terms (\"Kingdom of Luminaria\"), tutorial concepts (\"Freeze status\"), bestiary entries, NPC profiles – anything the player should be able to look up.","md",{"plugin":942,"category":943,"page":944},"global_essentials","miscellaneous","lore","\u002Fdocs\u002Fglobal_essentials\u002Fmiscellaneous\u002Flore",{"title":5,"description":939},"docs\u002Fglobal_essentials\u002Fmiscellaneous\u002Flore","SMiw4PcmRYmBwyIeY9E3LLSVL-wwpxB_nT-idWXJcik",1779582261739]