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

How to Edit the EXE and DLL files

Here you find the different tutorials on editing and MODing Freelancer

Post Thu Mar 23, 2006 2:53 pm

How to Edit the EXE and DLL files

Hi
im posting this treat because i couldn't find any tuturial regarding that subject.
I dont know how to do it so im hoping that the comunity could post some tuturial explaining how to for e.g set the speed meter to show the correct speed. i know that to make that its necessary to edit the EXE file.
I'm SURE SOME one could help in this.

Post Fri Mar 24, 2006 8:38 am

Hi.
I don't have much time,so I'll give You short answer.
Serch for "speedmeter"(You'll be given not so many threads)
.It'll take <10 min. to find the answer.

Post Sat Mar 25, 2006 1:40 pm

hi
after i post this Thread i found the thread were StoneD post how to break the Speed Cap.
actualy is very easy with a simpel hex editor like Hex Workshop you can do it very quikly.

Found the HUD display speed limit... there's two locations. One for Trade Lanes and one for the Cruise Engines! Actually, I think I found the first one last year before my comp died, but what the hell.

Before I continue, I have already submitted an FLMOD to TLR, however I suspect it won't get approved because it contains an EXE. If that is the case, I'll make a trainer version instead if people want.

For those who want to do it themselves or want some ammo in their struggle to learn Assembler, here's the juice :

Both are in freelancer.exe, so if you want to modify it, you'll have to either do it using some kind of memory editor, a trainer or by hacking a NO-CD patch version like I did :


HUD Speed display limiter - Cruise

.004D592B: D815807E5D00 fcom d,[005D7E80 << Checking against 300.0, real(4) float
.004D5931: DFE0 fstsw ax
.004D5933: F6C441 test ah,041 ;"A"
>004D5936: 0F8575FFFFFF jne .0004D58B1 -----? (2)
.004D593C: DDD8 fstp st(0)
.004D593E: D905807E5D00 fld d,[005D7E80
.004D5944: DC15787E5D00 fcom q,[005D7E78

Where the > is, the HEX offset is 0xD5936. Change "0F85" to "90E9". This changes the JNE (Jump if Not Equal) to simply JuMP.

This code *seems* to be some kind of half-hearted attempt to prevent the CPU from doing something constantly when
it doesn't need to. Previous lines involved in the loop do traverse several DLLs (common.dll, msvcrt.dll, server.dll)
so it may impact low spec comps if you do this. I doubt it though.


HUD Speed display limiter - Trade Lanes

.004D5979: 3DE7030000 cmp eax,0000003E7 ;" _" !! 999 !!
.004D597E: 898644030000 mov [esi[000000344,eax
>004D5984: 7E19 jle .0004D599F -------- (3)
.004D5986: 8B8E3C030000 mov ecx,[esi[00000033C
.004D598C: 8B11 mov edx,[ecx

Where the > is, the HEX offset is 0xD5984. Change "7E" to "EB". This changes the JLE (Jump if Less or Equal) to simply JuMP.

FYI, the actual tradelane speed is 2,500.

Now, I know from past experience that people will ask, so to summarize, do thusly :


I. Fetch thyself an Editor of Hex. Tis not an issue whither it be share, free or pay-ware. An goodly one is HIEW.
II. Readst thou thine manual for thine Editor of Hex.
III. Makest thyself an copy of Freelancer.exe. Test.exe t'would be good.
IV. Open Test.exe in thine Editor of Hex.
V. Shouldst thou desire to remove yonder Cruise limit, instruct thine Editor of Hex to go to this Offset : D5936
VI. At this location, thou wilst find two bytes, 0F and 85. Change to 90 and E9.
VII. Shouldst thou desire to remove yonder Trade Lane limit, instruct thine Editor of Hex to go to this Offset : D5984
VIII. At this location, thou wilst find but a single byte, and it shalt be 7E. Change this to EB.
IX. Savest thine changes.
X. Quiteth thou from thine Editor of Hex.
XI. Clicketh doubly so upon yonder Test.exe.
XII. Play.


Didn't think I'd make it *that* easy, did you?

BTW, I've been watching a certain Monty Python film recently. FYI, etc. ;DFound the HUD display speed limit... there's two locations. One for Trade Lanes and one for the Cruise Engines! Actually, I think I found the first one last year before my comp died, but what the hell.

Before I continue, I have already submitted an FLMOD to TLR, however I suspect it won't get approved because it contains an EXE. If that is the case, I'll make a trainer version instead if people want.

For those who want to do it themselves or want some ammo in their struggle to learn Assembler, here's the juice :

Both are in freelancer.exe, so if you want to modify it, you'll have to either do it using some kind of memory editor, a trainer or by hacking a NO-CD patch version like I did :


HUD Speed display limiter - Cruise

.004D592B: D815807E5D00 fcom d,[005D7E80 << Checking against 300.0, real(4) float
.004D5931: DFE0 fstsw ax
.004D5933: F6C441 test ah,041 ;"A"
>004D5936: 0F8575FFFFFF jne .0004D58B1 -----? (2)
.004D593C: DDD8 fstp st(0)
.004D593E: D905807E5D00 fld d,[005D7E80
.004D5944: DC15787E5D00 fcom q,[005D7E78

Where the > is, the HEX offset is 0xD5936. Change "0F85" to "90E9". This changes the JNE (Jump if Not Equal) to simply JuMP.

This code *seems* to be some kind of half-hearted attempt to prevent the CPU from doing something constantly when
it doesn't need to. Previous lines involved in the loop do traverse several DLLs (common.dll, msvcrt.dll, server.dll)
so it may impact low spec comps if you do this. I doubt it though.


HUD Speed display limiter - Trade Lanes

.004D5979: 3DE7030000 cmp eax,0000003E7 ;" _" !! 999 !!
.004D597E: 898644030000 mov [esi[000000344,eax
>004D5984: 7E19 jle .0004D599F -------- (3)
.004D5986: 8B8E3C030000 mov ecx,[esi[00000033C
.004D598C: 8B11 mov edx,[ecx

Where the > is, the HEX offset is 0xD5984. Change "7E" to "EB". This changes the JLE (Jump if Less or Equal) to simply JuMP.

FYI, the actual tradelane speed is 2,500.

Now, I know from past experience that people will ask, so to summarize, do thusly :


I. Fetch thyself an Editor of Hex. Tis not an issue whither it be share, free or pay-ware. An goodly one is HIEW.
II. Readst thou thine manual for thine Editor of Hex.
III. Makest thyself an copy of Freelancer.exe. Test.exe t'would be good.
IV. Open Test.exe in thine Editor of Hex.
V. Shouldst thou desire to remove yonder Cruise limit, instruct thine Editor of Hex to go to this Offset : D5936
VI. At this location, thou wilst find two bytes, 0F and 85. Change to 90 and E9.
VII. Shouldst thou desire to remove yonder Trade Lane limit, instruct thine Editor of Hex to go to this Offset : D5984
VIII. At this location, thou wilst find but a single byte, and it shalt be 7E. Change this to EB.
IX. Savest thine changes.
X. Quiteth thou from thine Editor of Hex.
XI. Clicketh doubly so upon yonder Test.exe.
XII. Play.


Didn't think I'd make it *that* easy, did you?

BTW, I've been watching a certain Monty Python film recently. FYI, etc. ;D


Edited by - oarsman on 3/25/2006 1:41:33 PM

Edited by - oarsman on 3/25/2006 1:47:29 PM

Post Sat Mar 25, 2006 3:11 pm

how is this in any way a tutorial?
*click* (please!)

Post Sun Mar 26, 2006 6:42 am

hi
well this may not be the rigth place to post this question but... i can move it if you want... but i think its in the rigth place, the quote that i post from Stone-D is self explanatory but i can put a step by step on how to do it

How to set the SPEED METER to show the real speed

Needed tools:
- NO-CD Freelancer.exe
- An Hex Editor like Hex Workshop

Im using Hex Workshop so im gona explain how to do it using this hex editor.

1- Instal Hex Workshop (duhh)
2- Run the editor and open the No-CD Freelancer.exe
3- Go to the Edit Menu and click GOTO...
4- Now were it says offset: type D5936, select Hex and Biginig of File, click GO
5- The cursor should now be blinking in the rigth spot 0F85
6- Highlight the first byte 0F, right click and select Fill... type 90 click OK
7- Highlight the second byte 85, right click select Fill... type E9 click OK
8- In the end, the 0F85 should be 90E9

Now the Second Part

1- Go to the Edit Menu and click GOTO...
2- Now were it says offset: type D5984, select Hex and Biginig of File, click GO
3- The cursor should now be blinking in the rigth spot 7E19
4- Here you will only change the first byte, Highlight the first byte 7E, right click and select Fill... type EB click OK
5- 7E19 should now be EB19

Now save the file with a diferent name e.g. Test.exe and make a backup of oyur original Freelancer.exe. Rename the Test.exe to Freelancer.exe, put it in the EXE folder and it should be working


Edited by - oarsman on 3/26/2006 12:02:58 PM

Post Sun Mar 26, 2006 4:44 pm

Since StoneD post the original, this is then not a tutural. If you have learned something new, then please post it, but if your just rehashing what someone else did, its of no point and in danger of being locked.

Michael

Please read the Rules and Regs before posting. When in doubt, Search the Forums to find it out.
Looking for a mod or ship, check in Here
You have entered a "Flame Free" area, please extinguish all lights and secure all combustibles, Thanks!
Have you been to the Welcome to The Lancers Reactor Yet?
Portalive TS Server IP: 128.39.88.122 (TLR)
IBF Forums

Post Sun Mar 26, 2006 7:47 pm

hi
It was not my intention to post what other people alredy did, this thing about the speed cap was just an exempel, and i found the Stone-D post after i start this one.
My idea for this thread is for the people that know about modifying the dll's especially the common.dll and exe, cause im intersted in things like removing the F1 trick, tradelane speed, money limit etc. i know that there is alredy a patch for the money, but i was hoping that the people that make those patchs realease the documentation in how to do it.
Im a newb in this site but i alredy notice that this have TONS AND TONS of information but the problem to find the rigth information (at lest for me) its the search of the site is not very good.
hope you understand

Post Mon Mar 27, 2006 12:43 am

Everything you talk about has already been covered, in some detail in Alcanders thread about modifying certain aspects of the .exe files

Post Mon Mar 27, 2006 4:42 am

hi
Yes i know that is alredy been covered but i didn't see any documentation about, only a few patchs and a lot of talk about, i dont saying that is bad talking about but i realy want to see some documentation , like procedures in how to do something. If its alredy out there sorry but i wasn's abel to find it.

Edited by - oarsman on 3/27/2006 5:43:22 AM

Post Mon Mar 27, 2006 5:58 am

oarsman the problem is that this is a touchy subject here at TLR, any tutorials on source code hacking will almost certainly be deleted. A post or two in the General editing forum can be allowed depending on the wording, but a full blown tutorial will get this site into trouble. After all this is the (Un)Official Freelancer site and M$ keep an eye on what happens here.

Hacking the code is bad enough without mentioning the illegal NoCD hacked exe, add that to the fact that most of the hacks that have been done (Alcanders Freelimits patch) cause a lot of us nothing but problems with PC's freezing or crashing.

**shuffles of with a new headache**

Post Mon Mar 27, 2006 6:38 am

So then maybe some links have to be posted out somewhere on TLR?...

(by the way,can anybody give me some links PLEASE,for example F1 mod)?)

Post Mon Mar 27, 2006 11:02 am

hi

Bejaymac i agree that a full tuturial about source code hacking may cause some troubels for TLR, but be real people, if it wasn't this site and others like it, mostly this one, and the mod comunity ho spend their time trying to improve the game, Freelancer has alredy be dead for a long time, and that is a bad thing for MS. And why do you think they never bother TLR, cause this site is the heart of Freelancer, whithout it FL will die as MP Game. I PAY for this game and i have the right to see it improved.
If TLR dont wont to host these tuturials or hacked files i understand, but at least lets post some links to them in other sites, or P2P network... look at the exemple os Astalavista and the all others like them... if we dont make money with this tuturials and files theres no problem at all. Thats what i think

Post Mon Mar 27, 2006 11:20 am

I've found some Alcander's exe mods: "FLEXEMods", RAR file.
But what's next? Where do I have to put it? Tryed insert in EXE folder,to DATA but nothing works.Engines still not sellable .Can buy them,but can't sell.
If anyone knows,tell me PLEASE.

Post Mon Mar 27, 2006 11:25 am

Oarsman,I agree with you.

Post Mon Mar 27, 2006 12:46 pm

@Vital

Use the search function. There are turorials available that will show how to make engines, and many other things sellable in freelancer. These are not DLL or EXE hacks.

As for not making money off of the hacking still does not make it legal. If Microsoft states that those are off limits, then it is, wether you do it for free or not.

I really enjoy this site and have learned so much about modding, I would hate to see this site go under due to someone pissing Microsoft off.

If you look hard enough, you will find what you are looking for. I have found most everything I have looked for.

Edited by - fadius on 3/27/2006 1:48:12 PM

Return to Freelancer Editing Tutorial Forum