**Tutorial** Fun Tricks with the NavMap
Note you need a decoded ( aka "No CD" ) version of Freelancer.exe, such as the UBISOFT republished version of Freelancer includes.
In this tutorial I am going to show you how to move NavMap locations and change their resource names. Nothing too exciting but it can be useful. A table of the various offsets for each system is at the bottom. For the sake of example, in this tutorial we are going to change the Bretonia location on the NavMap from X, Y coordinates of (-0.245, -.123) (which it is in the original) to (-0.27, 0.25). Later I'll show you a simple change you can make even to make the NavMap entries disappear entirely.
So first things first, the memory offsets for the NavMap coordinates on the grid for Bretonia are:
Freelancer.exe
-------------------
RVA when Loaded in Program Memory / File Offset in Hex Editor
X_Coordinate (Raw Hex): 004903DE / 903DE = 48 E1 7A BE
Y_Coordinate (Raw Hex): 004903E6 / 903E6 = 6D E7 FB BD
Keeping in mind these values are pushed onto a stack backwards we have to reverse them. This gives us: BE7AE148 and BDFBE76D.
If you plug these into a Float Converter (like this one I use: http://www.geocities.com/jrgert/SourceCode/), this yields:
X_Coordinate (Translated Float): BE7AE148 = -0.245
Y_Coordinate (Translated Float): BE7AE148 = -0.123
I'm not sure (haven't bothered to check) what the maximum number is for each side of the plane (furthest left, right, top, bottom) but it shouldn't be too hard to figure out with guess and checking.
So now to change the value, all you need to do is type in a value you want for the new coordinates and convert them back to hex. For example if we wanted to move it to -0.27, 0.25, this would be:
X_Coordinate (Changing to a new value): -0.27 -> BE8A3D71 in Hex
Y_Coordinate (Changing to a new value): 0.25 -> 3E800000 in Hex
Now we need to reverse the order (since values in a file are always stored backwards), octet by octet (an octet, if you aren't aware is 2-character/digit pair - for example, the first octet of the X_Coordinate is BE, the 2nd is 8A, the 3rd is 3D, and the last is 71. This means the value we want to put into the file for each respectively is:
X_Coordinate (Modifying the value in the file): 71 3D 8A BE
Y_Coordinate (Modifying the value in the file): 00 00 80 3E
So to change the label to the new coordinates we need only change it such that:
X_Coordinate (Raw Hex): 004903DE / 903DE = 48 E1 7A BE --> 71 3D 8A BE
Y_Coordinate (Raw Hex): 004903E6 / 903E6 = 6D E7 FB BD --> 00 00 80 3E
Here's a table of offsets for each of the NavMap locations. Try as I might, it appears to be impossible to create new entries on the NavMap (at this time) but you can change the Resource ID for any of them and move them around the NavMap freely.
Table of NavMap Coordinate Offsets in Freelancer.exe
-------------------
RVA when Loaded in Program Memory / File Offset in Hex Editor
Liberty
----------
Resource ID Displayed on NavMap: 00490359 / 90359
-(=E1 04 in File / 4E1 in Hex / 1249 as Integer (which is value of String in Resources.dll) - Put 00's in all values here to make the name disappear from the map
X_Coordinate: 00490382 / 90382
Y_Coordinate: 0049038A / 9038A
Bretonia
----------
Resource ID Displayed on NavMap: 00490359 / 90359
-(=E2 04 in File / 4E2 in Hex / 1250 as Integer (which is value of String in Resources.dll) - Put 00's in all values here to make the name disappear from the map
X_Coordinate: 004903DE / 903DE
Y_Coordinate: 004903E6 / 903E6
Kusari
----------
Resource ID Displayed on NavMap: 00490359 / 90359
-(=E3 04 in File / 4E3 in Hex / 1251 as Integer (which is value of String in Resources.dll) - Put 00's in all values here to make the name disappear from the map
X_Coordinate: 0049043A / 9043A
Y_Coordinate: 00490442 / 90442
Rheinland
----------
Resource ID Displayed on NavMap: 00490359 / 90359
-(=E4 04 in File / 4E4 in Hex / 1252 as Integer (which is value of String in Resources.dll) - Put 00's in all values here to make the name disappear from the map
X_Coordinate: 0049047A / 9047A
Y_Coordinate: 00490482 / 90482
In addition to changing the locations, you can also change the name that appears on the map. This can be useful if say you want the system to appear as something on the map but say something different when you arrive in the sector (and it says "Entering Yada Yada, Blah Blah Space...".
There are many other fun things you can do (like easily make an entire entry not appear at all) but it is late so that is all for now.
Please let me know if you find any of this useful! it took awhile to write-up ...
Alcander
Edited by - alcander on 7/18/2007 12:23:08 AM
Edited by - alcander on 7/18/2007 12:23:48 AM
Edited by - alcander on 7/18/2007 12:43:49 PM
Edited by - alcander on 7/18/2007 7:11:24 PM