Jump to content

Configure your weapons/armor/items


Recommended Posts

  • Contributor

Level required  Beginner

Estimed time :  15 minutes

 

Hello everyone,

 

This tutorial aims to explain how to configure an item on your server.

Here is the list of possible configurations :

Révélation
  • Vnum
  • Local name
  • Type and Subtype
  • Size
  • Antiflag / Flag / Wearflag
  • Immune
  • Merchant selling price => Player | Player => Merchant
  • Vnum of the item once refined (Blacksmith)
  • Material needed to upgrade your item
  • Chance to have a bonus when creating the item
  • Limitations
  • Value of limitations
  • Type of bonus
  • Bonus value
  • Values
  • Number of free spaces
  • Automatic Average Damage / Skill Damage
  • Specular

 

 

Needed :

  • An item already installed on the server on which you want to perform the configurations. This tutorial explains how to implant an item on your server (item, weapon, armor, hairstyle, sash, ect ...)
  • The item_proto.txt which is in the files of your server (WinSCP). It is in this file that the configuration of all the items of the game is located.

 

 

I. Item_proto.txt, what is it? 

Révélation

item_proto.txt, which is located in the server files of your server metin2/db/item_proto.txt, contains the configuration of all the items.

Take mine as an example:

045701Capture.PNG

 

We notice that in the first row, we have the name of each column (ITEM, ITEM_NAME (KR), ITEM_TYPE, etc ...)

And below, we have the list of all the items with their configuration.

 

Information. Each column corresponds to a parameter. Each parameter is separated by a tab.
Tips. For more readability, you can copy the contents of your item_proto.txt to an Excel spreadsheet. This will allow you to make fewer mistakes and make it easier to proofread.

 

When your server starts, it will put all the content of this .txt file in the form of a database. In your database (Navicat), go to the "item_proto" table. Here you will have all your items with their configuration.

 

Warning ! There is no need to edit directly in the database. It just allows you to read the configurations of your items more easily.

 

Item_proto.txt not enough. Your client also has an item_proto in your locale_xx pack. (xx being the country code you use)

You can generate it using the Dump Proto tool.

  

II. Parameters 

Révélation

At the end of this tutorial, we will explain each parameter of this file. Each parameter will be presented in this form:

 

Local name (Column name in TXT file / Column name in the database)

 

1. Vnum (ITEM / Vnum)

 

This is the number (or ID) of your item. The one you use for the GM /i command.
Some items are managed by the server through the vnum. Changing their vnum will cause bugs. (For some items hardcoded in the sources)
The vnum of your weapons and armor MUST be less than 65536.

 

Warning ! The VNUM must be the same as the one used in item_names.txt and the one used when implementing the client-side item.


 2. (ITEM_NAME(KR) / name)

 

This is a name requested by some files on your server (especially those of drops), the choice of this name is yours.

 

 3. (ITEM_TYPE / type) and (SUB_TYPE / subtype)

 

Type and SubTypes are really important figures, you better not do a mistake here!

 

Révélation

Here is the list of the Type and SubTypes, it will be presented like this:

  • TYPE : Name of the Type
    • SUB_TYPE : Name of the SubType
    • SUB_TYPE : Name of the SubType

 

In the column ITEM_TYPE you will need to write the TYPE.

In the column SUB_TYPE you will need to write the SUB_TYPE.

 

Using the following ITEM_TYPE:

