Difference between revisions of "How to use templates"

From Medivia Online Wiki
Line 239: Line 239:
{|
{|
|-
|-
| valign="top" width="30%" | <pre>{{Rune&#124;
| valign="top" width="30%" |
{| class="wikitable"
|-
! RUNE SOURCE CODE
|-
|<pre>{{Rune&#124;
name=&#124;
name=&#124;
image=[[File:Rune name.png]]&#124;
image=[[File:Rune name.png]]&#124;
Line 269: Line 274:
Scout_Yehsha=[[SCOUT TEACHER YEHSHA]]&#124;
Scout_Yehsha=[[SCOUT TEACHER YEHSHA]]&#124;
}}
}}
</pre>
</pre>
 
|}
{|  
| valign="top" width="70%" |  
| valign="top" width="70%" |  
{| class="wikitable"
{| class="wikitable"

Revision as of 12:22, 21 September 2018

How to use templates

 

 


Thanks to @hunz, who wrote templates source code, our wiki 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 these 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. Paste it into source code of a page you want to edit. To open source code click Source button in Editor.
RTENOTITLE
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)|
}}
Example (Skull Staff)
{{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 ( [[|]] ).
Most of the item/monster files are named Ham.png/Skull staff.png/Ghoul.png/Dragon lord.png etc.


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=|
}}
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=<span style="color:#c0392b;">Fire,</span> 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. 


NPC SOURCE CODE
{{{Npc| 
name=|
image=[[File:npc name.png]]|
location=|
job=| 
note=|
}}
Sells
{| class="wikitable sortable"
|-
! Item
! Price
|-
| ITEM NAME
| ITEM PRICE
|-
| ITEM NAME
| ITEM PRICE
|-
| ...
| ...
|}
Example (Asha)
{{Npc|
name=Asha|
location=[[Yehsha|Yehsha]], north-eastern part ([http://mediviastats.info/mapper.php?y=2015&x=1363&z=6&zoom=6 here])| 
job=Banker, Jewelry Shopkeeper&#|
note=Asha runs a bank in Yehsha. She exchanges gold coins,platinum coins and crystal coins. Sells and buys gems and jewelry.}}
Sells
{| class="wikitable sortable"
|-
! '''Item'''
! '''Price (gp)'''
|-
| [[Wedding_Ring]]
| 990
|-
| [[Golden_Amulet]]
| 6600
|-
|...
|}
Buys
{| class="wikitable sortable"
|-
! '''Item'''
! '''Price (gp)'''
|-
| [[White_Pearl]]
| 160
|-
| [[Black_Pearl]]
| 280
|-
|...
|}

[[Yehsha_NPCs|Yehsha NPCs]]

   

RUNE SOURCE CODE
{{Rune|
name=|
image=[[File:Rune name.png]]|
incantation=SPELL WORDS|
cost=SPELL COST IN GP|
ml_spell|
ml_use|
charges=|
mana=MANA REQ|
premium=y/n|
effect=|
note=|
rune=SINGLE RUNE COST|
BP=BP COST|
Cleric_Ab'dendriel=[[CLERIC TEACHER AB]]|
.
.
.
Cleric_Yehsha=[[CLERIC TEACHER YEHSHA]]|
Sorcerer_Ab'dendriel=[[SORCERER TEACHER AB]]|
.
.
.
Sorcerer_Yehsha=[[SORCERER TEACHER YEHSHA]]|
Scout_Ab'dendriel=[[SCOUT TEACHER AB]]|
.
.
.
Scout_Yehsha=[[SCOUT TEACHER YEHSHA]]|
}}
Example (Great Fireball)
 

 

And that's all. I hope this guide will serve you well. 


|}

|}

|}