Changing Colors in Celestia

General discussion about Celestia that doesn't fit into other forums.
Avatar
Topic author
FarGetaNik M
Posts: 484
Joined: 05.06.2012
With us: 12 years 7 months
Location: Germany

Changing Colors in Celestia

Post #1by FarGetaNik » 22.08.2016, 09:18

I know there are several topics here on the forum to cover some of this, but this doesn't fit well into any of these. I have multiple questions.

How to change the deafault colors of orbits (and labels)? I think the default colors are too bright and confuse me when to much orbits are rendered. I've selected darker tones for minor objects.
For orbits, I know there is a ssc command:

Code: Select all

OrbitColor   [ 0 0.3 1 ]

But I'd prefer to change the default and don't have to worry about editing every single object in the solar system.

As stated here: http://celestiaproject.net/forum/viewtopic.php?t=11607 it is possible to change the default via scripting. I added the commands to my start.cel script, but it gives me an error: Bad parameter list. It seems to work with a seperate .celx script, but changes are not permanent.

Which brings me to my next problem: How to tell Celestia to launch via start.cel script? When clicking on celestia.exe it loads it's default script, even though I edited start.cel. It get's annoying to start Celestia via script.

Finally, I have to say that star colors seem unrealistic to me (especially M type stars) and it would be nice to change their defaults as well. But this might be a topic for a new version of Celestia...
Last edited by FarGetaNik on 22.08.2016, 09:30, edited 1 time in total.

john71
Posts: 1009
Joined: 10.08.2016
With us: 8 years 5 months

Post #2by john71 » 22.08.2016, 09:25

It would be fantastic, if the GUI gave more flexible options to users.

Avatar
Fenerit M
Posts: 1880
Joined: 26.03.2007
Age: 17
With us: 17 years 10 months
Location: Thyrrenian sea

Post #3by Fenerit » 22.08.2016, 09:30

OrbitColor need a CELX script, not the CEL script. You can switch from CEL to CELX through "celestia.cfg" at string InitScript.

Code: Select all

InitScript "start.celx"
...


Within this new script then you can insert the CEL commands.
Never at rest.
Massimo

Avatar
Topic author
FarGetaNik M
Posts: 484
Joined: 05.06.2012
With us: 12 years 7 months
Location: Germany

Post #4by FarGetaNik » 22.08.2016, 09:38

Fenerit wrote:OrbitColor need a CELX script, not the CEL script. You can switch from CEL to CELX through "celestia.cfg" at string InitScript.

Which brings me back to the problem that Celestia seems to ignore the start script and launches it default no matter what I do with the script.

Could you be more specific about how the script should look like? I can't combine the start.cel skript and the color parameters for the .celx script in a way Celestia doesn't crash at launch. Sorry I'm a complete noob in scripting.

My start.cel script looks like this:

Code: Select all

{
  select {object "Sol"}
  goto   {time 3.0 distance 6000}
  gotolonglat { time 3 distance 3000 longitude 0 latitude 45 }
  wait   {duration 3.0}

  print  {text "Welcome to Celestia!"  row -3  column 1  duration 3}
  wait   {duration 3.0}
}

How to insert the color parameters in a .celx script while maintatining these commands?

Added after 2 minutes 37 seconds:
FarGetaNik wrote:Which brings me back to the problem that Celestia seems to ignore the start script and launches it default no matter what I do with the script.

OK I solved this problem (kinda...) when selecting a different script name in the config, Celestia seems to use it instead it's default.

Avatar
jogad
Posts: 458
Joined: 17.09.2008
With us: 16 years 4 months
Location: Paris France

Post #5by jogad » 22.08.2016, 09:50

FarGetaNik wrote:When clicking on celestia.exe it loads it's default script, even though I edited start.cel

I see your location is Germany.
If you run Celestia in German the initscript is not the one which is in the Celestia directory but the one in the celestia\locale folder.

Il you set

Code: Select all

InitScript "start.celx"

and your local is "de" then the file to edit is
celestia/locale/start_de.celx

Here is a way to include the previous CEL instructions in your new start.cel

Code: Select all

-- start.celx

