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

.sur and .3db

Here you find the different tutorials on editing and MODing Freelancer

Post Mon Sep 15, 2003 6:07 pm

.sur and .3db

What are those files and how can they be edited?


Rheinland über alles!

Post Mon Sep 15, 2003 7:01 pm

SUR files are the ones that define where your surfaces of the ship are for things such as collision and weapon shot hits on the hull. So far as i know you cannot mod these or make them as of yet, but everyone picks a ship of similar size (might be worthwhile to keep this in mind when making a ship) and then copies and renames the file to correspond to their ship instead.
I think the 3db is something along the lines of a 3D box of certain dimensions or something, related to the above, but not sure.........LOL
I am totally guessing by the way on that one, imagine, wanderer, victor could certainly fill you in better than myself!
Chips

Post Tue Sep 16, 2003 3:22 am

ahh! but I don't know much either. Wanderer has had some success using asteroid sur files to form a collision surface
Like Chips said, use the sur of a ship with similar shape; just throw the sur file into your ship's directory, name it after your ship, and no coding is needed apparently.

edit: 1 more thing, it is said that the 3db files are nothing more than simple cmp files with some extra data nodes thrown in



Edited by - Imagine on 16-09-2003 04:23:46

Post Mon Sep 22, 2003 2:00 am

Imagine is correct. A .3db file is essentially a simplified form of a .cmp. It has a VMesh like a .cmp file, but it will only have one mesh group in it. It also often has the textures built right into the file.

If you want to check them out, the .cmp importer I wrote for Milkshape will also handle .3db files.

Post Mon Sep 22, 2003 4:18 am

Okay, is there a way to make a new 3db file?

I mean do you just copy cmp file?

Post Tue Sep 23, 2003 7:23 am

why don't you e-mail the creator of the battleaxe ship. He succesfully created his ship using breakable parts, you know parts that are torn off when shot at.

Working hard to earn... but too lazy to do something...

Post Fri Sep 26, 2003 8:16 pm

The battleaxe didnt use .3db files. As far as i could see they served no purpose in defining a ships components. Without them the components displayed correctly even when blown off the ship. It seems to be one of the many layers of redundancy in FL, tho iam willing to be corrected in this - an easy way to check it is to delete components .3db files from a game ship and see if you notice any changes.

Various other items do use .3db files (my HD packed in about a month ago and i dont see me having the cash for a new one for a while so i cant check), if i remember correctly things like cargo pods and missiles use them. As has been correctly point out by others they are basically just simplified .cmp files.

Reven raises an interesting point by saying that .3db files often include the textures. It is perfectly possible to incorporate textures into any .cmp file using the same method.

The major problem remains to be .sur files. Although i am fairly certain i have lost all my FL stuff by a lucky coincidence i had been scribbling alot of notes on .sur files on scraps of paper so atleast i have those. I noticed tho that soemone else had posted a fairly good general layout of them. They are split into header, traingle then vertex sections. Each component on a ship/station has its own section within the .sur file which you can find the start of by calculating the modified CRC for the objects name then searching for it in the .sur file. This is why all .sur files are interchangable - the main component of any object in FL is always called 'Root' so swapping the .sur files gives your new component the collision data for the 'Root' section of the .sur file you have stolen - but no the collision data for any of that ships components. This means if you are shopping for a .sur file to steal it is useful to import potential candidates via Revens importer and check just the 'Root' components shape to see if it will be suitable.

Very simple components such as cargo boxes etc dont have split component .sur files and dont contain the 'Root' CRC. They also have slightly shorter headers. They can still be used for complicated objects tho. I have succesfully modified cargo box .sur files allowing me to create boxes of any size, however this is fairly easy as it only involves changing the vertex coordinates. I got stuck at the triangles section. As well as the triangle number and a reference to each vertex in the triangle there is also a 2 byte signed int after each vertex reference which seems vital yet remains a mystery.

I'm sure someone will crack it soon

Post Mon Sep 29, 2003 9:06 am

i hope so.... pesky DA guys.

Working hard to earn... but too lazy to do something...

Return to Freelancer Editing Tutorial Forum