Howdy All,
Is 1.3.1 pre6 supposed to be supporting Lua and .celx scripts? I've downloaded some of the example scripts and they do very strange things to this version.
For example, if tour-system is double-clicked (as a file), Celestia comes up but does nothing, displaying the "'{' expected at start of script" error. (Note: This happens with all .celx files I double-click.)
If I then use Celestia's Menu/File/Open Script command to run it, the objects have no textures -- they are all plain white -- even though they DID have textures after Celestia came up, and I did not Exit prior to running the script.
Trying to run absmag crashes Celestia.
The distanceto script displays nothing.
Etc.
Just wondering if these are supposed to work in this version?
Thanks...
-Don
1.3.1 pre6 - CELX Scripts?
-
Topic authordon
- Posts: 1709
- Joined: 12.07.2003
- With us: 21 years 4 months
- Location: Colorado, USA (7000 ft)
Hi Chris,
My OS: WinXP Pro, SP-1, all current patches, etc.
They look identical. Should they be different?
I un-installed Celestia 1.3.0 Final before installing 1.3.1 pre6.
-Don
My OS: WinXP Pro, SP-1, all current patches, etc.
Code: Select all
From inside File Manager...
Menu / Tools / Folder Options
Folder Options dialog box / File Types tab
Extensions column: "CELX"
File Types column: "CELX File"
Select CELX Extension and click Advanced button
Edit File Type dialog box
Actions: "open"
Click "open" action
Click Edit button
"Editing action for type:" dialog box
Action:
<blank>
Application used to perform action:
C:\Program Files\Celestia\celestia.exe --once --dir "C:\Program Files\Celestia" -u "%1"
Use DDE (checkbox): Checked
DDE Message: <blank>
Application: celestia
DDE Application Not Running: <blank>
Topic: System
Here is what the CEL Extension is using for "Application used to perform action":
C:\Program Files\Celestia\celestia.exe --once --dir "C:\Program Files\Celestia" -u "%1"
They look identical. Should they be different?
I un-installed Celestia 1.3.0 Final before installing 1.3.1 pre6.
-Don
-
Topic authordon
- Posts: 1709
- Joined: 12.07.2003
- With us: 21 years 4 months
- Location: Colorado, USA (7000 ft)
Just tried a full run of "tour-system.celx", and found that *some* planets and moons had textures while others did not. Below is a partial list of the ones that did not have textures -- the spacecraft and some moons I could not even see (speed too fast or on dark side of object?), even with Ambient Light set to "Med".
No Textures, running "tour-system.celx" ...
Mercury
Venus
Mars
Jupiter
Io
Call...
Titan
Lapetus (?)
Uranus
Mina ... (?)
Ariel
Umb... (?)
Titania
Oberon
*** Celestia crashed here ***
Sorry about the incomplete names, as the script runs really fast and I've not looked into slowing it down.
At one point during the script, I clicked the Render menu option to check Ambient Light. It appeared that the script stopped when in the menu, but then "flashed" through 3 or 4 objects when I closed the menu, then the script continued normally.
I also pressed the "p" and "m" keys to display Planet and Moon names.
Maybe one of these caused the eventual crash?
Hope this helps narrow it down some.
-Don
No Textures, running "tour-system.celx" ...
Mercury
Venus
Mars
Jupiter
Io
Call...
Titan
Lapetus (?)
Uranus
Mina ... (?)
Ariel
Umb... (?)
Titania
Oberon
*** Celestia crashed here ***
Sorry about the incomplete names, as the script runs really fast and I've not looked into slowing it down.
At one point during the script, I clicked the Render menu option to check Ambient Light. It appeared that the script stopped when in the menu, but then "flashed" through 3 or 4 objects when I closed the menu, then the script continued normally.
I also pressed the "p" and "m" keys to display Planet and Moon names.
Maybe one of these caused the eventual crash?
Hope this helps narrow it down some.
-Don
-
Topic authordon
- Posts: 1709
- Joined: 12.07.2003
- With us: 21 years 4 months
- Location: Colorado, USA (7000 ft)
Hi Chris,
Just ran it again, and got different results (sigh).
-Don
Just ran it again, and got different results (sigh).
Code: Select all
* Most planets and moons had no texture.
* The previous run went to the smaller, asteroid-like moons. This run did not
get close enough to see them. I had "m" active so I could see their labels in
the middle of the screen, but that's all.
* When visiting moons on the edge of ringed planets (Saturn, Uranus), the edge-
on view "flickers" (poor rendering by the render engine?).
* The script stopped at Voyager2. I *do* have a set of Darkmiss files for
Voyager2 in their appropriate directories, if this is a problem.
* The default FOV in ver 1.3.1 pre6 seems to be "1.00x", so I left it there.
Code: Select all
Here is the tour-system.celx file I have ...
function goto(o, t)
local obs = celestia:getobserver()
obs:follow(o)
obs:goto(o, t)
while (obs:travelling()) do
wait(0)
end
end
function visit(o)
local i, v
celestia:select(o)
celestia:flash(o:type() .. " - " .. o:name())
goto(o, 3)
wait(0.5)
local children = o:getchildren()
for i, v in ipairs(children) do
visit(v)
end
end
sol = celestia:find("Sol")
visit(sol)
-Don
-
Topic authordon
- Posts: 1709
- Joined: 12.07.2003
- With us: 21 years 4 months
- Location: Colorado, USA (7000 ft)
Update ...
There is a single line in the "prelimiary Celestia User's FAQ" that I just read:
"A limitation in the current version of Celestia is that your default directory must be the Celestia root directory and the scripts must be there, too. Otherwise Celestia will not be able to find the surface texture files for its objects."
When I move the tour-system.celx script to the Celestia directory, all textures and spacecraft now appear on-screen, when run from Celestia's File/Open Script option. It still gives the "{" expected error when trying to double-click the file.
However, this script still stops at Voyager2, when it looks like it should end at Sol.
Here's what happens with the other example scripts...
* absmag.celx: Displays nothing, but does not crash Celestia when it's in the Celestia directory. Does this script expect something to be enabled, or set in a particular way, that might not be?
* annum.celx: If you goto Earth first, it produces a very cool display as the days wizzz by. (Suggestion: Have the script goto Earth first.)
* distanceto.celx: Displays nothing. Yes, I've tried selecting several different objects (Earth, Mars, Sol, etc.). Does this script expect something to be enabled, or set in a particular way, that might not be?
* marktype.celx: This one only works if you have Markers enabled, as the script does not enable them first. I get red triangles. (Suggestion: Have the script Enable Markers first.)
* randstar.celx: If you left Markers enabled from running marktype (like I did), this script brings up the marked stars in a random order.
* toursystem.celx: See above.
Now, if I only knew what Lua stuff was enabled in Celestia, and how to use it. Reading the Lua manual wasn't much help in telling me what Celestia has opened up for Lua scripting, or how to code it. Anyone have any clues, or an example Lua script that uses all enabled commands, etc.? Pretty please (smile)?
-Don
There is a single line in the "prelimiary Celestia User's FAQ" that I just read:
"A limitation in the current version of Celestia is that your default directory must be the Celestia root directory and the scripts must be there, too. Otherwise Celestia will not be able to find the surface texture files for its objects."
When I move the tour-system.celx script to the Celestia directory, all textures and spacecraft now appear on-screen, when run from Celestia's File/Open Script option. It still gives the "{" expected error when trying to double-click the file.
However, this script still stops at Voyager2, when it looks like it should end at Sol.
Here's what happens with the other example scripts...
* absmag.celx: Displays nothing, but does not crash Celestia when it's in the Celestia directory. Does this script expect something to be enabled, or set in a particular way, that might not be?
* annum.celx: If you goto Earth first, it produces a very cool display as the days wizzz by. (Suggestion: Have the script goto Earth first.)
* distanceto.celx: Displays nothing. Yes, I've tried selecting several different objects (Earth, Mars, Sol, etc.). Does this script expect something to be enabled, or set in a particular way, that might not be?
* marktype.celx: This one only works if you have Markers enabled, as the script does not enable them first. I get red triangles. (Suggestion: Have the script Enable Markers first.)
* randstar.celx: If you left Markers enabled from running marktype (like I did), this script brings up the marked stars in a random order.
* toursystem.celx: See above.
Now, if I only knew what Lua stuff was enabled in Celestia, and how to use it. Reading the Lua manual wasn't much help in telling me what Celestia has opened up for Lua scripting, or how to code it. Anyone have any clues, or an example Lua script that uses all enabled commands, etc.? Pretty please (smile)?
-Don