Alternative Video Tutorial: https://youtu.be/cV11LJ0VDakFirst, let's take a look at the item_db in the db folder, and its structure: ID,DBName,ScreenName,Type,Price,Sell,Weight,ATK,DEF,Range,Slot,Job,Class,Gender,Loc,wLV,eLV, Refineable,View,{Script},{OnEquip_Script},{OnUnequip_Script} ID: ID of the item. Aegis Name: This first name is the DB name. When you use @item and you know the name of the item, but not the ID, type this name instead. Try making the ScreenName the same as this so you wont get confused. English Name: This is the name the server shows. Type: Purpose of the item. 0 = Usable : healing 2 = Usable : other 3 = Misc 4 = Armor 5 = Weapon 6 = Card 7 = Pet Egg 8 = Pet Equipment 10 = Arrow/Ammunition 11 = Usable with delayed consumption (intended for 'itemskill'). Items using the 'itemskill' script command are consumed after selecting a target. Any other command will NOT consume the item. 12 = Shadow Equipment 18 = Another delayed consume that requires user confirmation before using item. Price: Default NPC buying price in Zeny. Sell: NPC selling price in Zeny. Weight: Weight of the item * 10. Means, an item of 0.1 weight each, must be entered as 1. ATK: Base weapon attack, in case of a weapon. In RE enabled servers this field have a optional delimiter : to define this item's weaponMATK bonus, for example, 30:50 would mean the item gives 30 atk and 50 weaponMATK DEF: Base defense for armor-type items. Range: Maximum range in map cells a weapon allows to be the player apart from it's target. Slot: Amount of card slots in weapon/armor-type items. Job: Which jobs this item is available for. Values below can be combined to achieve availability for multiple job classes, i. e. 0x2|0x4 -> 0x6 (Swordman+Mage) (S.) Novice (2^00): 0x00000001 Swordman (2^01): 0x00000002 Mage (2^02): 0x00000004 Archer (2^03): 0x00000008 Acolyte (2^04): 0x00000010 Merchant (2^05): 0x00000020 Thief (2^06): 0x00000040 Knight (2^07): 0x00000080 Priest (2^08): 0x00000100 Wizard (2^09): 0x00000200 Blacksmith (2^10): 0x00000400 Hunter (2^11): 0x00000800 Assassin (2^12): 0x00001000 Unused (2^13): 0x00002000 Crusader (2^14): 0x00004000 Monk (2^15): 0x00008000 Sage (2^16): 0x00010000 Rogue (2^17): 0x00020000 Alchemist (2^18): 0x00040000 Bard/Dancer (2^19): 0x00080000 Unused (2^20): 0x00100000 Taekwon (2^21): 0x00200000 StarGladiator (2^22): 0x00400000 Soul Linker (2^23): 0x00800000 Gunslinger (2^24): 0x01000000 Ninja (2^25): 0x02000000 Gangsi (2^26): 0x04000000 Death Knight (2^27): 0x08000000 Dark Collector (2^28): 0x10000000 Kagerou/Oboro (2^29): 0x20000000 Rebellion (2^30): 0x40000000 All Classes : 0xFFFFFFFF Every Job Except Novice : 0xFFFFFFFE Class: Specifies whether the item can be used by normal, baby or reborn/rebirth classes (trans.). Values below can be combined, i. e. 1|4 -> 5, Normal+Baby Classes (excl. Third Baby classes) Note: For Pre-Renewal Setting 2 enables the item for rebirth/reborn (trans.) classes and 3rd classes, and 8 can be used for all kinds of Third Classes. 1 = Normal 2 = Reborn/Trans. Classes (High Wizards, Champions etc.) (excl. Trans-3rd classes) 4 = Baby Classes (excl. 3rd Baby Classes) 8 = 3rd Classes (excl. Trans-3rd classes and 3rd Baby classes) 16 = Trans-3rd Classes 32 = Baby 3rd Classes Gender: Gender restriction for the item. 0 = Female 1 = Male 2 = No restriction (both) Loc: Equipment location of armor and arrow-type items. Values below can be combined, i. e. 136 would indicate both accessory slots (typical value for accessories). (2^0) 1 = Lower headgear (2^1) 2 = Right hand (2^2) 4 = Garment/Robe (2^3) 8 = Accessory 1 (2^4) 16 = Armor (2^5) 32 = Left hand (2^6) 64 = Shoes (2^7) 128 = Accessory 2 (2^8) 256 = Upper headgear (2^9) 512 = Middle headgear (2^10) 1024 = Costume Upper headgear (2^11) 2048 = Costume Middle headgear (2^12) 4096 = Costume Lower headgear (2^13) 8192 = Costume Garment/Robe (2^15) 32768 = Arrow (arrow-type items only) (2^16) 65536 = Shadow Armor (2^17) 131072 = Shadow Weapon (2^18) 262144 = Shadow Shield (2^18) 524288 = Shadow Shoes (2^20) 1048576 = Shadow Accessory 2 (2^21) 2097152 = Shadow Accessory 1 wLV: Weapon level of an item (1-4), other items 0. eLV: The minimum base level required for using/equipping the item. Refineable: Whether the item is available for refining (1) or not (0). View: Specifies the client-side look for the item. Weapon-type items: Daggers One-Handed Swords Two-Handed Swords One-Handed Spears Two-Handed Spears One-Handed Axes Two-Handed Axes Maces (not used) Wand/Staff Bows/Crossbows Knuckle Weapons Musical Instruments Whips Books Katars Revolvers Rifles Shotguns Gatling guns Grenade launchers Fuuma shuriken Two-handed staves Max Type Dual-wield Daggers Dual-wield Swords Dual-wield Axes Dagger + Sword Dagger + Axe Sword + Axe Shield-type items: Guard, Novice Guard Buckler Shield, Holy Guard, Evangelist Mirror Shield Ammunition-type items: Arrows Throw-able daggers Bullets Shells Grenades Shuriken Kunai Cannonballs Throwable Items (Sling Item) Headgear-type items: Please see the View IDs section of this guide. {Script}: This is where you put your item bonus. Whether it's an usable item or an equip item, it will take effect according to the item type. {OnEquip_Script}: This is where the bonus you want to be applied upon equipping goes. It will only execute as soon as you equip the item. {OnUnequip_Script}: This is where the bonus you want to be applied upon unequipping goes. It will only execute as soon as you unequip the item. In the doc folder look for a text file called "item_bonus", it shows all the scripts items can have and how they work. Defining Items clientside (Renewal Clients <= 2012-04-10a & Main Clients <= 2012-07-10a) After you make your item, put it in your item_db2.txt, so that you will not run into conflicts when updating the SVN later. Then go to your data folder and modify the following files, one after another. idnum2itemdisplaynametable.txt This file holds the item names, as displayed inside the client. Each item added as: ItemID#ItemName# ItemID is the number from your ID column inside the item db. If your item name contains spaces, replace those with _ (underscore). idnum2itemdesctable.txt This file contains the description of your item, when it is right-clicked. The syntax for an item is: ItemID# Item Description Line 1 Item Description Line 2 # You can use any amount of lines for the description. If your description contains a #, make sure it is followed by a space character. idnum2itemresnametable.txt This file sets the inventory and drop-sprite for an the item. Item is defined as follows: ItemID#SpriteName# The SpriteName is the name of the files in collection and item folders inside texture and the ones inside sprite folder. If you want to use the look of an another item, search for it's id and copy the sprite name from there. itemslotcounttable.txt In this file you set the amount of visible slots for the item. You do not need to add 0 slot items or items, which do not have slots at all (i. e. usable items). Syntax: ItemID#NumberOfSlots# NumberOfSlots should be a number from 1-4, larger values might have undesired effects. Files for non-identified items The following files specify the name, description and look for items, which have not yet been identified. Their syntax follows the same rules as for the files with idnum prefix. Normally the same text is entered for non-equipment and generic description (which can be copied from official items) is used for equipment of all sorts (weapons, armor, headgears). num2itemdesctable.txt num2itemdisplaynametable.txt num2itemresnametable.txt Defining Items Clientside (For New Clients) For newer clients all the information which were earlier specified in txt files have been combined into a single file : System/ItemInfo.lub Since ItemInfo.lub is compiled, you need to decompile it to lua , add your customs and recompile back to lub file (Some have said that renaming a decompiled file to lub also works) Syntax: [<item id>] = { unidentifiedDisplayName = <item name to show when not magnified>, unidentifiedResourceName = <file name prefix used for all the images and drop sprite when not magnified>, unidentifiedDescriptionName = { <comma separated list of strings>,<to get multiple lines>,<in item description> }, identifiedDisplayName = <item name to show when magnified>, identifiedResourceName = <file name prefix used for all the images and drop sprite when magnified>, identifiedDescriptionName = { <same format as unidentifiedDescriptionName but for magnified items> }, slotCount = <number of slots>, ClassNum = <View ID - yes the same one that was there item_db> }, You can also put the different values in DescriptionName in separate lines. Example: Lets say i want to add a weapon to item id 25000 - a One handed sword named Devastator with 3 slots & the image files & drop sprite files are all named Black_Sword.* . Also i want to display a Sword when not magnified. [25000] = { unidentifiedDisplayName = "Sword", unidentifiedResourceName = "¼Òµå", unidentifiedDescriptionName = { "Unidentified item, can be identified with [Magnifier]." }, identifiedDisplayName = "Devastator", identifiedResourceName = "Black_Sword", identifiedDescriptionName = { "An Unholy Sword that was created with the sole purpose of destruction", "Class :^777777 Sword^000000", "Attack :^777777 325^000000", "Weight :^777777 80^000000", "Weapon Level :^777777 4^000000", "Required Level :^777777 100^000000", "Applicable Job :^777777 Novice, Swordsman Class, Merchant Class, Thief Class^000000" }, slotCount = 3, ClassNum = 2 }, Allocating Items on Client Side Your custom item will have 4 (6 in case its a headgear or garment) files: 1) Drop sprite -> Helmet_drop.spr 2) Drop act file -> Helmet_drop.act 3) Item Inventory image -> Helmet_item.bmp 4) Item Collection image -> Helmet_collection.bmp (the one you see on its description window) 5) Headgear View sprite -> Helmet.spr 6) Headgear View act file -> Helmet.act Lets say i downloaded a custom item called Helmet which serves as a headgear and the above six files were in them. Step 1: We place the first four files based on what we specified in id2numresnametable.txt (IdentifiedResourceName in Iteminfo.lub). For our example lets say i used "Helmet" as the resource name : i) Copy Helmet_drop.spr to [RO Folder]\data\sprite\¾ÆÀÌÅÛ\Helmet.spr ii) Copy Helmet_drop.act to [RO Folder]\data\sprite\¾ÆÀÌÅÛ\Helmet.act iii) Copy Helmet_item.bmp to [RO Folder]\data\texture\À¯ÀúÀÎÅÍÆäÀ̽º\item\Helmet.bmp iv) Copy Helmet_collection.bmp to [RO Folder]\data\texture\À¯ÀúÀÎÅÍÆäÀ̽º\collection\Helmet.bmp Step 2 (only for Headgears): For displaying headgear on the character there will be two additional files (sprite & act) or 4 if the sprite author intended for a separate set of files for male & female. In my example i have considered the first scenario. The filename for headgear sprite are now specified in accname.lua file (details of which is available in the View IDs Section) lets say i used [ACCESSORY_IDs.HELMET] = "_Helmet", then we need to: i) Copy Helmet.spr to [RO Folder]\data\sprite\¾Ç¼¼»ç¸®\¿©\¿©_Helmet.spr (Female) ii) Copy Helmet.act to [RO Folder]\data\sprite\¾Ç¼¼»ç¸®\¿©\¿©_Helmet.act iii) Copy Helmet.spr to [RO Folder]\data\sprite\¾Ç¼¼»ç¸®\³²\³²_Helmet.spr (Male) iv) Copy Helmet.act to [RO Folder]\data\sprite\¾Ç¼¼»ç¸®\³²\³²_Helmet.act Now it is ready to be used provided you have added entries properly to the lua files. Specifications of the files 1) Drop sprites - ideally have 1 frame & its act file will be just an empty act (only header will be there inside) 2) Equip sprites - typically have 3+ frames to show images for various orientations & its act file will have the info on where to place each frame. 3) Item bmp - 24x24 size 256 bit bmp file. 4) Collection bmp - 75x100 size bmp file (usually 256 bit but there is no restriction) How to differentiate between sprite files? Open both sprite files in Spr Conview. The number of frames in the files can be seen at bottom (Sprite: <currentframe>/<total>). If it says Sprite: 1/1 then its a drop sprite and the other is equip sprite. Sometimes what sprite authors do is they simply copy the original sprite itself to make a drop sprite. In this case you will see both of them as identical when opened in Spr Conview & we don't need to worry about which one is which (since they are the same). If this process confused you, here is an example folder, the sprite is done by drkangel. The folder is virus free. View IDs, Having A Custom Headgear Without Xray Look in your data folder and make sure there is a folder named "lua files", if there is not make it.Download the most recent lub package and extract it to your lua files folder in your data folder.Download the most recent accname.lua and accessoryid.lua, put it in your datainfo folder that is inside the lua files folder. Now download this lub compiling tool, and put it in the datainfo folder. Now, Open accessoryid.lua in the datainfo folder with notepad or a text editor of your choice, go all the way down until the names stop. Add your custom gears before the } symbol. You should use a high number just like with your custom item's database ID, or use unused IDs to be sure you won't have to redo them all in the future, or at least for a while. Example: ACCESSORY_PINKBUNNY_HAIRBAND = 663, ACCESSORY_GREENBUNNY_HAIRBAND = 664, ACCESSORY_OLD_ELFEAR = 665, ACCESSORY_THA_MAERO_MASK = 666, ACCESSORY_THANATOS_MAI_MASK = 667, --668 free ACCESSORY_FISHPIN = 669, ACCESSORY_CUSTOM_HAT = 900, } You must compile to lub if you leave space between IDs, if you don't plan on compiling to lub, make sure you do not skip any numbers. Now open accname.lua, do basically the same thing but just in a different way, and for the sprite. Add your item to the bottom, have it look like the ones above it, except have your items name and the item's sprite name. [ACCESSORY_IDs.ACCESSORY_PINKBUNNY_HAIRBAND] = "_ÇÎÅ©Åä³¢¸Ó¸®¶ì", [ACCESSORY_IDs.ACCESSORY_GREENBUNNY_HAIRBAND] = "_±×¸°Åä³¢¸Ó¸®¶ì", [ACCESSORY_IDs.ACCESSORY_OLD_ELFEAR] = "_°í´ë¿äÁ¤ÀDZÍ", [ACCESSORY_IDs.ACCESSORY_THA_MAERO_MASK] = "_Ÿ³ªÅ佺Àǽ½Çİ¡¸é", [ACCESSORY_IDs.ACCESSORY_THANATOS_MAI_MASK] = "_Ÿ³ªÅ佺ÀÇÁõ¿À°¡¸é", [ACCESSORY_IDs.ACCESSORY_FISHPIN] = "_¹°°í±âÇÉ", [ACCESSORY_IDs.ACCESSORY_CUSTOM_HAT] = "_Sprite_Name_Here", } Delete the accname.lub and accessoryid.lub. Now that you are done, make sure luac.exe is in your datainfo folder, right click the luac.exe, create a shortcut, right click the shortcut, and click properties, in the target area, add right after the quotes, with the quotes: -o "accessoryid.lub" "accessoryid.lua" So that it looks something like this: "C:\Program Files (x86)\Gravity\RO\data\lua files\datainfo\luac5.0.2.exe" -o "accessoryid.lub" "accessoryid.lua" Do this also to "accname.lub" except instead of accessoryid in the quotes, do accname. If there is any lua file leftover, you may want to move it somewhere else just for future changes, like My Documents. For future reference, this is also how you turn the other lub files to lua files. Modifications Sprite Replacement To replace a headgear with your customized headgear, just delete one of the items you want, and replace your customised item ID with that id. Lets say you have something like this: 15000,Angel_Wing,Angel Wing,4,,10,10,0,,1,0,0,3,0,0,0,0,0,{},{},{} And there's an item you wont need, such as: 2220,Hat,Hat,5,1000,,200,,2,,0,10477567,2,256,,0,1,16,{},{},{} Well, to replace it, just delete everything in the hat line but its ID, and paste there your custom item, all the line but the ID. Should be like this: 2220,Hat,Hat,5,1000,,200,,2,,0,10477567,2,256,,0,1,16,{},{},{} 15000,Angel_Wing,Angel Wing,4,,10,10,0,,1,0,0,3,0,0,0,0,0,{},{},{} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv 2220,Angel_Wing,Angel Wing,4,,10,10,0,,1,0,0,3,0,0,0,0,0,{},{},{} All you need to do now is changing the View ID to the Hat, and change your file names to its name. You can find them on the idnum2resnametable.txt Search for 2220 and the gibberish besides it, w/o the # # is the file name, then rename it to your custom item name. Remember to add the files to data\sprite\¾ÆÀÌÅÛ (Icon sprite) and both data\sprite\¾Ç¼¼»ç¸®\³² (Male Item Sprite) and data\sprite\¾Ç¼¼»ç¸®\¿© (Female Item Sprite). Remember, these 2 last item names, must have either a ³²_ for male or ¿©_ for female, at the beginning of the name, both .spr and .act. Also, don't forget to change the other files: idnum2itemdisplaynametable.txt , idnum2itemdesctable.txt , idnum2itemdesctable.txt , num2itemdesctable.txt , num2itemdisplaynametable.txt , num2itemresnametable.txt and itemslotcounttable.txt Use these files if you want to replace sprites, they will be useful. actOR: with the actor you modify the act file, which is the one who tells the client where does the weapon go and what does it have to do and at a certain moment. SPR Conview: you can use these to view which sprite is which, and also see sequence per sequence. Item Restrictions Look on your db folder for a file called item_trade.txt and open it Now, the pattern for a flag is: Item ID, TradeMask, GM-Level Override Item ID: the ID of your item. TradeMask: Testrictions the item will have, such as being dropped, stored or traded. These values can be combined to achieve multiple effects. 1:Item can't be dropped 2:Item can't be traded (nor vended) 4:Item can only be traded with wedded partner 8:Item can't be sold to NPCs 16:Item can't be placed in the cart 32:Item can't be placed in the storage 64:Item can't be placed in the guild storage GM-Level Override: This is the minimum GM level a player must have to avoid these restrictions. Item Script This section duplicates, in whole or part, the scope of itemskill, sc_start and skilleffect. Please discuss this issue on the talk page and conform with style guide by replacing the section with a link and a summary of the repeated material, or by spinning off the repeated text into an article in its own right. This section's factual accuracy is disputed. Please see the relevant discussion on the forums and comment on the further proceeding with this section. (September 2010) Okay, I'll update this as I go; otherwise, I wont have anything new to show. First with usable items. Well, there are 3 types of usables: 1.- Healing items, they have in the type field a 0. 2.- Other uses items, such as fly wings and so, which doesn't heal, but does have an instant effect, they have in the type field a 2. 3.- Usable items, which are skills that requires a target selection, therefore they have a delayed use, and in newer SVNs the item wont be gone until the target is chosen and the cast has finished. Means, you wont lose the item if the skill hasn't been done. They have in the type field an 11. Now, for an item skill, the pattern for a skill is: itemskill <skill id>,<skill level>; Without <> of course. Now, we go to our db\skill_db.txt and search for the blessing ID, searching for AL_ or blessing, but first, the structure of a skill: id,range,hit,inf,element,nk,splash,max,list_num,castcancel,cast_defence_rate,inf2,maxcount,skill_type,blow_count,name,description Now, the AL_BLESSING or Blessing Skill: 34,9,6,16,0,0x1,0,10,1,yes,0,0,0,magic,0, AL_BLESSING,Blessing We grab the ID and put it on our code: itemskill 34,<skill lvl>; Don't mind the actual level of the skill_db.txt for the skill level part. You can actually put the level you want here below 99, so lets pick 4: itemskill 34,4; And finally, insert it on the code. ,{ itemskill 34,4; },{},{} There, we have a