If I want to add daggers, I will use the TYPE  ITEM_WEAPON in ITEM_TYPE and the SUB_TYPE WEAPON_DAGGER in the SUB_TYPE column.

  • ITEM_WEAPON : Weapon
    • WEAPON_SWORD : Sword
    • WEAPON_DAGGER : Daggers
    • WEAPON_BOW : Bow
    • WEAPON_TWO_HANDED : Two-Handed weapon
    • WEAPON_BELL : Bell
    • WEAPON_FAN : Fans
    • WEAPON_ARROW : Arrow
    • WEAPON_MOUNT_SPEAR : Not really useful and slightly unused
    • WEAPON_CLAW : Claws
    • WEAPON_WEDDING : Wedding Items
  • ITEM_ARMOR : Equipment (other than a Weapon)
    • ARMOR_BODY : Armor
    • ARMOR_HEAD : Headset
    • ARMOR_UNIQUE : Shield
    • ARMOR_WRIST : Bracelet
    • ARMOR_FOOTS : Shoes
    • ARMOR_NECK : Necklaces
    • ARMOR_EAR : Earrings
  • ITEM_USE : Item with a single use
    • USE_POTION : HP/SP Potion (and whatever, a potion)
    • USE_TALISMAN : Warp scrolls
    • USE_TUNING : Refine Scrolls
    • USE_MOVE : /
    • USE_TREASURE_BOX : Treasure Box (Iron & Golden)
    • USE_MONEYBAG : /
    • USE_BAIT : Bait (used for fishing)
    • USE_ABILITY_UP : Potion giving an upgrade (i.e. Dragon Blessing)
    • USE_AFFECT : Pretty much the same though giving an affect
    • USE_CREATE_STONE : Pouch giving a random spirit stones (vnum between 28000 & 28013)
    •  USE_SPECIAL : Those vnums are hardcoded, you wouldn't want to change this
    • USE_POTION_NODELAY : Insta heal potions (or insta SP regen)
    • USE_CLEAR : Potion used to clean all bad affects (similar to Healing Shamans)
    • USE_INVISIBILITY : Gives full invisibility for 5 minutes (like a GM!)
    • USE_DETACHMENT : Used to remove a spirit stone on an item
    • USE_BUCKET : /
    • USE_POTION_CONTINUE : Used after a death (i.e a medal)
    • USE_CLEAN_SOCKET : Removes broken spirit stones
    • USE_CHANGE_ATTRIBUTE : 1/5 Bonus Switcher
    • USE_ADD_ATTRIBUTE : 1/4 & 6/7 Bonus adder
    • USE_ADD_ACCESSORY_SOCKET : Diamond (used on accessories)
    • USE_PUT_INTO_ACCESSORY_SOCKET : Ores (used on accessories)
    • USE_ADD_ATTRIBUTE2 : Blessing Marble
    • USE_RECIPE : Recipe
    • USE_CHANGE_ATTRIBUTE2 : 6/7 Bonus Switcher
    • USE_BIND : Used for Soul Bind system
    • USE_UNBIND : Same, used to unbind an item though
    • USE_TIME_CHARGE_PER : Recharge a Dragon Soul (Duration in %)
    • USE_TIME_CHARGE_FIX : Recharge a Dragon Soul (Fixed Duration)
    • USE_PUT_INTO_BELT_SOCKET : Diamond but for Belts
  • ITEM_MATERIAL : Matertial
    • MATERIAL_DS_REFINE_NORMAL : Material used to refine Dragon Stones
    • MATERIAL_DS_REFINE_BLESSED : Material used to refine Dragon Stones
    • MATERIAL_DS_REFINE_HOLLY : Material used to refine Dragon Stones (with a typo on the word "Holy")
  • ITEM_ELK : Yang
  • ITEM_METIN : Spirit Stones
    • METIN_NORMAL : Normal Stone
    • METIN_GOLD : Rare Stone (Needs a specific slot!) (Unused feature)
  • ITEM_FISH : Poisson
    • FISH_ALIVE : Alive fish (reward to be configured in fishing.txt)
    • FISH_DEAD : Maybe grilled over the campfire
  • ITEM_ROD : Fishing rod
  • ITEM_CAMPFIRE : Campfire
  • ITEM_UNIQUE : Item item-shop (limited in time) (equipable)
    • UNIQUE_SPECIAL_RIDE : Objet pour monture (utilisable par quête avec le flag adéquat(512))
    • UNIQUE_3 : Item for mount 
    • UNIQUE_7 : Same interest as 3/7 items (not equipable)
    • USE_SPECIAL : Are equipable / unequipable or Silk Bundle (vnum 71049)
  • ITEM_SKILLBOOK : Skill Book
  • ITEM_QUEST : Manageable item by quests (using the .use)
  • ITEM_POLYMORPH : Polymorphic orb
  • ITEM_TREASURE_BOX : Chest to open with a key
  • ITEM_TREASURE_KEY : Key to open a chest (drops configarables in special_item_group.txt)
  • ITEM_SKILLFORGET : Livre de l'oubli
  • ITEM_GIFTBOX : Keyless chest (to be configured in special_item_group.txt)
  • ITEM_PICK : Pick
  • ITEM_HAIR : Hair style (old version)
  • ITEM_BLEND : Dew (potion configurable in blend.txt)
  • ITEM_COSTUME : Costumes
    • 0. COSTUME_BODY : Armor costume
    • 1. COSTUME_HAIR : Hair costume (hairstyle)
    • 2. COSTUME_WEAPON : Weapon costume
    • 3. COSTUME_ACCE : Sash / Acce
    • 4. COSTUME_MOUNT : Mount costume
  • ITEM_DS: (Dragon Soul)
    • 0. DS_SLOT1 : Dragon Diamond
    • 1. DS_SLOT2 : Dragon Ruby
    • 2. DS_SLOT3 : Dragon Jade
    • 3. DS_SLOT4 : Dragon Sapphire
    • 4. DS_SLOT5 : Dragon Garnet
    • 5. DS_SLOT6 : Dragon Onyx
  • ITEM_EXTRACT : DragonSoul extractor
    • 0. EXTRACT_DRAGON_SOUL :
    • 1. EXTRACT_DRAGON_HEART :
  • ITEM_SECONDARY_COIN : Used for ShopEx or whatever, probably used in official in the new elemental system for guild shops. Unused yet.
  • ITEM_RING : Rings (Wearable)
  • ITEM_BELT : Belt
