Jump to content

Template:Trait infobox: Difference between revisions

From inZOI Wiki
No edit summary
Tag: Reverted
No edit summary
Tag: Reverted
Line 1: Line 1:
<includeonly>
<includeonly>
<!--  
<!--  
   Trait Infobox for Inzoi
  =====================================
   ---------------------------------------------------
   Trait Infobox for Inzoi (Stylized)
  Inspired by the FFXIV "Item infobox," but repurposed
   =====================================
  for use with character traits in the Inzoi game.
 
   PARAMETERS:
   PARAMETERS:
   | name        = Name of the trait (defaults to PAGENAME if omitted).
   | name        = The displayed name of the trait (defaults to PAGENAME if omitted).
   | icon        = File name for the trait’s icon (e.g. "Expert.png"); omit "File:" prefix.
   | icon        = File name of the trait icon (e.g., "Expert.png").
   | group      = The overarching group or personality category (e.g. "Wise and Logical").
   | group      = Parent category / personality group for the trait.
   | type        = More specific sub-type or classification if applicable (optional).
   | type        = Secondary classification or type (optional).
   | release    = For tracking expansions or major releases. (optional)
   | release    = Expansion/major release (optional).
   | patch      = For tracking patch version (optional).
   | patch      = Patch version (optional).
   | description = Description of the trait.
   | description = Main description of the trait (in-game flavor).
   | synergy    = Optional field to list synergy or related traits.
   | synergy    = Related/synergistic traits (optional).
   | notes      = Optional developer/extra notes.
   | notes      = Additional notes, tips, or dev info (optional).
-->


  USAGE EXAMPLE (on a Trait page):
<!-- Handle expansions and patch categories -->
  {{Trait infobox
  | name        = Expert
  | icon        = ExpertTrait.png
  | group      = Wise and Logical
  | type        = Knowledge-Focused
  | release    =
  | patch       =
  | description = Pursues exceptional knowledge and skills, interested in theory...
  | synergy    = Explorer
  | notes      = This trait is especially useful for science-based careers.
  }}
-->
{{#switch:{{lc:{{{release|}}}}}
{{#switch:{{lc:{{{release|}}}}}
  |  
  | heavensward    = {{Heavensward expansion content}}
  <!-- Example for future expansions; replace these with actual expansions if desired
| stormblood    = {{Stormblood expansion content}}
  | expansion1 = <!-- some special category or banner -->
| shadowbringers = {{Shadowbringers expansion content}}
  | expansion2 =  
| endwalker      = {{Endwalker expansion content}}
  -->
| dawntrail      = {{Dawntrail expansion content}}
}}{{#if:{{{release|}}}||{{#switch:{{{patch|}}}
}}{{#if:{{{release|}}}||{{#switch:{{{patch|}}}
  | 1.0|2.0|2.05|2.1|2.15|2.16|2.2|2.21|2.25|2.28|2.3|2.35|2.38|2.4|2.41|2.45|2.5|2.51|2.55|2.56|2.57=
  | 1.0|2.0|2.05|2.1|2.15|2.16|2.2|2.21|2.25|2.28|2.3|2.35|2.38|2.4|2.41|2.45|2.5|2.51|2.55|2.56|2.57=
  | #default = [[Category:Missing release]]
  | #default=[[Category:Missing release]]
}}}}
}}}}


<div class="infobox-n trait">
<!-- Start of the actual Infobox layout -->
   <!-- Hidden "dot" to help with layout -->
