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

Voices

The general place to discuss MOD''ing Freelancer!

Post Tue Aug 21, 2007 4:07 am

Interesting..and nice find !!

Maybe its relationship is to the size (dimensions)of the system used.
Can you put in the sizes of the sys and where it stopped when you tested.?

Post Tue Aug 21, 2007 10:42 am

I have narrowed it down to working at 2290 units, not working at 2300 so far. Can't do more until I get home. The system is 240,000 units across

Edited by - DwnUndr on 8/21/2007 12:11:58 PM

Post Tue Aug 21, 2007 12:29 pm

Was testing in Alaska, 180k across. The range talking stopped at was 15k.

Also tested in Chugoku, which appears to be 135k across. Range still stopped at 15k - as soon as I moved Kyoto to 15001, 0, 0, it stopped talking, but kept blabbing to me at 15000, 0, 0 like normal.

I'm using 1.1 DLLs and EXEs, btw. Perhaps this range was changed in the patch, but I doubt it.

Edit: I've searched for the square in both float and double form (it's too high to be an integer), and haven't turned up anything so far. =/

Edit 2: Thought of another possibility when I was bored after some flying fretwork with Guitar Hero (duh, what better way to think of things =P). I've changed a lot of internal DLL ranges for Flak, and this number we're looking for might have been one of them. I use 15000 as a lot of cutoff ranges (NPCs, loot, etc. are un-loaded from server memory at this range), so I'm going to play around and see what I can find.

Edited by - fox Unit 01 on 8/21/2007 9:52:42 PM

Post Tue Aug 21, 2007 9:14 pm

Okay, here's the good, the bad, and the ugly.

We'll start with the good:
My hunch was correct, and I found the number + offset:
6250000f in server.dll, 0x84ADC = square of well-wish un-dock speech
0x86AEC = 1.1 offset

The bad:
Unfortunately, due to my hunch being correct, this is the same exact number as:
6250000f in server.dll, 0x84ADC = square of NPC disappear distance in MP
0x86AEC = 1.1

The ugly:
This explains why I was registering a 15000 range, as technically I was doing this off my mod's files (which is bad practice, but I'm lazy). As you can imagine, this also defining disappear distances makes things rather fugly. NPCs and cargo won't directly disappear if you up this to, say, the square 999999 (like I did), however, fortunately, I believe that since the persistance range is still set at whatever (2500 by default), NPCs and cargo will still be un-loaded from the server - you'll just see the NPC disappear without the definitive de-targeting and 'target lost' HUD sound effect. I'm going to play around with this for a while and see what I come up with.

Edit: Alright. Even though this edit creates a rather un-desirable side-effect, it would seem that it's pretty harmless, and in my experience with FLServer this probably won't de-stabilize it at all, because if a change to NPCs and objects like this would de-stabilize it the crash would be pretty timely. Don't quote me on that, but I'm willing to reckon that it's overall fine to up this to 999999^2 or something really high like that.

As far as NPCs go, the only side-effect is that your targeted NPC will appear to disappear at anywhere from 2.5 to 4 km (that's just a guess, for me it's 15-20, as persist range is at 15). It seems that FLServer only updates population additions/subtractions every few seconds, so your targetted NPC may disappear immidiately, or it may take little while. This _should_ have zero impact on server lag, because in reality the NPC would take a few seconds to be un-loaded anyways, so you looking at it while it doesn't seem to be any reason to introduce lag.

Cargo, however, is a much different different story that had me worried for a while. When you up this value to a high number, cargo no longer has any disappearance range, so a Nanobot you dropped at Pittsburgh can be seen from Manhattan, provided you don't un-target it - but even if you did, you could head back to Pittsburgh and it'd still be there.

Fortunately, this is Constatnts.ini comes in handy - specifically, these lines:
LOOT_UNSEEN_RADIUS = 2000 ;Any player not within this radius will start...
LOOT_UNSEEN_LIFE_TIME = 120.00 ;... This timer. Once this many seconds have passed, that unit of loot will be successfully un-loaded.
(these aren't default values, but again I'm lazy lol)

This worries me, however, because FLServer will still have to run timers for every piece of loot - even the ones 50km away that normally would've been un-loaded by that point. My suggestion would be to use a low radius and lifetime for these variables, to minimize the amount of loot FLServer would have to deal with at one time. Maybe 1000m, at 30 seconds, would do well.

I think that pretty much covers everything. I hope I explained everything clearly. If you don't understand how to hex-edit, I wrote up a quick picture-guided tutorial in the Limit Breaking 101 topic a while ago - it's the last post on this page. I suppose I could also whip up a stock DLL if anyone wants, though knowing how to edit this stuff is a pretty handy skill for modding in my opinon. =P

Edited by - fox Unit 01 on 8/21/2007 10:47:23 PM

Post Tue Aug 21, 2007 9:28 pm

Great work! This explains the discrepancy between our numbers, mine does not have the NPC's modified.

Post Wed Aug 22, 2007 12:19 am

I have found the exact number for an unmodified file.

2292 units works

2293 does not.

See if that still matches the NPC disappear distance. I think you mentioned it was 2500? Hopefully they are different.

Edited by - DwnUndr on 8/22/2007 1:21:03 AM

Post Wed Aug 22, 2007 2:48 pm

I found the number already, see my last post. =P
It includes a link to a brief, picture-guided hex-editing tutorial incase you've never done it before.

Edit: Sorry, I see what you're getting at. Me mis-reading posts as always, duh. Unfortunately, this offset in the DLL does indeed govern both NPC+Cargo disappear distances and the "cutoff range" for this voice message. I don't think this "cutoff range" was intentional, probably just a side-effect of this "disappear range" function programmed for FLServer.

Edit 2: I've uploaded a pre-made version of this hack for both 1.0 and 1.1 Server.dll versions, for anyone who wants to play around with it - http://www.memes.no/88flak/downloads/beta/FreelancerAlphaBlahThisIsBlahBaseFarewellHack.zip.

Edited by - fox Unit 01 on 8/22/2007 8:36:02 PM

Post Thu Aug 23, 2007 1:06 am

Thanks for the upload.

What radius does it cover in the hack on server.dll?

Post Thu Aug 23, 2007 1:01 pm

1000km, or 1000000m, which should be large enough to encompass any system created within Freelancer that doesn't suffer the ship rattling from hell bug. =P

Return to Freelancer General Editing Forum