Information. If no subtype is used, put ITEM_NONE in the column SOUS_TYPE

 

 

4. (SIZE / size)

 

Represents the number of squares that your item will take.

For example 1 for daggers, 2 for bows, 3 for two-handed swords.

 

5. (ANTI_FLAG / antiflag)

 

Antiflag places restrictions on the use of the item.

 

Révélation

Here is the list :

 

  • ANTI_FEMALE : Unusable by women
  • ANTI_MALE : Unusable by man
  • ANTI_MUSA : Unusable by warrior
  • ANTI_ASSASSIN : Unusable by ninja
  • ANTI_SURA : Unusable by sura
  • ANTI_MUDANG : Unusable by shaman
  • ANTI_GET : Non configuré
  • ANTI_DROP : Impossible to throw to the ground
  • ANTI_SELL : Impossible to sell to merchants
  • ANTI_EMPIRE_A : Not configured
  • ANTI_EMPIRE_B : Not configured
  • ANTI_EMPIRE_C : Not configured
  • ANTI_SAVE : Not configured
  • ANTI_GIVE : Cannot sell in a personal store, to drop it on a player with a negative rank, to throw it on the ground, to exchange it
  • ANTI_PKDROP : Cannot drop it on a player with negative rank
  • ANTI_STACK : Cannot move it to an items of the same vnum to be stacked (it must be stackable, see flags)
  • ANTI_MYSHOP : Cannot sell in a personal store
  • ANTI_SAFEBOX : Cannot move it to the player's warehouse
  • ANTI_BIND : Unable to bind an item to your soul
  • ANTI_WOLFMAN : Unusable by lycan

 

Tips ! You can put several antiflags by separating them with |
Don't hesitate to take an example from the other items to see how it's done

 

 

6. (FLAG / flag)

 

The flag increases the possibilities of actions of your items.

 

Révélation
  • ITEM_TUNABLE : You can remove stones from the item
  • ITEM_STACKABLE : You can stack the
  • COUNT_PER_1GOLD : Can sell / buy items for less than one gold (price = 1/price)
  • ITEM_SLOW_QUERY : This item doesn't flush the database or whatever (useful for unmodifiable items : Potions, Baits...)
  • ITEM_IRREMOVABLE : Item is created by pack (the item must be stackable, the number of items in the pack is configured in the value1 of the item)
  • CONFIRM_WHEN_USE : Once equipped, the item cannot be unequipped (i.e specific thief gloves / exp rings)
  • QUEST_USE : Linked with the special_item_group.txt / the SIGVnum  (unsure)
  • QUEST_USE_MULTIPLE : Makes the item manageable by a quest, especially for type 3/2 items (mount seals)
  • QUEST_GIVE : Make the item manageable by a quest
  • ITEM_QUEST : Disabled, not to be confused with the ITEM_QUEST type! (18)
  • LOG : Leave a trace in the database log when this item is used
  • NONE : Well... None?

 

 

7. (ITEM_WEAR / wearflag)

 

The wearflag indicates the location where the item is equipable.

 

Révélation

Here is the list :

 

  • WEAR_BODY : Armor
  • WEAR_HEAD : Headset
  • WEAR_FOOTS : Shoes
  • WEAR_WRIST : Bracelet
  • WEAR_WEAPON : Weapon
  • WEAR_NECK : Necklace
  • WEAR_EAR : Earrings
  • WEAR_UNIQUE : Item shop items (2 slots)
  • WEAR_SHIELD : Shield 
  • WEAR_ARROW : Arrows
  • WEAR_HAIR : Hairstyles
  • WEAR_COSTUME_BODY : Body costume (armor costume)
  • WEAR_COSTUME_HAIR : Hairstyle / Hair costume
  • WEAR_COSTUME_WEAPON : Costume weapon
  • WEAR_COSTUME_ACCE : Acce / Sash
  • WEAR_COSTUME_MOUNT : Costume mount

 

8. (IMMUNE / immune)

Corresponds to the special effect of your item. The possible list:

  • PARA
  • CURSE
  • STUN
  • SLEEP
  • SLOW
  • POISON
  • TERROR