function CEL(source)
   local script = celestia:createcelscript(source)
   while script:tick() do
      wait(0)
   end
end

CEL([[
{
# ... Beginning of standard CEL script
# ***** REPLACE THIS LINE WITH THE CONTENT OF YOUR USUAL START.CEL FILE *****
# End of standard CEL script...
}
]])

CELX instructions HERE

-- end of the celx script


Avatar
Topic author
FarGetaNik M
Posts: 484
Joined: 05.06.2012
With us: 12 years 7 months
Location: Germany

Post #6by FarGetaNik » 22.08.2016, 10:00

jogad wrote:I see your location is Germany.
If you run Celestia in German the initscript is not the one which is in the Celestia directory but the one in the celestia\locale folder.

Ah that's the reason! Thanks for pointing this out, maybe I'll use the english/deafult version of Celestia for the future... that is if I figure out how :think:

jogad wrote:Here is a way to include the previous CEL instructions in your new start.cel
And thanks a lot for your help, it works now :smile:

Avatar
Fenerit M
Posts: 1880
Joined: 26.03.2007
Age: 17
With us: 17 years 10 months
Location: Thyrrenian sea

Post #7by Fenerit » 22.08.2016, 10:01

This is the start.celx I use. Note that there are set in some add-ons you couldn't have. I've left them just to show some procedure about how to show/hide add-ons through shortcut keys when they are loaded at Celestia's loading. The .ssc of all the specified add-ons must have the propriety Visible false in order to be hidden at start.
Please: do remove all the lines between the commented out "start Magnetic.../end Magnetic..." or add the yours. The keyhandlers section set your custom CTRL+key. The CEL commands of the default start.cel are merged like written. As at is, the script move the observer at long 0. lat 0., so please do change it at your wish. The CEL section is editable as usual.

Code: Select all

-- start.celx

local obs = celestia:getobserver()

obs:setlocationflags
{
   city = false, observatory = false, landingsite = false, crater = false,
   vallis = false, mons = false, planum = false, chasma = false, patera = false,
   mare = false, rupes = false, tessera = false, regio = false, chaos = false,
   terra = false, astrum = false, corona = false, dorsum = false, fossa = false,
   catena = false, mensa = false, rima = false, undae = false, reticulum = false,
   planitia = false, linea = false, fluctus = false, farrum = false, volcano = false,
   tholus = false, insula = false, other = false
}

-- celestia:setlabelflags{locations = true}

celestia:setlabelcolor("stars",                  0.500, 0.500, 1.000)
celestia:setlabelcolor("planets",                0.150, 0.740, 1.000)
celestia:setlabelcolor("moons",                  0.450, 0.576, 0.612)
celestia:setlabelcolor("asteroids",              0.460, 0.440, 0.360)
celestia:setlabelcolor("comets",                 0.840, 0.620, 0.280)
celestia:setlabelcolor("spacecraft",             0.750, 0.740, 0.670)
celestia:setlabelcolor("locations",              0.220, 0.940, 0.440)
celestia:setlabelcolor("galaxies",               0.190, 0.850, 0.710)
celestia:setlabelcolor("nebulae",                0.850, 0.350, 0.290)
celestia:setlabelcolor("openclusters",           0.620, 0.480, 0.540)
celestia:setlabelcolor("constellations",         0.385, 0.280, 0.567)
celestia:setlabelcolor("dwarfplanets",           0.350, 0.400, 0.600)
celestia:setlabelcolor("minormoons",             0.400, 0.612, 0.576)
celestia:setlabelcolor("planetographicgrid",    0.200, 0.900, 1.000)
celestia:setlabelcolor("equatorialgrid",         0.318, 0.439, 0.361)
celestia:setlabelcolor("galacticgrid",           0.360, 0.360, 0.150)
celestia:setlabelcolor("eclipticgrid",           0.500, 0.220, 0.300)
celestia:setlabelcolor("horizontalgrid",         0.318, 0.361, 0.439)

