Plz i need the id for this map

03/12/2010 23:29 Arcо#31
@kiyono
[Only registered and activated users can see links. Click Here To Register...]
03/12/2010 23:35 Kiyono#32
Quote:
Originally Posted by .Arco View Post
@kiyono
[Only registered and activated users can see links. Click Here To Register...]
Oh I have that list but I want I just wanted to try to code something that reads and writes maps IDs.
03/12/2010 23:40 Arcо#33
Quote:
Originally Posted by Kiyono View Post
Oh I have that list but I want I just wanted to try to code something that reads and writes maps IDs.
I know, click the link, it leads you to a post by sparkie that I think you should read.
03/12/2010 23:45 Kiyono#34
Quote:
Originally Posted by .Arco View Post
I know, click the link, it leads you to a post by sparkie that I think you should read.
Guess I fail at searching, I ran a few searches through the conquer section but couldn't find anything >_<
03/12/2010 23:50 Arcо#35
Quote:
Originally Posted by Kiyono View Post
Guess I fail at searching, I ran a few searches through the conquer section but couldn't find anything >_<
Yeah. Well I hope that post helps you.
Good luck.
03/13/2010 00:18 Kiyono#36
Quote:
Originally Posted by .Arco View Post
Yeah. Well I hope that post helps you.
Good luck.
I tried some things but all failed, in other words no clue on how to use it >_<

//edit I'll try again later...when it's not 12:23 AM...
03/13/2010 00:41 © Haydz#37
Warning: Slightly Long Post

Okay, I see you made an attempt, which I am extremely happy about and applaud you, partly proves my theory about this place wrong :p

1.Making new GameMap.dat
So I'll start off with the code I used to generate a new GameMap.dat

Code:
 class Program
    {
        static string ConquerPath = @"C:\Program Files (x86)\Conquer 4351\";
        static string OutputPath = @"C:\";
        static string NewMapPath = @"map/map/sf-parade.DMap";

        static void Main()
        {
            using (BinaryReader Reader = new BinaryReader(new FileStream(ConquerPath + @"ini\GameMap.dat",FileMode.Open)))
            {
                int TotalMaps = Reader.ReadInt32();

                using (BinaryWriter Writer = new BinaryWriter(new FileStream(OutputPath + "GameMap.dat", FileMode.OpenOrCreate)))
                {
                    Writer.Write((int)(TotalMaps + 1));//Write total maps + 1 (our new map)

                    Writer.Write((int)(1844));//Our new map id, maybe we can specify our own?
                    Writer.Write((int)(NewMapPath.Length));//length of dmap file path
                    Writer.Write(Encoding.ASCII.GetBytes(NewMapPath));//Path to dmap file
                    Writer.Write((int)(256));//Puzzle Piece Size ([B]Not Always[/B] 256)

                    for (int i = 0; i < TotalMaps; i++)//Write existing maps into GameMap.dat
                    {
                        int nLength;
                        Writer.Write(Reader.ReadInt32());
                        Writer.Write(nLength = Reader.ReadInt32());
                        Writer.Write(Reader.ReadBytes(nLength));
                        Writer.Write(Reader.ReadUInt32());
                    }

                }
            }
            Console.WriteLine("Done!");
            Console.ReadLine();
        }

    }
ConquerPath is the path to your client version, in my case, 4351
OutputPath is basically where it puts the new GameMap.dat (Don't output it to your ini folder, place it somewhere else so you can copy + paste it in).
NewMapPath is the path to the DMap file of the map your adding, I'll explain more at the foot of my post.

Note: PuzzlePiece is not always 256, I'll explain more on how to get it at the footer

In regards to specifying our own MapID for the map, I'm not sure, I don't see why not though, I shall experiment later. (Not really sure why you would want to anyway).

2.Replacing Files
Alright, so now you should have copied + pasted your new gamemap.dat into the ini/gamemap.dat folder, you should now get an error in the debug log about map/map/sf-parade.DMap, is missing, simply go to that location in your official installation and copy + paste it in, I'll upload the files anyway.

Then next you'll get an error about the minimap not existing in the minimap.ani, simply open ani/MiniMap up with a text editor, then do the same in your 2.0 installation, find the index it's missing (our case: 1844) then copy + paste it in.
Code:
[1844]
FrameAmount=1
Frame0=data/MiniMap/sf-parade.jpg
Now we need to get the actual jpg file, so go to the Frame0 location and copy + paste it from your official to your client.

Now you need the puzzle file, which unfortunately doesnt seem to appear in the debug log, luckily for us, the name is the same as the map, so just go into your Conquer Installation, map/puzzle/ and copy + paste the sf-parade.pul into your client.

To proceed, we have to login and go to the map, to trigger map object errors, e.g. error in the debug log about a missing tree "n-tree1.tga" in Mapscene.ani, do the same, open up mapscene.ini as a text, copy the value into your client
Code:
[n-tree1.tga]
FrameAmount=1
Frame0=data/map/mapobj/newbie-v/tree/tree/n-tree1.dds
Then do the following for the other ani errors, tedious work..., also make sure you actually copy the dds files into the correct place too :p

Then that should be it, the map should be working perfectly :), as you can see its a lot of tedious copy + pasting, but if the map is good, it will be worth it in the long run.

Result = sf-parade on 4351 client:

I may actually make an application which you can check which maps you would like to import from the official installation, it will then retrieve all values for you, create the gamemap, create the required files/folders etc.

To further elaborate on the PuzzleFile, it's not always 256, so basically by utilising the structure of gamemap.dat you will have to find the value from the official.

Hope this helps someone, it's obviously generic so you can do it for pretty much any map, I'll try to help people with problems, hope it isn't too complicated and, good luck :o
03/13/2010 12:27 Kiyono#38
Well that makes it easier, +thanks for the guide gonna try it now.
//edit 5095 client.
[Only registered and activated users can see links. Click Here To Register...]
03/13/2010 13:50 xI NiNJA DuCKey#39
On AcidCO, You can type @map, I|t will give the Map ID, Also, I think PlainLazy may of made the map.
03/13/2010 19:11 Arcо#40
Quote:
Originally Posted by xI NiNJA DuCKey View Post
On AcidCO, You can type @map, I|t will give the Map ID, Also, I think PlainLazy may of made the map.
For the last time, this is NOT a custom map. This was a map used by TQ for a parade event a while back.
03/14/2010 11:35 Paralyzer[GM]#41
Acid-co as smart litte people they have re-done the map ids I tryed this along time ago no luck...

has anybody got the Dmap files ?
03/14/2010 11:44 Korvacs#42
Its already in your client, i said what the official MapID for this is further back in the thread...
03/14/2010 12:00 Paralyzer[GM]#43
o.O and so it is +thanks
03/16/2010 08:30 Arcо#44
Haydz I love you lol.
Ignore the minimap.
03/16/2010 10:27 Kiyono#45
Quote:
Originally Posted by .Arco View Post
Haydz I love you lol.
Ignore the minimap.
Oh, that's a ship o_O
I'm also gonna add it to see how it looks =X