From Wikibooks, open books for an open world
Jump to navigation Jump to search

Introduction[edit | edit source]

Typing commands on the keyboard can be tiring and error prone. If you are using Celestia to show the universe to others, a script may be an effective way to tour the stars.

Types of Scripting[edit | edit source]

Celestia supports two different Scripting languages, CEL and CELX (Lua). These can be used to add new functionality to the program, or to run educational activities.

CEL scripting[edit | edit source]

See the page Celestia/Cel_Scripting

CELX scripting[edit | edit source]

See the page Celestia/Celx_Scripting

Other Languages[edit | edit source]

You can use any other language you want if it can pass commands to the operating system's command interpreter. It can issue the command to run Celestia and can include on that command line the instruction to run a .CEL Celestia script or .CELX Lua script.

When invoked from a command line, Celestia can be passed the name of a .CEL or .CELX script to run at startup:

./celestia --url name-of-script.cel

When the command line includes the qualifier "--once", the command line will be passed to the running copy of Celestia instead of starting a new copy of the program. (note: use two hyphens)

./celestia --once --url name-of-script.celx

(Starting with Celestia v1.3.1, scripts may be in any folder. Previously they had to be in Celestia's "root" folder.)

External Links[edit | edit source]

Visit the Celestia Scripting Forum

Read and contribute to the Celestia Scripting Guide

Many resources for both CEL and CELX scripting can be found at Don G's Celestia Scripting Resources page.