|
You last visited: Today at 01:10
Advertisement
Decoding GameMap.dat
Discussion on Decoding GameMap.dat within the CO2 Programming forum part of the Conquer Online 2 category.
04/07/2010, 13:43
|
#1
|
elite*gold: 0
Join Date: Oct 2009
Posts: 8,765
Received Thanks: 5,291
|
Decoding GameMap.dat
Well I was working on a project tonite, it was decoding Gamemap.dat.
Thanks to the help of haydz I finally got this and it works!
Code:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.IO;
namespace ConsoleApplication1
{
class Program
{
static string ConquerPath = @"C:/Conquer 2.0";
static void Main()
{
Console.Title = "GameMap.dat";
using (BinaryReader Reader = new BinaryReader(new FileStream(ConquerPath + @"ini\GameMap.dat", FileMode.Open)))
{
TextWriter TW = new StreamWriter(@"C:\Gamemap.txt");
uint TotalMaps = Reader.ReadUInt32();
TW.WriteLine("Total Maps: " + TotalMaps);
TW.WriteLine();
Console.WriteLine("Writing....");
for (int i = 0; i < TotalMaps; i++)
{
TW.WriteLine("MapID: " + Reader.ReadUInt32());
int Length = Reader.ReadInt32();
string Path = Encoding.ASCII.GetString(Reader.ReadBytes(Length));
TW.WriteLine("Path: " + Path);
TW.WriteLine("PuzzleSize: " + Reader.ReadInt32());
TW.WriteLine();
}
TW.Close();
Reader.Close();
}
Console.WriteLine("Done!");
Console.ReadLine();
}
}
}
First you must create a text file in C:/ drive or wherever you want, just don't forget to change the streamwriter location.
Then make sure the pathway to your gamemap.dat is correct.
Debug and bam!
The maps are listed in this form.
MapID
Path
PuzzleSize
#edit
I don't know if this is the right section for this.
Probably goes in programming?
|
|
|
04/07/2010, 15:05
|
#2
|
elite*gold: 20
Join Date: Mar 2006
Posts: 6,125
Received Thanks: 2,518
|
Moved.
Little tip for you:
Code:
TextWriter Writer = new StreamWriter(new FileStream("YourPathHere", FileMode.Create));
|
|
|
04/07/2010, 15:43
|
#3
|
elite*gold: 0
Join Date: Oct 2008
Posts: 828
Received Thanks: 427
|
C++? is it?
|
|
|
04/07/2010, 15:49
|
#4
|
elite*gold: 20
Join Date: Mar 2006
Posts: 6,125
Received Thanks: 2,518
|
Quote:
Originally Posted by SaM.ThE.MaN
C++? is it?
|
C#
|
|
|
04/07/2010, 19:25
|
#5
|
elite*gold: 0
Join Date: Oct 2008
Posts: 828
Received Thanks: 427
|
korvacs i know it is off post,
could ya tell me what is used to program for C# , and the download link to it
|
|
|
04/07/2010, 20:59
|
#6
|
elite*gold: 0
Join Date: Apr 2006
Posts: 35
Received Thanks: 9
|
Quote:
Originally Posted by SaM.ThE.MaN
korvacs i know it is off post,
could ya tell me what is used to program for C# , and the download link to it
|
Do this.
|
|
|
04/08/2010, 04:13
|
#7
|
elite*gold: 0
Join Date: Oct 2009
Posts: 8,765
Received Thanks: 5,291
|
Quote:
Originally Posted by Korvacs
Moved.
Little tip for you:
Code:
TextWriter Writer = new StreamWriter(new FileStream("YourPathHere", FileMode.Create));
|
Ah so that's how you do it, I kept trying different ways and kept getting noob errors.
Thanks.
|
|
|
04/08/2010, 10:35
|
#8
|
elite*gold: 20
Join Date: Mar 2006
Posts: 6,125
Received Thanks: 2,518
|
No worries, now it'll create the text file or overwrite it.
|
|
|
09/20/2010, 00:03
|
#9
|
elite*gold: 0
Join Date: Apr 2010
Posts: 291
Received Thanks: 61
|
Oh my *** , You are a genius!
|
|
|
09/20/2010, 00:27
|
#10
|
elite*gold: 0
Join Date: Feb 2009
Posts: 1,765
Received Thanks: 382
|
Quote:
Originally Posted by JuiceDCodeR
Oh my *** , You are a genius!
|
not genius, but knowing what his talking about.
Big different.
|
|
|
09/20/2010, 05:05
|
#11
|
elite*gold: 0
Join Date: Dec 2006
Posts: 1,039
Received Thanks: 1,335
|
Quote:
Originally Posted by JuiceDCodeR
Oh my *** , You are a genius!
|
Not really something special...
And don't bump old threads.
|
|
|
09/20/2010, 18:56
|
#12
|
elite*gold: 0
Join Date: Apr 2010
Posts: 291
Received Thanks: 61
|
Can you make a relase to convert it back to gamemap.dat?
|
|
|
09/20/2010, 20:39
|
#13
|
elite*gold: 21
Join Date: Jul 2005
Posts: 9,193
Received Thanks: 5,376
|
Quote:
Originally Posted by JuiceDCodeR
Can you make a relase to convert it back to gamemap.dat?
|
Read the text file and then use a binary writer to write the values back to gamemap.dat.
hell... isn't there a released gamemap.dat editor that will decrypt/encrypt?
|
|
|
09/20/2010, 20:56
|
#14
|
elite*gold: 0
Join Date: Dec 2006
Posts: 1,039
Received Thanks: 1,335
|
Gamemap.dat isn't even encrypted, just needs to be parsed. Basically the whole file goes like this
Int32 MapID
Int32 Length
char* MapPath[Length]
|
|
|
09/20/2010, 21:08
|
#15
|
elite*gold: 20
Join Date: Jun 2006
Posts: 3,296
Received Thanks: 924
|
Quote:
Originally Posted by JuiceDCodeR
Can you make a relase to convert it back to gamemap.dat?
|
See my signature.
|
|
|
|
|
Similar Threads
|
[Release]GameMap creator/dumper
05/06/2012 - CO2 PServer Guides & Releases - 23 Replies
Well this is the first application I ever made and I decided to share it here and the source is included.
When executed you'll see 2 buttons, Create GameMap.dat and Dump GameMap.dat.
Create GameMap.dat will add a new map to the GameMap.dat (specified in the config.ini)
Dump GameMap.dat will dump a list of map names/IDs/sizes in a text file.
The config file:
|
Packet decoding
08/15/2009 - Silkroad Online - 5 Replies
Hi ! Today I just wrote a simple proxy in autoit for ksro, to sniff the packets , but yeah I knew it is encrypted.
This is an example first packet 0x2500005000000EF7360258FEDD153B370000009B000000A6 FF776C62225323D37E6C13555A852137DC3612
Where clearscrean told me 25 00 is the lenght 00 50 is opcode 00 00 is magic bytes and the 0EF7360258FEDD153B370000009B000000A6FF776C62225323 D37E6C13555A852137DC3612 is the handshake.
So my question now how to decode the next packets by knowing the...
|
Decoding log files?
04/02/2007 - Conquer Online 2 - 2 Replies
In the CO2.0 folder, there's a folder called 'log', which contains information about the accounts you have used to log into on the specified server. However, when you open the .txt file to the corresponding character number, it's just a lot of random characters. Can anyone tell me what language these characters are in, and/or how to decode them? Thanks!
|
All times are GMT +2. The time now is 01:10.
|
|