celestia:setlinecolor("starorbits",             0.500, 0.500, 0.800)
celestia:setlinecolor("planetorbits",           0.000, 0.360, 0.900)
celestia:setlinecolor("moonorbits",             0.220, 0.330, 0.400)
celestia:setlinecolor("asteroidorbits",         0.280, 0.240, 0.216)
celestia:setlinecolor("cometorbits",            0.520, 0.320, 0.128)
celestia:setlinecolor("spacecraftorbits",       0.360, 0.360, 0.360)
celestia:setlinecolor("constellations",         0.234, 0.090, 0.576)
celestia:setlinecolor("boundaries",             0.492, 0.279, 0.451)
celestia:setlinecolor("dwarfplanetorbits",       0.098, 0.195, 0.439)
celestia:setlinecolor("minormoonorbits",         0.130, 0.260, 0.215)
celestia:setlinecolor("planetographicgrid",    0.150, 0.525, 0.525)
celestia:setlinecolor("planetequator",           0.400, 0.900, 1.000)
celestia:setlinecolor("equatorialgrid",         0.192, 0.248, 0.184)
celestia:setlinecolor("galacticgrid",           0.200, 0.200, 0.000)
celestia:setlinecolor("eclipticgrid",           0.300, 0.050, 0.100)
celestia:setlinecolor("horizontalgrid",         0.192, 0.184, 0.248)

-- Start Planetary_Interiors and Magnetic_Fields Celx Script -------------------------------------

objects_pi = {

      "Sol/Mercury's Interior",
      "Sol/Earth's Interior",
      "Sol/Earth/Moon's Interior",
      "Sol/Mars' Interior",
      "Sol/Jupiter/Io's Interior",
      "Sol/Jupiter/Callisto's Interior",
--      "Sol/Saturn's Interior",
      "Sol/Saturn/Enceladus' Interior",
      "Sol/Saturn/Titan's Interior",
      "Sol/Saturn/Rhea's Interior"
   }

objects_mf = {

      "Sol/Earth/Terre_magnetique",
      "Sol/Earth/Terre_magnetique/Nord_magn_Terre",
      "Sol/Earth/Terre_magnetique/Sud_magn_Terre",
      "Sol/Earth/P?le Nord magn?tique (2005)",
      "Sol/Earth/P?le Sud magn?tique (2005)",
      "Sol/Earth/P?le Nord magn?tique dipolaire",
      "Sol/Earth/P?le Sud magn?tique dipolaire",
      "Sol/Earth/P?le Nord g?ographique",
      "Sol/Earth/P?le Sud g?ographique",
      "Sol/Earth/Trajectoire 1",
      "Sol/Earth/Trajectoire 2",
      "Sol/Earth/Trajectoire 3",
      "Sol/Earth/Trajectoire 4",
      "Sol/Earth/Trajectoire 5",
      "Sol/Earth/Trajectoire 6",
      "Sol/Earth/Aurora",
      "Sol/Earth/Axe_rot_Terre",
      "Sol/Earth/Axe_magn_Terre",
      "Sol/Jupiter/Jupiter_magnetique",
      "Sol/Jupiter/Jupiter_magnetique2",
      "Sol/Jupiter/Jupiter_magnetique/Nord_magn_Jupiter",
      "Sol/Jupiter/Jupiter_magnetique/Sud_magn_Jupiter",
      "Sol/Jupiter/Axe_rot_Jupiter",
      "Sol/Jupiter/Axe_magn_Jupiter",
      "Sol/Jupiter/Trajectoire 7",
      "Sol/Jupiter/Trajectoire 8",
      "Sol/Saturn/Saturne_magnetique",
      "Sol/Saturn/Saturne_magnetique/Nord_magn_Saturne",
      "Sol/Saturn/Saturne_magnetique/Sud_magn_Saturne",
      "Sol/Saturn/Axe_rot_Saturne",
      "Sol/Saturn/Axe_magn_Saturne",
      "Sol/Uranus/Uranus_magnetique",
      "Sol/Uranus/Uranus_magnetique/Nord_magn_Uranus",
      "Sol/Uranus/Uranus_magnetique/Sud_magn_Uranus",
      "Sol/Uranus/Axe_rot_Uranus",
      "Sol/Uranus/Axe_magn_Uranus",
      "Sol/Neptune/Neptune_magnetique",
      "Sol/Neptune/Neptune_magnetique/Nord_magn_Neptune",
      "Sol/Neptune/Neptune_magnetique/Sud_magn_Neptune",
      "Sol/Neptune/Axe_rot_Neptune",
      "Sol/Neptune/Axe_magn_Neptune"
   }

