Important Message

You are browsing the archived Lancers Reactor forums. You cannot register or login.
The content may be outdated and links may not be functional.


To get the latest in Freelancer news, mods, modding and downloads, go to
The-Starport

**Tutorial** Fun Tricks with the NavMap

Here you find the different tutorials on editing and MODing Freelancer

Post Tue Jul 17, 2007 11:22 pm

**Tutorial** Fun Tricks with the NavMap

Some people have asked me (or the forum) on various occassions if you can modify the locations of things on the NavMap or substitute a different string for what appears on the NavMap than the system name when you change it from being Bretonia, Rheinland, etc to something else. The answer is yes and yes. In this tutorial I'll show you how. It looks a little lengthy but it is actually quite easy.

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

Post Wed Jul 18, 2007 11:19 am

This is very good info. Thanks for taing your time to write it up. I am looking forward to your tutorial on getting rid of the names all together as this something I want to do in my mod.

Requiem: A Total FL Conversion Mod .

Post Wed Jul 18, 2007 11:28 am

This is very cool ALcander! Too bad I can't try it out right now.

By getting a different name on the NavMap you mean like vou could have "Rheinland" on the NavMap, while on entering Stuttgart it says e.g. "Stuttgart, Kraut Space". Right?

Post Wed Jul 18, 2007 11:39 am

Moonhead,

That is exactly correct. I am glad I was able to explain this clearly as it is a bit tricky!

Post Wed Jul 18, 2007 11:58 am

A different (but related) question: is there way to expand the number of systems belonging to a house? I mean, there's like 5 systems per house: a fixed set of IDS_names, that have " xxx space" tagged after it when you enter them. I think it is not likely that there is an easy solution for that, right? Prolly a similar issue as those blocked-out faction names (which would also be cool if expandable; there's cool things you could do with that) - there's just a bunch of entries named in some data file, and you'd have to rewrite a whole chunk of code to have the game do it otherwise.


Edited by - moonhead on 7/18/2007 1:01:34 PM

Post Wed Jul 18, 2007 1:10 pm

@Fadius

Open up the resourses.dll with the IDS program and locate these numbers, already mentioned by Alcander as well lol,

1249 - Liberty
1250 - Bretonia
1251 - Kusari
1252 - Rheinland

All you do is delete the name or change it and off you go. One thing to remember is to always insert a space if you're leaving it blank otherwise it shows a load of ??? for some reason.

Member of the HAVEN ADMINS community
http://talonstrike.co.uk/HavenAdmin/index.php

Gizmo Studios - Home to the Galactica mod series
http://gizmostudios.proboards38.com/index.cgi

Post Wed Jul 18, 2007 2:19 pm

Moonhead,

As I said in my reply to your other topic in the other forum, this doesn't appear possible yet. But I'm still looking into it.

Post Wed Jul 18, 2007 6:13 pm

I've updated the article with the info on how to make the names disappear. I probably could have added it in last night but I had to double check I had my addresses right.

You just need to zero-out the hex values where the resource ID is. (i.e. per above to make Bretonia disappear change the E1 04 that appears in the file, 00 00). You can do this for all the names.

Edited by - alcander on 7/18/2007 7:13:25 PM

Post Wed Jul 18, 2007 7:08 pm

Here is an image of the map with no names on it after the no names modification:

Post Wed Jul 18, 2007 7:09 pm

awesome work as always Alcander - (to DA; put your text on the texture, lazy devs! )

Post Thu Jul 19, 2007 6:40 am

@ Alcander

Question for you, while i have no doubt that using a hex editor to alter the values works, would it not be easier just to change the information in the four IDS numbers i mentioned and do it that way? It just seems a bit complicated to go using a hex editor when the changes can be made in less than 60 seconds by using fl-ids program. Or am i missing something?

Member of the HAVEN ADMINS community
http://talonstrike.co.uk/HavenAdmin/index.php

Gizmo Studios - Home to the Galactica mod series
http://gizmostudios.proboards38.com/index.cgi

Post Thu Jul 19, 2007 6:58 am

@ Gibbon,

Yes, you are missing the point I think. This doesn't involve changing the names in the resource file using a text editor at all. This lets you change their positions, remove them entirely, or even swap names on the map without changing the names in the INI files.

For example, mknote, for various reasons had to swap positions of two house names on the map. However when he changed the resource IDs in the IDS files it made it say "Entering XXX, Bretonia Space" for example when he wanted it to say "Entering XXX, Liberty Space". But if he changed the values in the resource files it made the house names not appear in the positions he wanted them to on the map which was reflected by his setup of the gates in game and wouldn't have been an accurate location for the system.

Post Thu Jul 19, 2007 9:14 am

Are you able to change the Sirius Sector name and remove that as well? The over all map name that is.

Requiem: A Total FL Conversion Mod .

Post Thu Jul 19, 2007 10:03 am

This is possible as well yes.

Since you requested it, I will post how to do this later tonight.

Post Thu Jul 19, 2007 10:23 am

I have two things I want to say. First, if you open up the resource.dll file with Reshacker, it makes things so much easier. You can change any of the names including the Sirius Sector with that program too. I personally changed all my names for my tc mod. I have also removed that thing where it says system after the system's name, if you get what I'm saying. Also anothing thing that I think people may like is that you can change the name of money system too as well as hundreds of things.

Which brings me to my second thing, or question. If your create a new system, how do you get them to come up with the System, Sector? All of my custom system just come up with the system name and nothing more.

Return to Freelancer Editing Tutorial Forum