EQ2Interface

EQ2Interface (https://www.eq2interface.com/forums/index.php)
-   EQ2MAP (https://www.eq2interface.com/forums/forumdisplay.php?f=34)
-   -   ZoneRect + UIBuilder Map Location Calculator (https://www.eq2interface.com/forums/showthread.php?t=963)

taco-man 01-09-2005 05:34 PM

ZoneRect + UIBuilder Map Location Calculator
 
3 Attachment(s)
This is a tool that will calculate the zonerect for any zone if you know the required information that was posted by Bobble HERE

I wrote it in visual basic .net so you will need the .net framework to use it if you do not already have it. you can get the .net framework from windows update or from http://www.microsoft.com/downloads/d...displaylang=en by clicking the download button in the upper right corner.

This is a BETA Version so please post any bugs, suggestions, or questions here. To my knowledge it works perfectly however you can never be too sure.

this program should save a tremendous amount of time for anyone making maps because all you have to do is enter the numbers and click calculate. I was origionally just going to make it do zonerect but i decided to make it calculate the position on the map if you give it the in game locationa and the maps zonerect. that should save ALOT of time instead of having to calculate each one manually.

Thankyou Bobble for the origional formula to calculate the zonerect.

Also if anyone is interested in the formula i am using to calculate the map location(NOT the zonerect) it is:
Code:

        (LOC_0x + LOC_x)
MAP_x  = ----------------  +  Map_0x - (IconW / 2)
              wdpp_x

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

if anyone is interested in the source code let me know i can post the visual basic .net project files.

UPDATED: 1-13-05
pushing enter will now click the calculate button.
The calculated data will be automaticly copied into the clipboard for you so all you have to do is paste it where you want (ctrl-v or right click and paste)
instead of having to copy it first.

Drumstix42 01-09-2005 09:38 PM

Haha nice job. I was thinking of something like this to possibly help myself in moving stuff around in the hud in "groups". As I do not know VB, I was thinking something like javascript, heh.

Pixi 01-09-2005 11:10 PM

You guys are just plain crazy hehe. But I have to admit that I can't *wait* too see some of these maps in action. :)

taco-man 01-09-2005 11:37 PM

it was ALOT more work then i expected when i first started. It ended up being 221 lines of code that i had to write (not counting comments or the code that is automaticly generated for the positioning and placement of the buttons, boxes, ect) and the second part for the positioning(that i wasn't origionally planning on doing) i had to make a formula for, i didn't have a formula someone already made :D

taco-man 01-12-2005 02:39 PM

the negative/positive signs for the zone rect may or may not be working properly, when i get home i will post the source code for the part that does the calculation and maybe someone can spot where i screwed up. However the numbers are still correct.

sunthas 01-12-2005 03:22 PM

the icon calcuation seems to be working fine :)

taco-man 01-13-2005 10:22 PM

update planned for friday to make it put the "answer" it calculates into the clipboard as well as set the calculate button to be pressed when you hit enter.

taco-man 01-14-2005 12:34 AM

well my friend forgot to give me back my notes for my calc assignment so i had some spare time since i couldn't do it and i updated it, for details see the part of the first post which says UPDATED

Eloa 01-14-2005 08:09 AM

Thats great, thanks so much taco.

Eloa 01-14-2005 08:16 AM

on the first try, I broke it:
Quote:

Unhandled exception, Value was either too large or too small for a decimal.

************** Exception Text **************
System.OverflowException: Value was either too large or too small for a Decimal.
at System.Decimal..ctor(Double value)
at Microsoft.VisualBasic.CompilerServices.DecimalType.FromObject(Object Value, NumberFormatInfo NumberFormat)
at Microsoft.VisualBasic.CompilerServices.DecimalType.FromObject(Object Value)
at Zone_Rect.Form1.BtnCalculate_Click(Object sender, EventArgs e)
at System.Windows.Forms.Control.OnClick(EventArgs e)
at System.Windows.Forms.Button.OnClick(EventArgs e)
at System.Windows.Forms.Button.PerformClick()
at System.Windows.Forms.Form.ProcessDialogKey(Keys keyData)
at System.Windows.Forms.Control.ProcessDialogKey(Keys keyData)
at System.Windows.Forms.Control.ProcessDialogKey(Keys keyData)
at System.Windows.Forms.Control.ProcessDialogKey(Keys keyData)
at System.Windows.Forms.Control.ProcessDialogKey(Keys keyData)
at System.Windows.Forms.TextBoxBase.ProcessDialogKey(Keys keyData)
at System.Windows.Forms.Control.PreProcessMessage(Message& msg)
at System.Windows.Forms.ThreadContext.System.Windows.Forms.UnsafeNativeMethods+IMso Component.FPreTranslateMessage(MSG& msg.

No biggie, just thought you may want to make an error handler for it.
I was in location calculator, x=12,y=123,width=1,height=11,zonerect is 1,1,1,1 (thats prob what caused it)

taco-man 01-14-2005 09:51 AM

yea one day i will get around to adding an error handler for it, but you are right, i doubt it likes 1,1,1,1

tonyis3l33t 01-22-2005 02:23 AM

tacoman, could you make it so pushing TAB highlights everything in the next field? that way i can tab over and start typing, rather than TAB Backspace, backspace, backspace, backspace hehe

thanks bro, you did an awesome job with this.

furthermore:) would be nice to have the "in game /loc coordinates" text fields be one field, that accepts several formats of /locs
ie
1,1,1
1, 1, 1
1,1
1, 1
________
Volcano solid valve

taco-man 01-25-2005 02:50 PM

i try and get to it this weekend since i am so busy right now studying for finals i have on wednesday thursday and friday, and i need to replace the ignition in my car this weekend, as well, since being able to start my car would be nice :mad:

sunthas 01-25-2005 03:46 PM

rl comes first :)

taco-man 01-25-2005 07:57 PM

yes it does, it just seems to be coming first way too often...last time i got a chance to play eq was about 3 weeks ago

Eloa 01-25-2005 09:00 PM

ick, you should quit real life like I did.

taco-man 01-25-2005 09:01 PM

haha, i wish i could, but i still haven't even made it out of high school. On the bright side this is my last year and then i get to go to college!


All times are GMT -5. The time now is 02:39 AM.

vBulletin® - Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
© MMOUI