|
You last visited: Today at 20:42
Advertisement
[Release]DBC Converter
Discussion on [Release]DBC Converter within the CO2 Weapon, Armor, Effects & Interface edits forum part of the CO2 Guides & Templates category.
02/23/2012, 11:26
|
#16
|
elite*gold: 20
Join Date: Jun 2006
Posts: 3,296
Received Thanks: 925
|
Quote:
Originally Posted by JobvdH
I hope you'll succeed!
If you succeed this will be a great progress to 5165+ item editing!
|
Don't expect anything though, the chance of me doing anything half decent at programming is as high as doomsday happening this year.
|
|
|
02/23/2012, 11:50
|
#17
|
elite*gold: 0
Join Date: Nov 2010
Posts: 371
Received Thanks: 120
|
Ah alright, perhaps CrpSky might want to help you?
If he won't, you atleast tried it
|
|
|
02/23/2012, 18:15
|
#18
|
elite*gold: 0
Join Date: Jan 2008
Posts: 1,443
Received Thanks: 1,175
|
I fixed the errors, plus I added the 3DEffect support.
|
|
|
02/23/2012, 18:30
|
#19
|
elite*gold: 0
Join Date: Nov 2010
Posts: 371
Received Thanks: 120
|
Quote:
Originally Posted by CptSky
I fixed the errors, plus I added the 3DEffect support.
|
Great job!
|
|
|
02/23/2012, 18:33
|
#20
|
elite*gold: 20
Join Date: Jun 2006
Posts: 3,296
Received Thanks: 925
|
Quote:
Originally Posted by CptSky
I fixed the errors, plus I added the 3DEffect support.
|
Also added 3deffect support, can't test since I'm on my notebook but it should work.
|
|
|
02/23/2012, 19:01
|
#21
|
elite*gold: 0
Join Date: Jan 2009
Posts: 586
Received Thanks: 336
|
we are getting so close
|
|
|
03/13/2012, 10:24
|
#22
|
elite*gold: 20
Join Date: Jun 2006
Posts: 3,296
Received Thanks: 925
|
And it should support all .dbc files now.
//edit Moved to the editing section as it seems more suitable.
|
|
|
04/25/2012, 23:22
|
#23
|
elite*gold: 28
Join Date: Jun 2010
Posts: 2,225
Received Thanks: 868
|
What about converting the .txt back to .dbc? Or is that not required, abit of a nub with this ****.
|
|
|
04/25/2012, 23:30
|
#24
|
elite*gold: 0
Join Date: Jan 2008
Posts: 1,443
Received Thanks: 1,175
|
Quote:
Originally Posted by _DreadNought_
What about converting the .txt back to .dbc? Or is that not required, abit of a nub with this ****.
|
It should support both conversions as my DLL support them...
|
|
|
04/25/2012, 23:44
|
#25
|
elite*gold: 28
Join Date: Jun 2010
Posts: 2,225
Received Thanks: 868
|
Ah yeah it did, it just wasn't very clear...
However when trying to convert 3DEffectObj.dbc I am unable to do it, this exception is as follows(in spoiler)..
Quote:
|
Originally Posted by DBC Converter & .Net
See the end of this message for details on invoking
just-in-time (JIT) debugging instead of this dialog box.
************** Exception Text **************
System.Exception: Invalid EFFE Header in file: c:\users\john\documents\conquer stuff\take two\ini\3deffectobj.dbc
at CO2_CORE_DLL.IO.DBC.EFFE.LoadFromDat(String Path)
at DBC_Converter.Form1.button3_Click(Object sender, EventArgs e)
at System.Windows.Forms.Control.OnClick(EventArgs e)
at System.Windows.Forms.Button.OnClick(EventArgs e)
at System.Windows.Forms.Button.OnMouseUp(MouseEventAr gs mevent)
at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ButtonBase.WndProc(Message& m)
at System.Windows.Forms.Button.WndProc(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.O nMessage(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.W ndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
************** Loaded Assemblies **************
mscorlib
Assembly Version: 4.0.0.0
Win32 Version: 4.0.30319.261 (RTMGDR.030319-2600)
CodeBase: file:///C:/Windows/Microsoft.NET/Framework/v4.0.30319/mscorlib.dll
----------------------------------------
DBC Converter
Assembly Version: 1.0.0.0
Win32 Version: 1.0.0.0
CodeBase: file:///C:/Users/John/Documents/Conquer%20stuff/Tools/DBC%20Converter/DBC%20Converter.exe
----------------------------------------
System.Windows.Forms
Assembly Version: 4.0.0.0
Win32 Version: 4.0.30319.235 built by: RTMGDR
CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Windows.Forms/v4.0_4.0.0.0__b77a5c561934e089/System.Windows.Forms.dll
----------------------------------------
System.Drawing
Assembly Version: 4.0.0.0
Win32 Version: 4.0.30319.1 built by: RTMRel
CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Drawing/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
----------------------------------------
System
Assembly Version: 4.0.0.0
Win32 Version: 4.0.30319.261 built by: RTMGDR
CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System/v4.0_4.0.0.0__b77a5c561934e089/System.dll
----------------------------------------
System.Configuration
Assembly Version: 4.0.0.0
Win32 Version: 4.0.30319.1 (RTMRel.030319-0100)
CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Configuration/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Configuration.dll
----------------------------------------
System.Xml
Assembly Version: 4.0.0.0
Win32 Version: 4.0.30319.233 built by: RTMGDR
CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Xml/v4.0_4.0.0.0__b77a5c561934e089/System.Xml.dll
----------------------------------------
CO2_CORE_DLL
Assembly Version: 1.0.0.11
Win32 Version: 1.0.0.11
CodeBase: file:///C:/Users/John/Documents/Conquer%20stuff/Tools/DBC%20Converter/CO2_CORE_DLL.DLL
----------------------------------------
************** JIT Debugging **************
To enable just-in-time (JIT) debugging, the .config file for this
application or computer (machine.config) must have the
jitDebugging value set in the system.windows.forms section.
The application must also be compiled with debugging
enabled.
For example:
<configuration>
<system.windows.forms jitDebugging="true" />
</configuration>
When JIT debugging is enabled, any unhandled exception
will be sent to the JIT debugger registered on the computer
rather than be handled by this dialog box.
|
|
|
|
04/26/2012, 00:11
|
#26
|
elite*gold: 0
Join Date: Jan 2008
Posts: 1,443
Received Thanks: 1,175
|
Quote:
Originally Posted by _DreadNought_
Ah yeah it did, it just wasn't very clear...
However when trying to convert 3DEffectObj.dbc I am unable to do it, this exception is as follows(in spoiler)..
|
The app should use the RSDB [32bits] class and not the EFFE class for this file.
|
|
|
04/26/2012, 00:35
|
#27
|
elite*gold: 28
Join Date: Jun 2010
Posts: 2,225
Received Thanks: 868
|
Here is the fixed class:
Code:
using System;
using System.Windows.Forms;
using System.IO;
namespace DBC_Converter
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void button1_Click(object sender, EventArgs e)
{
var result = openFileDialog1.ShowDialog();
if (result == DialogResult.OK)
{
textBox1.Text = openFileDialog1.FileName.ToLower();
}
}
private void button3_Click(object sender, EventArgs e)
{
if (File.Exists(textBox1.Text))
{
switch (Header(textBox1.Text))
{
case "EFFE":
{
var dbc = new CO2_CORE_DLL.IO.DBC.EFFE();
if (IsDbc(textBox1.Text))
{
dbc.LoadFromDat(textBox1.Text);
dbc.SaveToTxt(ExtDbc(true));
}
else
{
dbc.LoadFromTxt(textBox1.Text);
dbc.SaveToDat(ExtDbc(false));
}
Done();
break;
}
case "RSDB32":
{
var dbc = new CO2_CORE_DLL.IO.DBC.RSDB_SMALL();
if (IsDbc(textBox1.Text))
{
dbc.LoadFromDat(textBox1.Text);
dbc.SaveToTxt(ExtDbc(true));
}
else
{
dbc.LoadFromTxt(textBox1.Text);
dbc.SaveToDat(ExtDbc(false));
}
Done();
break;
}
case "RSDB64":
{
var dbc = new CO2_CORE_DLL.IO.DBC.RSDB_BIG();
if (IsDbc(textBox1.Text))
{
dbc.LoadFromDat(textBox1.Text);
dbc.SaveToTxt(ExtDbc(true));
}
else
{
dbc.LoadFromTxt(textBox1.Text);
dbc.SaveToDat(ExtDbc(false));
}
Done();
break;
}
case "SIMO":
{
var dbc = new CO2_CORE_DLL.IO.DBC.SIMO();
if (IsDbc(textBox1.Text))
{
dbc.LoadFromDat(textBox1.Text);
dbc.SaveToTxt(ExtDbc(true));
}
else
{
dbc.LoadFromTxt(textBox1.Text);
dbc.SaveToDat(ExtDbc(false));
}
Done();
break;
}
case "MESH":
{
var dbc = new CO2_CORE_DLL.IO.DBC.MESH();
if (IsDbc(textBox1.Text))
{
dbc.LoadFromDat(textBox1.Text);
dbc.SaveToTxt(ExtDbc(true));
}
else
{
dbc.LoadFromTxt(textBox1.Text);
dbc.SaveToDat(ExtDbc(false));
}
Done();
break;
}
case "EMOI":
{
var dbc = new CO2_CORE_DLL.IO.DBC.EMOI();
if (IsDbc(textBox1.Text))
{
dbc.LoadFromDat(textBox1.Text);
dbc.SaveToTxt(ExtDbc(true));
}
else
{
dbc.LoadFromTxt(textBox1.Text);
dbc.SaveToDat(ExtDbc(false));
}
Done();
break;
}
case "MATR":
{
var dbc = new CO2_CORE_DLL.IO.DBC.MATR();
if (IsDbc(textBox1.Text))
{
dbc.LoadFromDat(textBox1.Text);
dbc.SaveToTxt(ExtDbc(true));
}
else
{
dbc.LoadFromTxt(textBox1.Text);
dbc.SaveToDat(ExtDbc(false));
}
Done();
break;
}
case "ROPT":
{
var dbc = new CO2_CORE_DLL.IO.DBC.ROPT();
if (IsDbc(textBox1.Text))
{
dbc.LoadFromDat(textBox1.Text);
dbc.SaveToTxt(ExtDbc(true));
}
else
{
dbc.LoadFromTxt(textBox1.Text);
dbc.SaveToDat(ExtDbc(false));
}
Done();
break;
}
default:
{
MessageBox.Show("The DBC file is not recognized.");
break;
}
}
}
else
{
MessageBox.Show("You either forgot to select a file or somehow selected a non-existing one.");
}
}
private void button2_Click(object sender, EventArgs e)
{
MessageBox.Show("So you probably clicked here because of the program not working.\nYou probably did something weird, try again.");
}
private void button4_Click(object sender, EventArgs e)
{
MessageBox.Show("Credits:\nCptSky for his .dll, program wouldn't have existed without him.\nMe for putting together this for the lazy ones.\nGoogle for random stuff.");
}
public bool IsDbc(string path)
{
if (path.EndsWith(".dbc"))
return true;
return false;
}
public string ExtDbc(bool extension)
{
if(extension)
return textBox1.Text.Replace(".dbc", ".txt");
return textBox1.Text.Replace(".txt", ".dbc");
}
public string Header(string text)
{
if (text.Contains("3deffectobj") || text.Contains("3dobj") || text.Contains("3dtexture") || text.Contains("sound"))
return "RSDB32";
if (text.Contains("3deffect"))
return "EFFE";
if (text.Contains("motion") && !text.Contains("emotionico"))
return "RSDB64";
if (text.Contains("3dsimpleobj"))
return "SIMO";
if (text.Contains("armet") || text.Contains("armor") || text.Contains("head") || text.Contains("misc") || text.Contains("mount") || text.Contains("weapon"))
return "MESH";
if (text.Contains("emotionico"))
return "EMOI";
if (text.Contains("material"))
return "MATR";
if (text.Contains("rolepart"))
return "ROPT";
return "NONE";
}
public void Done()
{
MessageBox.Show("Done converting.");
}
private void Form1_Load(object sender, EventArgs e)
{
}
}
}
Tiny code changes, but that now will work with all of the .dbc files.
There was a few useless else's and if's that I have removed. That class works fine and is abit better.
|
|
|
04/26/2012, 09:05
|
#28
|
elite*gold: 0
Join Date: Jan 2009
Posts: 586
Received Thanks: 336
|
well it didnt work for 3deffect.dbc
|
|
|
04/26/2012, 10:56
|
#29
|
elite*gold: 20
Join Date: Jun 2006
Posts: 3,296
Received Thanks: 925
|
Fail on my part.
Code:
if (text.Contains("3deffect"))
return "EFFE";
else if (text.Contains("3deffectobj") || text.Contains("3dobj") || text.Contains("3dtexture") || text.Contains("sound"))
return "RSDB32";
Change it to:
Code:
if (text.Contains("3deffect") && !text.Contains("3deffectobj"))
return "EFFE";
else if (text.Contains("3deffectobj") || text.Contains("3dobj") || text.Contains("3dtexture") || text.Contains("sound"))
return "RSDB32";
And it should work.
//edit Uploaded it.
|
|
|
04/26/2012, 12:11
|
#30
|
elite*gold: 28
Join Date: Jun 2010
Posts: 2,225
Received Thanks: 868
|
Should probably fix your minor unnecessary codes..
for ex
Code:
if (path.EndsWith(".dbc"))
return true;
else
return false;
why the else?
Code:
if (path.EndsWith(".dbc"))
return true;
return false;
|
|
|
 |
