starsphere.cmp files

  • I downloaded this guide a while back not sure where from though, bit beyond me lol


    CK256



    Starting THN


    “What is THN?” You ask. THN is the basic code used to create Menu Screens, Cutscenes and base Scripts. Lets Start with Menu Screens. Decrypted it can be opened with any Text Editor such as Word, or notepad. The Program Availlable to Decrypt files is FLED-Thorn, which can be found in the Downloads section of this site. There is often confusion as to what menu screens are. They are Simply the background to the main FL menu. You can have up to three which will cycle randomly. These are defined by INI files found in the UNIVERSE folder. It is here that background music is also defined, although it is possible to define sounds within the THN.


    We will start by looking at the file for the picture on the left. Menu Screen THN Files are always found in <!-- m --><a class="postlink" href="C://Program">C://Program</a><!-- m --> Files\Freelancer\DATA\SCRIPTS\INTRO by default, and are defined by the INI files in C:\Program Files\Freelancer\Data\UNIVERSE\SYSTEMS\INTRO\BASES\ROOMS. The INI File for this screen would go as follows:



    [Room_Info]
    scene = ambient, Scripts\Intro\Intro_FarMoon.thn


    [Room_Sound]
    music = music_tau_danger


    The First Line defines Location of the THN file and requires the .thn suffix, whilst the second line defines audio, and therefore does not requires a suffix for the file name. File paths are not included, as Freelancer simply searches the Audio Files for sounds. Make sure you do not use sounds with possible duplicates, as this will lead to a crash.


    The Basic THN File.


    A Menu Screen THN will always start with duration = #. # is the amount of time (in seconds) the scene will last. A duration of 3-400 is recommended for Non-Animated menu Screens. Animated ones can be anything from 500-2000. Next we will define Entities. Entities are Objects and Effects that can be placed in the file such as planets. However, Scenes and Cameras are defined by entities as well. The Start of a THN Will often look like this:


    entities={
    {
    entity_name="Scene_Untitled",
    type=SCENE,
    template_name="",
    lt_grp=0,
    srt_grp=0,
    usr_flg=0,
    spatialprops={
    pos={
    0,
    0,
    0
    },
    orient={
    {
    1,
    0,
    0
    },
    {
    0,
    1,
    0
    },
    {
    0,
    0,
    1
    }
    }
    },
    up=Y_AXIS,
    front=Z_AXIS,
    ambient={
    128,
    128,
    128
    }
    },


    Entity Name: the nickname of the Object or FX. This is referred to in Animation or FX scripts later, so make sure it’s clear what the object is.
    Type: this effectively defines what properties the object will have. Some Objects will only be placed under certain types. Commonly used Types are SCENE, LIGHT, CAMERA, COMPOUND, PSYS and MONITOR.
    Template_name: this is the template, effect, or model used. Cameras, Scenes and monitors tend not to have these. For example planet_gasgrncld_5000 would spawn a large, orange Gas Giant Provided Type was set to COMPOUND and category was set to solar. (We’ll cover category and userprops later)
    Lt_grp, srt_grp and usr_flag: I’m not totally sure what these do but I assume they have something to do with lighting. Include them, otherwise entities won’t spawn, but set all three values to 0.
    Spatialprops: Spatialprops covers Position and Orientation. These are very basic, following XYZ values. An Entry of 0,0,0 in Pos will mean the object is placed at the centre of the scene. Note, if a camera is not included it will automatically be placed at 0,0,0.
    Up, Front and Ambient: this allows you to change where objects are quickly by reconfiguring where X,Y and Z axis are. It’s a good idea to leave them because they can cause confusion later on. Ambient is a lighting value used only in SCENE Entries.
    Userprops: these are settings defined by category and Type. They include Psysprops, Lightprops and cameraprops.


    Psysprops
    },
    psysprops={
    sparam=0
    }


    Best left at 0. This simply needs to be included at the end of an FX entry


    Lightprops


    },
    lightprops={
    on=Y,
    color={
    255,
    255,
    255
    },
    diffuse={
    0.909804,
    0.909804,
    1
    },
    specular={
    0,
    0,
    0
    },
    ambient={
    0,
    0,
    0
    },
    direction={
    0,
    0,
    1
    },
    range=2000,
    cutoff=98.999985,
    type=L_DIRECT,
    theta=90,
    atten={
    1,
    0,
    4e-006
    }


    A Typical lightprops entry looks like the one above many are self-explanatory. Make sure to leave theta at 90 unless you know what you’re doing.


    Cameraprops
    },
    cameraprops={
    fovh=30,
    hvaspect=1.333333,
    nearplane=1,
    farplane=1000000
    }
    This is the default entry for any camera. Reducing Farplane can allow for a ‘fog’ Effect when moving the camera. Changing nearplane can have a similar effect.


    { }, ={ and so on
    The most unpleasant aspect of creating THN files in loading them up and finding a black screen rather than the beautiful starscape you envisaged. The most common cause of this is forgetting to close an entry. Entries are opened with a { bracket and are closed with a }, Bracket. Make sure you close entries properly.


    {
    entity_name="Scene_Untitled",
    type=SCENE,
    template_name="",
    lt_grp=0,
    srt_grp=0,
    usr_flg=0,
    spatialprops={
    pos={
    0,
    0,
    0
    },


    The Brackets in Red are required at the end of an entry. Note that the actual entry for the entity, and any userprops it may have such as rotation are separate. Therefore.
    orient={
    {
    1,
    0,
    0
    },
    {
    0,
    1,
    0
    },
    {
    0,
    0,
    1
    }
    }
    },


    The Brackets in Red are required for orient, whilst the ones in blue are empty. I tend to include these out of habit, and have never had any issues with them.


    ={ is used to declare props or a new section. These brackets do not need to be closed For Example:


    entities={
    {
    entity_name="Scene_Untitled",
    type=SCENE,
    template_name="",
    lt_grp=0,
    srt_grp=0,
    usr_flg=0,
    spatialprops={
    pos={
    0,
    0,
    0
    },


    The text in red is Always required at the start of a scene after duration, otherwise entities will not spawn.


    Category List


    Prop: Starspheres, Water
    Solar: Planets, Most Stations
    Psys: Effects, such as Sun FX, weapon FX and so on
    Spaceship: any Ship model from Freelancer
    Room: if you felt so inclined to make an indoor scene it would be possible to do so using hardpoints from the Right Folder.


    Events


    The events section of the file defines when, where and for how long Effects, Animation and Audio goes on for. It is headed by events={. This is where nicknames become important A Typical Events entry looks like this:


    {
    0,
    START_PSYS,
    {
    "Intro_Farmoon_sun_6"
    },
    {
    duration=360
    }
    },


    The Name in brackets is the nickname of a sun I added in Entities earlier. Duration, is how long the sun FX will last, and the 0 at the top is the delay, allowing for creatively timed weapons/Beams/Etc. If you’ve placed a Camera and monitor, an entry like this is required:


    {
    0,
    SET_CAMERA,
    {
    "Monitor_2",
    "Camera_1"
    }
    },


    Changing the Duration here will caused the Camera to jump from 0,0,0 to wherever the monitor is placed after a set amount of time.
    Finally, attaching entities is important. It allows you to put engines on ships, or a glow effect on the end of a weapon. This will be covered in Advanced THN.


    List of Sun FX That Can Be Used in THN.


    Regular sun entries cannot be included in THN. Instead, FX must be used. Below is a small list of Sun FX that can be used in any THN File.


    Intro_planetchunk_sun: Blue with a large Corona
    Intro_volcanoplanet_sun: Orange with Sparkly Debris Orbiting it
    Intro_waterplanet_sun: Green With a Large Corona.
    Intro_waterplanet_sun#1: Blue with a large Corona
    rtc_ku02_sun: Small, Blue, Very Bright
    rtc_ku03_sun: Small, Blue, less Bright
    rtc_pl03_sun: Dim, Yellow Sun.
    The THN File Used to Reference here is Attached. I Will Post an Advanced THN Tutorial Later. If you can suggest any improvements, please Email me at <!-- e --><a href="mailto:Ruppetthemuppet@hotmail.co.uk">Ruppetthemuppet@hotmail.co.uk</a><!-- e -->

  • Starsphere.cmp can have their textures changed by opening it using the UTF Editor. Expand the "tree" in the Texture Library node. You will see the different textures in there. At the end of each "branch" you will see something like "MIP0" or "MIPS". You simply export/import your texture using buttons on the side (dont worry they are easily identifiable haha). One thing to note, if it is a MIP0 node then you export it as a .TGA, if it is a MIPS node you export it as a .DDS file.


    Remember to add the file extension to the end of the name want the file to be. Example: br_clouds.tga will work, but NOT br_clouds


    Another thing, if it is a DDS file, you will need the GIMP/Photoshop plugin to view/edit them. It is made by Nvidia if I remember correctly. If you want to make a custom cmp you use Milkshape texture it as you see fit, invert the faces (so they appear on the inside) and export it. This is significantly more advanced however. I suggest you start of simply editing the cmps using UTF editor till you get comfortable with how starspheres work in FL. If you are serious about modding FL, being proficient with UTF Editor is an essential skill to acquire.


    Here is an example of what you can do when editing starspheres using UFT Editor...
    <!-- m --><a class="postlink" href="http://i17.photobucket.com/albums/b68/rgriffin9219/New%20Mod%20stuff/SWWTStars.png">http://i17.photobucket.com/albums/b68/r ... TStars.png</a><!-- m -->
    <!-- m --><a class="postlink" href="http://i17.photobucket.com/albums/b68/rgriffin9219/New%20Mod%20stuff/screen161.png">http://i17.photobucket.com/albums/b68/r ... een161.png</a><!-- m -->

  • i wonder why nobody is building real starspheres instead manipulating the old ones
    editing the originals and using that tool just limits the real possibilities

  • Quote

    i wonder why nobody is building real starspheres instead manipulating the old ones
    editing the originals and using that tool just limits the real possibilities


    Because people have to crawl before they can walk. Read my first post again...


    Quote

    If you want to make a custom cmp you use Milkshape texture it as you see fit, invert the faces (so they appear on the inside) and export it. This is significantly more advanced however. I suggest you start of simply editing the cmps using UTF editor till you get comfortable with how starspheres work in FL.


    There is plenty of potential with vanilla starspheres if you know how to use photoshop. I've made a number of custom ones before, but modifying vanilla cmps can look great too. If someone wants to keep the same system look (feature location wise) but want to improve the quality, it is perfect.

  • Forsaken,


    If i want to make an own starsphere, and after i done anything you mentioned before, where should i save to? i mean i have my own mod and i want to add the new starsphere to one of my systems. I guess i have to save it to my mod folder... If yes, does FLE recognize it?


    regards,


    ps: I saw you first photo ( thats the best with that green cloud and stars), it does look like you imported an own texture which is transparent a bit. My question is, what i have to set to get same result? Polygons or the texture itself?
    An other question: may i resize the textures from 256x256 to bigger size or the texture library could handle only 128x128 and 256x256 bits? (of course it means i want to import an unique texture)