Jump to content

Template:Creature Infobox: Difference between revisions

From The Petit Planet Wiki
Rstar256 (talk | contribs)
m Sell Price format
Rstar256 (talk | contribs)
mNo edit summary
Line 36: Line 36:
   </data>
   </data>
   <group layout="vertical">
   <group layout="vertical">
     Sell Price
     <data><label>Sell Price</label></data>
     <group layout="horizontal">
     <data>
      <data source="price1">
      <group layout="horizontal">
        <label>★</label>
        <data source="price1">
        <format>{{{price1}}}</format>
          <label>★</label>
      </data>
          <format>{{{price1}}}</format>
      <data source="price2">
        </data>
        <label>★★</label>
        <data source="price2">
        <format>{{{price2}}}</format>
          <label>★★</label>
      </data>
          <format>{{{price2}}}</format>
      <data source="price3">
        </data>
        <label>★★★</label>
        <data source="price3">
        <format>{{{price3}}}</format>
          <label>★★★</label>
       </data>
          <format>{{{price3}}}</format>
     </group>
        </data>
       </group>
     </data>
   </group>
   </group>
   <data source="description">
   <data source="description">

Revision as of 10:58, 14 November 2025

Template documentation
Note: parts of or the entire template might not be visible without values provided.
This template uses Module:Infobox, a script written in Lua.
This template uses CSS found at MediaWiki:Gadget-Infobox.css.

Template that creates an infobox for Creatures.

Syntax

{{Creature Infobox
|name         = 
|number       = 
|category     = 
|group        = 
|type         = 
|quality      = 
|description  = 
|min_size     = 
|max_size     = 
|habitat      = 
|time         = 
|distribution = 
|weather      = 
|time         = 
|sell1        = 
|sell2        = 
|sell3        = 
}}
  • name – Name of the creature.
  • number – Zero-padded archive number of the creature.
  • category – Category of the creature.
  • group – Group of the creature.
  • type – Type of the creature.
  • quality – Quality of the creature.
  • description – Description of the creature.
  • min_size – Minimum size of the creature.
  • max_size – Maximum size of the creature.
  • distribution – Distribution of the creature.
  • habitat – Habitat of the creature.
  • time – Active time of the creature.
  • weather – Active weather of the creature.
  • sell1 – Selling price for a 1-star variant of the creature.
  • sell2 – Selling price for a 2-star variant of the creature.
  • sell3 – Selling price for a 3-star variant of the creature.

Other parameters

  • image – Override the default image with a single file. Default: name Icon.png.
  • images – Override the default image with multiple files and tabs.
    • Format: Image 1.ext:Tab 1 name; Image 2.ext:Tab 2 name; ... ; Image N.ext:Tab N name.

Example

{{Creature Infobox
|name         = Calico Koi
|number       = 001
|category     = Fish
|group        = Serene Waters of the Islets (Hexia)
|type         = Freshwater Fish
|quality      = Purple
|description  = Whether it actually brings good fortune or not depends on the definition of "good fortune."
|min_size     = 60.00
|max_size     = 86.00
|distribution = Exclusive to Islets
|habitat      = Lowland Lake
|time         = All Day
|weather      = Any Weather
|sell1        = 30
|sell2        = 33
|sell3        = ???
}}

<infobox>

 <title source="name">
 	<format>001 Calico Koi</format>
 </title>
 <image source="image"/>
 <group layout="horizontal">
    
      <label>Category</label>
      <format>Fish</format>
    
    
      <label>Type</label>
      <format>Freshwater Fish</format>
    
 </group>
 
   <label>Quality</label>
   <format>Purple</format>
 
 
    <label>Size</label>
    <format>60.00 - 86.00 Li</format>
 
 
    <label>Habitat</label>
    <format>Lowland Lake</format>
 
 
    <label>Distribution</label>
    <format>Exclusive to Islets</format>
 
 
    <label>Active Time</label>
    <format>All Day</format>
 
 <group layout="vertical">
   <label>Sell Price</label>
   
     <group layout="horizontal">
       
         <label>★</label>
         <format>{{{price1}}}</format>
       
       
         <label>★★</label>
         <format>{{{price2}}}</format>
       
       
         <label>★★★</label>
         <format>{{{price3}}}</format>
       
     </group>
   
 </group>
 
   <format>Description
Whether it actually brings good fortune or not depends on the definition of "good fortune."</format>

</infobox>

Template Data

Template that creates an infobox for creatures.

Template parameters[Edit template data]

This template has custom formatting.

ParameterDescriptionTypeStatus
Namename

Name of the creature.

Example
Calico Koi
Stringrequired
Numbernumber

Zero-padded archive number of the creature.

Example
001, 002, 003
Numbersuggested
Categorycategory

Category of the creature.

Example
Fish
Stringsuggested
Groupgroup

Group of the creature.

Example
Serene Waters of the Islets (Hexia)
Stringsuggested
Typetype

Type of the creature.

Example
Freshwater Fish
Stringsuggested
Qualityquality

Quality of the creature.

Example
Gray, Purple, Gold
Stringsuggested
Descriptiondescription

Description of the creature.

Contentsuggested
Minimum sizemin_size

Minimum size of the creature.

Example
60.00
Numbersuggested
Maximum sizemax_size

Maximum size of the creature.

Example
86.00
Numbersuggested
Distributiondistribution

Distribution of the creature.

Example
All Regions, Exclusive to Islets
Stringsuggested
Habitathabitat

Habitat of the creature.

Example
Lowland Lake
Stringsuggested
Active timetime

Active time of the creature.

Example
All Day, Daytime, Nighttime
Stringsuggested
Active weatherweather

Active weather of the creature.

Example
Any Weather, Rainy
Stringsuggested
Selling price 1sell1 price1

Selling price for a 1-star variant of the creature.

Example
10
Numbersuggested
Selling price 2sell2 price2

Selling price for a 2-star variant of the creature.

Example
15
Numbersuggested
Selling price 3sell3 price3

Selling price for a 3-star variant of the creature.

Example
20
Numbersuggested
Imageimage

Override the default image with a single file.

Default
<name> Icon.png
Example
Unknown Icon.png
Fileoptional
Imagesimages

Override the default image with multiple files and tabs.

Example
Image 1.ext:Tab 1 name; Image 2.ext:Tab 2 name
Contentoptional