[RELEASE](C#) PARTIAL MAP EDITOR + SOURCE

01/24/2014 23:03 ismokedrow#1
Hello EPVP,

Today I come to share to you something that you have been teased with before, this started as just a test to see if I could get anywhere and as a test of xXExiledXx's memory and TheBrains ability to decompile next to anything.

I started this project from information solely gathered from the header but it became apparent that math (which is usually way over my head) was needed. I would've asked C1ph3r but I'd have better chances talking to a wall honestly -- Since he released his Map Painter, I took a sneak peak to aid in the math. (Thanks C1ph3r)

With xXExiledXx's much better than mine, math the TSP Map Editor is now fully capable of reading and displaying NFA, NFS, NFC and QPF. Why not NFE? Simple I don't have the time to put into this particular program with all that is happening at the TSP (development wise) and the other TSP Core staff are also indisposed. (Besides adding NFE should be no harder than NFS if you need help just pm me)

Some things about this program:
  • Not all menu items are implemented, some are just place holders
  • The program displays the image at full resolution (3072, 3072) by default and then allows zooming out to 4 and back in to full resolution
  • By clicking the minimap you will move the main map (math sucks, is spot on at full resolution but just a bit off when zoomed out)
  • Clicking the Main Map will deliver file (qpf-like) coords
  • Hovering the mouse over the Main Map will cause the mini-map to display in-game coords (bottom left)
  • NFS-NPC LOAD_MAP_IMAGE doesn't draw the text (as the image has to be flipped -- uncomment the line be lines.DrawLines and you will see
  • When you use "VIEW > ALL" the program expects you are selecting a .NFA (It doesn't matter if the NFA being selected is in the programs directory or not)
  • ONLY QPF Coords have been converted to IN-GAME Coords (Datagrid Views)
  • All NFA,NFC,NFS,QPF are in folders inside the programs directory
  • All minimap images (v256_*.jpg) should be placed inside of V256 inside programs directory
  • The program can not save (pretty simple, just the reverse of reading)
  • I will help if I can but provide no express support for this program

SCREENSHOTS:


THANKS:

- xXExiledXx for help with math and creating the JPG Assembly
- TheBrain for being the best decompiler evar :D
- C1ph3r for releasing Map Painter

DOWNLOAD:

(If you want a virus total, just don't download it.)

[Only registered and activated users can see links. Click Here To Register...] (v3)

OTHER NOTES:

FOR THE THANKS @ Mongreldogg :3

ENJOY!
01/25/2014 14:39 TheBrain_#2
See what people get you when they work '' together '' in a close team?

See what it is like to be developing a game that people need tools like these?

it takes 2 words; Open Source.

anyway, good release but we (tsp members) knew it was coming :)

have fun :D
01/25/2014 17:21 hassuny#3
thanks thanks thanks thanks thanks thanks thanks thanks

can you put the complete program please ?
01/25/2014 17:38 mongreldogg#4
i lost a thanks farming competition?

great work guys =)
01/25/2014 17:45 hassuny#5
and add nfe please ..
01/25/2014 18:22 ismokedrow#6
Quote:
Originally Posted by hassuny View Post
thanks thanks thanks thanks thanks thanks thanks thanks

can you put the complete program please ?
It may happen, it may not happen. If and when I have time I will think to add NFE and some other things, but a lot of the work is already done for you.
01/25/2014 18:58 Ssync#7
stop releasing new tools :D and relaunch TSP :P :P
01/25/2014 19:12 hassuny#8
Quote:
Originally Posted by ismokedrow View Post
It may happen, it may not happen. If and when I have time I will think to add NFE and some other things, but a lot of the work is already done for you.
yes , I know and Iam happy for this release .
thank you :cool:
01/25/2014 20:34 eziorav#9
thanks for this amazing tool
but i got 2 problems
1# The Map doesn't show up when tool starts (shows black area)
2# There is a problem with opening NFS files Solved by downloading the update
01/25/2014 21:48 ismokedrow#10
Quote:
Originally Posted by eziorav View Post
thanks for this amazing tool
but i got 2 problems
1# The Map doesn't show up when tool starts (shows black area)
2# There is a problem with opening NFS files Solved by downloading the update

There is no map by default, hence the black box. When you load a map via "VIEW > ALL" the black box is replaced by the map
01/25/2014 22:19 glandu2#11
Nice release, but the code is weird ...

Code:
while (true)
                    {

                        FILE_EXISTS = num1 <= coord_count;
                        if (!FILE_EXISTS)
                        {
                            break;
                        }

                        //int val1 = num1 - 1;
                        //MessageBox.Show("Point " + val1.ToString() + " read");

                        FILE_EXISTS = num1 <= coord_count;

                        if (!FILE_EXISTS)
                        {
                            break;
                        }
Why not just while(num1 <= coord_count) ? or even "if(num1 <= coord_count) break;" (and 2 tests instead of one, variables dont changes, but maybe something was between the two tests before)

And capslock variable names is bad : o

Thebrain you should not claim that opensource is good when you try to make people work on GG without it's source while having them.

But still nice tool as it has more feature than previous and is opensourced, the zoom is an appreciable feature :)
01/25/2014 23:28 eziorav#12
Quote:
Originally Posted by glandu2 View Post
Nice release, but the code is weird ...

Code:
while (true)
                    {

                        FILE_EXISTS = num1 <= coord_count;
                        if (!FILE_EXISTS)
                        {
                            break;
                        }

                        //int val1 = num1 - 1;
                        //MessageBox.Show("Point " + val1.ToString() + " read");

                        FILE_EXISTS = num1 <= coord_count;

                        if (!FILE_EXISTS)
                        {
                            break;
                        }
Why not just while(num1 <= coord_count) ? or even "if(num1 <= coord_count) break;" (and 2 tests instead of one, variables dont changes, but maybe something was between the two tests before)

And capslock variable names is bad : o

Thebrain you should not claim that opensource is good when you try to make people work on GG without it's source while having them.

But still nice tool as it has more feature than previous and is opensourced, the zoom is an appreciable feature :)
that a good remark
but i think that developers could write a could by a long way like u mentioned to check that it works or just because of stress and lack of having rest
i may be mistaken
01/25/2014 23:54 TheBrain_#13
Quote:
Originally Posted by glandu2 View Post
Thebrain you should not claim that opensource is good when you try to make people work on GG without it's source while having them.
i recoded a piece of the GG, which is litteraly the only piece u need to make it work and the only piece u need to make a bypass.

further more; i released the source in c++ and c#.

I was going to release the source once i completed the other files, but now people like '' you '' jumping on people like '' me '' makes me not releasing to anything to epvpers at all.

want to be fair winner? start by c1ph3r and these russian devs and some others., they have more than i have for sure and iam quite sure they have even more files you might enjoy.

it seems to be its the '' developers '' choise to eitherway share it or not.
all this negative attitude on epvpers makes me just not wanna do it at all.

its the same old team who keeps '' thanking '' each other, and if anyone else makes a attempt to give people a shot they just wanna grab your hole hand, geuss what. u just grabbed my hole hand and i dropped it all together.

besides, if i ask for help to other developers, (not all of them luckily) i get ignored, now iam not sure if you '' developers '' are known with the word and meanings of Community.
01/26/2014 00:26 ismokedrow#14
Quote:
Originally Posted by glandu2 View Post
Nice release, but the code is weird ...

Code:
while (true)
                    {

                        FILE_EXISTS = num1 <= coord_count;
                        if (!FILE_EXISTS)
                        {
                            break;
                        }

                        //int val1 = num1 - 1;
                        //MessageBox.Show("Point " + val1.ToString() + " read");

                        FILE_EXISTS = num1 <= coord_count;

                        if (!FILE_EXISTS)
                        {
                            break;
                        }
Why not just while(num1 <= coord_count) ? or even "if(num1 <= coord_count) break;" (and 2 tests instead of one, variables dont changes, but maybe something was between the two tests before)

When I first began working on how to read the loops I used segments of c1ph3rs map editor to guide how the loops worked. To be honest this is where the while(flag){}; comes from, I just kept writing it like that and before I knew it all where this way. I will probably begin reverting them if I keep doing work to this tool, now a couple friends and projects are asking me to finish it. Who knows :(

And capslock variable names is bad : o

tbh I started this with ACRM, not sure why but I feel comfortable with caps property names.

Thebrain you should not claim that opensource is good when you try to make people work on GG without it's source while having them.

Didn't he release source? (I don't work with GG so not sure on anything to do with this)

But still nice tool as it has more feature than previous and is opensourced, the zoom is an appreciable feature :)

I think I'mma add NFE reader and you wouldn't believe the hell zooming put me through as I choose to purposefully write my own system instead of using c1ph3rs as a reference.

On a side note if anyone wants to tackle why my math is screwed when moving main map.

Example:

If you click a spot on the minimap while at full resolution, when you zoom out and try to move again the area the main map moves to is slightly off from where it should be :(

I would appreciate it.
01/26/2014 00:28 glandu2#15
Quote:
Originally Posted by eziorav View Post
that a good remark
but i think that developers could write a could by a long way like u mentioned to check that it works or just because of stress and lack of having rest
i may be mistaken
Yes, the name of the archive contains code_cleaned, there might be several tries to get the file layout right (or whatever) which led to that. It's me or m005_001.nfc is corrupt ? It seems there are 2 polygons with 5 and 6 points, but the 2 expected strings are not here (only the description, google tell azura village entrance and ~center point)

(response of TheBrain's post here to avoid off-topic: [Only registered and activated users can see links. Click Here To Register...])

Quote:
When I first began working on how to read the loops I used segments of c1ph3rs map editor to guide how the loops worked. To be honest this is where the while(flag){}; comes from, I just kept writing it like that and before I knew it all where this way. I will probably begin reverting them if I keep doing work to this tool, now a couple friends and projects are asking me to finish it. Who knows
Then keep writing code like that to understand it more, but I quoted that because I didn't understood at the first time.


About the zoom, you should use the center of the image as the zoom point, and recalculate the origin.
For example:

mapZoomedX = clickX - 16128/2 / zoom (where mapZoomedX, clickX are coord in the map units and 16128 the width of the map)
Then draw 16128/zoom units in your image
And the small rectangle in the minimap should have a width & height of 256/zoom, if the zoom is greater, the rectangle is smaller. If using these formula, your zoom value must be 1 if not zoomed (that is viewing the full map, that's -4 in the gui) and 2 if the viewed width is 16128/2 (that is 1/4 of the map is on shown, 1/2 width and 1/2 height)