As mentioned in the last posting, before you can get your computer to actually do something, someone has to write a computer program . In general, all computer programs involve the the analysis and display of data. The program may use data that is already included in the computer's memory or, more often, will take data input (provided) by the user (you) and then execute some specific portion of that same program based on your input. Input data can come from any number of sources such as the keyboard, movement of a device such as a mouse, point and clicks, or even from a program running on another computer.
What You Will Need
If you haven't done so, download both Celestia and Notepad++ from their respective web sites. Both of these downloads will "self-install" when you click or double-click on the download packages, so all you need do is select "yes" when the install program tells you to. Once both programs are installed, you are ready to go.
Lesson 1: How to View and Alter an Existing Celestia Script
In Celestia a script is defined as a document written using a plain text editor (an editor that does not contain any text formatting instructions other than empty spaces) that contains a series of commands that Celestia can "understand" and then respond to those commands in a sequential manner. It is helpful to make an analogy regarding an actor (Celestia) whose words and actions are given in a movie script .
Let's make your first Celestia script!
1. Open Celestia by clicking on (or whatever action is required by your operating system) its Desktop icon. Pay close attention to what happens during the ~ 10 seconds after Celestia starts up.
2. In the Celestia Menu Bar, click on "File," then select the "Open Scripts" option.
3. Near the bottom of the directory that appears after you select "Open Scripts," you will find an item named "start." This is the script that controlled the start-up graphics that you saw a few minutes earlier. Its "full name" is actually "start.cel," where ".cel " is the file type or file extension that identifies "start.cel" as a Celestia script file.
4. Right click (or whatever your operating system requires, I'm working with a Windows machine) on the "start" file. Another menu will appear and one of the available options on that menu will be "Open With ..." Place your cursor over this item, click again, and select "Notepad++ ". Notepad++ will open the source file ( start.cel ) in another window. Through Notepad++, not only can you read the actual code that Celestia executed on start-up, you can change that source code as well!
Take few minutes to read the first 40 lines of "start.cel" (ignore everything after line 40. I'll go over the rest of it in the next posting). Notice how the source code is, within reason, "human readable." To get a better understanding of what the source code actually did, rerun "start.cel" (double click the file in Celestia) while you keep the Notepad++ window open. Does the source code make better sense after you watch it run?
Now we can turn to the fun stuff.
5. Use Notepad++'s "File | Save as..." option to save a copy of "start.cel" to a location where you can easily find it again. Any location on your computer is fine as long as you chose a spot other than its original location in Celestia's File | Open Scripts sub-directory.
6. Go to the line (in my copy of Notepad++, it's line 39) of the original "start.ce"l that begins with "print {text "Welcome to Celestia ..."
7. Change the text within the ' " " ' to read whatever you would like (I changed mine to "Welcome to Hunter Greene's Copy of Celestia"). Be careful: anything inside the opening ' " ' and the last ' " ' will be printed to the Celestia screen exactly as you type it.
8. Save the copy of file that you just changed as start.cel to the location where you originally found in Celestia's "File | Open Scripts" sub-directory. Make certain that your modified file is saved with the extension .cel ! When Notepad++ warns you that you are about to overwrite an existing file, tell it to shut up and mind its own business by clicking " OK ".
9. Click on the file you just saved to see the results of your first Celestia script. Assuming that you did everything outlined above properly, and didn't make any typographical errors, your new greeting will appear during Celestia's start-up. If your script didn't change the "Welcome" screen, recheck your changes and make sure you saved the changed script to the correct location inside Celestia (welcome to the facet of computer programming known as debugging !).
Summary
In this posting you have learned how to view Celestia scripts and to make small modifications to those scripts. In my next posting I'll go over the basic, or fundamental, structure of a Celestia script and the basic programming commands that Celestia can understand before moving on to more advanced topics such as how to change your viewing perspective for various objects and how to change the virtual time span that elapses between events.
Stuff To Do On Your Own
Carefully read all of the original copy of the "start.cel" script that you saved. This document contains a lot of material that will reinforce what you learned in this post. Also, go to the Celestia Motherlode Page and download Don Goyette's Cel Scripting Guide for a more detailed explanation of Celestia scripting. You can find it under Documentation | Scripting Guides .
You can download many different scripts from the Celestia Scripts Page . For now, I suggest that you download only the "Minimalist" scripts (e.g. the "Minimalist Tour of Mercury," "Minimalist Tour of Mars", etc) since some scripts will require downloading additional materials, something that requires more than a passing knowledge of how Celestia is organized. We'll address this issue in an upcoming posting.
Note that many script files will be downloaded in compressed or "zipped" format, meaning you will need a decompression or "unzipping" utility in order to use these files. In most versions of Windows, this functionality is included as part of the Windows environment. There are also many free unzipping programs available such as CAM unZip or 7 Zip (I use both, but prefer Cam unZip).
Until our next meeting, happy scripting.
Published by Wayne McDonald
I'm a retired Physician's Assistant with special qualifications in adult & pediatric echocardiography (heart ultrasound) and cardiovascular testing. I'm also working on my master's degree in history. View profile
- Home School Lesson PlansLesson plans can be done by the day or week in a book that can be purchased or printed off the internet. Plan what will be done each day for each subject. Home school lesson plans are prepared the same way as regular...
Make Your Own Oak Gall or Iron Gall Ink: Home School ProjectLearn the significance and chemistry of oak gall or iron gall ink and include it among your list of home school projects.- Oklahoma Home School Bills 308, 472 Could Affect Parents' RightsFor home schoolers and parents in the state of Oklahoma, the home school bill introduced in the State Senate could affect how you are allowed to home school your children.
Free Home School Lesson: Teach Genealogy with ScrapbookingWith the fun scrapbooking supplies available today, teaching genealogy in the home school classroom can be much more exciting than drawing a family tree.- Home-School Wall AccessoriesThere are lots of things you need to run a home-school and many of them you can make yourself!
- Learning Computer Programming with Celestia
- How to Get a Home School Cooperative Up and Going
- Home-School Teacher for Wynonna Judd, Scott Myers, Faces Child Pornography Charges
- How to Start a Home School Cooperative
- How to Form a Home School Cooperative Class
- HB 2144 Threatens Parents' Right to Home School in Arkansas
- Advantages of Home School




