[{"data":1,"prerenderedAt":1468},["ShallowReactive",2],{"doc-global_essentials\u002Fcharacters\u002Fabilities":3},{"id":4,"title":5,"body":6,"description":16,"extension":1460,"meta":1461,"navigation":907,"path":1464,"seo":1465,"stem":1466,"__hash__":1467},"docs\u002Fdocs\u002Fglobal_essentials\u002Fcharacters\u002Fabilities.md","Abilities",{"type":7,"value":8,"toc":1446},"minimark",[9,13,17,44,47,50,55,58,85,88,90,94,99,106,113,187,194,206,209,213,216,222,227,273,279,281,285,291,301,310,319,322,324,328,335,346,351,368,373,393,396,398,402,466,469,482,489,648,650,654,657,663,679,681,685,698,730,740,765,784,792,795,841,852,1029,1031,1035,1045,1084,1087,1133,1151,1156,1298,1301,1316,1341,1343,1347,1442],[10,11,5],"h1",{"id":12},"abilities",[14,15,16],"p",{},"The engine provides a complete ability system:",[18,19,20,28,34],"ol",{},[21,22,23,27],"li",{},[24,25,26],"strong",{},"Define & Author"," — create ability definitions (fields like damage, cooldown, element) and ability templates in the editor",[21,29,30,33],{},[24,31,32],{},"Attach"," — grant abilities to characters through templates, items, skill trees, or buff statuses",[21,35,36,39,40,43],{},[24,37,38],{},"Trigger Battle"," — the built-in ",[24,41,42],{},"Auto Battler"," plugin consumes your abilities for a grid-based battle system with formations, AI, tokens, and damage formulas",[14,45,46],{},"You can use everything out of the box, or build your own battle system (or use a community plugin) on top of the same data layer.",[48,49],"hr",{},[51,52,54],"h2",{"id":53},"abilities-are-part-of-the-status-system","Abilities Are Part of the Status System",[14,56,57],{},"Like everything in the character system, abilities are granted through statuses:",[59,60,61,67,73,79],"ul",{},[21,62,63,66],{},[24,64,65],{},"Character template"," - base abilities the character starts with",[21,68,69,72],{},[24,70,71],{},"Equipped item"," - abilities granted while wearing the item",[21,74,75,78],{},[24,76,77],{},"Learned skill"," - permanent abilities from skill trees",[21,80,81,84],{},[24,82,83],{},"Applied buff"," - temporary abilities from effects",[14,86,87],{},"When a status with abilities is added, the character gains those abilities. When removed, they lose them.",[48,89],{},[51,91,93],{"id":92},"the-two-layer-system","The Two-Layer System",[95,96,98],"h3",{"id":97},"_1-ability-definitions","1. Ability Definitions",[14,100,101,102,105],{},"First, define what ",[24,103,104],{},"fields"," abilities can have in your game.",[14,107,108,109,112],{},"Go to ",[24,110,111],{},"Characters > Ability Definitions"," and create fields like:",[114,115,116,132],"table",{},[117,118,119],"thead",{},[120,121,122,126,129],"tr",{},[123,124,125],"th",{},"Field",[123,127,128],{},"Type",[123,130,131],{},"Role",[133,134,135,147,157,167,177],"tbody",{},[120,136,137,141,144],{},[138,139,140],"td",{},"name",[138,142,143],{},"string",[138,145,146],{},"meta",[120,148,149,152,155],{},[138,150,151],{},"icon",[138,153,154],{},"image",[138,156,146],{},[120,158,159,162,165],{},[138,160,161],{},"cooldown",[138,163,164],{},"number",[138,166,146],{},[120,168,169,172,174],{},[138,170,171],{},"damage",[138,173,164],{},[138,175,176],{},"aspect",[120,178,179,182,185],{},[138,180,181],{},"element",[138,183,184],{},"chooseOne (fire, ice, lightning)",[138,186,176],{},[14,188,189,190,193],{},"Each field has a ",[24,191,192],{},"role",":",[59,195,196,201],{},[21,197,198,200],{},[24,199,146],{}," - Presentation data (name, icon, description, cooldown)",[21,202,203,205],{},[24,204,176],{}," - Mechanical data (damage, range, element type)",[14,207,208],{},"Think of definitions as \"what CAN an ability have?\" - you're designing the structure.",[95,210,212],{"id":211},"_2-ability-templates","2. Ability Templates",[14,214,215],{},"Then create actual abilities using those fields.",[14,217,108,218,221],{},[24,219,220],{},"Characters > Ability Templates"," and create abilities like:",[14,223,224],{},[24,225,226],{},"Fireball",[59,228,229,245],{},[21,230,231,234],{},[24,232,233],{},"meta section:",[59,235,236,239,242],{},[21,237,238],{},"name: \"Fireball\"",[21,240,241],{},"icon: (select image)",[21,243,244],{},"cooldown: 3",[21,246,247,250],{},[24,248,249],{},"effects section:",[59,251,252,263],{},[21,253,254,255],{},"Effect \"main_damage\":\n",[59,256,257,260],{},[21,258,259],{},"damage: 50",[21,261,262],{},"element: fire",[21,264,265,266],{},"Effect \"burn\":\n",[59,267,268,271],{},[21,269,270],{},"damage: 10",[21,272,262],{},[14,274,275,278],{},[24,276,277],{},"Why effects are a list:"," One ability can do multiple things. Fireball might deal direct damage AND apply a burn effect. Each effect has its own aspects.",[48,280],{},[51,282,284],{"id":283},"granting-abilities","Granting Abilities",[14,286,287,288,290],{},"Add abilities to any status via the ",[24,289,12],{}," field in the editor.",[14,292,293,296,297,300],{},[24,294,295],{},"In a character template:","\nGo to ",[24,298,299],{},"Characters > Character Templates",", select your character, and in the abilities field select the abilities you want.",[14,302,303,296,306,309],{},[24,304,305],{},"In an item:",[24,307,308],{},"Characters > Item Templates",", select your item, and add abilities to the abilities field.",[14,311,312,296,315,318],{},[24,313,314],{},"In a buff status:",[24,316,317],{},"Characters > Character Statuses",", create a buff, and add abilities to grant while the buff is active.",[14,320,321],{},"Characters accumulate abilities from all their active statuses. The same ability from multiple sources doesn't duplicate - each ability ID appears once.",[48,323],{},[51,325,327],{"id":326},"ability-modifiers","Ability Modifiers",[14,329,330,331,334],{},"Statuses can also ",[24,332,333],{},"modify"," existing abilities without changing the base template.",[14,336,337,338,340,341,345],{},"In any status form, the ",[24,339,12],{}," section uses the same form as ability templates. To create a modifier, set the ",[342,343,344],"code",{},"modifies"," field to the ID of the ability you want to modify, then fill in the fields you want to change:",[14,347,348],{},[24,349,350],{},"Fire Mastery Buff",[59,352,353,356],{},[21,354,355],{},"modifies: fireball",[21,357,358,359],{},"effects:\n",[59,360,361],{},[21,362,254,363],{},[59,364,365],{},[21,366,367],{},"damage: +25",[14,369,370],{},[24,371,372],{},"How modifiers merge:",[59,374,375,381,387],{},[21,376,377,380],{},[24,378,379],{},"Numbers"," sum together (damage 50 + modifier 25 = 75)",[21,382,383,386],{},[24,384,385],{},"Arrays"," concatenate",[21,388,389,392],{},[24,390,391],{},"Other types"," last value wins",[14,394,395],{},"This lets you create buffs like \"Fire Mastery: +25 damage to Fireball\" without editing the base ability template.",[48,397],{},[51,399,401],{"id":400},"accessing-abilities-in-code","Accessing Abilities in Code",[114,403,404,414],{},[117,405,406],{},[120,407,408,411],{},[123,409,410],{},"Method",[123,412,413],{},"Returns",[133,415,416,426,436,446,456],{},[120,417,418,423],{},[138,419,420],{},[342,421,422],{},"character.abilities",[138,424,425],{},"Set of ability IDs the character has",[120,427,428,433],{},[138,429,430],{},[342,431,432],{},"character.getAbility(id)",[138,434,435],{},"Single merged ability (base + all modifiers)",[120,437,438,443],{},[138,439,440],{},[342,441,442],{},"character.getAbilities()",[138,444,445],{},"All abilities as a reactive object",[120,447,448,453],{},[138,449,450],{},[342,451,452],{},"character.addAbility(id)",[138,454,455],{},"Add an ability template to the character (persists through save\u002Fload)",[120,457,458,463],{},[138,459,460],{},[342,461,462],{},"character.removeAbility(id)",[138,464,465],{},"Remove an ability from the character",[14,467,468],{},"The merged ability object contains:",[59,470,471,476],{},[21,472,473,475],{},[342,474,146],{}," - presentation fields (name, icon, cooldown, etc.)",[21,477,478,481],{},[342,479,480],{},"effects"," - object of effect IDs to their aspects",[14,483,484,485,488],{},"Each effect record may contain ",[342,486,487],{},"__name"," (the effect's display name from the template or modifier). This is a reserved key - skip it when iterating aspects:",[490,491,496],"pre",{"className":492,"code":493,"language":494,"meta":495,"style":495},"language-js shiki shiki-themes github-light github-dark","const ability = character.getAbility(\"fireball\");\nfor (const effectId in ability.effects) {\n    const effect = ability.effects[effectId];\n    const effectName = effect.__name; \u002F\u002F \"Fire Strike\"\n    for (const aspectId in effect) {\n        if (aspectId.startsWith('__')) continue; \u002F\u002F skip reserved keys\n        \u002F\u002F process aspect...\n    }\n}\n","js","",[342,497,498,532,552,566,583,601,630,636,642],{"__ignoreMap":495},[499,500,503,507,511,514,518,522,525,529],"span",{"class":501,"line":502},"line",1,[499,504,506],{"class":505},"szBVR","const",[499,508,510],{"class":509},"sj4cs"," ability",[499,512,513],{"class":505}," =",[499,515,517],{"class":516},"sVt8B"," character.",[499,519,521],{"class":520},"sScJk","getAbility",[499,523,524],{"class":516},"(",[499,526,528],{"class":527},"sZZnC","\"fireball\"",[499,530,531],{"class":516},");\n",[499,533,535,538,541,543,546,549],{"class":501,"line":534},2,[499,536,537],{"class":505},"for",[499,539,540],{"class":516}," (",[499,542,506],{"class":505},[499,544,545],{"class":509}," effectId",[499,547,548],{"class":505}," in",[499,550,551],{"class":516}," ability.effects) {\n",[499,553,555,558,561,563],{"class":501,"line":554},3,[499,556,557],{"class":505},"    const",[499,559,560],{"class":509}," effect",[499,562,513],{"class":505},[499,564,565],{"class":516}," ability.effects[effectId];\n",[499,567,569,571,574,576,579],{"class":501,"line":568},4,[499,570,557],{"class":505},[499,572,573],{"class":509}," effectName",[499,575,513],{"class":505},[499,577,578],{"class":516}," effect.__name; ",[499,580,582],{"class":581},"sJ8bj","\u002F\u002F \"Fire Strike\"\n",[499,584,586,589,591,593,596,598],{"class":501,"line":585},5,[499,587,588],{"class":505},"    for",[499,590,540],{"class":516},[499,592,506],{"class":505},[499,594,595],{"class":509}," aspectId",[499,597,548],{"class":505},[499,599,600],{"class":516}," effect) {\n",[499,602,604,607,610,613,615,618,621,624,627],{"class":501,"line":603},6,[499,605,606],{"class":505},"        if",[499,608,609],{"class":516}," (aspectId.",[499,611,612],{"class":520},"startsWith",[499,614,524],{"class":516},[499,616,617],{"class":527},"'__'",[499,619,620],{"class":516},")) ",[499,622,623],{"class":505},"continue",[499,625,626],{"class":516},"; ",[499,628,629],{"class":581},"\u002F\u002F skip reserved keys\n",[499,631,633],{"class":501,"line":632},7,[499,634,635],{"class":581},"        \u002F\u002F process aspect...\n",[499,637,639],{"class":501,"line":638},8,[499,640,641],{"class":516},"    }\n",[499,643,645],{"class":501,"line":644},9,[499,646,647],{"class":516},"}\n",[48,649],{},[51,651,653],{"id":652},"battle-systems-plugins","Battle Systems & Plugins",[14,655,656],{},"The engine provides the ability data layer, but the battle system itself is handled by plugins.",[14,658,659,662],{},[24,660,661],{},"Built-in: Auto Battler plugin"," — a grid-based auto battler with formations, tokens, AI targeting, and damage formulas. Enable it in your game's manifest and define abilities using its format (damage, damage_type, range, area_shape, etc.). See the Auto Battler plugin docs for details.",[14,664,665,668,669,671,672,674,675,678],{},[24,666,667],{},"Custom or community plugins"," — you can build your own battle system or use community plugins. The ability API gives you everything you need: ",[342,670,442],{}," for data, ",[342,673,432],{}," for merged values, and ",[342,676,677],{},"game.buildAbilityEffectsDescription()"," for auto-generated tooltips. Your plugin just provides the UI and game logic on top.",[48,680],{},[51,682,684],{"id":683},"auto-generated-descriptions","Auto-Generated Descriptions",[14,686,687,688,691,692,694,695,697],{},"Ability definitions with ",[342,689,690],{},"ingame_description"," templates can auto-generate player-facing text. Set these on ",[24,693,176],{}," or ",[24,696,146],{}," role definitions:",[59,699,700,713],{},[21,701,702,704,705,708,709,712],{},[24,703,690],{}," - Template string. ",[342,706,707],{},"[v]"," = this aspect's value, ",[342,710,711],{},"[sibling_id]"," = another aspect's value in the same effect.",[21,714,715,718,719,722,723,726,727,729],{},[24,716,717],{},"ingame_description_ref"," - For fromFile definitions, the dot-path to the display name (e.g., ",[342,720,721],{},"\"name\"",", ",[342,724,725],{},"\"traits.name\"","). Falls back to ",[342,728,721],{},", then raw ID.",[14,731,732,733,735,736,739],{},"Aspects without ",[342,734,690],{}," are silently skipped (useful for auxiliary fields like ",[342,737,738],{},"damage_type"," that are consumed by other templates).",[14,741,742,745,746,749,750,753,754,757,758,760,761,764],{},[24,743,744],{},"Auto-linkification."," When an aspect's value references a ",[342,747,748],{},"fromFile"," entity by id (e.g. a status id in ",[342,751,752],{},"status_apply","), the resolver looks up the entity's display name and — if a narrative record exists with the same id — wraps the result in a lore link automatically. So ",[342,755,756],{},"Apply [v] for [status_duration] turns"," produces a clickable record link when the applied status has one, and plain text otherwise. No need to wrap ",[342,759,707],{}," in ",[342,762,763],{},"[[ ... ]]"," manually; the engine handles it per-id.",[14,766,767,773,774,778,779,781,782,193],{},[24,768,769,772],{},[342,770,771],{},"[v:status]"," mode."," When an aspect's value is ",[775,776,777],"em",{},"always"," a status id (or array of status ids) and you want the rich status popup — name, description, live stats, granted abilities — write ",[342,780,771],{}," instead of ",[342,783,707],{},[490,785,790],{"className":786,"code":788,"language":789},[787],"language-text","\"ingame_description\": \"Apply [status_stacks] [v:status] [status_duration]\"\n","text",[342,791,788],{"__ignoreMap":495},[14,793,794],{},"This emits a clickable element per id; hovering opens a popup rendered from the status definition itself, not from a record. No record authoring required. Pick between modes per aspect:",[114,796,797,807],{},[117,798,799],{},[120,800,801,804],{},[123,802,803],{},"Use",[123,805,806],{},"When",[133,808,809,822,831],{},[120,810,811,815],{},[138,812,813],{},[342,814,707],{},[138,816,817,818,821],{},"opportunistic record link — value points at any fromFile entity that ",[775,819,820],{},"might"," have a record",[120,823,824,828],{},[138,825,826],{},[342,827,771],{},[138,829,830],{},"value is always a status id; show the status popup with live stats and abilities",[120,832,833,838],{},[138,834,835],{},[342,836,837],{},"[v:id]",[138,839,840],{},"raw id text, no lookup or link",[14,842,843,844,847,848,851],{},"Sibling form ",[342,845,846],{},"[X:status]"," works the same — pulls value from sibling aspect ",[342,849,850],{},"X"," and renders status links.",[490,853,855],{"className":492,"code":854,"language":494,"meta":495,"style":495},"\u002F\u002F Grouped by effect (default)\nconst effects = game.buildAbilityEffectsDescription(\"fireball\");\n\u002F\u002F [\n\u002F\u002F   { name: \"Fire Strike\", lines: [\"Deal 50 fire damage\"] },\n\u002F\u002F   { name: \"Burn\", lines: [\"30% chance\", \"Deal 10 fire damage\", \"Apply Burning\"] }\n\u002F\u002F ]\n\n\u002F\u002F Flat list (names dropped)\nconst flat = game.buildAbilityEffectsDescription(\"fireball\", undefined, true);\n\u002F\u002F [\"Deal 50 fire damage\", \"30% chance\", \"Deal 10 fire damage\", \"Apply Burning\"]\n\n\u002F\u002F With character modifiers applied\nconst merged = game.buildAbilityEffectsDescription(\"fireball\", \"player_1\");\n\u002F\u002F Uses merged ability data (base + all modifier buffs)\n\n\u002F\u002F Meta descriptions (range, charges, requirements)\nconst meta = game.buildAbilityMetaDescription(\"fireball\");\n\u002F\u002F [\"Range: \u003Cb>3\u003C\u002Fb>\", \"Charges: \u003Cb>2\u003C\u002Fb>\"]\n",[342,856,857,862,883,888,893,898,903,909,914,943,949,954,960,985,991,996,1002,1023],{"__ignoreMap":495},[499,858,859],{"class":501,"line":502},[499,860,861],{"class":581},"\u002F\u002F Grouped by effect (default)\n",[499,863,864,866,869,871,874,877,879,881],{"class":501,"line":534},[499,865,506],{"class":505},[499,867,868],{"class":509}," effects",[499,870,513],{"class":505},[499,872,873],{"class":516}," game.",[499,875,876],{"class":520},"buildAbilityEffectsDescription",[499,878,524],{"class":516},[499,880,528],{"class":527},[499,882,531],{"class":516},[499,884,885],{"class":501,"line":554},[499,886,887],{"class":581},"\u002F\u002F [\n",[499,889,890],{"class":501,"line":568},[499,891,892],{"class":581},"\u002F\u002F   { name: \"Fire Strike\", lines: [\"Deal 50 fire damage\"] },\n",[499,894,895],{"class":501,"line":585},[499,896,897],{"class":581},"\u002F\u002F   { name: \"Burn\", lines: [\"30% chance\", \"Deal 10 fire damage\", \"Apply Burning\"] }\n",[499,899,900],{"class":501,"line":603},[499,901,902],{"class":581},"\u002F\u002F ]\n",[499,904,905],{"class":501,"line":632},[499,906,908],{"emptyLinePlaceholder":907},true,"\n",[499,910,911],{"class":501,"line":638},[499,912,913],{"class":581},"\u002F\u002F Flat list (names dropped)\n",[499,915,916,918,921,923,925,927,929,931,933,936,938,941],{"class":501,"line":644},[499,917,506],{"class":505},[499,919,920],{"class":509}," flat",[499,922,513],{"class":505},[499,924,873],{"class":516},[499,926,876],{"class":520},[499,928,524],{"class":516},[499,930,528],{"class":527},[499,932,722],{"class":516},[499,934,935],{"class":509},"undefined",[499,937,722],{"class":516},[499,939,940],{"class":509},"true",[499,942,531],{"class":516},[499,944,946],{"class":501,"line":945},10,[499,947,948],{"class":581},"\u002F\u002F [\"Deal 50 fire damage\", \"30% chance\", \"Deal 10 fire damage\", \"Apply Burning\"]\n",[499,950,952],{"class":501,"line":951},11,[499,953,908],{"emptyLinePlaceholder":907},[499,955,957],{"class":501,"line":956},12,[499,958,959],{"class":581},"\u002F\u002F With character modifiers applied\n",[499,961,963,965,968,970,972,974,976,978,980,983],{"class":501,"line":962},13,[499,964,506],{"class":505},[499,966,967],{"class":509}," merged",[499,969,513],{"class":505},[499,971,873],{"class":516},[499,973,876],{"class":520},[499,975,524],{"class":516},[499,977,528],{"class":527},[499,979,722],{"class":516},[499,981,982],{"class":527},"\"player_1\"",[499,984,531],{"class":516},[499,986,988],{"class":501,"line":987},14,[499,989,990],{"class":581},"\u002F\u002F Uses merged ability data (base + all modifier buffs)\n",[499,992,994],{"class":501,"line":993},15,[499,995,908],{"emptyLinePlaceholder":907},[499,997,999],{"class":501,"line":998},16,[499,1000,1001],{"class":581},"\u002F\u002F Meta descriptions (range, charges, requirements)\n",[499,1003,1005,1007,1010,1012,1014,1017,1019,1021],{"class":501,"line":1004},17,[499,1006,506],{"class":505},[499,1008,1009],{"class":509}," meta",[499,1011,513],{"class":505},[499,1013,873],{"class":516},[499,1015,1016],{"class":520},"buildAbilityMetaDescription",[499,1018,524],{"class":516},[499,1020,528],{"class":527},[499,1022,531],{"class":516},[499,1024,1026],{"class":501,"line":1025},18,[499,1027,1028],{"class":581},"\u002F\u002F [\"Range: \u003Cb>3\u003C\u002Fb>\", \"Charges: \u003Cb>2\u003C\u002Fb>\"]\n",[48,1030],{},[51,1032,1034],{"id":1033},"custom-aspect-renderers","Custom Aspect Renderers",[14,1036,1037,1038,1040,1041,1044],{},"By default, an ",[342,1039,690],{}," template renders the aspect's value as plain bold text (",[342,1042,1043],{},"\u003Cb>20\u003C\u002Fb>","). For values that scale at runtime — damage that grows with caster power, status stacks computed from a stat, etc. — register a custom renderer to surface the derivation in the tooltip.",[490,1046,1048],{"className":492,"code":1047,"language":494,"meta":495,"style":495},"game.registerAspectRenderer(aspectId, ({ value, aspects, character }) => htmlString);\n",[342,1049,1050],{"__ignoreMap":495},[499,1051,1052,1055,1058,1061,1065,1067,1070,1072,1075,1078,1081],{"class":501,"line":502},[499,1053,1054],{"class":516},"game.",[499,1056,1057],{"class":520},"registerAspectRenderer",[499,1059,1060],{"class":516},"(aspectId, ({ ",[499,1062,1064],{"class":1063},"s4XuR","value",[499,1066,722],{"class":516},[499,1068,1069],{"class":1063},"aspects",[499,1071,722],{"class":516},[499,1073,1074],{"class":1063},"character",[499,1076,1077],{"class":516}," }) ",[499,1079,1080],{"class":505},"=>",[499,1082,1083],{"class":516}," htmlString);\n",[14,1085,1086],{},"The renderer receives:",[59,1088,1089,1094,1104,1116],{},[21,1090,1091,1093],{},[342,1092,1064],{}," — the aspect's literal authored value",[21,1095,1096,1098,1099,722,1101,1103],{},[342,1097,1069],{}," — sibling aspects in the same effect (read ",[342,1100,738],{},[342,1102,752],{},", etc.)",[21,1105,1106,1108,1109,1112,1113,1115],{},[342,1107,1074],{}," — present when the tooltip is built with a ",[342,1110,1111],{},"characterId"," prop (e.g. on an equipped ability card); ",[342,1114,935],{}," in template-preview contexts",[21,1117,1118,1121,1122,1125,1126,722,1129,1132],{},[342,1119,1120],{},"ability"," — the merged ability data (",[342,1123,1124],{},"{ meta, effects }","); useful to branch on ",[342,1127,1128],{},"ability.meta.costs",[342,1130,1131],{},"ability.meta.cooldown",", etc.",[14,1134,1135,1136,1139,1140,1142,1143,1146,1147,1150],{},"The return value (HTML string) replaces the default ",[342,1137,1138],{},"\u003Cb>value\u003C\u002Fb>"," for both the aspect's own ",[342,1141,707],{}," token ",[24,1144,1145],{},"and"," any sibling ",[342,1148,1149],{},"[id]"," reference to it from other aspects' templates.",[14,1152,1153],{},[24,1154,1155],{},"Example — show \"% of power\" with optional scaled value:",[490,1157,1159],{"className":492,"code":1158,"language":494,"meta":495,"style":495},"game.registerAspectRenderer('damage', ({ value, character }) => {\n  let txt = `\u003Cb>${value}% of power\u003C\u002Fb>`;\n  if (character) {\n    const scaled = Math.round(character.getStat('power') * value \u002F 100);\n    txt += ` \u003Cb>(${scaled})\u003C\u002Fb>`;\n  }\n  return txt;\n});\n",[342,1160,1161,1188,1210,1218,1261,1280,1285,1293],{"__ignoreMap":495},[499,1162,1163,1165,1167,1169,1172,1175,1177,1179,1181,1183,1185],{"class":501,"line":502},[499,1164,1054],{"class":516},[499,1166,1057],{"class":520},[499,1168,524],{"class":516},[499,1170,1171],{"class":527},"'damage'",[499,1173,1174],{"class":516},", ({ ",[499,1176,1064],{"class":1063},[499,1178,722],{"class":516},[499,1180,1074],{"class":1063},[499,1182,1077],{"class":516},[499,1184,1080],{"class":505},[499,1186,1187],{"class":516}," {\n",[499,1189,1190,1193,1196,1199,1202,1204,1207],{"class":501,"line":534},[499,1191,1192],{"class":505},"  let",[499,1194,1195],{"class":516}," txt ",[499,1197,1198],{"class":505},"=",[499,1200,1201],{"class":527}," `\u003Cb>${",[499,1203,1064],{"class":516},[499,1205,1206],{"class":527},"}% of power\u003C\u002Fb>`",[499,1208,1209],{"class":516},";\n",[499,1211,1212,1215],{"class":501,"line":554},[499,1213,1214],{"class":505},"  if",[499,1216,1217],{"class":516}," (character) {\n",[499,1219,1220,1222,1225,1227,1230,1233,1236,1239,1241,1244,1247,1250,1253,1256,1259],{"class":501,"line":568},[499,1221,557],{"class":505},[499,1223,1224],{"class":509}," scaled",[499,1226,513],{"class":505},[499,1228,1229],{"class":516}," Math.",[499,1231,1232],{"class":520},"round",[499,1234,1235],{"class":516},"(character.",[499,1237,1238],{"class":520},"getStat",[499,1240,524],{"class":516},[499,1242,1243],{"class":527},"'power'",[499,1245,1246],{"class":516},") ",[499,1248,1249],{"class":505},"*",[499,1251,1252],{"class":516}," value ",[499,1254,1255],{"class":505},"\u002F",[499,1257,1258],{"class":509}," 100",[499,1260,531],{"class":516},[499,1262,1263,1266,1269,1272,1275,1278],{"class":501,"line":585},[499,1264,1265],{"class":516},"    txt ",[499,1267,1268],{"class":505},"+=",[499,1270,1271],{"class":527}," ` \u003Cb>(${",[499,1273,1274],{"class":516},"scaled",[499,1276,1277],{"class":527},"})\u003C\u002Fb>`",[499,1279,1209],{"class":516},[499,1281,1282],{"class":501,"line":603},[499,1283,1284],{"class":516},"  }\n",[499,1286,1287,1290],{"class":501,"line":632},[499,1288,1289],{"class":505},"  return",[499,1291,1292],{"class":516}," txt;\n",[499,1294,1295],{"class":501,"line":638},[499,1296,1297],{"class":516},"});\n",[14,1299,1300],{},"Result:",[59,1302,1303,1310],{},[21,1304,1305,1306,1309],{},"No character context: \"Deal ",[24,1307,1308],{},"100% of power"," fire damage\"",[21,1311,1312,1313,1309],{},"With character (power 200): \"Deal ",[24,1314,1315],{},"100% of power (200)",[14,1317,1318,1319,1321,1322,1324,1325,1328,1329,1332,1333,1336,1337,1340],{},"Remember to drop redundant prose from the ",[342,1320,690],{}," template once a renderer takes over its ",[342,1323,707],{}," slot. If the template still reads ",[342,1326,1327],{},"\"Deal [v]% [damage_type] damage\"",", the renderer's ",[342,1330,1331],{},"% of power"," suffix will collide with the literal ",[342,1334,1335],{},"%",". Trim to ",[342,1338,1339],{},"\"Deal [v] [damage_type] damage\"",".",[48,1342],{},[51,1344,1346],{"id":1345},"quick-reference","Quick Reference",[114,1348,1349,1359],{},[117,1350,1351],{},[120,1352,1353,1356],{},[123,1354,1355],{},"I want to...",[123,1357,1358],{},"Do this",[133,1360,1361,1368,1375,1386,1395,1404,1415,1424,1434],{},[120,1362,1363,1366],{},[138,1364,1365],{},"Define what fields abilities have",[138,1367,111],{},[120,1369,1370,1373],{},[138,1371,1372],{},"Create an ability",[138,1374,220],{},[120,1376,1377,1380],{},[138,1378,1379],{},"Give a character an ability",[138,1381,1382,1383,1385],{},"Add to ",[24,1384,12],{}," field in any status",[120,1387,1388,1391],{},[138,1389,1390],{},"Add an ability from code",[138,1392,1393],{},[342,1394,452],{},[120,1396,1397,1400],{},[138,1398,1399],{},"Remove an ability from code",[138,1401,1402],{},[342,1403,462],{},[120,1405,1406,1409],{},[138,1407,1408],{},"Buff an existing ability",[138,1410,1382,1411,1414],{},[24,1412,1413],{},"ability_modifiers"," in a status",[120,1416,1417,1420],{},[138,1418,1419],{},"Access ability data in code",[138,1421,1422],{},[342,1423,432],{},[120,1425,1426,1429],{},[138,1427,1428],{},"Register a custom aspect renderer",[138,1430,1431],{},[342,1432,1433],{},"game.registerAspectRenderer(\"damage\", fn)",[120,1435,1436,1439],{},[138,1437,1438],{},"Use a battle system",[138,1440,1441],{},"Enable the Auto Battler plugin or build your own",[1443,1444,1445],"style",{},"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 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);}html pre.shiki code .s4XuR, html code.shiki .s4XuR{--shiki-default:#E36209;--shiki-dark:#FFAB70}",{"title":495,"searchDepth":534,"depth":534,"links":1447},[1448,1449,1453,1454,1455,1456,1457,1458,1459],{"id":53,"depth":534,"text":54},{"id":92,"depth":534,"text":93,"children":1450},[1451,1452],{"id":97,"depth":554,"text":98},{"id":211,"depth":554,"text":212},{"id":283,"depth":534,"text":284},{"id":326,"depth":534,"text":327},{"id":400,"depth":534,"text":401},{"id":652,"depth":534,"text":653},{"id":683,"depth":534,"text":684},{"id":1033,"depth":534,"text":1034},{"id":1345,"depth":534,"text":1346},"md",{"plugin":1462,"category":1463,"page":12},"global_essentials","characters","\u002Fdocs\u002Fglobal_essentials\u002Fcharacters\u002Fabilities",{"title":5,"description":16},"docs\u002Fglobal_essentials\u002Fcharacters\u002Fabilities","qLD7FlLZp4_egQAeI-aCG95yA-uM98wSQlERiIWlNDU",1779582261180]