Note - This is a work in progress and is targeted toward individuals with prior experience adding/modifying files within the game client archives.
For this you will need the following:
- .lua files contained within "data/lua files/", which can be downloaded here:
http://www.justintynne.com/outbox/rms/luafiles.zip or manually downloaded
http://svn6.assembla.com/svn/ClientSide/Lua_Project/- Newest released RE client with "Read lua files before lub files" selected when applying the diff patch.
------- Download Client w/diff and diffing program here:
http://www.justintynne.com/outbox/rms/040710ClientDiff.zip- Fully updated RE client.
1. Placement
Create a folder called "lua files" in your "data" folder (data/lua files/) and place the .lua files from the zip above into the folder.
2. Editing
Open data/lua files/datainfo/ and open "accname.lua" and "accessoryid.lua" in a text editor.
accname.lua:Find a line that you want to copy. For this example, I've chosen "PRETTY_RIBBON" which looks like this:
[ACCESSORY_IDs.ACCESSORY_
PRETTY_RIBBON] = "
_¿¹»Û¸®º»",
The red highlighted text above is the sprite name (as found in your resname.txt files).
The blue highlighted text above is YOUR new name for the headgear.
Here, I've changed the name to CHARMING_RIBBON and I'm using the same sprite (Kawaii Ribbon):
[ACCESSORY_IDs.ACCESSORY_CHARMING_RIBBON] = "_¿¹»Û¸®º»",
I'm speculating that if you wish to add in a custom sprite, you'd simply write the sprite name at the end, such as:Confirmed: If you wish to use a custom sprite, use the filename without .spr, prefixed with an underscore.
[ACCESSORY_IDs.ACCESSORY_CHARMING_RIBBON] = "_spritename",
Note: You MUST use an underscore before the sprite name! (Just like in Xray)
Next you'll need to remember the name you assign the new headgear and open the next file, "accessoryid.lua".
accessoryid.luaFind the matching entry in this file (PRETTY_RIBBON) that you used in the step above. It will look like this,
ACCESSORY_PRETTY_RIBBON = 211
The "211" at the end is the VIEW ID as assigned in the item database (sql:
http://svn.eathena.ws/svn/ea/trunk/sql-files/item_db.sql)
Copy it and modify it to contain your desired ID (number at the end).
NOTE: At this time you can only use View ID's up through 999, so give yourself a large enough gap so you can add in Gravity's updates later. For this example I'm using view ID 999.
ACCESSORY_CHARMING_RIBBON = 999
* - Make sure you add a comma to the end of the line before your addition! (ACCESSORY_PERSICA = 659
,).
Then, insert your new item with the view ID number you wrote above as the view ID for the item in the database. Here's an SQL insert for item_db2:
REPLACE INTO `item_db2` VALUES (5140,'Charming_Ribbon','Kawaii Ribbon',5,20,NULL,400,NULL,1,NULL,1,0xFFFFFFFF,7,2,256,NULL,10,1,
999,'bonus2 bSubRace,RC_Undead,5; bonus2 bSubRace,RC_Demon,5;',NULL,NULL);
Reload your item database, restart your game client and voila, the sprite *should* work!

You can also add monsters in similarly using the jobname.lua and npcidentity.lua files.