EQ2Interface.com
Search Downloads


Go Back   EQ2Interface > Featured Projects > EQ2MAP

Reply
Thread Tools Search this Thread Display Modes
  #1  
Unread 06-18-2006, 12:40 PM
decadre decadre is offline
A Crazed Gnoll
 
Join Date: Nov 2004
Server: Antonia Bayle
Posts: 21
Default Looking for formula help

to get the coordinates to put a POI on a map that I have created. (Not the zonerect formula).

I found this one;
Code:
         (LOC_0x + LOC_x)
MAP_x  = ----------------  +  Map_0x - (IconW / 2)
               wdpp_x
here. http://www.eq2interface.com/forums/showthread.php?t=963

Unfortunately, I'm not understanding Tacoman's explanation about what the variables are. Here is his explanation:
Quote:
Originally Posted by taco-man
Same variables in bobbles formula except LOC_x is any /loc in game and MAP_x is the corresponding coordinate on the map image that the equation will give you when you solve it. IconW is the icon's width that you are placing on the map. Without the (IconW / 2) in the equation it would give you where you want the center of the icon to be on the map but since the coordinates used to place things in the ui is the upper left corner we need to subtract half the width so that it is placed in the right spot
Where I'm getting confused. If LOC_x is any in-game /loc, then what is LOC_0x and Map_0x? Are they the left-most (since we are doing x-axis and not the y-axis) coordinates of the respective in-game map and my map? And what it wdpp_x?

I'd appreciate any help that anyone can give me.
Reply With Quote
  #2  
Unread 06-18-2006, 12:47 PM
SaintPeter's Avatar
SaintPeter SaintPeter is offline
A Griffon
This person is a EQ2Map developer.
Interface Author - Click to view interfaces
 
Join Date: Nov 2004
Server: Guk
Posts: 536
Default

Don't try and figure it out . . . just use Taco's Tool:
http://www.eq2interface.com/download...fo.php?id=3395

If you use my Mapper2.pl, it creates crosshairs and gives you the locs for the first 2 cords and you use an image program to pull the Bitmap x/y cords off your finished image.
Mapper2:
http://www.eq2interface.com/download...fo.php?id=3936

I almost never have to readjust my zonerect after I use Taco's tool combined with my mapper output.
__________________
Reply With Quote
  #3  
Unread 06-18-2006, 12:51 PM
Garick's Avatar
Garick Garick is offline
A Grassland Beetle
 
Join Date: Nov 2005
Server: Runnyeye
Posts: 64
Default

think you need to take a look at Bobble's formula and explanation that Taco-man references in his post http://www.eq2interface.com/forums/s...&postcount=157

He explains all the variable for his original formula there.

Hope that helps a bit
Reply With Quote
  #4  
Unread 06-18-2006, 01:05 PM
decadre decadre is offline
A Crazed Gnoll
 
Join Date: Nov 2004
Server: Antonia Bayle
Posts: 21
Default

thanks, I'm going to read over Bobbles post now.

StPeter, I'd like to use some of those pre-made apps already, but I'm attempting a little project of my own. I've started to log all the /locs of ?'s and !'s that I've found lately since I'm noticing that a lot of time they always "pop" in a relatively common areas around a zone. I'm attempting to make a little script to put them into a database (already done), and either display them in a table (already done), or if I can get/make maps to display them on maps. Silly little project, but something I just want to try to do.
Reply With Quote
  #5  
Unread 06-18-2006, 03:24 PM
decadre decadre is offline
A Crazed Gnoll
 
Join Date: Nov 2004
Server: Antonia Bayle
Posts: 21
Default

ok, I'm having no luck getting the same answer that I get from Taco's Tool.

The in-game map has x-coordinates from;
Code:
 80 to -140 left to right
and y-coordinates from;
Code:
 -80 to 140 top to bottom
my map is;
Code:
 1000 pixels wide, and 966 pixels high
I'm just going to work the x-axis and hopefully someone will tell me what's wrong here.

From Bobbles post I get the following variables from the map info;
Code:
 
