Template:CreatureTable: Difference between revisions

From UO Outlands Wiki
Jump to navigation Jump to search
No edit summary
 
(19 intermediate revisions by the same user not shown)
Line 1: Line 1:
<noinclude>Note: Italicized values are values that have been automictically inserted, i.e. MaxSpellDamage is auto-filled if the creature has no magery.
<noinclude><big>''Editing this template will '''not''' change what the template displays, see [[Template:CreatureTable#Editing|#Editing]] for more information''</big>
{{CreatureTable|Forktongue Battlekhan}}</noinclude>


{{#invoke:Creatures|singleCreature|{{{1|{{PAGENAME}}}}}|{{{2|}}}|{{{image|{{{3|}}}}}}|{{NAMESPACE}}}}
 
{{PAGENAME}} generates a table for a creature with data pulled from a data module, like the example below of a Blood Daemon:
{{CreatureTable|Blood Daemon|image=blooddaemon.png}}
 
Along with wild creatures this template can also display creatures from [[Strangelands]] or creatures found on [[ships]], if specified. Creatures found in these circumstances often share their name and appearance with creatures found elsewhere but have unique stats; For example a Blood Daemon found on a daemon ship has the following stats:
{{CreatureTable|Blood Daemon|ships|image=blooddaemon.png}}
 
== Parameters ==
 
{| class="wikitable" style="text-align:center"
! Name
! Alias
! Default Value
! Function
! Example
|-
| name
| 1
| <nowiki>{{PAGENAME}}</nowiki>
| style="text-align:left"| The name of the creature to display, case-sensitive .
| Sun Wyrm
|-
| image
| 2
| <creaturename>.jpg*
| style="text-align:left"| The name of the image file of the creature, by default the template links a jpg image with the creature's name, in all lowercase with no spaces.
| sunwyrm.jpg
|-
| type
| 3
| wild*
| style="text-align:left"| The type of creature to display; Wild, Ships, Strangelands. Not case-sensitive
| SHIPS/Ship/ShiP
|-
| section
| 4
|
| style="text-align:left"| The section to add before the table, if a value is given
| Creature Stats
|}
''*Default value assigned by the module instead of in the template/invoke''
 
== Editing ==
This template is generated by [[Module:Creatures]], which conditionally formats the creature data, this cannot be edited without a basic understanding of Lua, or at least general programming. However the creature's data is pulled from one of three sources depending on the type specified:
 
* [[Module:WildCreatureData]]
* [[Module:ShipCreatureData]]
* [[Module:StrangelandsCreatureData]]
 
Each modules documentation (linked at the top of their pages) gives details on how to structure data in the Lua tables, after editing it is recommended that editors make sure the template still functions properly.
 
These modules were created by [[User:TheGmaster]], feel free to dm any questions/concerns/requests directly via Discord @thegmaster1.
 
</noinclude><onlyinclude>{{#invoke:Creatures|singleCreature|name={{{name|{{{1|{{PAGENAME}}}}}}}}|type={{{type|{{{2|}}}}}}|image={{{image|{{{3|}}}}}}|section={{{section|{{{4|}}}}}}|namespace={{NAMESPACE}}}}</onlyinclude>

Latest revision as of 21:31, 10 November 2024

Editing this template will not change what the template displays, see #Editing for more information


CreatureTable generates a table for a creature with data pulled from a data module, like the example below of a Blood Daemon:

Blood Daemon
Slayer Difficulty Gold Value Hits Melee Damage Wrestling Armor Magic Resist
Daemonic 151.3 1,513 8,000 50 - 60 120 25 175
Parry Attack Speed Magery Spell Damage Poison Poison Resist Stealth AI
? 150 30 - 40 MeleeMage

Along with wild creatures this template can also display creatures from Strangelands or creatures found on ships, if specified. Creatures found in these circumstances often share their name and appearance with creatures found elsewhere but have unique stats; For example a Blood Daemon found on a daemon ship has the following stats:

Ship Creature
Ship Creature
Blood Daemon
Slayer Difficulty Gold Value Hits Melee Damage Wrestling Armor Magic Resist
Daemonic 132.6 1,326 8,000 50 - 60 110 25 100
Parry Attack Speed Magery Spell Damage Poison Poison Resist Stealth AI
? 100 20 - 30 MeleeMage

Parameters

Name Alias Default Value Function Example
name 1 {{PAGENAME}} The name of the creature to display, case-sensitive . Sun Wyrm
image 2 <creaturename>.jpg* The name of the image file of the creature, by default the template links a jpg image with the creature's name, in all lowercase with no spaces. sunwyrm.jpg
type 3 wild* The type of creature to display; Wild, Ships, Strangelands. Not case-sensitive SHIPS/Ship/ShiP
section 4 The section to add before the table, if a value is given Creature Stats

*Default value assigned by the module instead of in the template/invoke

Editing

This template is generated by Module:Creatures, which conditionally formats the creature data, this cannot be edited without a basic understanding of Lua, or at least general programming. However the creature's data is pulled from one of three sources depending on the type specified:

Each modules documentation (linked at the top of their pages) gives details on how to structure data in the Lua tables, after editing it is recommended that editors make sure the template still functions properly.

These modules were created by User:TheGmaster, feel free to dm any questions/concerns/requests directly via Discord @thegmaster1.