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

Finally: LODs for Tradelanes

Here you find the different tutorials on editing and MODing Freelancer

Post Thu Apr 28, 2005 5:31 am

Finally: LODs for Tradelanes

Rimshot, althou not (yet) knowing, is the father to this little discovery In his Orbiting Planet thread, he mentioned that some stuff won't be affected by LODRanges entries in the INIs. Tradelane visibility is one such thing.

What you need is UTF-Edit and, if UTF-Edit produces rubbish when saving back the modified file (which is the case for me), a Hex Editor of your choice.

Locate the "tlr_lod.3db" file, which should be inside the \DATA\SOLAR\DOCKABLE\ subdirectory of your Freelancer folder. Open it within UTF-Edit and follow down this path: \ -> Multilevel -> Level0 -> VMeshPart -> VMeshRef. Make sure the "Interpret data as..." field is set to "float array". Hit Edit and scroll down to the bottom of the list. The last entry should be "497.471619". Change it to some very high value (like in Rimshots example, I too used 1000000), hit "Update", then save back the file into the folder from which it originates using the same file name.

If you're in luck, when firing up Freelancer every single Tradelane ring should now be visible from a greater than 10k range. If you're not so lucky and can't see a Tradelane ring at all, even at close range (zero M), you need to use some hex editor. I used the demo of Hex Workshop. Fire up your hex editor and open the "tlr_lod.3db" file inside it. Now make a search for the float value "497.471619". Your hex editor should find four such values, no more, no less. It's the fourth one we're looking for. Change it to 1000000 and save the file back into its originating folder. Start Freelancer and enjoy

Picture of one good looking Tradelane

:Edit
Fixed some (more) typos.

Edited by - Preacher0815 on 4/28/2005 6:48:41 AM

Post Thu Apr 28, 2005 12:24 pm

wow good job Preacher

Post Thu Apr 28, 2005 1:44 pm

Very cool- I've just tried this out, and it worked just fine- after changing the LOD settings in my solararch.ini file, too

Gotta wonder if there are any other objects we can affect this way- among other things, I've been trying for some time now to figure out how to change the distance at which things spawn, without success thus far...

Post Thu Apr 28, 2005 3:51 pm

I'm not that much into modding. I'm mostly into making everything being displayed at the highest level of detail possible without completely redoing the graphics. Right now that is all the objects which benefit from setting "lodranges" to higher values, asteroid-, mine-, ice-, junkfields, effects and now tradelanes, too. If there is something unmentioned, which could use some LOD tweaking, please let me know

The only thing I keep having problems with are the textures. No matter how i set the anisotropic filter of my graphics card, there always is a fine border line within the texturemap of an object, separating one level of mipmap from the other. I find this effect most noticeable when passing planet Leeds, when approaching battleships (especially Rheinland ones) and stations. The solution must be somewhere inside the Freelancer files. But where...

PS:
I've set all the lodranges in my Freelancer's INIs to 1000000 by default. So once the tradelanes worked, I didn't bother to check if there's a matching lodranges entry, too. Lazy, silly me

Edited by - Preacher0815 on 4/28/2005 5:02:04 PM

Post Fri Apr 29, 2005 12:45 pm

Nice post and idea

I wonder what affect this has on the pc processing though.

Whilst im sure that doing the odd thing wont make much of a difference, surely changing lots of things will have a significant impact combined with NPC's/combat/pvp etc.

Then again, maybe in DA/MS attempt to appeal to lower spec machines when FL was released they did it this way on purpose.

Post Fri Apr 29, 2005 2:01 pm

It makes non-variables like stations, tradelanes, asteroid fields, jumpgates and stuff like that visible from a longer range. NPCs are spawned in a 5K radius around the player. Other players are shown when inside this 5K radius, too, with the only exception of players who have teamed up with you, for those are visible inside a 10K radius. No lodranges setting, as high as it might be, is going to change that.

Objects shown inside the game are either based on data the client already posesses, or on data which is sent by the server anyways. So the question how it will affect PVP or PVN fights (or even server traffic for that matter) is answered: it just won't.

The only side-effect I noticed is that it has a slight hit on the game's performance, like 5 to 10% fewer frames per second in crowded areas like the New York system.

Post Fri Apr 29, 2005 2:13 pm

Well, it all depends on your system specs... and how much you jack everything up. For example, if you changed that flag for everything, and then set their higher LODs to show up at much longer ranges... that would definately have an impact on performance. I set it so that the LOD ramp basically goes from high-detail to LOD over the maximum distance where it really matters with Tradelanes... everything else is the lowest LOD, which is pretty low-poly.

Overall, I think that this is a really nice effect, and really makes the Tradelanes a lot more lively. I'd already done a minor tweak for the codebase mod I'm finishing (after all, it might as well be entertaining as well as useful, right?) where I'd made the green flashing lights bigger and brighter, and combined with the LOD trick, it's very, very clear which is the "onramp" end of a Tradelane... which is how I'd always imagined it should work

Post Fri Apr 29, 2005 3:08 pm

As I said before its a good idea and something that is worth doing...

My question was about performance issues and would there be any issues for players. I understand when images are drawn and I also understand about the client and server relationship.

What you mentioned in your third paragraph Preacher is exactly what I am talking about, slower FPS = processor performance issues. If you undertake this for lots of things it has no affect on the server (in MP) it is all on the clients (players) pc.

If you run a server, this is important because the players will be shouting about lag because of the slower FPS.

Post Mon May 23, 2005 7:41 pm

I think it's a great idea, a for a while i was wonder how but now i dont have to

This will work great with my mod =D

Post Mon May 23, 2005 8:08 pm

would it be possible to offer the modified file for download?
the hex editor i have doesnt have find float, it only has find text and hex string

edit: the UTF edit didnt work properly
tradelanes visible to about 14km and invisible inside 950m
Click here
Click here

Edited by - marc___1 on 5/23/2005 9:52:23 PM

Post Mon May 23, 2005 9:41 pm

i think he/she ment text as the search if you only have those 2

edit:
Hex: 34 39 37 2E 34 37 31 36 39
Text: 497.471619

Edited by - NightHound on 5/23/2005 10:43:53 PM

Post Mon May 23, 2005 10:50 pm

cant find either of those
im giving "hex workshop" a go from the first post

edit:
this just isnt working
i found the right entry but it shows as ^..C in the text window and wont let me edit the float value (f2)

Edited by - marc___1 on 5/24/2005 12:21:01 AM

Post Tue May 24, 2005 9:43 pm

can anyone with it working post their tlr_lod file? i cant get it working

Post Thu May 26, 2005 11:08 pm

Here's the modified file.
Remember to set the LODRANGES = value for the tradelanes, too.


And no, I didn't mean text. If your Hex Editor can't do 32 bit float, search for the fourth occurance of 5EBCF843 and replace it with 00247449

Edited by - Preacher0815 on 5/27/2005 12:18:03 AM

Post Fri May 27, 2005 3:17 am

the 3db file you posted fixed the tradlanes disappearing at close range but i can still only see them to about 14k, where in the ini do i put the lodrange 1000000
the only 'lodranges' i found in solararch.ini didnt have a number after it, shoud i add = 1000000 there?


edit: never mind, i reinstalled freelancer a few days ago and forgot the SDK, changed the lodranges and it works fine (lodranges=1000000 has problems though :p, meant to be 0, 1000000)

Edited by - marc___1 on 5/27/2005 5:36:11 AM

Return to Freelancer Editing Tutorial Forum