Template:MobCard: Difference between revisions
Template page
More actions
No edit summary |
Tag: Undo |
||
| 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; right: 10px;" title="Category: {{{category|Hostile}}}">[[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;"> | ||
| Line 6: | Line 6: | ||
</div> | </div> | ||
<div style="padding-top: 5px;"> | <div style="padding-top: 5px;"> | ||
<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;"> | <div style="width: {{#ifexpr: {{{health|20}}} >= 250 | 100 | {{#expr: ({{{health|20}}} / 250) * 100}} }}%; min-width: 25%; background: #ff4444; border-radius: 5px; margin: 5px auto; position: relative; height: 18px; border: 1px solid #c00;"> | ||
<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 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|20}}} HP</div> | ||
</div> | </div> | ||
</div> | </div> | ||
<div style="padding-top: 5px;"> | <div style="padding-top: 5px;"> | ||
<strong>Danger Rating:</strong><br> | <strong>Danger Rating:</strong><br> | ||
<span class="danger-rating">{{#invoke:StarDisplay|render|{{{danger}}}}}</span> | <span class="danger-rating">{{#invoke:StarDisplay|render|{{{danger|0}}}}}</span> | ||
</div> | </div> | ||
<div style="padding-top: 5px;"> | <div style="padding-top: 5px;"> | ||
| Line 38: | Line 38: | ||
"health": { | "health": { | ||
"description": "The health points of the mob.", | "description": "The health points of the mob.", | ||
"type": "number | "type": "number" | ||
}, | }, | ||
"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" | ||
}, | }, | ||
"danger": { | "danger": { | ||
Revision as of 17:17, 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 |