Description: All about writing scripts for Celestia in Lua and the .cel system
Code: Select all
Thanks!don wrote:Hello dos,
For a script that writes a script, this is an excellent first attempt! Congratulations.
A couple of minor spelling changes:
... * "Turist" to "Tourist"
... * When viewing locations: "this is..." to "This is..."
A couple of things to consider adding / changing in your perl script:
... * Keep track of objects already added to the cel script. There are a lot of duplicates and triplicates in the cel script (ie. 3 trips to Venus).
... * Check for Beginning and Ending statements in .ssc files. If one exists, then check the ending date and make sure the cel script uses a date *before* this date (ie. Mir).
The script can be run it two ways: random order or ssc order. That should take... * Define some kind of "order" in which to visit objects. For example:
... * Define the parent body for moons, for example: "Earth: Moon".
... * Since some folks have ambient light normally set to NONE, you might want the script to set it to a specific value, since there is a lot of sightseeing on the dark side of objects.
... * This one might take some playing with ... When going through Locations maybe obtain all longs / lats first, then sort, then write out the script code. Currently, if the next long / lat is on the opposite side of the object, the script goes *through* the object. Another way to get there would be to use the orbit command, but it's a lot trickier then.
Like I wrote above, EXCELLENT first attempt dos! Looking forward to seeing the next version's output.
Good point about asteroids.dos wrote:The script can be run it two ways: random order or ssc order. That should take care of it. It is my opinion that touring 10 asteroids in a row can become quite boring.... * Define some kind of "order" in which to visit objects. For example:
Your first script bounced around to a lot of random moons, of different planets, without saying what planet they belong to. Many folks (like me) don't know all the names of the moons and who they belong to. So, when randomly going to moons, it would be helpful to know who it's parent (planet) is.dos wrote:What do you mean? The probability that the object's parent body will be mentioned or shown is quite large.... * Define the parent body for moons, for example: "Earth: Moon".
dos wrote:And thank you for the excelent .cel scripting tutorial!
Anonymous wrote:I made a few slight changes to the perl script and generated a fast outer solar-system tour: http://student.fizika.org/~dsvilko/outer.cel
Hope U like it.
Wow! Even I didn't sit through the whole thing!Just sat through your new random2.cel. Yep, all 15,349 lines of it.
Thanks!Nice job DoS!
Yes, I know. Will try to fix it.FYI, the center option in the print command does not center the text,
like one would expect. Rather, it starts displaying the beginning of the text
in the center of the window. So, you might want to adjust the opening text
Fixed. There was a bug in the .ssc parser.A couple things I noticed in this particular script:
... Charon's radius is 593 km but the perl script picked a 10 m comparison size.
Only the text was the same. The 'Revolve-view / Parent-quick-look' and the... Borrelly "in orbit around Sol" was done twice, back-to-back.
With current randomization code there is a _very_ small chance that something... Ariel is shown twice (maybe defined twice in your .ssc files?).
Question: Does your perl script use constants (defined at the top of the
script) to set the number of seconds to display text under different
circumstances? For example, displaying the object name, a location name, etc.
What about other things that might be good candidates for constants, that a
user might want to change, such as sunset durations, ambient light min/max,
FOV min/max, etc.?
No major complaints. It's a bit fast-moving for me (I read slow), but it keeps the pace going, which is good. There was one instance in the random2 script where some text flashed too quick to read, but only that one that I remember, out of the thousands.dos wrote:The script has a lot of constants defined (most of the things you would wish to change) but for some timings it is necessary to change the code by hand. If you feel there is a timing that is way off, let me know and I'll either fix it or add a constant.
WOW! Nice script!dos wrote:I think the script is ready for the public (beta) use. You can download it from:
dos wrote:For those non-unix havent-heard-of-perl people out there,
don wrote:Hi DoS,A search on SourceForge will turn up several easy-to-install versions of the Apache web server for Windows, which can include perl (among others). I think there are also some perl-only installations for Windows, somewhere out there ... check Google.dos wrote:For those non-unix havent-heard-of-perl people out there,
Thanks again DoS!
I have tried an exe converter perl2exe from here http://www.indigostar.com/. It's a commecial programm but has a 30 days trying period. With the version 5.03 the translation seems to happend but after I was not able to create any .cel file. The code line i tried directly in the data folder of celestia was : "explore solarsys.scc > essai.cel" . This create an empty essai.cel file.
Could this programm be a solution for windows people like me ?
Anyway thank you for the script DoS
On the script side, the "size compare to earth" function is not accurate with my profile. When it displays "Earth size compare to Earth size" the square is smaller than the earth (which obviously shouldn't be !). My configuration : windowed mode / full screen window / res 1280*1084.
Gordon wrote:Thanks DoS, it works find now.
About the atmosphere feature, would it be possible to have a "sunrise" or "sunset" feature ? By this I mean that the script would land you on the surface and show you the sun falling (or rising) in 15 sec. for exemple ?
Users browsing this forum: 2 guests