Jump to content
  • 0

how to add custom weapon!!!!! cant find answer in wiki


mhielo12

Question


  • Group:  Members
  • Topic Count:  23
  • Topics Per Day:  0.01
  • Content Count:  112
  • Reputation:   4
  • Joined:  08/28/14
  • Last Seen:  

trouble with adding custom weapon.. my client date is... 2013-12-23cRagexe
already done this..


[40617] = {
        unidentifiedDisplayName = "One-Handed Spear",
        unidentifiedResourceName = "쟈벨린",
        unidentifiedDescriptionName = { "Unknown Item, can be identified by using a ^6666CCMagnifier^000000." },
        identifiedDisplayName = "Lod_Spear",
        identifiedResourceName = "lod_spear",
        identifiedDescriptionName = {
            "Vit +25",
            "Class :^777777 Dagger^000000",
            "Attack :^777777 200^000000",
            "Weight :^777777 60^000000",
            "Weapon Level :^777777 4^000000",
            "Applicable Job :^777777 Swordsman Class^000000",
        },
        slotCount = 4,
        ClassNum = 103
    },

 

 

WEAPONTYPE_Lod_Spear = 103

[Weapon_IDs.WEAPONTYPE_Lod_Spear] = "_40617"

 [Weapon_IDs.WEAPONTYPE_Lod_Spear] = Weapon_IDs.WEAPONTYPE_SPEAR

 

Àΰ£Á·

½ÅÆäÄÚÅ©·ç¼¼ÀÌ´õ

½ÅÆäÄÚÅ©·ç¼¼ÀÌ´õ_¿©_40617.act

½ÅÆäÄÚÅ©·ç¼¼ÀÌ´õ_¿©_40617.spr

½ÅÆäÄÚÅ©·ç¼¼ÀÌ´õ_¿©_40617_°Ë±¤.act

½ÅÆäÄÚÅ©·ç¼¼ÀÌ´õ_¿©_40617_°Ë±¤.spr

½ÅÆäÄÚÅ©·ç¼¼ÀÌ´õ_³²_40617.act

½ÅÆäÄÚÅ©·ç¼¼ÀÌ´õ_³²_40617.spr

½ÅÆäÄÚÅ©·ç¼¼ÀÌ´õ_³²_40617_°Ë±¤.act

½ÅÆäÄÚÅ©·ç¼¼ÀÌ´õ_³²_40617_°Ë±¤.spr

¾ÆÀÌÅÛ

lod_spear.act

lod_spear.spr

¾Ç¼¼»ç¸®

¿©_lod_spear.act

¿©_lod_spear.spr

 

³²_lod_spear.act

³²_lod_spear.spr

HELP PLEASE!!!

Link to comment
Share on other sites

5 answers to this question

Recommended Posts

  • 0

  • Group:  Content Moderator
  • Topic Count:  22
  • Topics Per Day:  0.00
  • Content Count:  639
  • Reputation:   596
  • Joined:  11/25/11
  • Last Seen:  

Two things: First, the viewID must be the same as the ID on your sprite set in weapontable.
Secondly, there's ID ranges for each kind of weapon.

 

 Weapon Sprite Solution (Renewal Clients <= 2012-04-10a & Main Clients <= 2012-07-10a)

For these clients, Weapons are limited to use a range of Item IDs hardcoded in the clientn for each type. For e.g.

1265,Bloody_Roar,Bloody Roar,4,,10,1000,120,,1,0,4096,7,2,34,4,75,1,16,{ bonus bIgnoreDefRace,RC_DemiHuman; bonus bFlee,-160; bonus bFlee2,-160; bonus bNoRegen,1; bonus bNoRegen,2; },{},{}
1266,Test,Test,4,4000,2000,10,165,,1,0,4096,7,2,34,3,33,1,16,{}

// 1-Handed Axes
1301,Axe,Axe,4,500,,800,38,,1,3,8803555,7,2,2,1,3,1,6,{}

