Template:Infobox creature: Difference between revisions

From Ring of Brodgar
Jump to navigation Jump to search
mNo edit summary
(Redirect Invalid-Number (basequality, basequality, fleeinghitpoints) case to alternative "*-txt" properties.)
 
(10 intermediate revisions by 2 users not shown)
Line 1: Line 1:
<includeonly
<includeonly


>{| class="infobox boxed" style="font-size:89%; width:300px;"
>{| class="infobox boxed" style="font-size:89%; width:320px;"
|+ {{#if:{{REVISIONID}}
|+ {{Infobox/preview_mode_note}}
|
|<span style="
font-size: 0.8em;
font-style: italic;
color: blue;
background-color: yellow;
">Infobox Preview Mode:<br>Property Changes Not Shown.}}</span>
 
! colspan="2" | {{{name|{{PAGENAME}}}}}
! colspan="2" | {{{name|{{PAGENAME}}}}}
|- style="text-align:center;"
{{Infobox/image_cell
| colspan="2" style="padding:0.5em;" | {{Page-image-name-processing | image={{{image|}}} | imagewidth={{{imagewidth|}}} | maxsize=320 }}<br/><i>{{{caption|}}}</i>
  | image = {{{image|}}}
  | imagewidth = {{{imagewidth|}}}
  | maxsize = 320
  |
  | caption = {{{caption|}}}
  | ptext1 = {{{ptext1|}}}
}}
|-
|-
| style="width:90px; padding:0; border:0;" |<!--above image might work best, but ... needs common css adjustment(rethink)-->
| style="width:90px; padding:0; border:0;" |<!--above image might work best, but ... needs common css adjustment(rethink)-->
Line 21: Line 19:
{{#if: {{{baseq|}}}
{{#if: {{{baseq|}}}
| {{!}} <b>Base-Quality</b>
| {{!}} <b>Base-Quality</b>
   {{!}} {{{baseq}}}
   {{!}} {{{baseq}}}{{#if:{{isNum|{{{baseq}}}}}|{{#set:Crt-basequality={{{baseq}}}}}|{{#set:Crt-basequality-txt={{{baseq}}}}}}}
   {{!}}-
   {{!}}-
}}
}}
{{#if: {{{deadly|}}}
{{#if: {{{deadly|}}}
| {{!}}<b>[[Execute|Is Deadly]]</b>
| {{!}}<b>[[Execute|Is Deadly]]</b>
   {{!}} [[crt-isdeadly::{{{deadly}}}]]
   {{!}} {{{deadly|}}}{{#set:Crt-isdeadly={{{deadly}}}}}
   {{!}}-
   {{!}}-
}}
}}
{{#if: {{{hp|}}}
{{#if: {{{hp|}}}
| {{!}}<b>Hitpoints</b>
| {{!}}<b>Hitpoints</b>
   {{!}} {{{hp}}}
   {{!}} {{{hp}}}{{#if:{{isNum|{{{hp}}}}}|{{#set:Crt-hitpoints={{{hp}}}}}|{{#set:Crt-hitpoints-txt={{{hp}}}}}}}
   {{!}}-
   {{!}}-
}}
}}
{{#if: {{{fhp|}}}
{{#if: {{{fhp|}}}
| {{!}}<b>Fleeing-Hitpoints</b>
| {{!}}<b>Fleeing-Hitpoints</b>
   {{!}} {{{fhp}}}
   {{!}} {{{fhp}}}{{#if:{{isNum|{{{fhp}}}}}|{{#set:Crt-fleeinghitpoints={{{fhp}}}}}|{{#set:Crt-fleeinghitpoints-txt={{{fhp}}}}}}}
   {{!}}-
   {{!}}-
}}
}}
{{#if: {{{armor|}}}
{{#if: {{{armor|}}}
| {{!}}<b>Armor</b>
| {{!}}<b>Armor</b>
   {{!}} {{{armor}}}
   {{!}} {{{armor}}}{{#set:Crt-armor={{{armor}}}}}
   {{!}}-
   {{!}}-
}}
}}
Line 50: Line 48:
}}
}}
{{#if: {{#ask: [[category:creatures]] [[{{PAGENAME}}]]}}
{{#if: {{#ask: [[category:creatures]] [[{{PAGENAME}}]]}}
| {{!}}<b>[[Terrain]]&nbsp;{{#info:This data is specified at the individual Terrain pages.|note}}</b>
| {{!}} '''[[Seasons|Seasonality]]'''
  {{#if: {{#ask:[[terrain_fauna::{{PAGENAME}}]]}}
  | {{!}} (''See [[Tables/Seasons/Creatures|this page]] for now'')
  | {{!}} <span style="color:gray;">(<i>None</i>)</span>
  }}
  {{!}}-
  {{!}}<b>[[Terrain]]&nbsp;{{#info:This data is specified at the individual Terrain pages.|note}}</b>
   {{!}} {{#if: {{#ask:[[terrain_fauna::{{PAGENAME}}]]}} | {{#ask:[[terrain_fauna::{{PAGENAME}}]]}} | <span style="color:gray;">(<i>None</i>)</span> }}
   {{!}} {{#if: {{#ask:[[terrain_fauna::{{PAGENAME}}]]}} | {{#ask:[[terrain_fauna::{{PAGENAME}}]]}} | <span style="color:gray;">(<i>None</i>)</span> }}
   {{!}}-
   {{!}}-
Line 57: Line 61:
! colspan="2" | Back to [[:Category:Creatures|Creatures]]
! colspan="2" | Back to [[:Category:Creatures|Creatures]]
|}
|}
{{#ifeq:{{NAMESPACE}}|{{ns:10}}| |
{{#ifeq:{{NAMESPACE}}|{{ns:0}}
[[Category:Creatures|{{PAGENAME}}]]
  | [[Category:Creatures|{{PAGENAME}}]]
        {{#set:object_type=creature}}
    {{#set:object_type=creature}}
{{#set:Test_Text_1={{List_normalize|{{{name|}}}!{{{image|}}}!{{{imagewidth|}}}!{{{caption|}}}!{{{baseq|}}}!{{{hp|}}}!{{{fhp|}}}!{{{loot|}}}!{{{terrain|}}}!{{{location|}}}!{{{xsize|}}}!{{{ysize|}}}}}}}
{{#set:Test_Text_1={{List_normalize|{{{name|}}}!{{{image|}}}!{{{imagewidth|}}}!{{{caption|}}}!{{{baseq|}}}!{{{hp|}}}!{{{fhp|}}}!{{{loot|}}}!{{{terrain|}}}!{{{location|}}}!{{{xsize|}}}!{{{ysize|}}}}}}}
}}</includeonly
  | {{nop}}
}}<!--
 
-->{{#if:{{{ptext2|}}}{{{ptext3|}}}<!-- block call on empty input -->
  | {{Infobox/pagina2
    | ptext2 = {{{ptext2|}}}
    | ptext3 = {{{ptext3|}}}
  }}
}}<!--
 
--></includeonly
 
><noinclude><!--


><noinclude>
-- alternative-hide next section --
--><div style="display:none;">
{{ {{PAGENAME}}
{{ {{PAGENAME}}
|                      <!-- Basic infobox parameters. Should only be used when needed -->
|                      <!-- Basic infobox parameters. Should only be used when needed -->
Line 70: Line 87:
| imagewidth = {{{imagewidth}}}
| imagewidth = {{{imagewidth}}}
| caption = {{{caption}}}
| caption = {{{caption}}}
|                      <!-- Resource pagina data -->
| ptext1 = {{{ptext1}}}
| ptext2 = {{{ptext2}}}
| ptext3 = {{{ptext3}}}
|                      <!-- alive creature / combat -->
|                      <!-- alive creature / combat -->
| baseq = {{{baseq}}}
| baseq = {{{baseq}}}
Line 79: Line 100:
| loot = {{{loot}}}
| loot = {{{loot}}}
}}
}}
<br style="clear:both;" />{{documentation}}</noinclude>
<br style="clear:both;" /></div>{{documentation}}</noinclude>

Latest revision as of 11:54, 10 July 2024

{{{name}}}
[[ {{{image}}}|frameless|320x320px ]]
{{{caption}}}

"{{{ptext1}}}"

Base-Quality {{{baseq}}}
Is Deadly {{{deadly}}}"{{{deadly}}}" is not recognized as a Boolean (true/false) value.
Hitpoints {{{hp}}}
Fleeing-Hitpoints {{{fhp}}}
Armor {{{armor}}}"{{{armor}}}" is not a number.
Creature-Products {{{loot}}}
Back to Creatures

"{{{ptext2}}}"


"{{{ptext3}}}"


Template documentation (for the template shown above, sometimes hidden or invisible)
Example result
Infobox creature.png
image caption

"{{{ptext1}}}"

Base-Quality 12
Is Deadly yes
Hitpoints 321
Fleeing-Hitpoints 123
Creature-Products Fresh Mouflon Hide, Intestines, Entrails x3, Raw Mutton x6, Bone Material x3
Back to Creatures


Description
This template is used to create a creature infobox on creature pages.


Basic syntax
Type {{infobox creature|...}} at the top of the page. Available parameters shown below.


Parameters
{{infobox creature

    General infobox parameters. Should only be used when needed or appropriate.
| name        = Infobox Title (defaults to related page-name)
| image       = File:Example.ext (defaults to "...")
| imagewidth  = 123 (To resize image if needed. Capped to a maximum of 350)
| caption     = text (Concise infobox-image caption text if needed)

| ptext1      = In-game/paginae text (type1). -- If any.

    Creature parts. (if applicable. ie: they do not apply all to all creatures)
| baseq       = 25
| deadly      = yes/no (bool-property)
| hp          = 200
| fhp         = 120
| armor       = 50
| loot        = [[Fresh Mouflon Hide]], [[Intestines]], [[Entrails]] x3, [[Raw Mutton]] x6, [[Bone Material]] x3

    Outdated parts.
| location       = (Input moved and renamed! Creature related terrain data can be added on the related terrain pages)
}}


Properties


Categories