Page 10 of 31
Re: A text Myst Online project
Posted: Wed Jul 10, 2013 9:04 am
by KathAveara
There appear to be some problems with the moon in Elahto, so the eclipse may not happen until after I get back from Australia... Anyway, the eclipse will be set back by at least one day...
Edit: I am removing that piece of code as it is not working. The moon will be static until I can get around the problem. I think it's the sched() misbehaving...
Re: A text Myst Online project
Posted: Wed Jul 10, 2013 11:10 am
by Christopher
It would be nice if "[Exception: Properties may only be set in action code]" could tell me where this happens. I can't find a location in my code where I set a property...
Christopher
Re: A text Myst Online project
Posted: Wed Jul 10, 2013 11:37 am
by belford
I've updated the docs to talk more about repeating events, and the on_wake and on_sleep properties. These are important if you're trying to set up weather or long-term cyclical events.
I still don't have an example of the (rather complicated) code I wrote to make Goldspring's fuel cans work. Because the system shuts down uninhabited instances, you have to keep track of how long you've been asleep, which means using datetime and timedelta objects in unobvious ways.
Re: A text Myst Online project
Posted: Wed Jul 10, 2013 11:41 am
by belford
Would it make sense to colonize a corner of the GoW wiki for documentation and examples?
Re: A text Myst Online project
Posted: Wed Jul 10, 2013 1:21 pm
by KathAveara
Quite possibly.
I am now at the airport!
Re: A text Myst Online project
Posted: Wed Jul 10, 2013 1:34 pm
by Acorn
KathAveara wrote:
I am now at the airport!
bon voyage!

Re: A text Myst Online project
Posted: Wed Jul 10, 2013 2:09 pm
by Christopher
Ok, I found my problem. I wrote [$elif foo = 1] instead of [$elif foo == 1], but I see you already opend an issue for this on github

I am looking forward to future additions. You seem to have a big issue list.
Christopher
Re: A text Myst Online project
Posted: Wed Jul 10, 2013 7:58 pm
by Pavitra
I'd like to get clearer documentation on what parts of the datetime module are available. Based on the current documentation, there appears to be no way to programmatically interact with the output of datetime.now.
Edit: Experimentation has yielded the following:
- The difference of two datetime.datetime objects is a datetime.timedelta object.
- Two datetime.timedelta objects can be added or subtracted.
- Two datetime.datetime objects can be compared (>).
- Two datetime.timedelta objects can be compared (>).
- A datetime.datetime object plus or minus a datetime.timedelta object works as expected.
This should be enough to create the effect of a long-running timer.
Re: A text Myst Online project
Posted: Wed Jul 10, 2013 8:47 pm
by belford
Your list is correct. It's the minimum I had to implement to make Goldspring work right. :)
Re: A text Myst Online project
Posted: Wed Jul 10, 2013 9:05 pm
by Pavitra
In order to more easily show each other implementation techniques, it might be useful to have a communally-accessible account, so that one person can write code using the code-demonstration account and others can then log in to that same account to view the code. Belford, if you think this is a good idea, then please set the builder flag on player 'Demo' (password 'demodemo').
Edit: Also, the modulus (%) and quotient (/) of one timedelta by another work correctly. That is incredibly useful.