Section 1: Preparing your client/extracting assets
Many client files are packed away from prying eyes. This section will be focused on extracting these files and understanding how they are associated with eachother.
WDF Archives
c3.wdf and data.wdf contain most 'classic' client assets. If you want to edit older items or interface elements, you will first need to extract from these archives.

DBC Files
Newer clients encrypt the .ini files so that they cannot be easily edited. You will need to decrypt them using a DBC tool and re-encrypt them when you are finished editing.

WDB Archives
Newer clients will pack DBC files inside of a WDB archive. Before you can decrypt the DBC files, you need to extract them!

Dat Files
Many of the client files are encrypted with a basic hash. This includes things like itemtype.dat, monstertype.dat and magictype.dat. Before you can edit them you must decrypt them and once you are done your edits you have to re-encrypt them to see your edits in game. (note: old clients do NOT use encrypted files but rather binary file structures. Write your own converter or use a hex editor to edit these (HUGE pain without writing a custom tool)

WDF Archives
c3.wdf and data.wdf contain most 'classic' client assets. If you want to edit older items or interface elements, you will first need to extract from these archives.

DBC Files
Newer clients encrypt the .ini files so that they cannot be easily edited. You will need to decrypt them using a DBC tool and re-encrypt them when you are finished editing.

WDB Archives
Newer clients will pack DBC files inside of a WDB archive. Before you can decrypt the DBC files, you need to extract them!

Dat Files
Many of the client files are encrypted with a basic hash. This includes things like itemtype.dat, monstertype.dat and magictype.dat. Before you can edit them you must decrypt them and once you are done your edits you have to re-encrypt them to see your edits in game. (note: old clients do NOT use encrypted files but rather binary file structures. Write your own converter or use a hex editor to edit these (HUGE pain without writing a custom tool)

Section 2: Useful Tools
Model Viewer
You don't always want to re-open the client to preview your edits. This is a VERY rough model viewer that I wrote a while back. It wasn't really intended for public use so expect plenty of bugs.

Note: This is created in XNA/Monogame. If it wont run, you must download the

Text Editor
I assume most people already use notepad++ but it is nearly required when working on so many text files for edits.

Useful tip: Select multiple lines by holding down ALT+Shift and pushing up/down arrow keys. This is a VERY quick way to edit many lines at once to create SQL update statements for your server or simply to save some time when adding lots of items at once.
DDS Plugin: Photoshop
Most modern versions of photoshop already support DDS files but still useful to have the link incase you need it

DDS Plugin: Gimp
Dont want to pirate photoshop and dont own it? Gimp will work just fine!

C3 Plugin: 3DSMax
There are lots of limitations. No ability to import existing models and no support for newer versions of 3ds max but the tool definitely works and I've used it for lots of projects.

Bitturn
Limited usefulness but this DOES work to export .c3 files so they can be viewed/edited in 3dsmax. Does not seem to work to convert back to .c3 so you'll still need the export tool above.

Section 3: How files are associated
ItemID Structure
The ID used for equipment is not random and follows very specific rules (for reason which will be explained later). All equipment should consist of 6 digits.
410339
TypeLevelQuality
This is the item ID for a super level 130 blade. ALL blades start with the digits 410, followed by the item level (00 and up) followed by quality (9 is always super).
The same EquipmentType ID is used for things such as determining if a skill can be cast (weapon requirement), weapon proficiency, composition checks and more. When adding or editing equipment keep that in mind. It will save you a lot of time.
Generic Items (EG: Potions/scrolls/rings/boots. Anything not visible on your character.)
ini/ItemType.dat controls an items name, id, combat stats, price, etc
ani/MapItemIcon.ani links an item ID to a texture for how an item will look on the ground
ani/ItemMinIcon.ani links an item ID to a texture for how an item will look in your inventory.
Weapons
ini/ItemType.dat controls an items name, id, combat stats, price, etc
ini/ItemAdd.ini controls the bonuses items get for being composed (Note: Generally a 'class' of item such as all 1h melee weapons getting same bonuses)
ini/Weapon.ini links an ItemID to a TextureID and a MeshID
ini/3dobj.ini links an MeshID to a .c3 mesh file (the shape of the weapon)
ini/3dtexture.ini links a TextureID to a .dds texture file (the texture painted ontop of the mesh)
ini/Action3DEffect.ini links an ItemID to a 3DEffect >Note: Diff final digit = diff qualities. 9 = super<
ani/MapItemIcon.ani links an ItemID to a texture for how an item will look on the ground
ani/ItemMinIcon.ani links an ItemID to a texture for how an item will look in your inventory.
Armor/Garments
ini/ItemType.dat controls an items name, id, combat stats, price, etc
ini/ItemAdd.ini controls the bonuses items get for being composed (Note: Generally a 'class' of item such as all 1h melee weapons getting same bonuses)
ini/Armor.ini links an ItemID to a TextureID and a MeshID
ini/3dobj.ini links an MeshID to a .c3 mesh file (the shape of the weapon)
ini/3dtexture.ini links a TextureID to a .dds texture file (the texture painted ontop of the mesh)
ini/Action3DEffect.ini links an ItemID to a 3DEffect >Note: Always ends with 0 even though the ID usually ends in 5<
ani/MapItemIcon.ani links an ItemID to a texture for how an item will look on the ground
ani/ItemMinIcon.ani links an ItemID to a texture for how an item will look in your inventory.
Helmets
ini/ItemType.dat controls an items name, id, combat stats, price, etc
ini/ItemAdd.ini controls the bonuses items get for being composed (Note: Generally a 'class' of item such as all 1h melee weapons getting same bonuses)
ini/Armet.ini links an ItemID to a TextureID and a MeshID
ini/3dobj.ini links an MeshID to a .c3 mesh file (the shape of the weapon)
ini/3dtexture.ini links a TextureID to a .dds texture file (the texture painted ontop of the mesh)
ini/Action3DEffect.ini links an ItemID to a 3DEffect
ani/MapItemIcon.ani links an ItemID to a texture for how an item will look on the ground
ani/ItemMinIcon.ani links an ItemID to a texture for how an item will look in your inventory.
Effects
ini/3dEffect.ini Links an effect name with a list of TextureIDs and EffectObjIDs. ADB refers to how transparency works. 2 = slightly default, 5 = black is transparent, 6 = alpha is transparent.
ini/3dTexture.ini Links a TextureID to a .dds texture file (the texture painted across the effect)
ini/3dEffectObj.ini Links an EffectObjID to a .c3 effect file (the shape and motion of the effect)
Status Effects
ini/stateff.ini links an effect name to a bitflag (Depending on client version may show the bit # or may show a hex value)
ini/3dEffect.ini Links an effect name with a list of TextureIDs and EffectObjIDs. ADB refers to how transparency works. 2 = slightly default, 5 = black is transparent, 6 = alpha is transparent.
ini/3dTexture.ini Links a TextureID to a .dds texture file (the texture painted across the effect)
ini/3dEffectObj.ini Links an EffectObjID to a .c3 effect file (the shape and motion of the effect)
Maps
map/map/xxxx.dmap controls all map access/object locations. References a puzzle file as well as many scene objects
map/puzzle/xxxx.pul defines a grid of puzzle IDs for the map (how the textures are arranged for the map) and references an ani file
ani/xxxx.ani links puzzle ID to a map .dds texture
data/map/puzzle contains all of the map .dds textures as referenced in the puzzle+ani files
Section 3: Re-Texturing a Garment
Re-texturing garments is a very popular way to edit the client and can be as easy or hard as you want it to be. This will focus on the NON artist route of simply locating, re-coloring and adding it to the client as a new item.
Find a garment to re-color
If you haven't already, extract any packed client assets (refer to section 1) and if needed, download my model viewer.
For this example we will be using dark wizard.
Step 1: Find the ItemID from itemtype.dat (decrypt it): 181355 DarkWizard
Step 2: Find the Armor.ini entry
Replace the last digit with 0 for garments (they dont have quality). If its a gender specific garment there should be 2 entries, if not there should be 4.
1 = small female
2 = large female
3 = small male
4 = large male
You might fuck it up. Save a copy first.
Step 5: Open the texture to edit, make your edits, save.
You can use gimp, phtoshop or any other editor with .dds support. If you cannot find the texture at the path listed, likely you haven't extracted all your client files as mentioned in section 1.
Protip - the color replace tool in phtoshop is AMAZING for quickly changing the color of a garment. Here's a 2 second example of what I did to female darkwizard.
Step 5: Preview your changes
Use the model viewer or load the model in game to see how it looks.
Step 6: Create a new item
Create a new item in itemtype.dat. The ID of the garment must be unique (if the client has multiple dark wizards, just replace one of them)
Create or edit the armor.ini entry to reference a new textureID
Create or edit the 3dtexture.ini entry to reference the new .dds file
Create or edit the ani/ItemMinIcon.ani entry so you have an item icon for it in your inventory
Create or edit the ani/MapItemIcon.ani entry so you have an item icon for it on the ground
Add the new item to your server's ItemType table so that its an actual item
Congratz! You've just re-colored your first garment so that it looks different WITHOUT destroying the one you already have. Pack up all the edited files into a patch and send to your players.
Obviously if you wanted to be fancy you can paint something completely different ontop of the garment but currently there is no way to change the shape of the garment itself. There is no public .c3 export tool that works with garments that I've seen.
Pro tip: Edit the alpha layer to delete parts of the mesh. Does it have wings or a super long piece of cloth? Click the alpha layer in photoshop to set it to transparent and it wont show in game!
Find a garment to re-color
If you haven't already, extract any packed client assets (refer to section 1) and if needed, download my model viewer.
For this example we will be using dark wizard.
Step 1: Find the ItemID from itemtype.dat (decrypt it): 181355 DarkWizard
Step 2: Find the Armor.ini entry
Replace the last digit with 0 for garments (they dont have quality). If its a gender specific garment there should be 2 entries, if not there should be 4.
1 = small female
2 = large female
3 = small male
4 = large male
Step 3: Search 3dtexture.ini for the TextureIDQuote:
[1181350]
Part=1
Mesh0=1137370
Texture0=1137370
MixTex0=0
MixOpt0=0
Asb0=5
Adb0=6
Material0=Default
[2181350]
Part=1
Mesh0=2137370
Texture0=1137370
MixTex0=0
MixOpt0=0
Asb0=5
Adb0=6
Material0=Default
[3181350]
Part=1
Mesh0=3137370
Texture0=3137370
MixTex0=0
MixOpt0=0
Asb0=5
Adb0=6
Material0=Default
[4181350]
Part=1
Mesh0=4137370
Texture0=3137370
MixTex0=0
MixOpt0=0
Asb0=5
Adb0=6
Material0=Default
Step 4: BACK UP THE TEXTURE FILE!!!Quote:
001137370=c3/texture/001137370.dds
003137370=c3/texture/003137370.dds
You might fuck it up. Save a copy first.
Step 5: Open the texture to edit, make your edits, save.
You can use gimp, phtoshop or any other editor with .dds support. If you cannot find the texture at the path listed, likely you haven't extracted all your client files as mentioned in section 1.
Protip - the color replace tool in phtoshop is AMAZING for quickly changing the color of a garment. Here's a 2 second example of what I did to female darkwizard.
Step 5: Preview your changes
Use the model viewer or load the model in game to see how it looks.
Step 6: Create a new item
Create a new item in itemtype.dat. The ID of the garment must be unique (if the client has multiple dark wizards, just replace one of them)
Create or edit the armor.ini entry to reference a new textureID
Create or edit the 3dtexture.ini entry to reference the new .dds file
Create or edit the ani/ItemMinIcon.ani entry so you have an item icon for it in your inventory
Create or edit the ani/MapItemIcon.ani entry so you have an item icon for it on the ground
Add the new item to your server's ItemType table so that its an actual item
Congratz! You've just re-colored your first garment so that it looks different WITHOUT destroying the one you already have. Pack up all the edited files into a patch and send to your players.
Obviously if you wanted to be fancy you can paint something completely different ontop of the garment but currently there is no way to change the shape of the garment itself. There is no public .c3 export tool that works with garments that I've seen.
Pro tip: Edit the alpha layer to delete parts of the mesh. Does it have wings or a super long piece of cloth? Click the alpha layer in photoshop to set it to transparent and it wont show in game!
Section 4: Editing weapon glows
This section will only be concerned with editing an existing effect on an existing weapon. Section 5 will focus on creating new ones. This knowledge will be needed for that section though so definitely read them both if that is your goal.
Step 1: Choose a weapon/find the item ID
Search your decrypted itemtype.dat for the weapon you want to modify. In this example we'll choose super level 130 blade (ID: 410339)
Step 2: Locate the Effect name
Open Action3DEffect.ini and search for the item ID. 410339 becomes 999.999.410.339. The effect name is 410339
Step 3: Locate the Effect entry
Open 3DEffect.ini, search for the effect name. You will get a list of EffectObjIDs and TextureIDs. We only care about the TextureIDs.
Open 3dTexture.ini and search for the TextureIDs you found above. They will give you the actual path of the textures.
Step 4: Open the textures, edit them, save them.
Use your favorite .dds editor (photoshop or gimp usually). For tweaking colors, the hue or color replace tool is usually best. If not get fancy and start painting.
REMINDER: The alpha layer is usually used for transparency. If you are changing the shape of the effect then be sure to update the alpha layer to match.
Step 1: Choose a weapon/find the item ID
Search your decrypted itemtype.dat for the weapon you want to modify. In this example we'll choose super level 130 blade (ID: 410339)
Step 2: Locate the Effect name
Open Action3DEffect.ini and search for the item ID. 410339 becomes 999.999.410.339. The effect name is 410339
Step 3: Locate the Effect entry
Open 3DEffect.ini, search for the effect name. You will get a list of EffectObjIDs and TextureIDs. We only care about the TextureIDs.
Step 4: Locate the Effect texturesQuote:
[410339]
Amount=5
EffectId0=460
TextureId0=460
ASB0=5
ADB0=2
EffectId1=461
TextureId1=461
ASB1=5
ADB1=2
EffectId2=462
TextureId2=462
ASB2=5
ADB2=2
EffectId3=463
TextureId3=463
ASB3=5
ADB3=2
EffectId4=464
TextureId4=464
ASB4=5
ADB4=2
Delay=0
LoopTime=99999
FrameInterval=33
LoopInterval=0
OffsetX=0
OffsetY=0
OffsetZ=0
Open 3dTexture.ini and search for the TextureIDs you found above. They will give you the actual path of the textures.
Note: If those files dont exist it means you didnt use the WDF extractor. Refer to section 1 of the post.Quote:
460=c3/effect/blade/410339/1.dds
461=c3/effect/blade/410339/2.dds
462=c3/effect/blade/410339/3.dds
463=c3/effect/blade/410339/4.dds
464=c3/effect/blade/410339/5.dds
Step 4: Open the textures, edit them, save them.
Use your favorite .dds editor (photoshop or gimp usually). For tweaking colors, the hue or color replace tool is usually best. If not get fancy and start painting.
REMINDER: The alpha layer is usually used for transparency. If you are changing the shape of the effect then be sure to update the alpha layer to match.
Section 5: Adding a Custom Weapon
This section will involve information from Section 4, please read it in advance. It also assumes you have an old version of 3dsmax to export .c3 files with. There are some torrents out there. I don't see any legal way to get a copy of the old version though... so you're on you're own there.
Step 1: Create a weapon model
Create a custom model, buy one from an asset store, import one from another game, etc. Once it's finished, choose a new ID that is not in use and export as .c3 to the c3/mesh folder
Step 2: Create/Export the weapon texture
If you're using a model you purchased/imported it probably already has a texture. Make sure the alpha layer is set proeprly and then export as dds into the c3/texture folder
Step 3: Add the new item to itemtype
Use an existing entry as a template. Make sure your item ID is not already in use, update any stats that need to be different (attack for example)
Add the entry to your server itemtype as well
Step 4: Add the weapon.ini entry
Use an existing entry as a template. In this case here's what I'm adding for this example
Step 4: Add the 3dobj.ini entry
Use the ID above, link it to the path of the mesh you just exported
560540=c3/mesh/560540.c3
Step 5: Add the 3dtexture.ini entry
Use the ID above, link it to the path of the texture you just exported
560540=c3/texture/560540.dds
Step 6: TEST
Make sure the weapon looks good. Proper size/position/coloring/etc. Easier to make tweaks now before you continue.
In this case, things look pretty good! Bit big but maybe that's how we like it
Step 1: Create a weapon model
Create a custom model, buy one from an asset store, import one from another game, etc. Once it's finished, choose a new ID that is not in use and export as .c3 to the c3/mesh folder
Step 2: Create/Export the weapon texture
If you're using a model you purchased/imported it probably already has a texture. Make sure the alpha layer is set proeprly and then export as dds into the c3/texture folder
Step 3: Add the new item to itemtype
Use an existing entry as a template. Make sure your item ID is not already in use, update any stats that need to be different (attack for example)
Add the entry to your server itemtype as well
Step 4: Add the weapon.ini entry
Use an existing entry as a template. In this case here's what I'm adding for this example
Re-stating from earlier: This is the weapon ID linking it to the MeshID and TextureID.Quote:
[560540]
Part=1
Mesh0=560540
Texture0=560540
MixTex0=0
MixOpt0=0
Asb0=5
Adb0=6
Material0=default
Step 4: Add the 3dobj.ini entry
Use the ID above, link it to the path of the mesh you just exported
560540=c3/mesh/560540.c3
Step 5: Add the 3dtexture.ini entry
Use the ID above, link it to the path of the texture you just exported
560540=c3/texture/560540.dds
Step 6: TEST
Make sure the weapon looks good. Proper size/position/coloring/etc. Easier to make tweaks now before you continue.
In this case, things look pretty good! Bit big but maybe that's how we like it
NOTE: THIS IS A WORK IN PROGRESS. I have a ton more to post but the thread will be reallyyyy long...






