Template:MobCard: Difference between revisions
Template page
More actions
No edit summary |
No edit summary |
||
| 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;"> | <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|Unknown}}}">[[File:Icon_{{{category|Hostile}}}.png|24px|link=]]</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=" | <div style="padding-top: 5px; display: flex; flex-direction: column; align-items: center;"> | ||
< | <div style="width: 80%; background: #ccc; border-radius: 5px; margin: 5px auto; position: relative; height: 18px; border: 1px solid #999;"> | ||
< | <div style="background: #ff4444; height: 100%; border-radius: 4px; max-width: 100%; width: {{#ifexpr: {{{health|20}}} >= 250 | 100 | {{#ifexpr: {{{health|20}}} <= 20 | 8 | {{#expr: ({{{health|20}}} / 250) * 100}} }} }}%;"></div> | ||
<div style="position: absolute; top: -1px; width: 100%; text-align: center; 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;">{{{health|Unknown}}} HP</div> | |||
</div> | </div> | ||
<div style=" | </div> | ||
<div style="padding-top: 5px;"> | |||
<strong>Danger Rating:</strong><br> | <strong>Danger Rating:</strong><br> | ||
<span class="danger-rating">{{#invoke:StarDisplay|render|{{{danger|0}}}}}</span> | <span class="danger-rating">{{#invoke:StarDisplay|render|{{{danger|0}}}}}</span> | ||
</div> | </div> | ||
<div style=" | <div style="padding-top: 5px;"> | ||
<strong>Drops:</strong><br> | <strong>Drops:</strong><br> | ||
{{{drops|None}}} | {{{drops|None}}} | ||
| Line 39: | Line 42: | ||
}, | }, | ||
"category": { | "category": { | ||
"description": "The behavior category of the mob (e.g., | "description": "The behavior category of the mob. Automatically calls an icon file (e.g., Icon_Hostile.png).", | ||
"type": "string" | "type": "string" | ||
}, | }, | ||
Revision as of 17:10, 7 March 2026
No description.
| Parameter | Description | Type | Status | |
|---|---|---|---|---|
| name | name | The display name of the mob. | String | required |
| namecolor | namecolor | The hex color code for the mob's name (e.g., #00FFFF).
| String | optional |
| image | image | The filename of the mob's image. | File | optional |
| health | health | The health points of the mob. | Number | optional |
| category | category | The behavior category of the mob. Automatically calls an icon file (e.g., Icon_Hostile.png). | String | optional |
| danger | danger | The danger rating (number of stars).
| Number | optional |
| drops | drops | A list of items dropped by the mob. | Content | optional |