Here the item 1266 is a custom katar and it does show up as a katar (if you have the proper sprite files ofcourse). but if i use some id like say 22000, client wont display it. So what is the range of item ids you can use? Look below:

    One handed Swords = 1100-1149, 13400-13499
    Two handed Swords = 1150-1199, 21000-21999 

    Knives, Daggers etc = 1200-1249, 13000-13099
    Katars = 1250-1299 ; Has 35 free IDs 

    One handed Axes = 1300-1349; Has 43 free IDs
    Two handed Axes = 1350-1399; Has 32 free IDs 

    One handed Spears = 1400-1449; Has 34 free IDs
    Two Handed Spears = 1450-1471, 1474-1499 

    Maces = 1500-1549, 16000-16999
    Books = 1550-1599 ; Has only 2 IDs.
    Knuckles = 1800-1899 ; Has 95 free IDs 

    One Handed Staves/Rods = 1600-1699; Has 79 free IDs
    Two Handed Staves/Rods = 1472,1473,2000-2099 

    Bows = 1700-1749, 18100-18499
    Guitars = 1900-1949 ; Has 32 free IDs
    Whips = 1950-1999 ; Has 130 free IDs 

    Handguns = 13100-13149
    Other guns = 13150-13199 

    Ninja weapons = 13300-13399 

The number of unused Item IDs left known for a range has also been mentioned above. Best practice to follow check in your range in official db before adding custom weapon.
Weapon Sprite Solution (For New Clients)

For new clients the view id system is also applicable to client. To add a custom weapon you need to first edit a file called weapontable.lub in your data folder

data/luafiles514/lua files/datainfo/weapontable.lub

I will be adding Oriental_Sword which will be a 1-Handed sword. Open weapontable.lub. First you will see a table called Weapon_IDs. Take note of the first 30 values in this table - these are the only available Weapon types in the client right now.

Anyways go to the last entry which should be for Wizardy Staff = 97. You can use a view id after that like shown below

 WEAPONTYPE_Oriental_Sword = 98,

Come down and you see the next table called WeaponNameTable. Here is where you add your sprite name suffix.
What do i mean by that? Its the last part in your weapon sprite & act file. Before it used to be _<Item ID>.

data/sprite/<job dependent folder>/<job dependent prefix>_<gender><weapon suffix>.spr

OK Back to topic. so I add my entry like shown below.

[Weapon_IDs.WEAPONTYPE_Oriental_Sword] = "Oriental"

Lastly come down further in weapontable.lub and you see the last table called Expansion_Weapon_IDs.
Remember the 30 types i told you to take note of ? here we assign one of those to our custom (like a mapping or connection).
Since mine is a 1-Handed Sword I specify it like below.

[Weapon_IDs.WEAPONTYPE_Oriental_Sword] = Weapon_IDs.WPCLASS_WEAPONTYPE_SWORD 

Now for the most important part. For our client to actually pick up all these details we need to provide the view id which we used in Weapon_IDs table as the ClassNum value in ItemInfo.lua. Check the ItemInfo.lub format shown above for details.

With this your weapon sprite will become visible while attacking. 

 

  • Upvote 1
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  0
  • Topics Per Day:  0
  • Content Count:  8
  • Reputation:   4
  • Joined:  12/04/17
  • Last Seen:  

hello what error can you tell me the specific error maybe i can help , how about the item_db ? did you done with that 

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  23
  • Topics Per Day:  0.01
  • Content Count:  112
  • Reputation:   4
  • Joined:  08/28/14
  • Last Seen:  

no error at all.. its just my custom weapon is showing the default spear sprite.. instead of my custom weapon

here is my item_db

40617,Lod_Spear,lod spear,5,20,,1800,180:40,,3,4,0x00004082,7,2,2,3,102,1,4,{ bonus bVit,25; },{},{}

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  31
  • Topics Per Day:  0.01
  • Content Count:  491
  • Reputation:   19
  • Joined:  11/19/11
  • Last Seen:  

On 12/9/2017 at 11:40 PM, mhielo12 said:

SOLVED!!

how to solved ??

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  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.

×
×
  • Create New...