Toggle menu
Toggle preferences menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

Template:MobCard: Difference between revisions

Template page
No edit summary
No edit summary
 
(5 intermediate revisions by the same user not shown)
Line 1: Line 1:
<includeonly><div class="mob-card" style="width: 250px; border: 1px solid #ccc; margin: 10px; padding: 10px; text-align: center; float: left; background: #f9f9f9; position: relative;">
<includeonly><div class="mob-card" style="width: 250px; border: 1px solid #ccc; margin: 10px; padding: 10px; text-align: center; float: left; background: #f9f9f9; position: relative;">
<div style="position: absolute; top: 10px; right: 10px;" title="Category: {{{category}}}">[[File:Icon_{{{category}}}.png|24px|link=]]</div>
<div style="position: absolute; top: 10px; left: 10px; font-weight: bold; font-size: 0.9em; display: flex; align-items: center; gap: 4px;" title="Health">[[File:Icon_Heart.png|16px|link=]] {{{health|?}}}</div>
<div style="position: absolute; top: 10px; right: 10px;" title="Category: {{{category|Hostile}}}">[[File:Icon_{{{category|Hostile}}}.png|24px|link=]]</div>
<div style="display: flex; justify-content: center; align-items: center; min-height: 24px; margin-bottom: 5px;">{{{layers|}}}</div>
<div style="font-weight: bold; font-size: 1.2em; color: {{{namecolor|inherit}}};">{{{name}}}</div>
<div style="font-weight: bold; font-size: 1.2em; color: {{{namecolor|inherit}}};">{{{name}}}</div>
<div style="margin: 5px 0;">
<div style="margin: 5px 0;">
[[File:{{#if:{{{image|}}}|{{{image}}}|Mobicon_{{{name}}}.png}}|x150px]]
[[File:{{#if:{{{image|}}}|{{{image}}}|Mobicon_{{{name}}}.png}}|x150px]]
</div>
</div>
<div style="padding-top: 5px;">
<div style="padding-top: 10px; width: 100%; display: flex; flex-direction: column; align-items: center;">
<div style="width: {{#ifexpr: {{{health}}} >= 250 | 100 | {{#expr: ({{{health}}} / 250) * 100}} }}%; min-width: 25%; background: #ff4444; border-radius: 5px; margin: 5px auto; position: relative; height: 18px; border: 1px solid #c00;">
{{{drops|}}}
<div style="position: absolute; top: -1px; left: 50%; transform: translateX(-50%); font-size: 0.85em; font-weight: bold; color: #fff; text-shadow: 1px 1px 0 #000, -1px -1px 0 #000, 1px -1px 0 #000, -1px 1px 0 #000; white-space: nowrap;">{{{health}}} HP</div>
</div>
</div>
<div style="padding-top: 5px;">
<strong>Danger Rating:</strong><br>
<span class="danger-rating">{{#invoke:StarDisplay|render|{{{danger}}}}}</span>
</div>
<div style="padding-top: 5px;">
<strong>Drops:</strong><br>
{{{drops|None}}}
</div>
</div>
</div></includeonly><noinclude>
</div></includeonly><noinclude>
Line 38: Line 30:
"health": {
"health": {
"description": "The health points of the mob.",
"description": "The health points of the mob.",
"type": "number",
"type": "number"
            "default": "20"
},
},
"category": {
"category": {
"description": "The behavior category of the mob. Automatically calls an icon file (e.g., Icon_Hostile.png).",
"description": "The behavior category of the mob. Automatically calls an icon file (e.g., Icon_Hostile.png).",
"type": "string",
"type": "string"
"default": "Hostile"
},
"layers": {
"description": "The spawn layers for the mob, usually input as image files.",
"type": "content"
},
},
"danger": {
"danger": {
Line 52: Line 46:
},
},
"drops": {
"drops": {
"description": "A list of items dropped by the mob.",
"description": "An HTML table of items dropped by the mob.",
"type": "content"
"type": "content"
}
}

Latest revision as of 18:56, 7 March 2026

No description.

Template parameters[Edit template data]

ParameterDescriptionTypeStatus
namename

The display name of the mob.

Stringrequired
namecolornamecolor

The hex color code for the mob's name (e.g., #00FFFF).

Default
inherit
Stringoptional
imageimage

The filename of the mob's image.

Fileoptional
healthhealth

The health points of the mob.

Numberoptional
categorycategory

The behavior category of the mob. Automatically calls an icon file (e.g., Icon_Hostile.png).

Stringoptional
layerslayers

The spawn layers for the mob, usually input as image files.

Contentoptional
dangerdanger

The danger rating (number of stars).

Default
0
Numberoptional
dropsdrops

An HTML table of items dropped by the mob.

Contentoptional
[create] [purge]Documentation
This template has no documentation. If you know how to use this template, please create it.