objects_ss = {

      "Sol/Mercury",
      "Sol/Earth",
      "Sol/Earth/Moon",
      "Sol/Mars",
      "Sol/Jupiter/Io",
      "Sol/Jupiter/Callisto",
--      "Sol/Saturn",
      "Sol/Saturn/Enceladus",
      "Sol/Saturn/Titan",
      "Sol/Saturn/Rhea"
   }

   
   for k, object in pairs(objects_pi) do
        obj_pi = celestia:find(object)
        obj_pi:setvisible(false)
   end

   for k, object in pairs(objects_mf) do
        obj_mf = celestia:find(object)
        obj_mf:setvisible(false)
   end
   
   for k, object in pairs(objects_ss) do
        obj_ss = celestia:find(object)
        obj_ss:setvisible(true)
   end
   
   
function Planetary_Interiors()
      
   for k, object in pairs(objects_pi) do
      obj_pi = celestia:find(object)
      obj_pi:setvisible(not obj_pi:visible())
   end

   for k, object in pairs(objects_mf) do
      obj_mf = celestia:find(object)
       obj_mf:setvisible(false)
   end

   for k, object in pairs(objects_ss) do
      obj_ss = celestia:find(object)
       obj_ss:setvisible(not obj_pi:visible())
   end
end


function Magnetic_Fields()
      
   for k, object in pairs(objects_mf) do
      obj_mf = celestia:find(object)
      obj_mf:setvisible(not obj_mf:visible())
   end

   for k, object in pairs(objects_ss) do
      obj_ss = celestia:find(object)
       obj_ss:setvisible(true)
   end
   
   for k, object in pairs(objects_pi) do
      obj_pi = celestia:find(object)
       obj_pi:setvisible(false)
   end
end


-- Keyhandlers -----------------------------------------------------

   keyhandlers =

{
   ["C-i"] = Planetary_Interiors,
   ["C-1"] = Magnetic_Fields
}

function handlekey(k)
    handler = keyhandlers[k.char]
    if (handler ~= nil) then
        handler()
         
    return true
   
    else
 
     return false

    end
end


celestia:registereventhandler("key", handlekey)


-- End of Magnetic_Fields and Planetary_Interiors Celx Script -------------------------------------


function CEL(source)
   local script = celestia:createcelscript(source)
   while script:tick() do
      wait(0)
   end
end

