Register for your free account! | Forgot your password?

You last visited: Today at 09:52

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

Advertisement



Conquer Map Editor

Discussion on Conquer Map Editor within the CO2 Private Server forum part of the Conquer Online 2 category.

Reply
 
Old 11/15/2010, 04:21   #31
 
elite*gold: 0
Join Date: Feb 2006
Posts: 550
Received Thanks: 81
Right now i can load up a map and then import my own image, it will scale the image and chop it up into 'chunks' and output them as dds.





(some random pokemon image i googled)

However having problems getting the client to read from them (as i can't add them to the .wdf archive, they don't want to read from my data file (data/map/puzzle/room/arena)

dds files for this are here if anyone wants to try:
ChingChong23 is offline  
Thanks
1 User
Old 11/15/2010, 04:57   #32
 
elite*gold: 20
Join Date: Oct 2010
Posts: 451
Received Thanks: 259
What about exporting the image of the map puzzles together so you can easily edit them? I think that'd be a useful feature. =]
FuriousFang is offline  
Old 11/15/2010, 08:44   #33
 
elite*gold: 21
Join Date: Jul 2005
Posts: 9,193
Received Thanks: 5,377
Quote:
Originally Posted by ChingChong23 View Post
Right now i can load up a map and then import my own image, it will scale the image and chop it up into 'chunks' and output them as dds.





(some random pokemon image i googled)

However having problems getting the client to read from them (as i can't add them to the .wdf archive, they don't want to read from my data file (data/map/puzzle/room/arena)

dds files for this are here if anyone wants to try:
Assuming the image specifications are correct, there shouldn't be any issue defaulting to the custom images... that's exactly how custom map edits already work :S

Ps: did you ever get the calculation for displaying dmap info working?
pro4never is offline  
Old 11/16/2010, 04:38   #34


 
CptSky's Avatar
 
elite*gold: 0
Join Date: Jan 2008
Posts: 1,434
Received Thanks: 1,147
The client check in the current folder before searching in the WDF package. You don't have to edit the package.

Good job for the program
CptSky is offline  
Old 11/20/2010, 16:44   #35
 
unknownone's Avatar
 
elite*gold: 20
Join Date: Jun 2005
Posts: 1,013
Received Thanks: 381
I'll give you a kick start on converting between screen and map locations if you need it. If you assume your screen is the size of an entire map graphic (eg, width and height of the puzzle) and to scale, then to obtain the location on screen where an in-game coordinate is, you use. (NB: map.Cells.Width/.Height are 64 and 32).

Code:
    public Point MapCoordinateToScreenPoint(Point mapCoordinate) {
        return new Point(
            (mapCoordinate.X - mapCoordinate.Y) * map.Cells.Height + (puzzle.Width / 2), 
            (mapCoordinate.X + mapCoordinate.Y - (map.Bounds.Height - 1)) * (map.Cells.Width / 2) + (puzzle.Height / 2)
        );
    }
Note that the point returned is actually outside the coordinate you want. The function returns a point which is the origin of a rectangle which surrounds the coordinate entirely (I'll refer to it as a "bounding rectangle" from here). Eg, in this image, the red dot is the location returned for each cell, so you would draw your tile relative to that location.



Other way round, you want the coordinate for a given location on screen, it's a little trickier. You first want to find out which bounding rectangle that a given click was placed in. The bounding rectangles overlap eachother, so you need to eliminate those. To do this, we subtract x mod 64 and y mod 32 from the actual ordinates of of the click. (such that the results will always be an exact multiple of 64,32.)

Code:
    Point blockOrigin = new Point(offset.X - (offset.X % map.Cells.Width), offset.Y - (offset.Y % map.Cells.Height));
You can then use this to determine the in-game coordinate which is bounded by the rectangle.

Code:
    public Point ScreenPointToMapCoordinate(Point screenPoint) {
        return new Point(
            screenPoint.X / map.Cells.Width + screenPoint.Y / map.Cells.Height,
            screenPoint.Y / map.Cells.Height + (puzzle.Width - screenPoint.X) / map.Cells.Width
        );
    }
The dilemma here is that you have only the bounding rectangle and it contains the corners of other in-game coordinates, so a click within that bounding rectangle could be a click on any of 5 different cells. To find out which cell the click was in, the easiest way is to use a "rainbow tile".



You subtract the actual click location from the bounding rectangle location, leaving a value where x is between 0 and 63, y is between 0 and 31. (Performing mod 64/32 will do the same thing here). You then look up the color of the pixel at this point within the rainbow tile (you only need 1 of them), and based on one of 5 colors, you can determine the actual coordinate.

Code:
    public class RainbowTile
    {
        private Bitmap bitmap;

        public RainbowTile(Size cellSize)
        {
            bitmap = new Bitmap(cellSize.Width, cellSize.Height);

            Point[] rainbowTrianglePoint1 = new Point[3] {
                new Point(0, 0),
                new Point(cellSize.Width / 2, 0),
                new Point(0, cellSize.Height / 2),
            };
            Point[] rainbowTrianglePoint2 = new Point[3] {
                new Point(cellSize.Width, 0),
                new Point(cellSize.Width / 2, 0),
                new Point(cellSize.Width, cellSize.Height / 2),
            };
            Point[] rainbowTrianglePoint3 = new Point[3] {
                new Point(0, cellSize.Height / 2),
                new Point(cellSize.Width / 2, cellSize.Height),
                new Point(0, cellSize.Height),
            };
            Point[] rainbowTrianglePoint4 = new Point[3] {
                new Point(cellSize.Width, cellSize.Height),
                new Point(cellSize.Width / 2, cellSize.Height),
                new Point(cellSize.Width, cellSize.Height / 2),
            };

            System.Drawing.Graphics g = System.Drawing.Graphics.FromImage(bitmap);
            
            g.FillPolygon(Brushes.Green, rainbowTrianglePoint1);
            g.FillPolygon(Brushes.Red, rainbowTrianglePoint2);
            g.FillPolygon(Brushes.Blue, rainbowTrianglePoint3);
            g.FillPolygon(Brushes.Yellow, rainbowTrianglePoint4);
            g.Save();
        }

        public Point GetCell(Point coordinate, Point cellPoint)
        {
            Color col = _bitmap.GetPixel(Math.Max(0, cellPoint.X), Math.Max(0, cellPoint.Y));
            if (col.R == 0 && col.G != 0 && col.B == 0)
                coordinate.X--;
            else if (col.R != 0 && col.G == 0 && col.B == 0)
                coordinate.Y--;
            else if (col.R == 0 && col.G == 0 && col.B != 0)
                coordinate.Y++;
            else if (col.R != 0 && col.G >= 0 && col.B == 0)
                coordinate.X++;
            return coordinate;
        }
    }
The rainbow tile is there to make it easier to understand, but a simple array of 64x32 would suffice.
unknownone is offline  
Thanks
8 Users
Old 11/21/2010, 04:37   #36
 
elite*gold: 21
Join Date: Jul 2005
Posts: 9,193
Received Thanks: 5,377
Quote:
Originally Posted by unknownone View Post
.
Holy ***! So much useful info.

I think I just jizzed a bit O_O
pro4never is offline  
Thanks
2 Users
Old 03/06/2011, 07:49   #37
 
m7mdxlife's Avatar
 
elite*gold: 0
Join Date: Feb 2009
Posts: 920
Received Thanks: 3,514
sorry i know this thread is kinda ancient but this is too much work to go for nothing xD
am wondering what happened with this project... its way too good to be forgotten
m7mdxlife is offline  
Old 03/07/2011, 22:52   #38
 
hady's Avatar
 
elite*gold: 0
Join Date: Dec 2006
Posts: 72
Received Thanks: 9
i think that too the where is the Project ???
hady is offline  
Old 03/07/2011, 23:07   #39
 
elite*gold: 21
Join Date: Jul 2005
Posts: 9,193
Received Thanks: 5,377
He had been talking to me on msn about it at the time for a while but he really lost interest in it.

I doubt anything will come of it. He got a ton of it done though.. I should try to get the source for safe keeping at some pt incase I ever wanted to pick up the project next fall or something.
pro4never is offline  
Thanks
1 User
Old 08/13/2013, 11:56   #40
 
elite*gold: 0
Join Date: Feb 2006
Posts: 550
Received Thanks: 81
bump, i know this is extremely old, but has anyone since actually created a full on editor?
ChingChong23 is offline  
Old 08/13/2013, 12:50   #41
 
elite*gold: 0
Join Date: Oct 2006
Posts: 110
Received Thanks: 67
Quote:
Originally Posted by ChingChong23 View Post
bump, i know this is extremely old, but has anyone since actually created a full on editor?
Hey, tell me how far you actually got with it, and exactly what obstacle was so difficult or bothersome, you decided to quit?

I myself have made a custom Eudemons Online client, where you can jump around and stuff. I had a small problem with 3d map objects though. The rest seems to work.

hadeset is offline  
Old 08/13/2013, 13:08   #42
 
elite*gold: 0
Join Date: Feb 2006
Posts: 550
Received Thanks: 81
Quote:
Originally Posted by hadeset View Post
Hey, tell me how far you actually got with it, and exactly what obstacle was so difficult or bothersome, you decided to quit?

I myself have made a custom Eudemons Online client, where you can jump around and stuff. I had a small problem with 3d map objects though. The rest seems to work.

It's been a long time, but i believe i just lost interest in it. i'm surprised nobody else has made one of these though. is the dmap/puzzle structures still the same for the latest clients?
ChingChong23 is offline  
Old 08/13/2013, 13:14   #43
 
elite*gold: 0
Join Date: Oct 2006
Posts: 110
Received Thanks: 67
Quote:
Originally Posted by ChingChong23 View Post
It's been a long time, but i believe i just lost interest in it. i'm surprised nobody else has made one of these though. is the dmap/puzzle structures still the same for the latest clients?
I don't know about Conquer, but in EO newer maps are in different format, which the old released EO client did not contain, so I couldn't implement those, but I imagine most CO maps would have the same structures as old EO.
So yeh, I don't think they will ever change the structures of the older maps, but only create newer ones with new structures.
hadeset is offline  
Old 08/13/2013, 16:54   #44


 
Korvacs's Avatar
 
elite*gold: 20
Join Date: Mar 2006
Posts: 6,125
Received Thanks: 2,518
I got this far, which is to say, not that far. Makes for a nice viewer though.

Korvacs is offline  
Old 08/13/2013, 18:06   #45
 
elite*gold: 0
Join Date: Oct 2006
Posts: 110
Received Thanks: 67
Here's an idea... How about making at least a map editor, that lets you put additional Scenes onto the map? That would make things a lot more interesting. Doesn't seem too hard either. I, myself don't have the time though, at the moment.
hadeset is offline  
Reply


Similar Threads Similar Threads
COPAC - Conquer Online Packet Logger / Editor
02/24/2008 - CO2 Exploits, Hacks & Tools - 362 Replies
I finally overcame my addiction to Conquer Online and finished this tool. It lets you log outgoing packets, edit and send them. To avoid any misunderstanding, it encrypts the packets for you in an indirect way. Usage: Start Conquer Online, run the COPACldr.exe from anywhere, but remember the COPACdll.dll file must be in the same directory as COPACldr.exe. Now log in or move a bit with your character so that it captures 1 packet and can get the send class. You are now able to send or log...



All times are GMT +2. The time now is 09:52.


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.