LOC_Ax = 80
LOC_Bx = -140
MAP_Ax = 0
MAP_Bx = 1000
So to get wdpp_x;
Code:
           LOC_Bx - LOC_Ax
wdpp_x = --------------------
           MAP_Bx - MAP_Ax

          -140 - 80       -220
wdpp_x = -----------  =  ------ = -0.22
          1000 - 0        1000
Ok, so according to Bobble MAP_0x is 0.
So, all I need now are LOC_0x and LOC_x.

LOC_x in this example will be 0 and 40 (2 different examples)

to get LOC_0x, we do;
Code:
LOC_0x = LOC_Bx - (wdpp_x * (MAP_Bx - MAP_0x) )
LOC_0x = -140 - (-0.22 * (1000 - 0) )
LOC_0x = 80
Ok, so to get my x-coordinate as far as I understand it, I just have to plug my numbers into this formula;
Code:
         (LOC_0x + LOC_x)
MAP_x  = ----------------  +  Map_0x - (IconW / 2)
               wdpp_x

for x = 0
         (80 + 0)
MAP_x  = ----------------  +  0 - (2)
               -0.22

MAP_x = -366 and Taco Program gives me an x-coordinate of 356.
Barring +/- sign, pretty close.

and for x = 40
         (80 + 40)
MAP_x  = ----------------  +  0 - (2)
               -0.22

MAP_x = -547 and Taco Program gives me an x-coordinate of 178.
Anyone know what I'm missing, not understanding, or just plain screwing up?
Reply With Quote
  #6  
Unread 06-18-2006, 06:39 PM
lordebon lordebon is offline
Fetish Core author
This person is a EQ2Map developer.
Featured
 
Join Date: Jun 2005
Server: Crushbone
Posts: 2,667
Default

One thing I think I see is an inconsistancy in sign...

Does the zone actually go from a + on the left to a - on the right? I thought it was always a + change as one goes right on the map (to the east). That might be the problem.

wpdd is essentially a scale factor (and should be equal for x and y unless the map is distorted). It scales the game locs to the pixels on the map.

Last edited by lordebon : 06-18-2006 at 06:55 PM.
Reply With Quote
  #7  
Unread 06-18-2006, 08:47 PM
decadre decadre is offline
A Crazed Gnoll
 
Join Date: Nov 2004
Server: Antonia Bayle
Posts: 21
Default

I need to check the zone in game, to see if it's mapped upside down.

Since I have been having luck getting numbers to be within 10-20 pixels of what Taco's program gets by reversing the sign on the x-coordinate i'm using in game.
Reply With Quote
  #8  
Unread 06-19-2006, 05:04 PM
SaintPeter's Avatar
SaintPeter SaintPeter is offline
A Griffon
This person is a EQ2Map developer.
Interface Author - Click to view interfaces
 
Join Date: Nov 2004
Server: Guk
Posts: 536
Default

Remeber: The zonerect is in the format: -W, N, -E, S
So, yeah, you may have to reverse the west and east signs.
__________________
Reply With Quote
  #9  
Unread 06-21-2006, 04:23 PM
decadre decadre is offline
A Crazed Gnoll
 
Join Date: Nov 2004
Server: Antonia Bayle
Posts: 21
Default

First off, I haven't had time to work on any of it since I posted this originally, sorry for that.

When I get a chance, what I'm going to do is work on the Y coordinates as it appears I don't need to change the signs of those numbers and see if they come out close.

THanks for the follow up btw.
Reply With Quote
  #10  
Unread 06-27-2006, 04:18 PM
decadre decadre is offline
A Crazed Gnoll
 
Join Date: Nov 2004
Server: Antonia Bayle
Posts: 21
Default

Thanks for all the help. I got it working now. Here's a screenie of Sinking Sands with the nodes displaying that I've found there. I may open it up to submissions from others once I get a UserID system in place so I can track who is adding what (in case some "kids" decide to mass add junk info into the DB).

Reply With Quote
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -5. The time now is 11:47 AM.


Our Network
EQInterface | EQ2Interface | WoWInterface | LoTROInterface | ESOUI | MMOUI