CEL([[

{

# ... Beginning of script

#****************************************************************************
#                                                                           *
#                 START.CEL - Startup script for Celestia                   *
#                             (version 2.1)                                 *
#                                                                           *
#---------------------------------------------------------------------------*
#                                                                           *
#  This script is run automatically, every time you run Celestia.           *
#                                                                           *
#  NOTE: Do not remove the curly braces located as the first and last       *
#        characters of this file. They define this file as a CEL script.    *
#                                                                           *
#  You can modify this script in many ways, to suit your specific needs.    *
#  Simply uncomment one or more of the lines below, as noted. Each line or  *
#  section of code contains comments describing what it does. To UNcomment  *
#  a line of code, simply remove the "#" character from the beginning of    *
#  that line.                                                               *
#                                                                           *
#  If you decide to modify this script, please copy it to a safe place      *
#  BEFORE you begin, so you will have it to refer to at a later date.       *
#                                                                           *
#****************************************************************************

  set {name "FOV" value 30}

  select {object "Sol"}
  goto   {time 3.0 distance 30}
  wait   {duration 3.0}


# PRELOADTEX ##########   
   
   select {object "Sol/Earth"}
   follow {}
#  synchronous {}

  goto   {time 3.0  distance 5.0}
  wait   {duration 3.0}

  print  {text "Welcome to Celestia!"  row -3  column 1  duration 3}
  wait   {duration 3.0}

#****************************************************************************
#  The lines of code above are the entire start.cel script. Below, is a     *
#  description of what each command does. We go to Sol first, so that when  *
#  we go to Earth, it will be displaying it's sunny side, regardless of     *
#  what your local time might be...                                         *
#                                                                           *
#  preloadtex: Tells Celestia to load the textures for the named object.    *
#          Otherwise Celestia would load the texture when the object        *
#          comes into view, which would be noticeable as a small delay.     *
#                                                                           *
#  select: Tells Celestia what object (planet, moon, spacecraft, etc.) to   *
#          define as the currently selected object. Sol defines our solar   *
#          system, the "/" character is merely a hierarchy divider, Earth   *
#          is the object we want to select. If you wanted to select our     *
#          Moon, the select command would look like the following:          *
#            select {object "Sol/Earth/Moon"}                               *
#                                                                           *
#  goto:   Tells Celestia to travel to the currently selected object, just  *
#          like pressing the "G" key on the keyboard. The time parameter    *
#          defines how many seconds it should take to travel there. The     *
#          distance parameter defines how far away from the object to be    *
#          positioned, in units of the object's radius, plus 1. For         *
#          example, if the object's radius is 10000 km, and you specify     *
#          6.0 for distance, you will be positioned 50000 km from the       *
#          center of the object.                                            *
#                                                                           *
#  wait:   Since the goto command is telling Celestia to take some time to  *
#          do something, we need to give Celestia that same amount of time  *
#          to actually DO it. When going to Sol, the wait command tells     *
#          Celestia to wait for 3 seconds while the goto takes place (for   *
#          3 seconds). The duration parameter value is normally the same    *
#          as the time parameter in the goto command. However, there are    *
#          always exceptions (grin).                                        *
#                                                                           *
#          When we are going to Earth, the wait command after the goto,     *
#          waits for only 2 seconds. The next command is a print command,   *
#          which displays some text on the screen and has another wait      *
#          command after it, that waits for another 3 seconds. It's all     *
#          just a matter of timing. The goto command allows us to display   *
#          some text on-screen WHILE it is executing. So, we simply make    *
#          sure that the total number of wait duration values, listed       *
#          after a goto, adds up to AT LEAST the time value specified in    *
#          the goto command. It can be longer, if desired.                  *
#                                                                           *
#  follow: Tells Celestia to follow the selected object through space,      *
#          just like pressing the "F" key on the keyboard. You could        *
#          replace the follow {} command with synchronous {}, which allows  *
#          you to remain in a stationary, or geosynchronous orbit above     *
#          the selected object.                                             *
#                                                                           *
#   print: Tells Celestia to display (print) some text on the screen. The   *
#          text parameter defines the text to be displayed. The row         *
#          parameter defines how many rows from the bottom of the window to *
#          start displaying the text at. The column parameter defines how   *
#          many columns from the left edge of the window to start           *
#          displaying the text. The duration parameter defines how many     *
#          seconds the text should be displayed on the screen. Which is     *
#          then followed by the wait command, as described above.           *
#****************************************************************************


#****************************************************************************
#  If you want to be positioned above YOUR specific location on Earth, use  *
#  the gotolonglat command shown below. Step-by-step instructions...        *
#                                                                           *
#  * Copy the entire line of code.                                          *
#                                                                           *
#  * Paste it below the "goto" command above.                               *
#                                                                           *
#  * Remove the "#" character at the beginning of the line. This UNcomments *
#    the line of code so it will be executed.                               *
#                                                                           *
#  * Add a "#" character to the beginning of the original goto command.     *
#    This turns the line of code into a comment, so it will NOT be run.     *
#                                                                           *
#  * Change the longitude and latitude values to those of your location.    *
#                                                                           *
#  * Since you are going to a specific position on the Earth, it might not  *
#    be daytime there, so you could comment-out the following lines of      *
#    code by adding a "#" character to the beginning of each line...        *
#      select {object "Sol"}                                                *
#      goto   {time 3.0 distance 30}                                        *
#      wait   {duration 3.0}                                                *
#    If you WANT to display your location in the daytime, use the time      *
#    command described next.                                                *
#****************************************************************************

   gotolonglat {time 3.0  distance 5.0  longitude 0  latitude 0}

#****************************************************************************
#  If you would like Celestia to always start at a specific date/time, use  *
#  the time command, as shown below.                                        *
#                                                                           *
#  WARNING: Starting Celestia with a pre-determined date/time requires that *
#           you physically press the "!" (exclamation mark) key in order to *
#           RESET the time to "current time", whenever you want to do some  *
#           exploring -- IF the actual time makes a difference.             *
#                                                                           *
#  Step-by-step instructions...                                             *
#                                                                           *
#  * Determine if you want to set the date via a calendar UTC date/time     *
#    string, or a Julian day (see below).                                   *
#                                                                           *
#  * Copy the one line of code with the time command you want to use.       *
#                                                                           *
#  * Paste it above the "goto" command above (top of file).                 *
#                                                                           *
#  * Remove the "#" character at the beginning of the line. This UNcomments *
#    the line of code so it will be executed.                               *
#                                                                           *
#  * Change the date/time value to YOUR required date/time.                 *
#****************************************************************************

# Set the time via a calendar UTC date/time string...
#  time { utc "2003-08-11T09:29:24.0000" }
#              YYYY-MM-DDTHH:MM:SS.SSSS
#  Note the "T" .........^ ... (this is required)

# Set the time via a Julian day value...
#  time { jd JulianDate }
#    U.S. Navy Calendar Date/Time to Julian Date/Time converter:
#    http://aa.usno.navy.mil/data/docs/JulianDate.html


#****************************************************************************
#  The commands listed below allow you to define several of Celestia's      *
#  settings, that will be set every time you start Celestia. Modify any of  *
#  the settings you want to.                                                *
#****************************************************************************

# Field of View (UNcomment / modify to meet your needs)...
# Default is 25 degrees, at a screen resolution of 1024 x 768

#  set {name "FOV" value 25}


# Ambient light level (UNcomment / modify to meet your needs)...
# 0.0 to 0.5 is a good Lo-Hi range
#  set {name "AmbientLightLevel" value 0.1}


# Faintest visible star magnitude (brightness)...
# (UNcomment / modify to meet your needs)
# Celestia UI: 0.8 to 15.2, default is 6.0
#
#  setvisibilitylimit {magnitude 6.0}


# Faintest auto-magnitude brightness, at 45 degrees, Default is 8.5...
# (UNcomment / modify to meet your needs)
#  setfaintestautomag45deg {magnitude 8.5}


# Items to be displayed (rendered):
# Do NOT render the following objects (UNcomment to suit your needs)...
#  renderflags {clear "atmospheres"}
#  renderflags {clear "automag"}
#  renderflags {clear "boundaries"}
#  renderflags {clear "cloudmaps"}
#  renderflags {clear "comettails"}
#  renderflags {clear "constellations"}
#  renderflags {clear "eclipseshadows"}
#  renderflags {clear "galaxies"}
#  renderflags {clear "grid"}
   renderflags {clear "markers"}
#  renderflags {clear "nightmaps"}
#  renderflags {clear "orbits"}
#  renderflags {clear "planets"}
#  renderflags {clear "pointstars"}
#  renderflags {clear "ringshadows"}
#  renderflags {clear "stars"}
#  renderflags {clear "partialtrajectories"}


# Items to be displayed (rendered):
# DO render the following objects (UNcomment to suit your needs)...
#  renderflags {set "atmospheres"}
#  renderflags {set "automag"}
#  renderflags {set "boundaries"}
#  renderflags {set "cloudmaps"}
#  renderflags {set "comettails"}
#  renderflags {set "constellations"}
#  renderflags {set "eclipseshadows"}
   renderflags {set "galaxies"}
#  renderflags {set "grid"}
#  renderflags {set "markers"}
#  renderflags {set "nebulae"}
#  renderflags {set "nightmaps"}
#  renderflags {set "orbits"}
#  renderflags {set "planets"}
#  renderflags {set "pointstars"}
#  renderflags {set "ringshadows"}
   renderflags {set "stars"}
#  renderflags {set "partialtrajectories"}


# Text labels:
# Do NOT label the following objects (UNcomment to suit your needs)...
#  labels {clear "asteroids"}
#  labels {clear "constellations"}
#  labels {clear "galaxies"}
#  labels {clear "moons"}
#  labels {clear "planets"}
#  labels {clear "spacecraft"}
#  labels {clear "stars"}


# Text labels:
# DO label the following objects (UNcomment to suit your needs)...
#  labels {set "asteroids"}
   labels {set "constellations"}
#  labels {set "galaxies"}
#  labels {set "moons"}
#  labels {set "planets"}
#  labels {set "spacecraft"}
   labels {set "stars"}


# Marker control:
# Unmark any objects that are currently Marked and disable Marker display...
# (UNcomment to suit your needs)
#  unmarkall { }


# Minimum orbit diameter to be rendered (in pixels)...
# (UNcomment / modify  to suit your needs)
#  set {name "MinOrbitSize"  value 1.0}


# Furthest visible star distance, default is 1000000...
# (UNcomment / modify to suit your needs)
#  set {name "StarDistanceLimit"  value 1000000}


# Time rate (1x, 100x, 1000x, etc.)...
# (UNcomment / modify to suit your needs)
#    Negative value = Reverse Time
#               0   = Pause Time
#               1.0 = Real Time (default)
#            1000.0 = Good moon orbit motion
#
#  timerate {rate 1.0}


#****************************************************************************
#  If you are using large textures, you can have Celestia pre-load them     *
#  into your graphics card memory by listing them below.                    *
#****************************************************************************
# Examples...
#  preloadtex {object "earth.*"}
#  preloadtex {object "earth.png"}

      
#****************************************************************************
#  orbit is a fun command to play with. The axis is specified in [X Y Z]    *
#  order, and each axis can be either 0 or 1. rate = how fast, duration =   *
#  number of seconds. Just make sure you have an object selected.           *
#****************************************************************************
#  orbit {axis [0 1 0]  rate 10.0  duration 7.0}


#****************************************************************************
#  To learn more about scripting in Celestia, visit:                        *
#                                                                           *
#   * Scripting forum: (http://www.shatters.net/forum/viewforum.php?f=9)    *
#   * Don G's Celestia page: (http://www.donandcarla.com/Celestia/)         *
#   * Harald's Celestia page: (http://www.h-schmidt.net/celestia/)          *
#                                                                           *
#  Don G's page includes a guide for CEL scripting. Harald's page includes  *
#  a guide for CELX (Lua) scripting. Both also have example scripts and     *
#  other goodies.                                                           *
#****************************************************************************

# End of standard CEL script...

}

]])


