.comment-link {margin-left:.6em;}

Monday, March 09, 2009

 

Stellarium 0.10.1 Script Fail

Stellarium 0.10.1 is now out. It's a bit faster on my system, has a couple of nice amendments once you get used to the confusing way they have re-jigged the menu. Hint guys, releasing the manual for 0.10 at the same time as the program would be a great help (currently the manual page points to the Stellarium 0.9 manual. I mean, a slider for governing what planet labels are available? That makes no sense.

But, and this is a big but for me, you can't run your old scripts. Or the script archive at the Stellarium Wiki. There is a note on the main page saying "as well as: a new script engine (in testing)".

That means they have completely changed the script language and none of your scripts will work. Without a manual describing the script system, there is no reasonable way to find out what the new commands even are!

Not that there are not some hints. Mathew Gates has made a lunar eclipse script (in the sripts foleder of the new Stellarium 0.10.1) to duplicate the old lunar eclipse script in 0.9 giving examples of old vs new commands.
// OLD: date utc 2004:05:04T17:51:00
core.setDate("2004:05:04T17:51:00");

// OLD: select planet Moon pointer off
core.selectObjectByName("Moon", false);
StelMovementMgr.setFlagTracking(true);

// OLD: wait duration 2
core.wait(2);
Yeah, they made the script language into a VB-like monstrosity. It almost certainly is more flexible, at the expense that most normal folks won't be able to make scripts at all. Check out the Zodidiac.ssc script in the new system, pure programmerese. They have remove the script recorder, so there is no way to "roll your own".

I'm rather annoyed, as I've been trying to make an archive of Stellarium scripts that could be used for teaching purposes, and now I have to completely rewrite them (eventually, when the manual comes out). One poor individual even downloaded Stellarium on my say so, and now can't run any of my scripts or the Wiki scripts. Nice work folks.

Also, new scripts have a .ssc ending, just like Celestia scripts! Nice way to avoid confusion folks!

So, if you make use of scripts a bit in Stellarium, stick with 0.9 for the moment.

Labels: , ,


Comments:
What do you mean when you describe the new scripting language as a "VB-like monstrosity"?
 
Where they take perfectly reasonable functions and agglomerate them into word salad with extra gumph just to make things incomprehensible. I mean
StelMovementMgr.setFlagTracking(true) instead of Set Flag Tracking (true). Once you have a half dozen of these things together your eyes start to water.

The principle is never make a simple statement that could possibly be read as English when you can provide an enormous unintelligible string.
 
'They' didn't create the scripting language. Stellarium now uses Qt's scripting framework. So it is a big change, and is not as expressive, but will be more powerful, and easier to maintain.
 
Okay, I see what you're complaining about, but I'm not seeing how it's VB-like in any way. While I don't know the scripting language they've gone with (the one that Anon mentions) a brief look at the examples available suggest to me it's anything but VB-like.

Not that I know VB that well either, if I'm honest, but I don't see the similarity.

The scripting language they've gone with looks pretty expressive.
 
I agree on your comments. I was working on different scripts for teaching purposes, when the new version came. A lot of work wasted. But they still have the old 0.9 versions avaliable, where the old scripting can be used.
 
Post a Comment



<< Home

This page is powered by Blogger. Isn't yours?