9.  (GOLD / gold)

Merchant selling price => Player

Note that the sale prices are multiplied by 3 for players with an empire different from that of the merchant.

 

10. (SHOP_BUY_PRICE / buy_price)

Player selling price => merchant

Note that the sale price is automatically divided by 3. And that a 3% tax applies.

In the end, your players only sell items for an amount equal to 32.333% of that value.

 

11. Vnum once refined (REFINE / refine_vnum)

 

Vnum of the item once passed through the hands of the blacksmith or a scroll

Put 0 if you don't want upgrade your item.

Otherwise do not forget to complete the following column.

 

12. (REFINESET / refine_set)

Material needed in order to upgrade an item.

The value must match a row in your refine_proto table in your database

The village blacksmith (vnum 20016) (and scrolls) only manage refine_set less than 500.

The refine_set greater than or equal to 500 can be managed by the NPC with the vnum 20091 (Seon-Pyeong).

 

13. (MAGIC_PCT / magic_pct)

% chance of having a bonus (or more) when creating an item.

Two possibilities to have "natural" bonuses:

  • the value is equal to 100 and the item is created via the item-shop warehouse
  • the item is created following a drop configured in the mob_drop_item.txt

 

14. (LIMIT_TYPE0, LIMIT_TYPE1 / limittype0, limittype1)

Type of limitation

To be able to use the item, the player must have:

  • LIMIT_NONE : no limitation
  • LEVEL : a minimum level of X
  • STR : a minimum force of X (bonus stuff included)
  • DEX : a minimum dexterity of X (bonus stuff included)
  • INT : a minimum intelligence of X (bonus stuff included)
  • CON : a minimum vitality of X (bonus stuff included)
  • PC_BANG : allows the restriction of uses of type 3/8 items to characters with a PCBangIP (Used only for Korea)
  • REAL_TIME : The item has a specific lifespan starting to exhaust after creation
  • REAL_TIME_FIRST_USE : The item has a specific lifespan starting to exhaust after first use
  • TIMER_BASED_ON_WEAR : The item has a specific lifespan starting to exhaust only when used.

X being the value in the next column.

 

15. Values of these limitations (LIMIT_VALUE0 et LIMIT_VALUE1 / limitvalue0 et limitvalue1)

 

For each limitation in the previous column you need to specify a value.

For example, if you want to prohibit the use of an item for players with a level lower than 10. Put 10 in this column and LEVEL in the previous column.

If this column is 0 and the previous column contains:

  • REAL_TIME_FIRST_USE ou REAL_USE : The lifespan of your item will be one week
  • TIMER_BASED_ON_WEAR : The lifespan of your item will be 10 hours when equipped

16. Item bonus (ADDON_TYPE0 à ADDON_TYPE2 / applytype0 à applytype2)

Item bonus

Are the base bonuses of your item. These columns are useful for :

  • All the equipments
  • Stones
  • Item-shop
  • Hairstyles
  • Costumes
  • Belts

Remember to complete the next column with the power of the bonus.

 

17. Power of bonus (ADDON_VALUE0 à ADDON_VALUE2 / applyvalue0 à applyvalue2)

 

For each bonus in the previous column, you need to specify a value.

 

18. Values (value0 à value5 value0 à value5)

 

Depends on the type of your items.

 

Révélation

Weapons :

 

  • Value1 : Minimum magic attack (= valeur+Value5)
  • Value2 : Maximum magic attack (= valeur+Value5)
  • Value3 : Minimum attack (= valeur+Value5)
  • Value4 : Maximum attack (= valeur+Value5)
  • Value5 : Bonus

 

Armor / Helmet / Shield / Boots :

 

  • Value1 : Defense
  • Value3 : ShapeIndex (only for armor)
  • Value5 : Bonus

 

Informaiton. The defense of your item will be equal to Value1+Value5*2

 

Red / blue potions:

 

  • Value0 : number of health points healed
  • Value1 : number of magic points gained

 

Teleport Scroll :

 

  • Value0 : 1 or 2

 

If 1 : first use: save the player's coordinates then teleport him to his map1, second use: teleport the player to the saved coordinates, the item is deleted
If 2 : first use: save the player's coordinates, second use: teleport the player to the saved coordinates, the item is deleted

 

