Monday, March 09, 2009
Stellarium 0.10.1 Script Fail
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:00Yeah, 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".
// OLD: select planet Moon pointer off
// OLD: wait duration 2
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.
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.
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.
Links to this post: