Dev's Limit Breaking 101 Techniques
-
I’ve figured out how to run multiple instances of Freelancer under one user.
You will need the following offset:"FreelancerClient" in freelancer.exe, 0x1e6dcc = string used for lpName when FL calls CreateMutex (change this for multiple instances) ```The following are optional to get it to work, but are needed for running multiple instances off of one installation:
“RemoteServer.dll” in freelancer.exe, 0x1e6454 = name of RemoteServer DLL filename used by FL
freelancer.exe in remoteserver.dll, 0x3f440 = name of freelancer.exe for RemoteServer; if you’re going to rename your freelancer.exe, you’ll need to change it here as well, or it will crash when you try to join a server ~CrazyThe first step is changing the "FreelancerClient" string to something else. You have a few options here because there's 3 extra null characters you can use after the original string (strings in binary files are typically **null terminated** - the end is signified by a null (0x00) character). Since there are 4 null characters after the original string you can safely make use of up to 3 of them to make the string longer. I personally added a "01" onto the original string. If the freelancer.exe that you're editing is in its own installation, then you're done - you should now be able to launch it along with whatever other installation you have. Otherwise, you should save the modified freelancer.exe as something else. The filename can be up to 1 character longer than the original "freelancer.exe". Now make a copy of the remoteserver.dll file, naming it up to 3 characters longer than the original filename. Next you need to change the filename of RemoteServer in freelancer.exe. As with the "FreelancerClient" string, there are 3 extra null characters after the string. Finally, change the "FreeLancer.exe" string in your copy of remoteserver.dll to whatever you saved your modified freelancer.exe as. You should now have two Freelancer executables that you can launch to have two instances of Freelancer open at once. Notes: I have only tested this in MP, where it worked fine. I do not know if it is also compatible with SP, but it should be. You should only have to change the "FreelancerClient" string in order to get it to work in SP - the remoteserver.dll stuff is specifically to get it to work in MP. I recommend launching the two instances with the -windowed (-w for short) command line switch, which will run each of them in their own window. When FL is run in windowed mode the window will only be updated when it has focus (FL will continue running whether it has focus or not, however). EDIT: I almost forgot. In order to connect the multiple instances to FLServer you will need to connect one, change your MP ID, and then connect another. I typically do this via registry files, but there is also a program called Freelancer Account Manager that will do this for you (I have not personally tried it, however).
-
M0tah, I tested your offsets for multiple instances, how ever, I was able to open a 2nd instance, but was unable to connect to the game server? I added the -sIP to the short cut, but simple no thing is going on if I click at the “connect” button. No thing happens then…
Did I did some mistake?
Hint: The first instance was connected to this game server, but I changed my FL MP ID…plus there was NO message. Simple no thing is going on. -
Thx, it is working now. iirc I forgot the “remoteserver.dll” entry ::)
-
04/15/09:
– Corrected the credit in “maximum number of characters per account, part 1” entry, which was actually discovered by ZephyerEdit: Also, I have updated the tutorial (http://www.memes.no/88flak/downloads/beta/1.0-1.1_Offsets_Tutorial.txt) to be up to date with the new format.
-
Oh well, since its public now, here you go for unlimited FL instances:
Replace the first char of the FreelancerClient string with a 0 (not a string-NULL, but a real NULL).
That will create a unique mutex for every FL instance. Also, you dont have to mess with remoteserver.dll that way.
-
Oh well, since its public now, here you go for unlimited FL instances:
Replace the first char of the FreelancerClient string with a 0 (not a string-NULL, but a real NULL).
That will create a unique mutex for every FL instance. Also, you dont have to mess with remoteserver.dll that way.
May you can tell me what’s this mean, and what their do ?
Thanks for your help and reply.
-
Changing the first character of the string to 0x00 will make it so you can open an unlimited number of freelancer.exes, without having to make a copy of freelancer.exe with a modified FreelancerClient string.
The reason FL normally does not allow multiple instances is because a call to CreateMutex fails. CreateMutex has an optional argument for the name of the mutex, which is normally the FreelancerClient string. If you try to start a second instance of FL, CreateMutex is called with the same FreelancerClient string and fails because a mutex was already created with that name by the first instance. If you pass in a NULL name, then the mutex is created without a name, which solves the function call failing since it no longer checks if there is already a mutex with the same name.
The way I did it was to change the string used in CreateMutex in the copy of freelancer.exe so the copy would have a different mutex name. -
04/29/09:
– Indexed w0dk4’s collision detection min check distance (increasing this will fix issues with the sur collisions on objects > 130k from center of system)04/28/09:
– Indexed M0tah’s chat-block offset (stops chat from being displayed, useful for filming) -
Added a critical hex value:
– 0.8f in server.dll, 0x???, 0x8AE78 = resale % for ships (server-side, must match variable above or 1.1 server dll will kick client for cheating) ~FriendlyFire
I changed resale value and was getting instant kick on everyone attempting to buy a new ship. Turns out this value had also to be changed ::)
-
Added an htm version of the offsets editing tutorial, with pictures displayed alongside the text; it may be found at http://www.memes.no/88flak/downloads/beta/1.0-1.1_Offsets_Tutorial.htm