old scripts don't work

All about writing scripts for Celestia in Lua and the .cel system
Topic author
Rich
Posts: 34
Joined: 03.01.2005
With us: 19 years 10 months
Location: USA - RI

old scripts don't work

Post #1by Rich » 22.07.2008, 17:56

Guys,
I recently started using Celestia 1.5 Mac OS. I've made a number of .cel scripts that work great with 1.4, but when I try to run them in 1.5, many of them start out at 206.27 au's distant from what ever object I'm looking at. Known bug?
-----------------
Mac Pro 2GHz | 4GB RAM | OSX 10.5.4 | GeForce 8800 GT
http://rbucci.awardspace.com

BobHegwood
Posts: 1803
Joined: 12.10.2007
With us: 17 years 1 month

Re: old scripts don't work

Post #2by BobHegwood » 22.07.2008, 18:23

Rich wrote:Guys,
I recently started using Celestia 1.5 Mac OS. I've made a number of .cel scripts that work great with 1.4, but when I try to run them in 1.5, many of them start out at 206.27 au's distant from what ever object I'm looking at. Known bug?
I have noticed this behavior on occasion myself. In order to have the script perform correctly, I have had to exit completely from Celestia, and then start the script again after Celestia starts up fresh. Don't know why this happens, but this is how I have fixed this problem when it occurs on my machine. Apparently something gets wacked after you run one script, and then try to run another without re-starting Celestia.
Just FYI...

Thanks, Bob
Brain-Dead Geezer Bob is now using...
Windows Vista Home Premium, 64-bit on a
Gateway Pentium Dual-Core CPU E5200, 2.5GHz
7 GB RAM, 500 GB hard disk, Nvidia GeForce 7100
Nvidia nForce 630i, 1680x1050 screen, Latest SVN

Avatar
selden
Developer
Posts: 10192
Joined: 04.09.2002
With us: 22 years 2 months
Location: NY, USA

Re: old scripts don't work

Post #3by selden » 22.07.2008, 18:54

The solar system's position is different in Celestia v1.5: the solar system's barycenter now is at the center of Celestia's coordinate system. The Sun and the planets all orbit around it.

In previous versions of Celestia the Sun was positioned some 200 AU away from the center of Celestia's coordinate system. This was to avoid some numeric problems which are no longer relevant.

Why this would affect some scripts only some of the time, I dunno.
Selden

Topic author
Rich
Posts: 34
Joined: 03.01.2005
With us: 19 years 10 months
Location: USA - RI

Re: old scripts don't work

Post #4by Rich » 23.07.2008, 12:04

selden wrote:The solar system's position is different in Celestia v1.5: the solar system's barycenter now is at the center of Celestia's coordinate system. The Sun and the planets all orbit around it.

In previous versions of Celestia the Sun was positioned some 200 AU away from the center of Celestia's coordinate system. This was to avoid some numeric problems which are no longer relevant.

Why this would affect some scripts only some of the time, I dunno.

Ahh. I think that explains my problem. Maybe there's a "preface" bit that an be added to the scripts to bring the viewer into the new center...

Bob, I've had the problems you mention too, and have solved them the same way. I think some 'residual' script info remains from script to script. One way I got around this was to start some of my scripts by setting the environment, placement etc., with some absolute values; essentially a RESET before the script actually begins.

-Thanks, Rich
-----------------
Mac Pro 2GHz | 4GB RAM | OSX 10.5.4 | GeForce 8800 GT
http://rbucci.awardspace.com

BobHegwood
Posts: 1803
Joined: 12.10.2007
With us: 17 years 1 month

Re: old scripts don't work

Post #5by BobHegwood » 04.08.2008, 13:08

This is a question for Vincent I think...

I'm just curious to know why CELX scripts written for 1.5.1 no longer work in 1.6? I have looked at the two versions of the
scripts you made for Cham's Political Border add-on, and I'm afraid that I simply do not understand what the differences are.

Could you explain why the version of 1.5.1 has to be different? I know this is probably a stupid question, but I really am curious
to know why two different versions of the script are needed for two different versions of Celestia. Is this going to be the case
for future versions of Celestia also?

Thanks, Brain-Dead
Brain-Dead Geezer Bob is now using...
Windows Vista Home Premium, 64-bit on a
Gateway Pentium Dual-Core CPU E5200, 2.5GHz
7 GB RAM, 500 GB hard disk, Nvidia GeForce 7100
Nvidia nForce 630i, 1680x1050 screen, Latest SVN

Avatar
Cham M
Posts: 4324
Joined: 14.01.2004
Age: 60
With us: 20 years 10 months
Location: Montreal

Re: old scripts don't work

Post #6by Cham » 04.08.2008, 13:51

Bob,

Vincent simply took advantages of some new CELX functions that were introduced in 1.6.0 to simplify things. The script which works for 1.5.1 SHOULD also works for 1.6.0.
"Well! I've often seen a cat without a grin", thought Alice; "but a grin without a cat! It's the most curious thing I ever saw in all my life!"

BobHegwood
Posts: 1803
Joined: 12.10.2007
With us: 17 years 1 month

Re: old scripts don't work

Post #7by BobHegwood » 04.08.2008, 14:58

Cham wrote:Bob,

Vincent simply took advantages of some new CELX functions that were introduced in 1.6.0 to simplify things. The script which works for 1.5.1 SHOULD also works for 1.6.0.

But the CELX script for your Political Borders add-on had to have two versions of the script in order for it to work in 1.5.1...
Oh, okay... I'm a little slow (as you know.)
I see what you mean now I think. I had to revise the CELX script you had originally so that it would work with 1.5.1. :roll:

Okay, got it. :wink:
Thanks very much. Sorry I'm such a pain here, but I am starting to warm up to CELX a bit. Just taking my slow mind a bit longer than most of you geniuses. :)
Brain-Dead Geezer Bob is now using...
Windows Vista Home Premium, 64-bit on a
Gateway Pentium Dual-Core CPU E5200, 2.5GHz
7 GB RAM, 500 GB hard disk, Nvidia GeForce 7100
Nvidia nForce 630i, 1680x1050 screen, Latest SVN


Return to “Scripting”