Register for your free account! | Forgot your password?

You last visited: Today at 02:46

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



GameMap.Dat

Discussion on GameMap.Dat within the CO2 Private Server forum part of the Conquer Online 2 category.

Reply
 
Old   #1
 
elite*gold: 0
Join Date: Apr 2010
Posts: 58
Received Thanks: 1
GameMap.Dat

Could someone explain how to add maps in Gamemap.dat, is there any program for that or just keep using these codes Arabs?

diegoer2 is offline  
Old 10/08/2011, 08:41   #2
 
elite*gold: 21
Join Date: Jul 2005
Posts: 9,193
Received Thanks: 5,376
It's a non encrypted structured binary file...


The structure is fully public and I seem to remember people posting readers/writers for the file all over epvp... do a bit of searching!

I seem to remember it being incredibly simple to do though... something like...

uint mapCount

for map count
uint(or ushort) map id
uint (or ushort) puzzle size
string(counted or 16 fixed... most likely counted) map file location


It was something very similar to that. Obviously not correct as I'm working off memory but it was definitely a VERY simple structure.
pro4never is offline  
Old 10/08/2011, 09:14   #3
 
elite*gold: 0
Join Date: Apr 2010
Posts: 58
Received Thanks: 1
I found that my problem was reported earlier, which would be: the informed mapdoc cq_map not included in the gamedata folder zfserver, thus creating inconsistency with the beam MsgServer doing it automatically, the solution would make the change in gamemap for everyone maps of the source could run quietly, then got the map update in which authorize poker 1858 1860 so that the server was rotating normally. what happens is that I could not add other maps eg gamemap in 1845 does not count because it would not generate error again, then the solution would be to add in all the maps gamemap not added, the question would be how to add maps?




U UNDERSTAND ?
diegoer2 is offline  
Old 10/08/2011, 14:14   #4


 
Korvacs's Avatar
 
elite*gold: 20
Join Date: Mar 2006
Posts: 6,125
Received Thanks: 2,518
Code:
                int MapCount = Reader.ReadInt32();

                for (int i = 0; i < MapCount; i++)
                {
                    uint MapID = Reader.ReadUInt32();
                    string Path = Encoding.ASCII.GetString(Reader.ReadBytes((int)Reader.ReadUInt32())).Remove(0, 8);
                    Reader.BaseStream.Seek(4, SeekOrigin.Current);
                }
Not sure what the last 4 bytes is about could be as pro said, puzzle size, but ive never needed it myself.
Korvacs is offline  
Old 10/09/2011, 01:29   #5
 
elite*gold: 0
Join Date: Apr 2010
Posts: 58
Received Thanks: 1
I did not understand, you use that to which version?
I am using 5065 binaries ...

Does anyone know how to put new maps in gamemap.dat ?
diegoer2 is offline  
Old 10/09/2011, 10:30   #6
 
elite*gold: 21
Join Date: Jul 2005
Posts: 9,193
Received Thanks: 5,376
It works in ANY version as far as I'm aware the structure of the file has never changed.


3 steps.

#1: Convert the binary .dat file into a text document (ini, txt, whatever you wish) by using a binary reader + the file structure we referred to.

#2: Edit the text document and add in your copies if needed (be careful not to add in extra spaces or anything silly. Follow the structure exactly

#3: Convert the file back to a .dat structured binary file using the same file structure as before except this time you're using a streamreader and a binarywriter instead of the opposite!


Simple stuff just requires a bit of work and basic programming knowledge.
pro4never is offline  
Old 10/10/2011, 00:31   #7


 
CptSky's Avatar
 
elite*gold: 0
Join Date: Jan 2008
Posts: 1,434
Received Thanks: 1,146
Quote:
Originally Posted by Korvacs View Post
[...]Not sure what the last 4 bytes is about could be as pro said, puzzle size, but ive never needed it myself.
It's the puzzle size. In general, the value is 128 or 256.

<edit by p4n>
I wanted to mention that puzzle size simply refers to the size of image chunks which make up the map (tq names things funny stuff)
CptSky is offline  
Reply


Similar Threads 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:
[Request] GameMap.dat Enc/Dec
06/20/2011 - CO2 Private Server - 7 Replies
If any one has the encryption for th gamemap.dat please release it
GameMap Reading
02/28/2011 - CO2 Private Server - 13 Replies
Well, I'm having problems reading the decoded GameMap ... It keeps reading the first map , it Doesn't go down... IniFile I = new IniFile(ThePath+ @"ini\TheGameMap.txt"); uint TotalMaps = 260; for (uint i = 0; i < TotalMaps; i++) { ushort MapID = I.ReadUInt16("AllMaps", "MapID"); string Path = I.ReadString("AllMaps", "Path"); DMap D = new DMap(MapID, Path);
Decoding GameMap.dat
09/21/2010 - CO2 Programming - 15 Replies
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! using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.IO; namespace ConsoleApplication1



All times are GMT +1. The time now is 02:46.


Powered by vBulletin®
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2024 elitepvpers All Rights Reserved.