Template:MobCard: Difference between revisions
Template page
More actions
No edit summary |
No edit summary |
||
| (18 intermediate revisions by 2 users not shown) | |||
| Line 1: | Line 1: | ||
<includeonly><div class="mob-card" style="width: | <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; 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="margin: 5px 0;"> | |||
[[File:{{#if:{{{image|}}}|{{{image}}}|Mobicon_{{{name}}}.png}}|x150px]] | |||
</div> | </div> | ||
</includeonly> | <div style="padding-top: 10px; width: 100%; display: flex; flex-direction: column; align-items: center;"> | ||
<noinclude> | {{{drops|}}} | ||
</div> | |||
</div></includeonly><noinclude> | |||
<templatedata> | <templatedata> | ||
{ | { | ||
"params": { | "params": { | ||
"name": {}, | "name": { | ||
"image": {}, | "description": "The display name of the mob.", | ||
" | "type": "string", | ||
"danger": {} | "required": true | ||
}, | |||
"namecolor": { | |||
"description": "The hex color code for the mob's name (e.g., #00FFFF).", | |||
"type": "string", | |||
"default": "inherit" | |||
}, | |||
"image": { | |||
"description": "The filename of the mob's image.", | |||
"type": "wiki-file-name" | |||
}, | |||
"health": { | |||
"description": "The health points of the mob.", | |||
"type": "number" | |||
}, | |||
"category": { | |||
"description": "The behavior category of the mob. Automatically calls an icon file (e.g., Icon_Hostile.png).", | |||
"type": "string" | |||
}, | |||
"layers": { | |||
"description": "The spawn layers for the mob, usually input as image files.", | |||
"type": "content" | |||
}, | |||
"danger": { | |||
"description": "The danger rating (number of stars).", | |||
"type": "number", | |||
"default": "0" | |||
}, | |||
"drops": { | |||
"description": "An HTML table of items dropped by the mob.", | |||
"type": "content" | |||
} | |||
} | } | ||
} | } | ||
Latest revision as of 18:56, 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 |
| layers | layers | The spawn layers for the mob, usually input as image files. | Content | optional |
| danger | danger | The danger rating (number of stars).
| Number | optional |
| drops | drops | An HTML table of items dropped by the mob. | Content | optional |