Difference between revisions of "How to use templates"

From Medivia Online Wiki
(Created page with " = How to use templates = ---- Thanks to '''@hunz''', who wrote templates source code, our wiki do looks prettier and adding informations about monsters and items is no...")
 
Line 12: Line 12:
*[[Template:Item]]  
*[[Template:Item]]  
*[[Template:Monster]]  
*[[Template:Monster]]  
*[[Template:NPC]]


To use them you simply copy and paste the code and edit it to match the info about specific item/monster.<br/> Here are the source codes:
To use them you simply copy and paste the code and edit it to match the info about specific item/monster.<br/> Here are the source codes:
Line 114: Line 115:


And that's all. Isn't it easy? I hope this guide will serve you well.
And that's all. Isn't it easy? I hope this guide will serve you well.
{| border="1" cellpadding="1" cellspacing="1" style="width: 500px;"
|-
| ITEM
| MONSTER
| NPC
|-
|
{{Item&#124;<br/> name=&#124;<br/> image=[[File:filename.png]]&#124;<br/> category=&#124;<br/> atk=&#124;<br/> def=&#124;<br/> arm=&#124;<br/> loot_value=&#124;<br/> weight=&#124;<br/> hand=&#124;<br/> dropped_by=[[MONSTER]]&#124;<br/> description=&#124;<br/> attributes=&#124;<br/> note=&#124;<br/> buy_from_CITY=[[NPC NAME]] (PRICE gp)&#124;<br/> sell_to_CITY=[[NPC NAME]] (PRICE gp)&#124;<br/> }}
| {{Monster&#124;<br/> name=&#124;<br/> image=[[File:monsterfile.png]]&#124;<br/> hp=&#124; exp=&#124;<br/> summon=&#124;<br/> convince=&#124;<br/> abilities=&#124;<br/> pushable=y/n&#124;<br/> push_objects=y/n&#124;<br/> walks_around=&#124;<br/> immune_to=&#124;<br/> neutral_to=&#124;<br/> task=&#124;<br/> est_max_damage=&#124;<br/> sounds=&#124; note=&#124;<br/> strategy=&#124;<br/> strategy_warriors=&#124;<br/> strategy_mages=&#124;<br/> strategy_scouts=&#124;<br/> skinnable=&#124;<br/> location=&#124;<br/> loot=&#124; }}
|
{{NPC&#124;<br/> name=&#124;<br/> image=[[File:npcfile.png]]&#124;<br/> job=&#124;<br/> sells=&#124;<br/> buys=&#124;<br/> note=&#124;<br/> }}
|}
&nbsp;

Revision as of 23:07, 6 June 2018

How to use templates


Thanks to @hunz, who wrote templates source code, our wiki do looks prettier and adding informations about monsters and items is now easier.
But not everyone knows how to edit pages using templates. This is why I made this guide. It is really easy, but it will take a lot of effort to edit all the item/monster pages.


Currently we do have two templates on our wiki:

To use them you simply copy and paste the code and edit it to match the info about specific item/monster.
Here are the source codes:


ITEM SOURCE CODE


{{Item|
name=|
image=[[File:filename.png]]|
category=|
atk=|
def=|
arm=|
loot_value=|
weight=|
hand=|
dropped_by=[[MONSTER]]|
description=|
attributes=|
note=|
buy_from_CITY=[[NPC NAME]] (PRICE gp)|
sell_to_CITY=[[NPC NAME]] (PRICE gp)|
}}

Basically what you need to do when editing item page is to click SOURCE button in Editor and then copy paste the code above and then add info about specific item. For example:

{{Item|
category=Clubs|
name=Skull Staff|
image=[[File:Skull staff.png]]|
atk=36|
def=12|
hands=1|
weight=17.0|
description=The staff longs for death.|
loot_value=6,000 - 7,500 gp|
dropped_by=[[Necromancer]], [[Warlock]], [[Dipthrah]], [[Ogre Warrior]], [[Necromantica]]|
sell_to_yehsha=[[Alesar]] (6000 gp, only if friendly with green Djinns)|
note=Upgrading from a [[Dragon Hammer]] to a Skull Staff will enable you to carry almost two additional backpacks full of runes. It's part of the [[Mid Level Set (Any Vocation)]]. Can be obtained in [[Medusa Shield Quest]].
}}

Notice that I've deleted some part of the code that I didn't need (in this case arm=|, attributes=|) because Skull Staff don't have armor or any other attribute. Also notice that all the links are in square brackets ( [[|]] ).


MONSTER SOURCE CODE


{{Monster|
name=|
image=[[File:monsterfile.png]]|
hp=|
exp=|
summon=|
convince=|
abilities=|
pushable=y/n|
push_objects=y/n|
walks_around=|
immune_to=|
neutral_to=|
task=|
est_max_damage=|
sounds=|
note=|
strategy=|
strategy_warriors=|
strategy_mages=|
strategy_scouts=|
skinnable=|
location=|
loot=|
}}

It's the same as editing item page. Just copy and paste -> add info. That's all. How it should look (for example: Valkyrie Cavalry)

{{Monster|
name=Valkyrie Cavalry|
image=[[File:Valkyrie_Cavalry.gif]]|
hp=270|
exp=216|
summon=750|
convince=--|
abilities=Melee (0-70), Spears (0-50), Haste|
pushable=n|
push_objects=y|
walks_around=Fire, Energy, Poison|
immune_to=None.|
neutral_to=Physical, Energy, Poison, Life Drain|
notes=Valkyries Cavalry run in low health.|
sounds= "Another head for me!"; "Head off!"; "Your head will be mine!"; "Stand still!"; "One more head for me!"; "All males will be our slaves"; "Grrrr"; "ATTACK!"|
strategy=It is better to attack them from distance because their Spears are weaker than their Melee fighting. Usually found around with Amazons and/or Witches.|
location=[[Amazon Camp (Carlin)]]|
loot=0-24 [[Gold Coin]], Spear, 0-2 [[Headhunter Spear]], [[Meat]], [[Apple]], [[Skull]], [[Dagger]], [[Chain Helmet]], [[Chain Armor]], [[Protection Amulet]], [[Small Diamond]] (rare), [[Double Axe]] (rare), [[Plate Armor]] (rare)|
}}

When editing this monster I deleted skinnable=|, strategy-warriors=|,strategy_mages=|, strategy_scouts=|, task=|, etc. from source code because I didn't need it. 

And that's all. Isn't it easy? I hope this guide will serve you well.

ITEM MONSTER NPC

{{Item|
name=|
image=File:Filename.png|
category=|
atk=|
def=|
arm=|
loot_value=|
weight=|
hand=|
dropped_by=MONSTER|
description=|
attributes=|
note=|
buy_from_CITY=NPC NAME (PRICE gp)|
sell_to_CITY=NPC NAME (PRICE gp)|
}}

{{Monster|
name=|
image=File:Monsterfile.png|
hp=| exp=|
summon=|
convince=|
abilities=|
pushable=y/n|
push_objects=y/n|
walks_around=|
immune_to=|
neutral_to=|
task=|
est_max_damage=|
sounds=| note=|
strategy=|
strategy_warriors=|
strategy_mages=|
strategy_scouts=|
skinnable=|
location=|
loot=| }}

{{NPC|
name=|
image=File:Npcfile.png|
job=|
sells=|
buys=|
note=|
}}