Scene Functions
Scene Functions
Section titled “Scene Functions”These functions read the Scene System’s records and change nothing. A public scene can be read by anyone holding the scene.view permission, which the scene package gives to everyone. Every scene can be read by its members and wizards; for anyone else a function about it returns #-1 PERMISSION. The reader is the enactor (%#), not the object running the code, so a scene package command shows each player what they may see. A missing scene, pose or member is #-1 NOT FOUND.
- scene(): one field of a scene
- scenelist(): scene ids by status, schedule or member
- scenewhere(): the active scene in a room
- sceneposes(): a scene’s pose ids
- scenepose(): one field of a pose
- scenemembers(): a scene’s members
- scenemember(): one field of a member
- scenefocus(): a player’s current scene
The scene type functions read the pose types and scene details. The scene write functions change scenes.
scene()
Section titled “scene()”scene(<id>[, <field>])
One field of a scene; status when no field is given.
status,id,posecountpublic,istemp: 1 or 0scheduledfor,startedat,lastactivityat: UTC milliseconds;scheduledforis empty when the scene has no timeowner,starter: dbrefs;ownername,startername: namesroom: the room’s objid, to compare with objid() of loc();roomname: its namejoinpolicy:openunless set;playercap: 0 (no cap) unless setdetails: the keys of the details the scene has a value for, the game’s in their order and then any others, leaving out hidden onestags: every tag the scene’s poses carry, once each, deleted poses left outcast: every name the scene’s poses are shown under, once each: a pose’s persona, or its author’s name when it has none; deleted poses left out
Any other key the scene holds, such as title or summary (the pitch), reads as its text. A detail the game defines reads empty while it is unset. Anything else, an unset title included, is #-1 UNKNOWN SCENE FIELD.
> think scene(12, title)Output: Harbour Night
scenelist()
Section titled “scenelist()”scenelist([<filter>][, <from>, <to>])
scenelist(mine[, <player>])
scenelist(shared, <player>[, <player>])
The ids of the scenes you may see among the first 50 the filter finds, separated by spaces. <filter> is one of:
recent(the default, and any word not listed here): every scene but the cancelled ones, latest activity firstactive,finished: the scenes with that status, latest activity firstscheduled: the scenes waiting to run, soonest first: those with a time that are not active or finished, and every paused one, the paused ones with no time lastupcoming:scheduledwithout the scenes more than an hour past their time that never startedmine,shared: the scenes a player is a member of; see scenelist members
<from> and <to> are UTC milliseconds. They limit active, finished, scheduled and upcoming to the scenes whose time falls between them, leaving out scenes with no time.
A bound that is not a number is #-1 BAD ARGUMENT FORMAT TO SCENELIST.
> think scenelist(scheduled, soon)Output: #-1 BAD ARGUMENT FORMAT TO SCENELIST
Scenes by Member
Section titled “Scenes by Member”scenelist(mine[, <player>])
scenelist(shared, <player>[, <player>])
mine: the scenes you are a member of, cancelled ones left out; with<player>, every scene of that player’s insteadshared: the scenes two players are both members of, latest activity first, found among the first player’s latest 200; with one name, you and that player
A player that is not found is #-1 NO SUCH PLAYER.
> think scenelist(shared, Bob)Output: 40 31 12
scenewhere()
Section titled “scenewhere()”scenewhere(<room>)
The id of the active scene in <room>, or #-1 NOT FOUND when there is none. here names the room you are in.
sceneposes()
Section titled “sceneposes()”sceneposes(<scene>[, <author>][, <count>])
The ids of a scene’s poses in their order, separated by spaces, deleted poses included. <author> keeps only that player’s poses, and <count> only the last that many. A count that is not a whole number above 0 is #-1 BAD ARGUMENT FORMAT TO SCENEPOSES.
scenepose()
Section titled “scenepose()”scenepose(<scene>, <pose id>[, <field>])
One field of a pose; content when no field is given. Leave <scene> empty to find the pose by its id alone. A pose that is in another scene is #-1 NOT FOUND.
content: the pose as it was written, colours and layout kept;markup: the same pose, serialisedid,scene,type,source,tags(separated by spaces)author,origin,lasteditor: dbrefsauthorname,originname,lasteditorname,showas: namescreatedat,lasteditedat: UTC millisecondsdeleted: 1 or 0;editcount: how many versions it has, 1 when never editededits: the ids of its versions, oldest first, separated by spaces: every version the game’s retention has kept- any other key set with scenesetpose()
Anything else is #-1 UNKNOWN POSE FIELD.
scenemembers()
Section titled “scenemembers()”scenemembers(<scene>[, <role>])
The dbrefs of a scene’s members, separated by spaces, or only those with <role>. A member whose object is gone is listed by name.
scenemember()
Section titled “scenemember()”scenemember(<scene>, <player>[, <field>])
One field of a player’s membership; role when no field is given. The others are showas (their name in the scene, empty for their own), current (1 when the scene is their focus), grantedat (when they joined, in UTC milliseconds) and name. Anything else is #-1 UNKNOWN MEMBER FIELD, and a player who is not a member is #-1 NOT FOUND.
scenefocus()
Section titled “scenefocus()”scenefocus(<player>)
The id of the player’s current scene, or #-1 NOT FOUND when they have none.
::: seealso
- scene system
- @scene :::