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

Tutorial: Orbiting Planets

Here you find the different tutorials on editing and MODing Freelancer

Post Tue Apr 19, 2005 3:42 pm

Tutorial: Orbiting Planets

hello all,
due to several reasons (the most important being: lack of time) i`m preparing retirement.
i have been very happy, finding answers to most of the problems i encountered modding freelancer, back in the days when i started -so i decided to finally write a tutorial to contribute and share a nice invention by myself to make all mods better (no offense)

this is about making orbiting planets, here we go:
(note: since this is an advanced project i could not be bothered to write an easy step by step tutorial, experienced modders should be able to follow me)

the main approach (only one i could ever think of) is to have a center object (invisible) with hardpoints far out of it`s origin and to connect "planets" to it (via loadout), then make it spin.

i said "planets" cause you might know usual freelancer planets aren`t 3db/cmp but sph files (not capable of having hardpoints assigned to them) -so you`d actually have to make planets 3db/cmp for this to work. (use space_arch_shield.sur and flmodeltool by anton to add proper collision detection)
in order to connect them to the center object, planets need a hardpoint ex.SpConnect01 at their origin.
that`s it, planets done ..

next,
use any 3db/cmp for the center object, doesn`t need mat, neither sur file -but in order to connect planets to it, add some hardpoints: ex.HpMount01 - HpMount09 (remember they need to be far out, i used 50k - 200k distance from center)
now there is a problem,
orbiting planets would just disappear if it`s center object gets out of sight (cause "they are one" -lodranges don`t work on some things things, trust me ..
here`s the solution:
open up the center object with utf-editor, expand multilevel-level0-vmeshpart->vmeshref
select interpret data as float array, click on vmeshref and edit:
scroll down to the very last number and change it a very high value (i used 1 mio) -this defines the objects radius and is important for visibility.
that`s it -job done,
now off to the required ini files ..

data/equipment/select_equip.ini: *typical entry for orbiting planets*

