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

Limit breaking 101

Here you find the different tutorials on editing and MODing Freelancer

Post Fri Aug 18, 2006 6:56 pm

Out of boredom and the fact that my mod uses 1.1 stuff, I've made a duplicate table of what's above except with 1.1 offsets. Enjoy. ^_^;

-------- Visibility --------
3f in Freelancer.exe, 0x210530 = near plane of view frustum
250000f in Freelancer.exe, 0x210534 = far plane of view frustum (nothing will be drawn beyond this)
20000f in Freelancer.exe, 0x1C8910 = max distance at which ships can be seen (even if LODranges specify a higher distance)
100000000f in Freelancer.exe, 0x1D15B8 = square of max distance that a ship can be selected
6250000f in server.dll, 0x84ADC = square of NPC disappear distance in MP
25000000f in server.dll, 0x84AE0 = square of player disappear distance in MP
100000000f in server.dll, 0x84AE4 = square of grouped player disappear distance in MP

-------- NPC spawning/behavior --------
1775d in content.dll, 0x11AC80 = initial NPC max spawn distance in SP and MP (such as after respawn)
2500d in content.dll, 0x11AC68 = NPC max spawn distance in SP and MP (following initial spawn)
2500f in content.dll, 0xD3C3E = maximum distance that NPCs will persist in MP (I don't recall if it applies to SP)
3750f in content.dll, 0x591B6 = distance over which NPC spawning will ignore density cap in SP; as a general rule, make it 1.5 * NPC max spawn distance
7500f in content.dll, 0x116A68 = distance over which NPC spawning will ignore density cap in MP; as a general rule, make it 3 * NPC max spawn distance
5000f in common.dll, 0x140810 = max range at which NPCs will engage enemies; don't forget to increase the range at which NPCs will engage in pilots_population as well (attack_preference under JobBlock)
5000f in content.dll, 0xD0510 AND 0x11AD10 = max range at which NPCs will go hostile upon seeing their allies go hostile (AND means both values must be changed)
500i in content.dll, 0x6C790 = max range at which NPCs will scan your cargo
2500f in content.dll, 0x6CA37 = max range at which NPCs will initiate scan of your cargo

-------- HUD --------
2000i in Freelancer.exe, 0xD2C02 = distance over which kilometers rather than meters are displayed (in the contact list)
2000i in Freelancer.exe, 0xEEF90 = distance over which kilometers rather than meters are displayed (target bracket in space)
10000i in Freelancer.exe, 0xD2C32 = distance over which fractions of kilometers are not displayed
99999i in Freelancer.exe, 0xD2C94 = distance over which "far" is displayed rather than an actual distance
999i in Freelancer.exe, 0xD597A = speed over which "---" is displayed
0x0F85->0x90E9 in Freelancer.exe, 0xD5936 = remove cruise speed display limit of 300 (in other words, change 0x0F85 to 0x90E9; this hack was found by someone else)
0.6f in Freelancer.exe, 0xDFC09 = speed at which target crosshair closes on subtarget in wireframe view (make smaller for faster)
0.8d in Freelancer.exe, 0x1D7E50 = width of bars for energy, shield and hull gauges (for example, set to 1.0 to make the bars solid)
1.25f in Freelancer.exe, 0x1C9804 = multiplier for distance at which brackets around non-targeted ships in space will appear (1.25 = ~3km, 37.5 = ~93km, etc)
3.0f in Freelancer.exe, 0x1D7964 = seconds between updates of the distances in the contact list

-------- Misc --------
1000f in common.dll, 0x18BDB4 = max dock acknowledge distance
10000f in common.dll, 0x13F48C = max docking initiation distance
0.8f in Freelancer.exe, 0x1D6D38 = resale % for ships
9999999f in Freelancer.exe, 0x1CAEE8 = maximum value of any single good
0.9f in common.dll, 0x18D5D4 = Reputation over which will give you affiliation with that faction (faction name appears in space before your name)
999999999i in server.dll, 0x6EEF1 = maximum credits that a player can have in MP

EFT_EXPLOSION_LARGE (limited duration):
100f in Freelancer.exe, 0x212AF0 - on-screen radius of effects, affects size-on-screen-based cutoff (make larger to increase cutoff range)
15f in Freelancer.exe, 0x212AF8 - max run time of effects
100f in Freelancer.exe, 0x212B00 - unknown, likely the first value of pbubble
500f in Freelancer.exe, 0x212B04 - visual cutoff range of effects (second value of pbubble)

EFT_WEAPON_LARGE_PROJ (infinite duration):
50f in Freelancer.exe, 0x212C58 - on-screen radius of effects
-1f in Freelancer.exe, 0x212C60 - max run time of effects
100f in Freelancer.exe, 0x212C68 - unknown, likely the first value of pbubble
500f in Freelancer.exe, 0x212C6C - visual cutoff range of effects (second value of pbubble)
15f in Freelancer.exe, 0x213158 - on-screen radius of vis_beam effects
100f in Freelancer.exe, 0x213168 - unknown, likely the first value of pbubble for vis_beam
500f in Freelancer.exe, 0x21316C - default vis_beam cutoff range (second value of pbubble for vis_beam)

EFT_DAMAGE_LARGE_SMOKE (infinite duration):
20f in Freelancer.exe, 0x212DE8 - on-screen radius of effects
-1f in Freelancer.exe, 0x212DF0 - max run time of effects
100f in Freelancer.exe, 0x212DF8 - unknown, likely the first value of pbubble
500f in Freelancer.exe, 0x212DFC - visual cutoff range of effects (second value of pbubble)


Oddly enough, the only real changes seemed to be in common.dll, which worries me a little. Could someone else perhaps comfirm some of these offsets on set of 1.1 files? I really don't feel like re-installing the game so I can re-apply the patch at the moment. =P

Post Sat Aug 19, 2006 10:53 am

Just curious, could perhaps the number that dictates the reputations bribes set be found? This could maybe be used to have bribes set reputations to 1 instead of 0.6 for faction tags, which some modders may find a better way of setting up tags over the "automated" ones obtained by just lowering the required rep for the tag. This way, a player could have more control over which tag he/she wants before the character name, instead of working towards, say, a Rouge tag and all of the sudden receiving a Xenos tag. Just a thought. =P

Edited by - fox Unit 01 on 8/19/2006 11:53:27 AM

Post Sun Aug 20, 2006 2:34 am

O_O

Awesome!
Stickified.

Post Sun Aug 20, 2006 3:19 am

Ya know I wonder if people actually read all the posts or only work from the original post, I am guessing they don't so I'll post again.

great work I have tried afew of these and they work fine
in multiplayer

the one I can't seem to get to work is the max cash i changed it from the 999999999 to 2000000000 and in mp it still will not let go past the 999999999 mark.

What did I do wrong?
999999999i in server.dll, 0x6EEF1 = maximum credits that a player can have in MP(not for 1.1 server.dll)

I have got the maximum value of any single good, max docking initiation distance to work and they work fine in mp.

well I don't know if I did the max cash proper but I got it to work by changing all 999999999 that
show up in the server.dll (and there is quite afew) to 2000000000 and it worked on my test server.

6250000f in server.dll, 0x84ADC = square of NPC disappear distance in MP
25000000f in server.dll, 0x84AE0 = square of player disappear distance in MP
100000000f in server.dll, 0x84AE4 = square of grouped player disappear distance in MP

>>>>in the 1.1 server dll these can be found at 86AEC, 86AF0 and 86AF4<<<<<

which means in the 1.1 server.dll

6250000f in server.dll, 0x86AEC = square of NPC disappear distance in MP
25000000f in server.dll, 0x86AF0 = square of player disappear distance in MP
100000000f in server.dll, 0x86AF4 = square of grouped player disappear distance in MP

i have anly altered the last 2 and tested on my test server

25000000 changed to 1000000000 you pick up an ungrouped player at 32k away

1000000000 changed to 2000000000 picked up a grouped player at 44k away

Anyways a big thanks to Dev for providing us with this tutorial I would have had no clue on where to look for these things with out it.

Triple

Post Mon Aug 21, 2006 3:27 am

could we rewrite one post with address for the 1.0 version of dlls and one for the 1.1 version of dlls, more clearly ???

Post Mon Aug 21, 2006 8:30 pm

I've done that already above, however I'm not 100% sure if they're accurate as TripleJH is reporting slightly different offsets for server.dll (admittedly by only one row, but still). I know for a fact that they're accurate on my DLLs and EXE, and I'm almost 100% sure I have the correct 1.1 files, but still TripleJH's different offsets are bugging me a little.

Hope this helps at all.

Edit: Nevermind, mis-read your post. Sorry. =P

Edit 2: Here, I just uploaded the text file I made for my own reference, directly off Dev's list. Every offset has another offset below it labeled "1.1" for the 1.1 offset that I found; they are all the same except ones for common.dll. They again may or may not be correct, so if you try one of the offsets and it's way off I'm sorry; again, this was just a reference for me. It can be found at http://www.memes.no/88flak/1.0-1.1_Offsets.txt

Edited by - fox Unit 01 on 8/21/2006 9:44:08 PM

Post Mon Aug 21, 2006 9:43 pm

Well I would be the last one to tell you that I know anything about hex editing or anything else Dev explained in his original post alot of gibberish to me.

But I do know what works and the 1.1 server.dll info I posted has been server tested and works.

TripleJH
Monkey Universe Admin
Monkey Universe Modding Team

Download Monkey Universe 1.87

Edited by - TripleJH on 8/21/2006 10:46:23 PM

Edited by - TripleJH on 8/21/2006 10:47:04 PM

Post Tue Aug 22, 2006 7:00 am

I’ve tested the visibility and NPC spawning behaviour changes. They work, superbly. Combat at 100k! What’s better the range incoming missiles are detected increased too so it is still possible to shoot them down even with them travelling at much higher speeds. An excellent job on your part Dev for providing this.

Post Fri Aug 25, 2006 9:31 pm

Don't ask me how, but it seemed that I was working only off half of 1.1's files when compiling my 1.1 offset list. I'm surprised FL wasn't a fireworks display of crashes; anywho, I have re-compiled a list of confirmed 1.1 offsets, listed below:

-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

Freelancer.exe is not changed in the 1.1 patch, leaving all offsets the same for freelancer.exe.
Offsets in server.dll, common.dll, and content.dll are changed, however.
All 1.1 values relate to the variable above.

-------- Visibility --------
3f in Freelancer.exe, 0x210530 = near plane of view frustum
0x210530 = 1.1
250000f in Freelancer.exe, 0x210534 = far plane of view frustum (nothing will be drawn beyond this)
0x210534 = 1.1
20000f in Freelancer.exe, 0x1C8910 = max distance at which ships can be seen (even if LODranges specify a higher distance)
0x1C8910 = 1.1
100000000f in Freelancer.exe, 0x1D15B8 = square of max distance that a ship can be selected
0x1D15B8 = 1.1
6250000f in server.dll, 0x84ADC = square of NPC disappear distance in MP
0x86AEC = 1.1
25000000f in server.dll, 0x84AE0 = square of player disappear distance in MP
0x86AF0 = 1.1
100000000f in server.dll, 0x84AE4 = square of grouped player disappear distance in MP
0x86AF4 = 1.1

-------- NPC spawning/behavior --------
1775d in content.dll, 0x11AC80 = initial NPC max spawn distance in SP and MP (such as after respawn)
0x11BC80 = 1.1
2500d in content.dll, 0x11AC68 = NPC max spawn distance in SP and MP (following initial spawn)
0x11BC68 = 1.1
2500f in content.dll, 0xD3C3E = maximum distance that NPCs will persist in MP (I don't recall if it applies to SP)
0xD3D6E = 1.1
3750f in content.dll, 0x591B6 = distance over which NPC spawning will ignore density cap in SP; as a general rule, make it 1.5 * NPC max spawn distance
0x58F46 = 1.1
(when searching for that I found a 3750f under 0x58F76 in the 1.1 content.dll, two rows down from 0x58F46. I don't know what it does, though)
7500f in content.dll, 0x116A68 = distance over which NPC spawning will ignore density cap in MP; as a general rule, make it 3 * NPC max spawn distance
0x117A68 = 1.1
5000f in common.dll, 0x1407E0 = max range at which NPCs will engage enemies; don't forget to increase the range at which NPCs will engage in pilots_population as well (attack_preference under JobBlock)
0x140810 = 1.1
5000f in content.dll, 0xD0510 AND 0x11AD10 = max range at which NPCs will go hostile upon seeing their allies go hostile (AND means both values must be changed)
0xD0630 AND 0x11BD10 = 1.1
500i in content.dll, 0x6C790 = max range at which NPCs will scan your cargo
0x6C470 = 1.1
2500f in content.dll, 0x6CA37 = max range at which NPCs will initiate scan of your cargo
0x6C717 = 1.1

-------- HUD --------
2000i in Freelancer.exe, 0xD2C02 = distance over which kilometers rather than meters are displayed (in the contact list)
0xD2C02 = 1.1
2000i in Freelancer.exe, 0xEEF90 = distance over which kilometers rather than meters are displayed (target bracket in space)
0xEEF90 = 1.1
10000i in Freelancer.exe, 0xD2C32 = distance over which fractions of kilometers are not displayed
0xD2C32 = 1.1
99999i in Freelancer.exe, 0xD2C94 = distance over which "far" is displayed rather than an actual distance
0xD2C94 = 1.1
999i in Freelancer.exe, 0xD597A = speed over which "---" is displayed
0xD597A = 1.1
0x0F85->0x90E9 in Freelancer.exe, 0xD5936 = remove cruise speed display limit of 300 (in other words, change 0x0F85 to 0x90E9; this hack was found by someone else)
0xD5936 = 1.1
0.6f in Freelancer.exe, 0xDFC09 = speed at which target crosshair closes on subtarget in wireframe view (make smaller for faster)
0xDFC09 = 1.1
0.8d in Freelancer.exe, 0x1D7E50 = width of bars for energy, shield and hull gauges (for example, set to 1.0 to make the bars solid)
0x1D7E50 = 1.1
1.25f in Freelancer.exe, 0x1C9804 = multiplier for distance at which brackets around non-targeted ships in space will appear (1.25 = ~3km, 37.5 = ~93km, etc)
0x1C9804 = 1.1
3.0f in Freelancer.exe, 0x1D7964 = seconds between updates of the distances in the contact list
0x1D7964 = 1.1

-------- Misc --------
1000f in common.dll, 0x18ADB4 = max dock acknowledge distance
0x18BDB4 = 1.1
10000f in common.dll, 0x13F45C = max docking initiation distance
0x13F48C = 1.1
0.8f in Freelancer.exe, 0x1D6D38 = resale % for ships
0x1D6D38 = 1.1
9999999f in Freelancer.exe, 0x1CAEE8 = maximum value of any single good
0x1CAEE8 = 1.1
0.9f in common.dll, 0x18C5D4 = Reputation over which will give you affiliation with that faction (faction name appears in space before your name)
0x18D5D4 = 1.1
999999999i in server.dll, 0x6EEF1 = maximum credits that a player can have in MP
(un-able to find precisely in 1.1 server.dll with my methods, however my testing with upping max cash on the 1.0 DLL caused players to have a chance of wrapping around to -1 credits, losing all their cash)
2500f in common.dll, 0x13F3CC = trade lane travel speed
0x13F39C = 1.1

EFT_EXPLOSION_LARGE (limited duration):
100f in Freelancer.exe, 0x212AF0 - on-screen radius of effects, affects size-on-screen-based cutoff (make larger to increase cutoff range)
0x212AF0 - 1.1
15f in Freelancer.exe, 0x212AF8 - max run time of effects
0x212AF8 - 1.1
100f in Freelancer.exe, 0x212B00 - unknown, likely the first value of pbubble
0x212B00 - 1.1
500f in Freelancer.exe, 0x212B04 - visual cutoff range of effects (second value of pbubble)
0x212B04 - 1.1

EFT_WEAPON_LARGE_PROJ (infinite duration):
50f in Freelancer.exe, 0x212C58 - on-screen radius of effects
0x212C58 - 1.1
-1f in Freelancer.exe, 0x212C60 - max run time of effects
0x212C60 - 1.1
100f in Freelancer.exe, 0x212C68 - unknown, likely the first value of pbubble
0x212C68 - 1.1
500f in Freelancer.exe, 0x212C6C - visual cutoff range of effects (second value of pbubble)
0x212C6C - 1.1
15f in Freelancer.exe, 0x213158 - on-screen radius of vis_beam effects
0x213158 - 1.1
100f in Freelancer.exe, 0x213168 - unknown, likely the first value of pbubble for vis_beam
0x213168 - 1.1
500f in Freelancer.exe, 0x21316C - default vis_beam cutoff range (second value of pbubble for vis_beam)
0x21316C - 1.1

EFT_DAMAGE_LARGE_SMOKE (infinite duration):
20f in Freelancer.exe, 0x212DE8 - on-screen radius of effects
0x212DE8 - 1.1
-1f in Freelancer.exe, 0x212DF0 - max run time of effects
0x212DF0 - 1.1
100f in Freelancer.exe, 0x212DF8 - unknown, likely the first value of pbubble
0x212DF8 - 1.1
500f in Freelancer.exe, 0x212DFC - visual cutoff range of effects (second value of pbubble)
0x212DFC - 1.1

-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

The 1.1 offsets have been tested on a fresh 1.1 install, and are 100% accurate, tested by a few others. Have fun folks. =P

Edit: Table updated on 9/24/06 at 11:59 PM

Edited by - fox Unit 01 on 9/24/2006 8:57:53 PM

Post Sat Aug 26, 2006 9:49 am

Dev, You are a new God!

One quaestion:do you know how to work out shaking when you are too far from the centre of the map?

(\__/)
(='.'=) This is Bunny. Copy and paste bunny into your
(" )_(" ) signature to help him gain world domination.


Edited by - Vital on 9/2/2006 11:13:58 AM

Dev

Post Sat Aug 26, 2006 3:47 pm

No, I think the ship shaking is something that is inherent to the way Freelancer is built. My guess is that there is some floating point error in the updating of the ship's location as it moves. Because of the newtonian physics of the FL engine, slowing down to a complete stop from either linear or angular motion will take literally infinite time, so the shaking continues for quite a while after the ship appears to be stopped. However, since the shaking does stop at some point, it also appears that there is some cutoff that will set the ship's movement speed to zero once it falls below a certain point. If you could find that cutoff value, you could possibly try to increase it, which would cause the ship to stop shaking earlier when it isn't supposed to be moving; however, this would not do anything for shaking while the ship is in motion. Offhand I don't believe a real solution exists beyond keeping the size of the solar system low enough that you don't notice the shakes.

Post Mon Aug 28, 2006 10:17 pm

coolness - after getting acquainted with the notation and XVI32 i sucessfully implemented your edits. now i've got three questions

are there any more hex adresses/values in the works?
could we get some info on the process that went into finding these?
would you locate the dynamic asteroid damage and mass constants please? if we could change it dynamic asteroid fields could be far more realistic = )

once again, very nice work

Dev

Post Mon Aug 28, 2006 11:00 pm

"are there any more hex adresses/values in the works?"

Probably not until I find that they are necessary. All the ones above were found because I needed them, or were found by accident while searching for things that I needed. It's not a very enjoyable process, so I would prefer to avoid it as much as possible.


"could we get some info on the process that went into finding these?"

The first step was taking a disassembler to the .exes and .dlls. I then wrote a utility that parsed the resulting assembly (which is not 100% accurate, of course) looking for constants, either 4-byte or 8-byte. The utility then produced text files containing reports of what it found, with the 4-byte values interpreted as both integers and floats and the 8-byte values as doubles. I then compared these candidate values against in-game observations in order to guess at which ones I wanted. Finally, the target value(s) were replaced in all target files; if the result worked in-game, I then narrowed it down to a particular file, and then a particular instance of that value (typically a given value will appear many times in one file). If the result didn't work, I would try different likely values. And sometimes I just did massive alterations of a large range of constants hoping to catch something in the process (notable case in point, the multiplier for the target brackets around untargeted ships). The replacement of only certain instances of values in certain files was taken care of by another utility that I wrote. In all, it's a long, slow, ugly process and is not for the faint of heart; the constants in the first post of this thread represent maybe around two hundred hours of work (more if you count the part where I was just trying to figure out what I was doing).


"would you locate the dynamic asteroid damage and mass constants please?"

What values would those be? If you can give me concrete numbers to look for I can probably find them; otherwise, I'll just be shooting in the dark, which I would rather avoid.

Post Tue Aug 29, 2006 7:57 am

Edit: Post deleted, my bad. The crash I was having was worked out.

Edited by - fox Unit 01 on 8/30/2006 10:00:04 AM

Post Tue Aug 29, 2006 9:01 am

hey Dev, great work I must say again

I just wondered if you could find a constant for me.
Its the base/wreck/weaponsplatform hitpoint-reset interval (it is 60 seconds actually)
If you find it, we actually could give base destructions a real use

Return to Freelancer Editing Tutorial Forum