Never at rest.
Massimo

Avatar
jogad
Posts: 458
Joined: 17.09.2008
With us: 16 years 4 months
Location: Paris France

Post #8by jogad » 22.08.2016, 10:12

maybe I'll use the english/deafult version of Celestia for the future... that is if I figure out how :think:

If you are running Celestia in Windows
You can launch it with a very little .bat file.

Make file calle celestia-en.bat in your celestia main file with this content

Code: Select all

set lang=en
start celestia.exe


Lauch Celestia with this celestia-en.bat instead of celestia.exe.

That's all.
.

Avatar
Topic author
FarGetaNik M
Posts: 484
Joined: 05.06.2012
With us: 12 years 7 months
Location: Germany

Post #9by FarGetaNik » 22.08.2016, 10:30

jogad wrote:You can launch it with a very little .bat file.

That also worked fine, with my now modified config it also runs my costom script! :smile: Only the lua toolbar remains german, but that is not dramatic. Would still be nice to launch it with the .exe... Celestia automatically chooses it's location right? I'm not sure if I ever set it to german manually.

Fenerit, it will take some time to look at your script. Thanks in advance!

Avatar
jogad
Posts: 458
Joined: 17.09.2008
With us: 16 years 4 months
Location: Paris France

Post #10by jogad » 22.08.2016, 10:42