<pre><font size=1 face=Courier>
[CargoPod
nickname = custom_planet_01
DA_archetype = xxx\xxx\your_custom_planet.cmp
material_library = xxx\xxx\your_custom_planet.mat
LODranges = 0, 999999
HP_child = SpConnect01
hit_pts = 4000
mass = 2000
explosion_arch = explosion_large_debris
</font></pre>

data/solar/solararch.ini: *typical entry for the center object*

<pre><font size=1 face=Courier>
[Solar
nickname = orb_planets_center
ids_name = 1
ids_info = 1
type = NON_TARGETABLE
DA_archetype = xxx\xxx\your_center_object.cmp
LODranges = 0, 999999
solar_radius = 100000
shape_name = NNM_SM_ROCK_ASTEROID
hit_pts = 999999961690316250000000000000000000.000000
mass = 10000000000000000000
loadout = orb_planets_loadout_01
</font></pre>

data/solar/loadouts.ini: *typical entry for a center objects loadout*

<pre><font size=1 face=Courier>
[Loadout
nickname = orb_planets_loadout_01
equip = custom_planet_01, HpMount01
</font></pre>

data/universe/systems/xxx/xxx.ini: *typical system entry*

<pre><font size=1 face=Courier>
[Object
nickname = xxx_orbit_01
pos = 0, 0, 0
archetype = orb_planets_center
loadout = orb_planets_loadout_01
spin = 0.000000, 0.100000, 0.000000
rotate = x, y, z
</font></pre>

ok that`s it folks, go ahead with questions if you have any.
but don`t ask about docking, it just wouldn`t work because of the auto pilot.

this was supposed to add to the scenery / atmosphere !!

a known issue: too low value for spin might result in them orbiting planets stopping after some time .. you have to fiddle with it, also: take care there`s nothing in their orbit they could collide with.

as an example and proof of concept you can download this video
and if you`re missing the codec .. get it here

yours,
RimShot

Edited by - RimShot on 5/26/2005 11:26:55 AM

Post Tue Apr 19, 2005 4:43 pm

RimShot thanks for writing the tutorial it's concise and verrry interesting.I can see two immediate applications for it in enhancing the already good spinning planets concept(can you say orbiting moons and satellites? ) You said to keep the motion from stopping you need to fiddle with the value,i am wondering what your experience is with the spin stalling being related to mass

* speculation* stations have rotating animations,does anyone know a reason why you couldn't apply the same animations to these pseudo planetary objects and make a moon that always faces towards its orbit?

Post Tue Apr 19, 2005 5:32 pm

There's no reason we couldn't do that, except for one little catch- we don't know how to re-produce DA's animations, or hack their current ones, so far as I am aware. I've gotten into their animations and changed rotation values and such, but I really haven't gotten very much to work well yet, to be perfectly honest, and I'm not sure if anybody's gotten any farther than that

Post Tue Apr 19, 2005 8:08 pm

Another option that sprung to mind was to make each planet an individual model with an invisible model attached to it at a far out counter point and the mount Hardpoint inbetween the two. You could then assign the planet docking hardpoints like a station, enabling it to spin and to be dockable. If you want more than one planet, just make them as individual models. I haven't tried this theory, but it would enable the planets to be dockable and each one to move around the center at it's own rate (even having some moving in eccentric orbits or retrograde orbits if you wish).

Freeworlds Mod Developer
Author of Modular Station

'There is no Good nor Evil in the universe, just perceptions and circumstances.'

Post Thu Apr 28, 2005 3:37 am

It would be cool if someone could make a flmm mod out of this just as an extra system with the orbiting planets, and the planets being dockable.

You know I understand this not being for beginners but what if a beginner would like to use this in a mod (with credit) and hes a beginner ... thats kind of arrogant if you get my meaning, restricting people because of their skill lol.

But anyways, other things, such as can you add things like defence platforms that orbit the planets as well? In the mod I'm working on (Silent Death Reborn, a conversion mod, basically deathmatch) and something like that would be awesome, having defence platforms orbiting a planet.

Proper rotating planets and planets that actually orbit, with other things orbiting them and multiple bases at each planet would make an awesome system.

The tutorials are around but it would be great to see all the above in an actual mod.

Post Sun May 01, 2005 3:40 pm


thats kind of arrogant if you get my meaning, restricting people because of their skill lol.


Actually, its called differentiation... once you have invested as much time and effort as some others into learning how to do things, you will understand this - because your knowledge will be at a requisite level to understand.

There is nothing upon the site that states people MUST cater for beginners at all...

Rimshot - did you not speculate upon this about a year ago? Or was that someone else?

Post Sun May 01, 2005 10:23 pm


You know I understand this not being for beginners but what if a beginner would like to use this in a mod (with credit) and hes a beginner ... thats kind of arrogant if you get my meaning, restricting people because of their skill lol.


Remember, no one is paid to do anything here. This is a hobby for everyone from beginner to expert. Beginners here are not paying customers to whom the experts owe anything. Indeed, the massive number of tutorials and amount of help the experts give here is because of the fact they want to share their knowledge. But you will find people won't build something unless they want to build it. They are not being arrogant, they are just spending the time on their hobby in the way they want to spend their time on their hobby. Nothing they do 'ever' has to be done for anyone else (though I am sure plenty of people are thankful for all the assistance the TLR staff and the community do give towards things).

Tutorials like these are where people have found out a way doing something and want to explain it to others how to do. They are not compelled for any reason to then make a mod of their tutorial for beginners to include in their own mods without having to follow the tutorial (unless they want to themselves). It is simply solutions for those looking to seek them. Indeed, I think it is better this way anyway, as it means that beginners can't just sit back and take a bit here, a bit there, put it all together and go hey presto. It means they actually *gosh* learn how to program mod themselves (and those that don't and give up show how much real dedication they had towards what they wanted to achieve). Which is the whole purpose of the editting and tutorial forums here, to help support one another in learning how to mod and not to do all the work for other people.

Post Thu Nov 30, 2006 1:45 pm

hmmm.... can you make somthing orbit somthing else that is orbiting?
I DEFY YOU!!! what if you made the planet be docked with at a large radius or does fl just not accept it?

.(\__/)
.(='.'=) This is Bunnies clone.
(" )_(" )Copy and paste bunny into your signature to help him gain world domination. And always, always beware of velociraptors.
Go to XKCD.com to learn more.

Edited by - lancerlover on 11/30/2006 1:46:12 PM

Post Mon Jan 08, 2007 8:50 am

This tutorial is great. I have managed to make a dockable planet the center and have it's moons orbit the planet. You can still dock with the planet. As mentioned, you will not be able to make the moons dockable as they become part of the planet and non selectable themselves.

Great job on the tutorial. This is very easy to follow and works just as written. So I do nto see aneed to create a mod for "beginners" as it is easy enough to follow for all levels.

Requiem: A Total FL Conversion Mod .
http://mod.pff-clan.us

Edited by - fadius on 1/8/2007 8:51:05 AM

Post Wed May 23, 2007 6:48 am

I have decided to use this on a limited basis for the following reasonsThese are problems or anomolies I have encountered)

1: I had the moon orbiting the Earth. It works and looks great. The problem? As the moon passes the back side of the Earth from your view point, the moon is still visible through the Earth. Earth does have a SUR and nothing else shows through it until I have the moon orbit around it. Then the moon is the only thing which is seen as it passes the backside of the planet.


2: This is actually kind funny to see. When you ram the moon arbiting Earth, you can actually change to rotation and orbit of the moon and Earth.


Because of these 2 things, I will be scaling back back how this is incorperated into the Requiem mod.

Now, if anyone has any idea how to correct these anomolies, I may begin utilizing it more again.

Requiem: A Total FL Conversion Mod .

Post Wed May 23, 2007 12:43 pm

I encountered the same thing a while back, I made a planet with animated textures and everything looked great from the light side, I flew round to the dark side to check the texture and realised I could see the sun, docking ring and orbiting base through the planet.

I think it has something to do with mesh size, the larger the distance between the front of the mesh and the back, the more transparent the model becomes, I think this is why DA used the .SPH for the larger objects rather than CMP or 3DB.

You could try adding an .SPH inside your main planet, this should work as a block and stop you from seeing through your planet.

**shuffles off with a new headache**

Post Wed May 23, 2007 12:52 pm

that's brilliant. if you are right, it would be close enough that it can't be seen, but you also cant see through. and i think you're right.


could you describe how the orbit change thing works? does it keep orbiting? does the center of the orbit move, or does it change it's orbit?

Post Wed May 23, 2007 1:52 pm

nice Idea for a system in my mod, make a planet that orbits the sun of a system...

Post Wed May 23, 2007 7:36 pm

@lancer

You collide with the orbiting moon and it changes the entire roation of the planet and the orbit of the moon as the moon is attached to the planet via a hardpoint.

@commodore

You will have to keep in mind that whatever you have orbiting your sun will not be dockable and it actually becomes part of the item it is orbiting.

Requiem: A Total FL Conversion Mod .

Return to Freelancer Editing Tutorial Forum