Template:Infobox creature/internal: Difference between revisions

From Baldur's Gate 3 Wiki
Jump to navigation Jump to search
(Support specifying the item that grants a passive, via Template:Infobox creature/passives parser.)
(Put the Balanced difficulty tab in first position.)
Line 38: Line 38:
<panel>
<panel>
   <section>
   <section>
     <label>Explorer</label>
     <label>Balanced</label>
     <group>
     <group>
       <header>Explorer Difficulty Stats</header>
       <header>Balanced Difficulty Stats</header>
       <data source="e level">
       <data source="level">
         <label>Level</label>
         <label>Level</label>
       </data>
       </data>
       <data source="e hp">
       <data source="hp">
         <label>HP</label>
         <label>HP</label>
       </data>
       </data>
       <data source="e ac">
       <data source="ac">
         <label>AC</label>
         <label>AC</label>
       </data>
       </data>
       <data source="e initiative">
       <data source="initiative">
         <label>Initiative</label>
         <label>Initiative</label>
       </data>
       </data>
       <data source="e prof bonus">
       <data source="prof bonus">
         <label>Proficiency</label>
         <label>Proficiency</label>
       </data>
       </data>
       <data source="e movement m">
       <data source="movement m">
         <label>Movement</label>
         <label>Movement</label>
         <format>{{{e movement m|0}}}&#8239;m ({{{e movement ft|0}}}&#8239;ft)</format>
         <format>{{{movement m|0}}}&#8239;m ({{{movement ft|0}}}&#8239;ft)</format>
       </data>
       </data>
       <data source="e weight kg">
       <data source="weight kg">
         <label>Weight</label>
         <label>Weight</label>
         <format>{{{e weight kg|0}}}&#8239;kg ({{{e weight lb|0}}}&#8239;lb)</format>
         <format>{{{weight kg|0}}}&#8239;kg ({{{weight lb|0}}}&#8239;lb)</format>
       </data>
       </data>
       <group layout="horizontal">
       <group layout="horizontal">
         <header>Ability scores</header>
         <header>Ability scores</header>
         <data source="e str">
         <data source="str">
           <label>STR</label>
           <label>STR</label>
           <format>{{{e str}}}<br/>({{{e str mod}}})</format>
           <format>{{{str}}}<br/>({{{str mod}}})</format>
         </data>
         </data>
         <data source="e dex">
         <data source="dex">
           <label>DEX</label>
           <label>DEX</label>
           <format>{{{e dex}}}<br/>({{{e dex mod}}})</format>
           <format>{{{dex}}}<br/>({{{dex mod}}})</format>
         </data>
         </data>
         <data source="e con">
         <data source="con">
           <label>CON</label>
           <label>CON</label>
           <format>{{{e con}}}<br/>({{{e con mod}}})</format>
           <format>{{{con}}}<br/>({{{con mod}}})</format>
         </data>
         </data>
         <data source="e int">
         <data source="int">
           <label>INT</label>
           <label>INT</label>
           <format>{{{e int}}}<br/>({{{e int mod}}})</format>
           <format>{{{int}}}<br/>({{{int mod}}})</format>
         </data>
         </data>
         <data source="e wis">
         <data source="wis">
           <label>WIS</label>
           <label>WIS</label>
           <format>{{{e wis}}}<br/>({{{e wis mod}}})</format>
           <format>{{{wis}}}<br/>({{{wis mod}}})</format>
         </data>
         </data>
         <data source="e cha">
         <data source="cha">
           <label>CHA</label>
           <label>CHA</label>
           <format>{{{e cha}}}<br/>({{{e cha mod}}})</format>
           <format>{{{cha}}}<br/>({{{cha mod}}})</format>
         </data>
         </data>
       </group>
       </group>
       <group layout="horizontal">
       <group layout="horizontal">
         <header>Saving throws</header>
         <header>Saving throws</header>
         <data source="e str">
        <!-- We intentionally use the ability scores as the data sources,
           <label>{{#if: {{{e str save prof|}}} | '''STR''' | STR }}</label>
            so this group won't be rendered if ability scores are missing,
           <format>{{#if: {{{e str save prof|}}} | '''{{{e str save}}}''' | {{{e str save}}} }}</format>
            like for inanimate objects -->
         <data source="str">
           <label>{{#if: {{{str save prof|}}} | '''STR''' | STR }}</label>
           <format>{{#if: {{{str save prof|}}} | '''{{{str save}}}''' | {{{str save}}} }}</format>
         </data>
         </data>
         <data source="e dex">
         <data source="dex">
           <label>{{#if: {{{e dex save prof|}}} | '''DEX''' | DEX }}</label>
           <label>{{#if: {{{dex save prof|}}} | '''DEX''' | DEX }}</label>
           <format>{{#if: {{{e dex save prof|}}} | '''{{{e dex save}}}''' | {{{e dex save}}} }}</format>
           <format>{{#if: {{{dex save prof|}}} | '''{{{dex save}}}''' | {{{dex save}}} }}</format>
         </data>
         </data>
         <data source="e con">
         <data source="con">
           <label>{{#if: {{{e con save prof|}}} | '''CON''' | CON }}</label>
           <label>{{#if: {{{con save prof|}}} | '''CON''' | CON }}</label>
           <format>{{#if: {{{e con save prof|}}} | '''{{{e con save}}}''' | {{{e con save}}} }}</format>
           <format>{{#if: {{{con save prof|}}} | '''{{{con save}}}''' | {{{con save}}} }}</format>
         </data>
         </data>
         <data source="e int">
         <data source="int">
           <label>{{#if: {{{e int save prof|}}} | '''INT''' | INT }}</label>
           <label>{{#if: {{{int save prof|}}} | '''INT''' | INT }}</label>
           <format>{{#if: {{{e int save prof|}}} | '''{{{e int save}}}''' | {{{e int save}}} }}</format>
           <format>{{#if: {{{int save prof|}}} | '''{{{int save}}}''' | {{{int save}}} }}</format>
         </data>
         </data>
         <data source="e wis">
         <data source="wis">
           <label>{{#if: {{{e wis save prof|}}} | '''WIS''' | WIS }}</label>
           <label>{{#if: {{{wis save prof|}}} | '''WIS''' | WIS }}</label>
           <format>{{#if: {{{e wis save prof|}}} | '''{{{e wis save}}}''' | {{{e wis save}}} }}</format>
           <format>{{#if: {{{wis save prof|}}} | '''{{{wis save}}}''' | {{{wis save}}} }}</format>
         </data>
         </data>
         <data source="e cha">
         <data source="cha">
           <label>{{#if: {{{e cha save prof|}}} | '''CHA''' | CHA }}</label>
           <label>{{#if: {{{cha save prof|}}} | '''CHA''' | CHA }}</label>
           <format>{{#if: {{{e cha save prof|}}} | '''{{{e cha save}}}''' | {{{e cha save}}} }}</format>
           <format>{{#if: {{{cha save prof|}}} | '''{{{cha save}}}''' | {{{cha save}}} }}</format>
         </data>
         </data>
       </group>
       </group>
       <group>
       <group>
         <header>Resistances <sup>[[Resistances|(info)]]</sup></header>
         <header>Resistances <sup>[[Resistances|(info)]]</sup></header>
         <data source="e resistances" name="resistances">
         <data source="resistances" name="resistances">
           <format>{{#invoke: ParseList | main | {{{e resistances}}} | useTemplate = Parse resistance | style = htmlList }}</format>
           <format>{{#invoke: ParseList | main | {{{resistances}}} | useTemplate = Parse resistance | style = htmlList }}</format>
         </data>
         </data>
       </group>
       </group>
       <group>
       <group>
         <header>Conditions</header>
         <header>Conditions</header>
         <data source="e conditions" name="conditions">
         <data source="conditions" name="conditions">
           <format>{{#invoke:
           <format>{{#invoke:
             ParseList | main | {{{e conditions}}}
             ParseList | main | {{{conditions}}}
             | useTemplate = Infobox creature/conditions query
             | useTemplate = Infobox creature/conditions query
             | style = htmlListNoBullets
             | style = htmlListNoBullets
Line 136: Line 139:
       <group>
       <group>
         <header>Features</header>
         <header>Features</header>
         <data source="e passives" name="passives">
         <data source="passives" name="passives">
           <format>{{#invoke:
           <format>{{#invoke:
             ParseList | main | {{{e passives}}}
             ParseList | main | {{{passives}}}
             | useTemplate = Infobox creature/passives parser
             | useTemplate = Infobox creature/passives parser
             | style = htmlListNoBullets
             | style = htmlListNoBullets
Line 147: Line 150:
   </section>
   </section>
   <section>
   <section>
     <label>Balanced</label>
     <label>Explorer</label>
     <group>
     <group>
       <header>Balanced Difficulty Stats</header>
       <header>Explorer Difficulty Stats</header>
       <data source="level">
       <data source="e level">
         <label>Level</label>
         <label>Level</label>
       </data>
       </data>
       <data source="hp">
       <data source="e hp">
         <label>HP</label>
         <label>HP</label>
       </data>
       </data>
       <data source="ac">
       <data source="e ac">
         <label>AC</label>
         <label>AC</label>
       </data>
       </data>
       <data source="initiative">
       <data source="e initiative">
         <label>Initiative</label>
         <label>Initiative</label>
       </data>
       </data>
       <data source="prof bonus">
       <data source="e prof bonus">
         <label>Proficiency</label>
         <label>Proficiency</label>
       </data>
       </data>
       <data source="movement m">
       <data source="e movement m">
         <label>Movement</label>
         <label>Movement</label>
         <format>{{{movement m|0}}}&#8239;m ({{{movement ft|0}}}&#8239;ft)</format>
         <format>{{{e movement m|0}}}&#8239;m ({{{e movement ft|0}}}&#8239;ft)</format>
       </data>
       </data>
       <data source="weight kg">
       <data source="e weight kg">
         <label>Weight</label>
         <label>Weight</label>
         <format>{{{weight kg|0}}}&#8239;kg ({{{weight lb|0}}}&#8239;lb)</format>
         <format>{{{e weight kg|0}}}&#8239;kg ({{{e weight lb|0}}}&#8239;lb)</format>
       </data>
       </data>
       <group layout="horizontal">
       <group layout="horizontal">
         <header>Ability scores</header>
         <header>Ability scores</header>
         <data source="str">
         <data source="e str">
           <label>STR</label>
           <label>STR</label>
           <format>{{{str}}}<br/>({{{str mod}}})</format>
           <format>{{{e str}}}<br/>({{{e str mod}}})</format>
         </data>
         </data>
         <data source="dex">
         <data source="e dex">
           <label>DEX</label>
           <label>DEX</label>
           <format>{{{dex}}}<br/>({{{dex mod}}})</format>
           <format>{{{e dex}}}<br/>({{{e dex mod}}})</format>
         </data>
         </data>
         <data source="con">
         <data source="e con">
           <label>CON</label>
           <label>CON</label>
           <format>{{{con}}}<br/>({{{con mod}}})</format>
           <format>{{{e con}}}<br/>({{{e con mod}}})</format>
         </data>
         </data>
         <data source="int">
         <data source="e int">
           <label>INT</label>
           <label>INT</label>
           <format>{{{int}}}<br/>({{{int mod}}})</format>
           <format>{{{e int}}}<br/>({{{e int mod}}})</format>
         </data>
         </data>
         <data source="wis">
         <data source="e wis">
           <label>WIS</label>
           <label>WIS</label>
           <format>{{{wis}}}<br/>({{{wis mod}}})</format>
           <format>{{{e wis}}}<br/>({{{e wis mod}}})</format>
         </data>
         </data>
         <data source="cha">
         <data source="e cha">
           <label>CHA</label>
           <label>CHA</label>
           <format>{{{cha}}}<br/>({{{cha mod}}})</format>
           <format>{{{e cha}}}<br/>({{{e cha mod}}})</format>
         </data>
         </data>
       </group>
       </group>
       <group layout="horizontal">
       <group layout="horizontal">
         <header>Saving throws</header>
         <header>Saving throws</header>
        <!-- We intentionally use the ability scores as the data sources,
         <data source="e str">
            so this group won't be rendered if ability scores are missing,
           <label>{{#if: {{{e str save prof|}}} | '''STR''' | STR }}</label>
            like for inanimate objects -->
           <format>{{#if: {{{e str save prof|}}} | '''{{{e str save}}}''' | {{{e str save}}} }}</format>
         <data source="str">
           <label>{{#if: {{{str save prof|}}} | '''STR''' | STR }}</label>
           <format>{{#if: {{{str save prof|}}} | '''{{{str save}}}''' | {{{str save}}} }}</format>
         </data>
         </data>
         <data source="dex">
         <data source="e dex">
           <label>{{#if: {{{dex save prof|}}} | '''DEX''' | DEX }}</label>
           <label>{{#if: {{{e dex save prof|}}} | '''DEX''' | DEX }}</label>
           <format>{{#if: {{{dex save prof|}}} | '''{{{dex save}}}''' | {{{dex save}}} }}</format>
           <format>{{#if: {{{e dex save prof|}}} | '''{{{e dex save}}}''' | {{{e dex save}}} }}</format>
         </data>
         </data>
         <data source="con">
         <data source="e con">
           <label>{{#if: {{{con save prof|}}} | '''CON''' | CON }}</label>
           <label>{{#if: {{{e con save prof|}}} | '''CON''' | CON }}</label>
           <format>{{#if: {{{con save prof|}}} | '''{{{con save}}}''' | {{{con save}}} }}</format>
           <format>{{#if: {{{e con save prof|}}} | '''{{{e con save}}}''' | {{{e con save}}} }}</format>
         </data>
         </data>
         <data source="int">
         <data source="e int">
           <label>{{#if: {{{int save prof|}}} | '''INT''' | INT }}</label>
           <label>{{#if: {{{e int save prof|}}} | '''INT''' | INT }}</label>
           <format>{{#if: {{{int save prof|}}} | '''{{{int save}}}''' | {{{int save}}} }}</format>
           <format>{{#if: {{{e int save prof|}}} | '''{{{e int save}}}''' | {{{e int save}}} }}</format>
         </data>
         </data>
         <data source="wis">
         <data source="e wis">
           <label>{{#if: {{{wis save prof|}}} | '''WIS''' | WIS }}</label>
           <label>{{#if: {{{e wis save prof|}}} | '''WIS''' | WIS }}</label>
           <format>{{#if: {{{wis save prof|}}} | '''{{{wis save}}}''' | {{{wis save}}} }}</format>
           <format>{{#if: {{{e wis save prof|}}} | '''{{{e wis save}}}''' | {{{e wis save}}} }}</format>
         </data>
         </data>
         <data source="cha">
         <data source="e cha">
           <label>{{#if: {{{cha save prof|}}} | '''CHA''' | CHA }}</label>
           <label>{{#if: {{{e cha save prof|}}} | '''CHA''' | CHA }}</label>
           <format>{{#if: {{{cha save prof|}}} | '''{{{cha save}}}''' | {{{cha save}}} }}</format>
           <format>{{#if: {{{e cha save prof|}}} | '''{{{e cha save}}}''' | {{{e cha save}}} }}</format>
         </data>
         </data>
       </group>
       </group>
       <group>
       <group>
         <header>Resistances <sup>[[Resistances|(info)]]</sup></header>
         <header>Resistances <sup>[[Resistances|(info)]]</sup></header>
         <data source="resistances" name="resistances">
         <data source="e resistances" name="resistances">
           <format>{{#invoke: ParseList | main | {{{resistances}}} | useTemplate = Parse resistance | style = htmlList }}</format>
           <format>{{#invoke: ParseList | main | {{{e resistances}}} | useTemplate = Parse resistance | style = htmlList }}</format>
         </data>
         </data>
       </group>
       </group>
       <group>
       <group>
         <header>Conditions</header>
         <header>Conditions</header>
         <data source="conditions" name="conditions">
         <data source="e conditions" name="conditions">
           <format>{{#invoke:
           <format>{{#invoke:
             ParseList | main | {{{conditions}}}
             ParseList | main | {{{e conditions}}}
             | useTemplate = Infobox creature/conditions query
             | useTemplate = Infobox creature/conditions query
             | style = htmlListNoBullets
             | style = htmlListNoBullets
Line 248: Line 248:
       <group>
       <group>
         <header>Features</header>
         <header>Features</header>
         <data source="passives" name="passives">
         <data source="e passives" name="passives">
           <format>{{#invoke:
           <format>{{#invoke:
             ParseList | main | {{{passives}}}
             ParseList | main | {{{e passives}}}
             | useTemplate = Infobox creature/passives parser
             | useTemplate = Infobox creature/passives parser
             | style = htmlListNoBullets
             | style = htmlListNoBullets

Revision as of 12:19, 24 April 2024

This is the raw internal infobox template for creatures. It does very little processing on its parameters and expects all the data to be spoon-fed.