Jump to content

Implement a weapon/armor/costume/item...


Recommended Posts

  • Distinguished Member

Required level  Beginner

Estimated time :  20 min

Hello everyone !

Needed :

  • Have a Metin2 server with WinSCP access to your server.
  • A tool to unpack your client like EterManagerEternexus, or EterPack Archiver
  • A TGA file for the item icon. You can also use an existing one.
  • If you implement an item with a 3D Model (weapon, armor, costume, etc ..), you'll need :
    • A file .gr2 which corresponds to the 3D model of your item and the tool Granny Viewer which allows you to view this type of model.
    • One or multiple .dds / .tga files which correspond to the textures of the item.   

I. Client Side :

Révélation

 

1. With the help of your unpacker, unpack the following files depending on what you want to implement:

  • locale_xx (xx being the country code you use)
  • icon
  • item (for weapons and hairstyles)
  • root (for armor and hairstyle)
  • pc, pc2 et pc3 (for armors, pc3 is for Lycan)

2. In the pack icon that you have unpacked, place your icon in the .tga file format in the folder icon/item.

 

Information. Skip step 3 if you don't have a .gr2 file (in the case of a simple item for example, without 3D model). Go directly to step 6.

 

3. Place your .gr2 files in the right folder depending on what you want to implement:

 

Révélation

 

For weapons, you will need to place your .gr2 in the item pack => item/weapon.

For armors :

  • Warrior (Male) : ymir work/pc/warrior/
  • Warrior (Female) : ymir work/pc2/warrior/
  • Ninja (Male) : ymir work/pc2/assassin/
  • Ninja (Female) : ymir work/pc/assassin/
  • Sura (Male) : ymir work/pc/sura/
  • Sura (Female) : ymir work/pc2/sura/
  • Shaman (Male) : ymir work/pc2/shaman/
  • Shaman (Female) : ymir work/pc/shaman/
  • Wolfman  : ymir work/pc3/

For hairstyles :

  • Warrior (Male) : ymir work/pc/warrior/hair/
  • Warrior (Female) : ymir work/pc2/warrior/hair/
  • Ninja (Male) : ymir work/pc2/assassin/hair/
  • Ninja (Female) : ymir work/pc/assassin/hair/
  • Sura (Male) : ymir work/pc/sura/hair/
  • Sura (Female) : ymir work/pc2/sura/hair/
  • Shaman (Male) : ymir work/pc2/shaman/hair/
  • Shaman (Female) : ymir work/pc/shaman/hair/
  • Wolfman : ymir work/pc3/hair/

For other items, you can put it anywhere you want. But generally, they should be placed in item/etc/

 

4. Open your .gr2 file with Granny Viewer. In the tab TextureList, you will have the path to the texture of your item.

 

042414unknown.png

 

You will need to place your texture file exactly at this location with the same name.

In the case of this screenshot, I'm placing the texture in the item pack, in the weapon folder.

 

Information. Step 5 is only useful if you are implementing an armor, costume, or hair styles. Go to step 6 otherwise.

 

5. You will now need to display your armor, hairstyle or costume. For this, we will modify the files .msm which are in the pack root. File msm depends on the class and gender of the player:

  • Warrior (Male) => warrior_m.msm
  • Warrior (Female) => warrior_w.msm
  • Ninja (Male) => assassin_m.msm
  • Ninja (Female) => assassin_w.msm
  • Sura (Male) => sura_m.msm
  • Sura (Female) => sura_w.msm
  • Shaman (Male) => shaman_m.msm
  • Shaman (Female) => shaman_w.msm
  • Wolfman => wolf_m.msm

 

Révélation

If you implement an armor :


Look for the line Group ShapeData.
A little further down you will find the line: ShapeDataCount followed by a number.
Increase this number by 1. It corresponds to the number of implemented armor.

 

If you implement a sash :


Look for the line Group AcceData
A little further down you will find the line: AcceDataCount followed by a number.
Increase this number by 1. It corresponds to the number of implemented costume.


If you implement a hairstyle :


Look for the line Group HairData
A little further down you will find the line: HairDataCount followed by a number.
Increase this number by 1. It corresponds to the number of hairstyles implanted.

 

1. In each of them there is a value PathName

This is the default folder in which your client will fetch the data. If your files isn't in this folder, then follow the next step to specify it.

2. In three cases, it will be necessary to add a Group.

