[{"data":1,"prerenderedAt":289},["ShallowReactive",2],{"doc-global_essentials\u002Fbuiltins\u002Fplaceholders":3},{"id":4,"title":5,"body":6,"description":278,"extension":279,"meta":280,"navigation":284,"path":285,"seo":286,"stem":287,"__hash__":288},"docs\u002Fdocs\u002Fglobal_essentials\u002Fbuiltins\u002Fplaceholders.md","Placeholders",{"type":7,"value":8,"toc":271},"minimark",[9,14,22,25,30,153,155,159,174,185,195,197,201,210,216,238,248,254,256,260,263,269],[10,11,13],"h1",{"id":12},"placeholders-reference","Placeholders Reference",[15,16,17,18],"p",{},"Format: ",[19,20,21],"code",{},"|placeholderName(args)|",[23,24],"hr",{},[26,27,29],"h2",{"id":28},"built-in-placeholders","Built-in Placeholders",[31,32,33,49],"table",{},[34,35,36],"thead",{},[37,38,39,43,46],"tr",{},[40,41,42],"th",{},"Placeholder",[40,44,45],{},"Description",[40,47,48],{},"Example",[50,51,52,68,83,98,113,131],"tbody",{},[37,53,54,60,63],{},[55,56,57],"td",{},[19,58,59],{},"flag",[55,61,62],{},"Returns the value of a flag",[55,64,65],{},[19,66,67],{},"You have |flag(gold)| gold",[37,69,70,75,78],{},[55,71,72],{},[19,73,74],{},"property",[55,76,77],{},"Returns the value of a game property",[55,79,80],{},[19,81,82],{},"Score: |property(score)|",[37,84,85,90,93],{},[55,86,87],{},[19,88,89],{},"item",[55,91,92],{},"Returns the name of an item",[55,94,95],{},[19,96,97],{},"You are using |item(uid, invId)|",[37,99,100,105,108],{},[55,101,102],{},[19,103,104],{},"from",[55,106,107],{},"Fetches a locale entry and resolves it through the full pipeline",[55,109,110],{},[19,111,112],{},"|from(greeting_text)|",[37,114,115,120,126],{},[55,116,117],{},[19,118,119],{},"pick",[55,121,122,123,125],{},"Like ",[19,124,104],{},", but randomly selects from numbered locale variants",[55,127,128],{},[19,129,130],{},"|pick(greeting_text)|",[37,132,133,138,148],{},[55,134,135],{},[19,136,137],{},"stat",[55,139,140,141,144,145],{},"Returns a character stat value. Requires ",[19,142,143],{},"context.character"," passed to ",[19,146,147],{},"resolveString",[55,149,150],{},[19,151,152],{},"|stat(power)|",[23,154],{},[26,156,158],{"id":157},"locale-template-composition","Locale Template Composition",[15,160,161,162,165,166,169,170,173],{},"Use ",[19,163,164],{},"|from(localeId)|"," to fetch a locale entry and resolve it through the full pipeline (",[19,167,168],{},"|placeholder|",", ",[19,171,172],{},"if{}",", styles). This enables locale-to-locale template chaining.",[15,175,176,177,180,181,184],{},"Pass inline params with ",[19,178,179],{},"key->value"," syntax — they replace ",[19,182,183],{},"|key|"," tokens in the fetched locale before the full pipeline runs:",[186,187,192],"pre",{"className":188,"code":190,"language":191},[189],"language-text","\u002F\u002F locale entries:\n\u002F\u002F greeting       = \"Hello, |name|! |from(greeting_detail)|\"\n\u002F\u002F greeting_detail = \"if{level > 10}You are a veteran.else{}Welcome, newcomer.fi\"\n\n|from(greeting, name->Alice)|\n\u002F\u002F → \"Hello, Alice! You are a veteran.\"\n","text",[19,193,190],{"__ignoreMap":194},"",[23,196],{},[26,198,200],{"id":199},"random-variant-selection","Random Variant Selection",[15,202,161,203,206,207,209],{},[19,204,205],{},"|pick(baseId)|"," to randomly select from numbered locale variants. Works like ",[19,208,104],{}," but adds variety.",[15,211,212],{},[213,214,215],"strong",{},"Variant naming convention:",[217,218,219,226,232],"ul",{},[220,221,222,225],"li",{},[19,223,224],{},"baseId"," — first variant (required)",[220,227,228,231],{},[19,229,230],{},"baseId_2"," — second variant",[220,233,234,237],{},[19,235,236],{},"baseId_3"," — third variant, etc.",[15,239,240,241,169,243,169,245,247],{},"The engine probes ",[19,242,224],{},[19,244,230],{},[19,246,236],{},"... until no entry is found, then picks one at random.",[186,249,252],{"className":250,"code":251,"language":191},[189],"\u002F\u002F locale entries:\n\u002F\u002F tavern_desc   = \"A quiet tavern with a crackling fire.\"\n\u002F\u002F tavern_desc_2 = \"The tavern buzzes with rowdy patrons.\"\n\u002F\u002F tavern_desc_3 = \"An empty tavern. Dust coats every surface.\"\n\n|pick(tavern_desc)|\n\u002F\u002F → randomly one of the three descriptions\n\n|pick(tavern_desc, name->Alice)|\n\u002F\u002F → key->value params work the same as |from()|\n",[19,253,251],{"__ignoreMap":194},[23,255],{},[26,257,259],{"id":258},"nested-property-paths","Nested Property Paths",[15,261,262],{},"For object-type properties, access nested values with dot notation:",[186,264,267],{"className":265,"code":266,"language":191},[189],"Volume: |property(settings.volume)|%\nTheme: |property(config.ui.theme)|\n",[19,268,266],{"__ignoreMap":194},[23,270],{},{"title":194,"searchDepth":272,"depth":272,"links":273},2,[274,275,276,277],{"id":28,"depth":272,"text":29},{"id":157,"depth":272,"text":158},{"id":199,"depth":272,"text":200},{"id":258,"depth":272,"text":259},"Format: |placeholderName(args)|","md",{"plugin":281,"category":282,"page":283},"global_essentials","builtins","placeholders",true,"\u002Fdocs\u002Fglobal_essentials\u002Fbuiltins\u002Fplaceholders",{"title":5,"description":278},"docs\u002Fglobal_essentials\u002Fbuiltins\u002Fplaceholders","jXStU4RIGPnpJXnjsM77YwTB8xvft-odAnlYUHi-Q5o",1779582262288]