FarGetaNik wrote:Only the lua toolbar remains german, but that is not dramatic.

The file to edit is "config.lua" in the celestia\scripts\lua_edu_tools directory
This configuration files allows to custom many things int lua_edu_tool.
(see the language setup)

By default celestia use the local of the computer, but you can set it in any language you want.
.

Avatar
Topic author
FarGetaNik M
Posts: 484
Joined: 05.06.2012
With us: 12 years 7 months
Location: Germany

Post #11by FarGetaNik » 22.08.2016, 13:14

jogad wrote:The file to edit is "config.lua" in the celestia\scripts\lua_edu_tools directory

Thanks, that also worked :smile:

jogad wrote:By default celestia use the local of the computer, but you can set it in any language you want.

Is there anything I can change about its configuration to tell it always to use english? The .bat file has no permanent effect. It's not that important, since I don't need it to always be english.

Avatar
Fenerit M
Posts: 1880
Joined: 26.03.2007
Age: 17
With us: 17 years 10 months
Location: Thyrrenian sea

Post #12by Fenerit » 22.08.2016, 16:48

You should delete the main "locale" folder; this will set english by default. Mind to move your new start.celx to Celestia's root.
Never at rest.
Massimo

Avatar
Topic author
FarGetaNik M
Posts: 484
Joined: 05.06.2012
With us: 12 years 7 months
Location: Germany