Here is an example, what appears in bold is what should not be modified. On the contrary, what is not in bold MUST be changed.

 

Group ShapeData01
{
        ShapeIndex            1

        Model                "assassin_novice.GR2"
        SourceSkin            "assassin_novice_red.dds"
        TargetSkin            "
assassin_novice_green.dds"
}

 

We have :

  • ShapeData01 : The name of the group. The name must be unique!
  • 1 : Number of your armor. Remember the asset, it's the one you should put in " value3 " on the server side. Put the one you want.
  • assassin_novice.GR2 : The location of your .gr2 file.
  • assassin_novice_red.dds : Original texture of your item.
  • assassin_novice_green.dds : Visible texture of your item.

 

Information. The SourceSkin and the TargetSkin are generally the same. But depending on the item you are trying to implement, it may be different.

 

6. You must now generate the file item_proto client that you will find in the pack locale_xx.

The tool Dump Proto, allows you to generate the proto client item from item_names.txt and item_proto.txt (from the server)

Generate it and place it in place of the old one in your client.

Warning ! You will have to do the part 2 before doing this step!

 

7. All you have to do is to link the Vnum to your model and your icon.

In the file item_list.txt in the pack locale_xx, add a new line in this format:

  WEAPON[TAB]icon/item/00010.tga[TAB]d: /ymir work/item/weapon/00010.gr2

We have here:

  • WEAPON : You put what you want. It is an indicator to help you recognize what your item corresponds to.
  • [TAB] Replace it with a tabulation, the key right above the caps lock.
  • icon/item/00010.tga : Location of your .tga file (if it does not exist, the image icon/item/27995.tga will be taken by default) 041308unknown.png
  • d:/ymir work/item/weapon/00010.gr2 location of your gr2 file (optional, if this parameter is empty, the default item will be ymir work/item/etc/item_bag.gr2). Useful for special weapons and items. Don't put anything on your armor / costume / hairstyle.

 

8. Repack all your packs and it will be good for the client side.

 

II. Server Side :

Révélation

 

1. To implement your item on the server side, you will need to connect to your server with WinSCP. Go to the folder /usr/metin2/db (or whatever you db file is) where you will find the file item_names.txt and item_proto.txt.

 

2. In the item_names.txt file, add a new line with the Vnum of your item as well as its display name. Insert a new line in this form:


Vnum[TAB]Item name

 

Warning ! Think carefully about the tabulation between the Vnum of the item and the name of the item. Remember also that a Vnum is unique. It corresponds to the ID that identifies your item.
Information. The item_names.txt file lists all the names of the items in the game. They are each linked to a Vnum. You can use this file as a dictionary to give you items.

4. The item_proto.txt file lists all the information for your item (except the name). A line corresponds to an item. If the line is not provided with the item you want to set up, create it yourself by taking inspiration from the other lines.

 

Warning! The most important parameters are the first (the vnum, the same as item_names.txt), the 3rd (the type) and the 4th (the subtype). For armors/costumes/hairstyles, don't forget to specify in value3, the value of your ShapeIndex on the client side. (Part I, step 5)
Success ! Your item is now integrated into your server!

 

 

  • A category Questions and Answers is available. If you have a problem or a question, feel free to post a request!
  • Metin2 Dev 1
  • Love 12
  • Good 3
Link to post
  • Honorable Member

Excellent tutorial! 

I would add just one little thing (I'm sure its not there, but if I'm blind or something, pardon me).

GR2 and gr2 problem. It's always important to check if models has extension in lower cases letters. Otherwise client won't read the models. Some packers do it automatically, but some of them not.

Edited by .plechito'
  • Metin2 Dev 2
  • Love 3
  • Good 1
Link to post

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



  • Activity

    1. 0

      Compile Server

    2. 0

      QC error message for special characters next to apostrophes

    3. 135

      Render Target Remastered

    4. 0

      Mount not attacking

    5. 2

      Rodnia2 | PVM | International | 3k+ players | Multiple-Languages | 2nd server opening: 13.02.2021

    6. 218

      WorldEditor ReMIX

    7. 54

      Quiver System

  • Recently Browsing

    No registered users viewing this page.

Shoutbox

Shoutbox

Chatroom Rules

 

Join our Discord

A request for help = Shoutbox Ban

Be respectful & Respect the rules

 

×
×
  • 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.