Orbiting Planets

  • 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*


    [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


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


    [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


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


    [Loadout]
    nickname = orb_planets_loadout_01
    equip = custom_planet_01, HpMount01


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


    [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


    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.

    signew.jpg


    cfmoddblogo.png5904.png5904.png
    http://www.moddb.com/scripts/topsite.php?ts=4766


    Only dead fish swim with the stream.
    Don't discuss with idiots. They only drag you down to their level and then beat you with experience there.


    This is ten percent luck,
    Twenty percent skill,
    Fifteen percent concentrated power of will,
    Five percent pleasure,
    Fifty percent pain,
    And a hundred percent reason to remember the name!