Post #13by FarGetaNik » 22.08.2016, 17:08

Fenerit wrote:You should delete the main "locale" folder; this will set english by default. Mind to move your new start.celx to Celestia's root.

Well ok that's a brutal but obvious solution :eh:

Avatar
Fenerit M
Posts: 1880
Joined: 26.03.2007
Age: 17
With us: 17 years 10 months
Location: Thyrrenian sea

Post #14by Fenerit » 22.08.2016, 17:19

BTW, the best way, imho. :biggrin:
Never at rest.
Massimo

Avatar
Chuft-Captain
Posts: 1779
Joined: 18.12.2005
With us: 19 years 1 month

Post #15by Chuft-Captain » 22.08.2016, 22:53

If I understand you correctly. all you want to do is run a customized version of the initscript?

In that case, it's very simple. The thing to realize is that the script itself can have any name you like, and can be anywhere on your system --- you just have to specify it's exact location and name in celestia.cfg using the syntax:

Code: Select all

  InitScript  "<filepath>/<filename>.cel"
eg. Replace:

Code: Select all

  InitScript  "start.cel"
with something like this:

Code: Select all

  InitScript  "C:/MyCelestiaScripts/MyCustomStartScript.cel"
There is absolutely no need to abandon your German locale, or run BAT files in order to achieve this.

In another example, I have personally not used celestia's default demo script for many years, but instead have found it more useful to re-purpose the "D" key to instantly set the FOV to 45 degrees, with this line in celestia.cfg:

Code: Select all

  DemoScript  "C:/MyCelestiaScripts/FOV45.cel"


CC
"Is a planetary surface the right place for an expanding technological civilization?"
-- Gerard K. O'Neill (1969)

CATALOG SYNTAX HIGHLIGHTING TOOLS LAGRANGE POINTS

Avatar
Topic author
FarGetaNik M
Posts: 484
Joined: 05.06.2012
With us: 12 years 7 months
Location: Germany

Post #16by FarGetaNik » 22.08.2016, 23:06

Chuft-Captain wrote:If I understand you correctly. all you want to do is run a customized version of the initscript?
There is absolutely no need to abandon your German locale, or run BAT files in order to achieve this

That was one issue, which I already solved. I wasn't aware that Celestia prefers the german locale over the deafult start-script in the main folder. Also, it is useful to have access to the english version of Celestia.

Chuft-Captain wrote:n another example, I have personally not used celestia's default demo script for many years, but instead have found it more useful to re-purpose the "D" key to instantly set the FOV to 45 degrees, with this line in celestia.cfg:

That is actually a good advice! I hate it when I accidently hit D and find all my settings overridden :fie:

Avatar
Fenerit M
Posts: 1880
Joined: 26.03.2007
Age: 17
With us: 17 years 10 months
Location: Thyrrenian sea

Post #17by Fenerit » 22.08.2016, 23:52

I use the "d" key to gotolonglat the observer at my coordinates; for all objects. :razz:
Never at rest.
Massimo


Return to “Celestia Users”