Page 1 of 1

A voice from the past

Posted: 01.11.2007, 16:32
by cpotting
Hello fellow scripters,

Just wanted to say that I'm back. Well, I haven't really been gone, but I haven't had any time to devote to Celestia and scripting in almost two years. I hope to be a little more active now.

I see that there is a new version of LUA being used - I am trying to bring myself up to speed with it. Plus I'm trying to figure out how to get 1.5.0 pre 4 compiled (managed to get CVS to download the source, now I have to figure out how to get VS2005 to compile it).

I see a lot of familiar names in the list of posters (Selden, Bob, Andrea, etc) - it's like coming home after long trip.

Posted: 01.11.2007, 16:36
by ElChristou
Welcome back Clive!

If needed, you can easily find a 1.5pre4 on Windows using the search on the forum...

Posted: 01.11.2007, 17:43
by selden
Clive,

Hi!

1. There are lotsa new Lua scripting possibilities now, especially since ScriptedOrbit and ScriptedRotation can be used to animate models. There are two videos on YouTube showing some preliminary results with Addons I've been working on. See http://www.youtube.com/user/CelestiaGuru

2. I've made the pre4 announcements stickies at the top of the Users Forum.

Posted: 01.11.2007, 19:56
by cpotting
ElChristou wrote:Welcome back Clive!
Thanks.
ElChristou wrote:If needed, you can easily find a 1.5pre4 on Windows using the search on the forum...

Yes. But all the one's I've downloaded don't seem to have all the LUA libraries activated.

Looking at the code, it appears that the symbol LUA_VER must be defined with a value of 0x050100 or higher in order to access LUA's package, io and os libraries. The default value is 0x050000.

Would you happen to know where there is a version with the proper LUA_VER value? I know I will be useful to get to point where I can compile on my own, but, until I get that worked out, it would be nice to get started on some scripting ideas I have.

Posted: 01.11.2007, 20:06
by Vincent
Clive,

You'll find the Lua 5.1 libraries here:
http://www.celestiaproject.net/~claurel/celestia/lua/

In the meantime, you can use this build:
http://vincent.gian.club.fr/celestia/ce ... 1.5CVS.exe

I thought that 1.5pre4 was built against Lua 5.1, though...

Posted: 01.11.2007, 20:14
by cpotting
selden wrote:Clive,

Hi!

1. There are lotsa new Lua scripting possibilities now, especially since ScriptedOrbit and ScriptedRotation can be used to animate models. There are two videos on YouTube showing some preliminary results with Addons I've been working on. See http://www.youtube.com/user/CelestiaGuru

2. I've made the pre4 announcements stickies at the top of the Users Forum.


W 8O O 8O W
I love it. That must have taken a lot of work to create, but end result is fabulous. Don't let Andrea see those videos - she'll have a thousand requests lined up before the weekend! :D

Posted: 01.11.2007, 20:33
by selden
Oh, Andrea's already seen it. :) But he's not the problem. Certain Frenchies in Paraguay are more of an issue.... ;)

(Sorry, ElChristou, but I really won't be able to help with your Apollo project, although I probably should have written this in the relevant threads. I doubt I'll be finished with the telescope very soon. No sooner do I get one part finished then I realize I forgot completely about some other part. And then I recognize a feature that I'd overlooked in one of the photographs that makes me have to remodel a "finished" part all over again. *sigh* )

Posted: 01.11.2007, 20:33
by cpotting
Vincent wrote:In the meantime, you can use this build:
http://vincent.gian.club.fr/celestia/ce ... 1.5CVS.exe
Thanks Vincent. However, that build has the same issue. You can see it if you try to execute a script with the command

Code: Select all

requires("xxx")
You will get the error

Code: Select all

attempt to call global 'require' (a nil value)
This is because the library has not been exposed to scripting environment.

Vincent wrote:I thought that 1.5pre4 was built against Lua 5.1, though...
Yes, it is. However, only LUA's basic library is exposed to the scripting environment. This library contains functions such as tostring(), type() and loadstring().
In 5.0 it included the function require(), which I have been using to build some OOP libraries. But now, in 5.1, the require() function was moved from the basic library to the package library. The only way to expose the package library (I believe) is to compile Celestia with LUA_VER set to 0x050100.

Posted: 01.11.2007, 20:41
by selden
Clive,

In order to use require() in a CELX script, the script first must call
celestia:requestsystemaccess()

or be running in the LuaHook environment
or be running in a ScriptedOrbit or ScriptedRotation environment.

Posted: 01.11.2007, 20:41
by cpotting
selden wrote:Oh, Andrea's already seen it. :) But he's not the problem.


he? oops. If you see this, sorry Andrea - I just assumed, because of the spelling, that you were female. I guess I didn't account for differences in spelling in different cultures.

In case you didn't know, in Canada at least, Andrea would be pronounced An - dree (rhymes with tree) - ah, or An - dra (rhymes with day) - ah. In either case, it would most likely be considered a female name.

My mistake.

Posted: 01.11.2007, 20:46
by Vincent
cpotting wrote:But now, in 5.1, the require() function was moved from the basic library to the package library.


Clive,

You may want to try this:
- Check out the following entry in celestia.cfg:

Code: Select all

ScriptSystemAccessPolicy "allow" 

- Then, request permission to access the libraries by adding the following lines at the beginning of your script:

Code: Select all

celestia:requestsystemaccess()
wait(0)


You should now have access to methods in the package library.

Edit: Sorry, cross post with Selden...

Posted: 01.11.2007, 20:57
by cpotting
selden wrote:In order to use require() in a CELX script, the script first must call
celestia:requestsystemaccess()
Thanks, that worked. 1.4.1 did not need permission; it's too bad that 1.5.0 does. It does limit the usefulness of the require() function a bit, but at least I can access it again.

or be running in the LuaHook environment
or be running in a ScriptedOrbit or ScriptedRotation environment.
Not sure what those are - yet.

[edit] Thanks to Vincent too.

Posted: 01.11.2007, 21:14
by ElChristou
selden wrote:Oh, Andrea's already seen it. :) But he's not the problem. Certain Frenchies in Paraguay are more of an issue.... ;)