|
Similar Threads
|
[Release] DBC Converter Source
12/13/2012 - CO2 Exploits, Hacks & Tools - 21 Replies
Right, the majority of this works, however i decided in the end that it would just be best to dump the source of the project here and people can make changes and modify it as they need to.
To start off you will need some .dbc files to decode to .txt files, and then you can convert them back again. Make sure you update the Count at the top of the file if you make changes, and ensure that the layout is correct, if something is placed in the wrong place or missing, then it wont work, this is...
|
[Release].php SQL zu XML Converter
06/14/2012 - Metin2 PServer Guides & Strategies - 8 Replies
Hey ho,
ich hab mir mal die Mühe gemacht *hust* und habe einen .php Script erstellt, mit welchem man Items & Monster ( item_proto & mob_proto ) aus der Datenbank in das XML Format umwandelt.
Wozu man das braucht?
Wenn ihr "locale_name" habt:
|
[Release]DDS-Converter
01/20/2011 - Metin2 PServer Guides & Strategies - 22 Replies
Hey ich habe heute mal mein Desktop aufgeräumt :P und da fand ich plötzlich eine komische Datei. Aufeinmal stellte sich raus das es ein DDS-Converter war. Er wandelt DDS Dateien in jpg und png dateien um.
Da das für manche Client´s nützlich ist dachte ich ich stell es mal hier rein.
Virustotal Screen
http://img3.fotos-hochladen.net/uploads/virrustot al0t16k9zq.png
Screen vom Programm
http://img3.fotos-hochladen.net/uploads/programmn gw8demb.png
MfG Fun-Zocker
|
[RELEASE] DDS converter
08/18/2009 - EO PServer Guides & Releases - 9 Replies
Well, because this is a tool, i post it here and not on another section :bandit:
People were complaining they cant open or edit a dds file..
This tool, can convert the dds file to jpg,png,bmp,tga
and it can convert "to" dds :handsdown:
|
All times are GMT +1. The time now is 20:42.
|
|