<table class="infobox trait-infobox" style="border:1px solid #ccc; background:#f9f9f9; width:280px; margin:0 0 1em 1em; float:right;">
   <div style="float:left;height:50px;position:relative;top:0px;left:0px;visibility:hidden;">.</div>
   <!-- Header row (Trait Name) -->
   <tr>
    <th colspan="2" style="background:#cce; color:#000; padding:5px; font-size:120%; text-align:center;">
      {{{name|{{#titleparts:{{PAGENAME}}}}}}}
    </th>
  </tr>


   <!-- Icon Section -->
   <!-- Icon + Basic Info row -->
   <div class="icon infobox-icon">
   <tr>
    {{#if: {{{icon|}}}
    <td style="width:60px; text-align:center; padding:5px;">
      | [[File:{{{icon}}}|46px]]
      <!-- Icon (fallback if none) -->
      | [[File:DefaultTraitIcon.png|46px]] <!-- Fallback if icon not provided -->
      {{#if: {{{icon|}}}
    }}
        | [[File:{{{icon}}}|50px]]
  </div>
        | [[File:DefaultTraitIcon.png|50px]] <!-- fallback icon -->
 
      }}
  <!-- Heading / Title -->
    </td>
  <p class="heading">
    <td style="vertical-align:top; padding:5px; line-height:1.4;">
    [[Has canonical name::{{{name|{{#titleparts:{{PAGENAME}}}}}}}]]
      <!-- Group -->
  </p>
      {{#if: {{{group|}}}
 
        | '''Group:''' {{{group}}}<br/>
  <!-- Trait Classification -->
      }}
  <div class="statistics trait">
      <!-- Type -->
    <!-- Group (e.g. "Wise and Logical") -->
      {{#if: {{{type|}}}
    {{#if: {{{group|}}}
        | '''Type:''' {{{type}}}<br/>
      | <span class="characteristic group" title="Personality Group/Category">{{{group}}}</span>
      }}
    }}
      <!-- Release -->
    <!-- Type (optional further classification) -->
      {{#if: {{{release|}}}
    {{#if: {{{type|}}}
        | '''Release:''' {{{release}}}<br/>
      | &nbsp; • &nbsp;<span class="characteristic type">{{{type}}}</span>
      }}
    }}
      <!-- Patch -->
   </div>
      {{#if: {{{patch|}}}
        | '''Patch:''' {{{patch}}}<br/>
      }}
      <!-- Synergy -->
      {{#if: {{{synergy|}}}
        | '''Synergy:''' {{{synergy}}}
      }}
    </td>
   </tr>


  <div class="wrapper">
   <!-- Description row -->
    <!-- Additional fields can be shown as a definition list -->
    {{#if: {{{release|}}}
      | ;Release
        :{{{release}}}
    }}
    {{#if: {{{patch|}}}
      | ;Patch
        :{{{patch}}}
    }}
    {{#if: {{{synergy|}}}
      | ;Related/Synergy
        :{{{synergy}}}
    }}
    {{#if: {{{notes|}}}
      | ;Notes
        :{{{notes}}}
    }}
  </div>
 
   <!-- Description -->
   {{#if: {{{description|}}}
   {{#if: {{{description|}}}
     | {{Quotation|game|
     | <tr>
        {{{description}}}
        <td colspan="2" style="padding:8px;">
       }}
          {{Quotation|game|{{{description}}}}}
        </td>
       </tr>
   }}
   }}


</div>
  <!-- Notes row (optional) -->
  {{#if: {{{notes|}}}
    | <tr>
        <td colspan="2" style="padding:8px; font-size:90%; font-style:italic;">
          '''Notes:''' {{{notes}}}
        </td>
      </tr>
  }}
</table>


<!--  
<!-- Auto-categorization by group (optional) -->
  AUTOCATEGORIZATION (optional).
  For example, if you wish to auto-categorize by group,
  uncomment or extend the logic below:
-->
{{#if: {{{group|}}}
{{#if: {{{group|}}}
  | [[Category:{{{group}}} Traits]]
  | [[Category:{{{group}}} Traits]]
Line 111: Line 97:
<noinclude>
<noinclude>
== Usage ==
== Usage ==
Use this template to provide an infobox for an **Inzoi** trait page.
Use this template to place a styled infobox at the top-right of an Inzoi trait page.


'''Example:'''
=== Basic Example ===
<pre>
<pre>
{{Trait infobox
{{Trait infobox
| name        = Expert
| name        = Expert
| icon        = ExpertTrait.png
| icon        = Expert.png
| group      = Wise and Logical
| group      = Wise and Logical
| type        = Knowledge-Focused
| type        = Knowledge-Focused
| release    = (Optional release info)
| release    =  
| patch      = (Optional patch info)
| patch      =  
| description = Pursues exceptional knowledge and skills, interested in theory, technology...
| description = Pursues exceptional knowledge and skills...
| synergy    = Explorer
| synergy    = Explorer
| notes      = This trait is especially effective in research-related professions.
| notes      = Especially helpful for R&D tasks.
}}
}}
</pre>
</pre>


== Parameters ==
=== Parameters ===
; name
; name
: (Optional) The trait’s display name. Defaults to the page name if left blank.
: (Optional) Defaults to the page name if omitted.
; icon
; icon
: (Optional) The file name for the trait’s icon. If omitted, will display "DefaultTraitIcon.png".
: (Optional) File name of the trait’s icon. If omitted, uses "DefaultTraitIcon.png".
; group
; group
: (Optional) The trait’s main personality category or group (e.g. "Wise and Logical").
: (Optional) Main personality category (e.g., "Wise and Logical").
; type
; type
: (Optional) A secondary classification or sub-type (e.g. "Knowledge-Focused").
: (Optional) A sub-classification.
; release
; release
: (Optional) Expansion or major update in which this trait was introduced.
: (Optional) Expansion or major update in which the trait was introduced.
; patch
; patch
: (Optional) Specific patch version for the trait’s introduction or rework.
: (Optional) Specific patch version.
; description
; description
: (Optional) Main descriptive text for the trait.
: (Optional) Main descriptive text for the trait (displayed in a quote box).
; synergy
; synergy
: (Optional) Other traits it works well with or is closely related to.
: (Optional) Other traits or mechanics it pairs well with.
; notes
; notes
: (Optional) Developer notes, additional mechanics, or tips.
: (Optional) Additional remarks or tips.


[[Category:Infobox templates|Trait infobox]]
[[Category:Infobox templates|Trait infobox]]
</noinclude>
</noinclude>

Revision as of 14:43, 12 February 2025


Usage

Use this template to place a styled infobox at the top-right of an Inzoi trait page.

Basic Example

{{Trait infobox
| name        = Expert
| icon        = Expert.png
| group       = Wise and Logical
| type        = Knowledge-Focused
| release     = 
| patch       = 
| description = Pursues exceptional knowledge and skills...
| synergy     = Explorer
| notes       = Especially helpful for R&D tasks.
}}

Parameters

name
(Optional) Defaults to the page name if omitted.
icon
(Optional) File name of the trait’s icon. If omitted, uses "DefaultTraitIcon.png".
group
(Optional) Main personality category (e.g., "Wise and Logical").
type
(Optional) A sub-classification.
release
(Optional) Expansion or major update in which the trait was introduced.
patch
(Optional) Specific patch version.
description
(Optional) Main descriptive text for the trait (displayed in a quote box).
synergy
(Optional) Other traits or mechanics it pairs well with.
notes
(Optional) Additional remarks or tips.