Scroll of up:

 

  • Value0 : 0 à 7
    • 0. Blessing Scroll : downgrade on failure, typical success %, does not work on items with a refine_set equal to 501
    • 1. Magic stone : does not downgrade on failure, classic success%
    • 2. Dragon Scroll : retrograde in the event of failure, % of success predefined according to the up of the item: +0: 100%, +1: 75%, then 65%, 55%, 45%, 40%, 35%, 25 %, 20% for +9
    • 3. Scroll of War : 100% success, only works on items +0 to +3
    • 4. Blacksmith Handbook : downgrade in case of failure, % of success predefined according to the up of the item : +0 : 100%, +1 : 100% then 90%, 80%, 70%, 60%, 50%, 30%, 20% for +9
    • 5. Variable : 100% success, can only upgrade items with an up level equal to the value in Value1. If Value1 = 8: 100% chance of up all items +8.
    • 6. ?? : Downgrade on failure, can only up +4 stones, 80% chance of success, refine_set must equal 702
    • 7. ?? : Used to upgrade costumes
  • Value1 : up level of the object, useful if value0 is 5

 

Bait :

 

  • Value0 : Power of the bait, affects the probability of catching a fish

 

Potions / Juice :

 

  • Value0 : bonus number
  • Value1 : duration of the potion (in seconds)
  • Value2 : power of the bonus

 

Potions :

 

  • Value1 : bonus number
  • Value2 : power of the bonus
  • Value3 : duration of the potion (in seconds)

 

Instant healing potions :

 

  • Value0 : Number of health points healed
  • Value1 : Number of magic points regained
  • Value3 : % of healed player's life
  • Value4 : % player magic regained

 

Spirit Stone Scroll :

 

  • Value0 : 0 or 7
    • If 0 : cleans weapons and armor from broken stones
    • If 7 : Clean sashes

 

Regeneration potion after death :

 

  • Value0 : number of life point
  • Value1 : number of energy points
  • Value2 : duration of the potion (in seconds)

 

Recipe (type 3/23) :

 

  • Value0 : Vnum of the reward
  • Value1 : Vnum of item1
  • Value2 : Number of item1
  • Value3 : Vnum of item2
  • Value4 : Number of item2
  • Value5 : % of success

 

Information. If the player has the sufficient number of item1 and item2 as well as item 50901 (Empty Bottle), he loses the items and wins the reward.

 

Stone :

 

  • Value2 : rarity (never used)
  • Value5 : limit: it is impossible to cumulate on the same object, two stones having the same value in Value5

 

Fishing rod :

 

  • Value0 : % of fishing
  • Value1 : % chance that the fishing rod will gain a point for each fish
  • Value2 : experience needed for fishing rod to up
  • Value3 : % chance of success for up
  • Value4 : vnum of the fishing rod once up

 

Item-shop :

 

  • Value0 : duration
  • Value2 : duration management (0 or 1)
    • If 0 : Time decreases when the object is worn, the duration in Value0 is expressed in minutes
    • If 1 : Time continuously decreases (even when the player is not logged in) and starts when the object is created, the duration in Value0 is expressed in seconds

 

Skill Book :

 

  • Value0 : skill number to up

 

Chest and Key :

 

  • Value0 : if the two Value0 objects are identical, the key opens the chest

 

Pickaxe (type 24) :

 

  • Value1 : % chance that the pickaxe will gain a point for each ore extraction
  • Value2 : experience required for pickaxe to up
  • Value3 : % chance of success for up
  • Value4 : vnum of the pickaxe once up

 

Hairstyles :

 

 

Costume armor :

 

  • Value3 : ShapeIndex

 

All items with the flag 128 (ITEM_IRREMOVABLE) :

 

  • Value1 : number of item created per pack
    • If Value1 is 20, during a pc.give_item2 (item, 1), the player will receive 20 items (same for chests)

 

19. Number of free spaces (SOCKET / socket_pct)

 

Allows you to define the number of stones that can be inserted on your equipment (maximum 3)

 

20. Item with bonus Average/Skill automatic (ATTU_ADDON / addon_type)

 

Put anything other than 0 to activate Average and Skill damage bonus on your item (like Full Moon Sword) (comme l'Épée de lune pleine)

 

21. Specular (SPECULAR / specular)

 

Manages the brightness of the item, the higher the specular the brighter the object (avoid putting more than 100)

If for example weapon use alpha channel (not for specular shining but you know for invisible parts, specular can not be set to 0, otherwise it invisible)

 

21. Categories / Sub Catégories

 

Not detailed.

Put 0

 

 

 

  • A category Questions and Answers is available. If you have a problem or a question, feel free to post a request!
Edited by Veltor88
  • Metin2 Dev 21
  • Eyes 1
  • Dislove 1
  • Not Good 1
  • Good 4
  • Love 1
  • Love 26
Link to comment
Share on other sites

Announcements



×
×
  • Create New...

Important Information

Terms of Use / Privacy Policy / Guidelines / We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.