Page 30 of 31

Re: A text Myst Online project

PostPosted: Mon Sep 23, 2013 10:35 am
by Acorn
KathAveara wrote:I have finally got a lunar cycle working in Elahto! If all is working right, there'll be an eclipse tomorrow.


Just visited - did I miss it - or will it happen later today?

Re: A text Myst Online project

PostPosted: Mon Sep 23, 2013 11:35 am
by Pavitra
I think it should be in about 45 minutes an hour and 15 minutes ???

Belford, would you be willing to make the number of active logged-in players visible without logging in?

Re: A text Myst Online project

PostPosted: Mon Sep 23, 2013 1:58 pm
by KathAveara
If all goes to plan, which /eval suggests it will, head down anytime in the nest 25 hours. Better sooner than later.

Re: A text Myst Online project

PostPosted: Mon Sep 23, 2013 10:09 pm
by belford
Active meaning "idle less than five minutes"? (Which is the definition on the signed-in page.)

Yeah, I could add that.

Re: A text Myst Online project

PostPosted: Tue Sep 24, 2013 10:48 am
by Pavitra
I wasn't aware of the exact definition you were using for "active", but yes I was thinking it would match the signed-in page.

Re: A text Myst Online project

PostPosted: Tue Sep 24, 2013 12:22 pm
by belford
Okay, that's done. Front page will mention the number of idle players (if any) as well as the total number of players signed in.

New feature: if you add an "instancepane" text property at the realm level, it will appear as an Age-specific booklet page. A new Age, Caelios, demonstrates this.

The Caelios page only appears in your personal instance, but that's because I set up its instancepane property with that restriction. The property looks like:

Code: Select all
[$if access.level(level=access.MEMBER)]
[...]
[$end]


The contents are empty for visitors, so the booklet page doesn't appear. If you don't use a trick like this, an instancepane property will appear for all players.

Re: A text Myst Online project

PostPosted: Tue Sep 24, 2013 3:14 pm
by KathAveara
We've just had moonset here in Elahto, but for some reason the desc didn't auto-update to hide the moon. I had to refresh to make it update. Is there anyway to make it auto-update?

Re: A text Myst Online project

PostPosted: Tue Sep 24, 2013 3:56 pm
by belford
A displayed description should always update whenever a property inside that description changes. If your time cycle is based on timer code that sets properties, it should always work.

If your descriptions are based on text like [$if datetime.now < foo], that will not auto-update. Is that what you did?

(The system can't recompute a property based on datetime.now changing, because datetime.now is *always* changing -- it would have to refresh the description literally a thousand times per second.)

Re: A text Myst Online project

PostPosted: Tue Sep 24, 2013 5:23 pm
by KathAveara
Kinda a mix of both. The datetime.now is a property which is used by another property to calculate which of 10 states it can be (and changes about every day), which is what is used in the text. My problem with using timers is that I need a cycle that is independent of whether or not someone's in the Age to keep a timer running.

Re: A text Myst Online project

PostPosted: Tue Sep 24, 2013 7:39 pm
by Pavitra
In on_wake, use datetime.now to calibrate and start the timer.

(Strictly speaking, you don't actually need the timer to run while the instance is asleep, since there are no players there to see the wrong state. Rather, you need the waking timer to behave as though the timer had been running while asleep.)

(I don't think datetime.now is a "property" in the relevant sense -- that is, it doesn't correspond to a database entry. But I might be wrong about what Belford meant.)