Quote:
Originally Posted by LordGragen.
i extracted c3.wdb from ini got the .dbc files, is there a way to read that files, are thy like text or? i need to read them to be able to add new mounts and stuff like that,
|
Besides lots of code published, I have found more info by trial and error, and have almost finished classes to handle these dbc files, either in binary or text format. Text format I got some files from some very old patches for Heroes of Might and Magic Online, but not full documented yet. These files seems to be in same format for Conquer (I tested just a few patches with dbc files from Conquer).
Unfortunately, my Visual Studio now crashes when hit any breakpoint, after installed C++ over C#, and I'm not able to repair it or uninstall, so I'm unable to complete the classes. If you want, I could post here what I have, but I was rewriting it all from scratch, after adquired new knowledge in programming; so the code is not very good yet...
Anyway, for mounts you just need to handle 2 main dbc files:
- mount.ini (MESH type)
- mountmotion.ini (RSDB 64 bits IDs type)
"mount.ini", as mesh file, is a collecion of models to use when showing animated 3D graphics. Every model is a collection of linked parts, from 1 to 4 parts at most. For example, head, body, tail.
"mountmotion.ini", as a RSDB file, defines the C3 files where you can find how a skeleton moves when animated.
When showing animated 3D graphics, the game uses C3 files to define the skeleton of a model, DDS files to define the textures, and Materials definition to handle the properties of every surface.
- mount.ini defines the Mesh ID (3D skeleton in C3 format) and Texture IDs (2D images in DDS format) files to use, the options to mix textures, and the materials used. The C3 files corresponding to the ID can be found in "3DObj.ini" (RSDB file). The DDS files corresponding to the IDs can be found in "3DTexture.ini" (RSDB file).
- mountmotion.ini defines the movements of each model part (in C3 format).
- Material.ini defines the properties of every surface.
To create new mounts you need to handle dbc files in RSDB, MESH and MATR formats, as well as DDS files and C3 files.
C3 files also contains different classes of data. I have almost completed the definition for every type and programmed classes, if you are interested, but as the dbc files, I was rewriting it from scratch.
If you want to team, we could start a repository to work together...
EDIT: Some samples of what you can find inside these files.
mount.ini
Quote:
[80300060]
Part=1
Mesh0=803060
Texture0=803060
MixTex0=0
MixOpt0=0
Asb0=5
Adb0=6
Material0=default
|
This mount model have only 1 part, with MeshID=803060 and TextureID=803060. Do not mix textures, uses Alpha channel from source, and inverse alpha channel from destination. Uses default material.
Mesh file is "c3/mount/803/803060.c3", which is in PHY4 format and have 8 objects (body, head, 4 x legs, mount and tail) with a total of 2492 polygons and 2010 vertices, using 1 texture file.
Texture file is "c3/mount/803/803060.dds"
mountmotion.ini
Quote:
803000600001=c3/Mount/803/101.c3
803000600002=c3/Mount/803/101.c3
803000600003=c3/Mount/803/101.c3
|
This mount motion is defined in "c3/Mount/803/101.c3" file, which is in motion (MOTI) format, and have 1 animation with 29 frames.
Material.ini
Quote:
|
default FFAFC9F1 FFFFFFFF FF43341D FF515151 0
|
This material named "default" have the following properties:
Diffuse color = 0xFF, 0xAF, 0xC9, 0xF1 (ARGB)
Ambient color = 0xFF, 0xFF, 0xFF, 0xFF (ARGB)
Specular 'shininess' = 0xFF, 0x43, 0x34, 0x1D (ARGB)
Emissive color = 0xFF, 0x51, 0x51, 0x51 (ARGB)
Sharpness if specular highlight = 0x00
If you want to edit also the mount effects, check ini/MountEffect.ini