(Sorry, ElChristou, but I really won't be able to help with your Apollo project, although I probably should have written this in the relevant threads. I doubt I'll be finished with the telescope very soon. No sooner do I get one part finished then I realize I forgot completely about some other part. And then I recognize a feature that I'd overlooked in one of the photographs that makes me have to remodel a "finished" part all over again. *sigh* )


Oh, don't worry Selden, I'm sure Linuxman and friend will end up with some nice anim even without using reference frames.

Tx anyway and welcome to my word! :wink:

Posted: 01.11.2007, 21:31
by selden
Clive,

The documentation that Chris wrote about Scripted orbits and rotations is available in the Celestia WikiBook at http://en.wikibooks.org/wiki/Celestia
in the chapters describing orbits, trajectories and rotations under "Customizing Celestia".

Posted: 01.11.2007, 22:16
by Vincent
cpotting wrote:
selden wrote:In order to use require() in a CELX script, the script first must call
celestia:requestsystemaccess()
Thanks, that worked. 1.4.1 did not need permission; it's too bad that 1.5.0 does. It does limit the usefulness of the require() function a bit, but at least I can access it again.

or be running in the LuaHook environment
or be running in a ScriptedOrbit or ScriptedRotation environment.
Not sure what those are - yet.

You'll find a concrete application of the use of Lua Hooks here:
http://celestiaproject.net/forum/viewtopic.php?t=10352

Have fun ! :wink:

Posted: 01.11.2007, 23:34
by ANDREA
cpotting wrote:
selden wrote:Oh, Andrea's already seen it. :) But he's not the problem.
he? oops. If you see this, sorry Andrea - I just assumed, because of the spelling, that you were female. I guess I didn't account for differences in spelling in different cultures. In case you didn't know, in Canada at least, Andrea would be pronounced An - dree (rhymes with tree) - ah, or An - dra (rhymes with day) - ah. In either case, it would most likely be considered a female name. My mistake.

Don't worry Clive, and welcome back to Celestia. :wink:
I'm used to be taken as female from my name, in many nations it is used this way, but in Italy Andrea is male, Andreina is female.
A matter of conventions, I think.
Bye

Andrea :D

Posted: 02.11.2007, 03:09
by BobHegwood
Tell 'im that your ALL-MALE Andrea, and if someone wants to prove it
otherwise, BRING IT ON.

On second thought, let me do it... I'm in the mood now. Oh never mind,
I'm just trying to release anger and frustration in any way that I can.

Good to see you again Clive. I've just been brought back from the dead
meself, so it's good to see familar faces resurfacing again.

Take care, Bob

Posted: 02.11.2007, 13:07
by cpotting
Thanks everyone.

ScriptedOrbit and ScriptedRotation look like great additions that will allow Celestia be less of a "passive" observational tool. I still have to check out the LuaHook and the Edu Tools, but that looks even more promising.

I am going to enjoy fiddling with this new version :)

Posted: 02.11.2007, 19:39
by Fenerit
cpotting wrote:
selden wrote:Oh, Andrea's already seen it. :) But he's not the problem.

he? oops. If you see this, sorry Andrea - I just assumed, because of the spelling, that you were female. I guess I didn't account for differences in spelling in different cultures.

In case you didn't know, in Canada at least, Andrea would be pronounced An - dree (rhymes with tree) - ah, or An - dra (rhymes with day) - ah. In either case, it would most likely be considered a female name.

My mistake.


Andrea = un-dre(ad)-a(s)

ai = I(m)
ea = as in share
ei = as in day
oi = as in oil
aiuola (flower-bed) = I-you-o-la(st)

Sorry, but today I'm enjoying with the language's issues. :D