Loggers
-
Some people have expressed interest in my loggers, so here's the Penn version (I'll add the Rhost version later).
This isn't actually anything like super clever or advanced/special code, its really pretty basic and easy, so its not a big deal. But it has a dramatic and positive effect on those games which like logs.
Some of the key features:
- By default it ignores lines that have 'OOC' in the first word, though this can be turned off.
- It logs everything it hears, but if you make a mistake in a pose, you can simply +log/undo to delete the last entry and repose.
- You can +log/show with an argument of like '5' to see just the last 5 poses, useful if you disconnect and need reposes without anyone having to repose to you.
- It formats your logs for wiki output (will need to be customized for your game's particulars)
On my games, I modify the room parent so the @conformat actually changes get(%i0/shortdesc) to be: objeval(%i0,u(%i0/shortdesc)) for the express purposes of these loggers use their shortdesc to report their on/off status brightly to avoid confusion.
The usage is pretty simple: @create an object, drop it, +log/make object, and voila. Its now a logger. +log/on object and pose away. +log/capture is a quick shortcut command to set all the metadata for the log, or you can set them individually. Then +log/wiki
On the parent you'll want to modify SHOW_HEADER_WIKI to match whatever the wikicode your logs need for your wiki.
This is the parent: -- START -- @create Logging Parent; LP @set Logging Parent; LP = NO_COMMAND &AHEAR Logging Parent; LP=@include me/CHECK_INCLUDE_OOC[v(include_ooc)];@include me/CHECK_CONNECT;&log`[inc(after(last(sortby(sort_log,lattr(me/LOG`*))),`))] me=[secs()] %0 @set Logging Parent; LP/AHEAR=no_command prefixmatch &CHECK_CONNECT Logging Parent; LP=@break strmatch(%0,* has connected.);@break strmatch(%0,* has disconnected.);@break strmatch(%0,* has reconnected.);@break strmatch(%0,* has partially disconnected) &CHECK_INCLUDE_OOC0 Logging Parent; LP=@break strmatch(first(%0),*OOC*) &CHECK_INCLUDE_OOC1 Logging Parent; LP= &DESCRIBE Logging Parent; LP=Status: [ifelse(v(logging),[ansi(hg,ON)],[ansi(hr,OFF)])]%ROOC Included? [ifelse(v(include_ooc),[ansi(hg,YES)],[ansi(hr,NO)])]%R%R[ansi(hw,Scene Information:)]%R%T[ansi(hw,Summary)]: [get(me/SCENE`SUMMARY)]%r%t[ansi(hw,Date)]: [get(me/SCENE`DATE)]%r%t[ansi(hw,Cast)]: [iter(get(me/SCENE`CAST),name(##))]%R%t[ansi(hw,Location Name)]: [get(me/SCENE`LOCATION)]%R%t[ansi(hw,Location Description)]: [get(me/SCENE`LOCATIONDESC)]%R%R[ansi(hw,Log entries recorded)]: [words(lattr(me/LOG`))] @set Logging Parent; LP/DESCRIBE=no_command visual prefixmatch public nearby &DO-SET-LOG-OOC Logging Parent; LP=&include_ooc me=[not(get(me/include_ooc))];@remit %l=[ansi(hy,OOC)]: [name(me)] is now set [ifelse(v(include_ooc),[ansi(hg,TO)] include OOC communication,[ansi(hr,TO NOT)] include OOC communication)]. &DO-SHOW-LOG Logging Parent; LP=@dol/inline HEADER [setq(0,sortby(sort_log,lattr(me/LOG`*)))][ifelse(t(%2),extract(%q0,mul(%2,-1),%2),%q0)] FOOTER={@pemit %0=[switch(%i0,HEADER,u(SHOW_HEADER_%1),FOOTER,u(SHOW_FOOTER_%1),u(SHOW_LOG_%1,%i0))]} &DO-START-LOG Logging Parent; LP=&logging me=1;@listen me=*;@remit loc(me)=[ansi(hy,OOC)]: This scene is now being logged by [ansi(hw,name(me))]. &DO-STOP-LOG Logging Parent; LP=&logging me=0;@remit loc(me)=[ansi(hy,OOC)]: This scene is no longer being logged by [ansi(hw,name(me))]. &DO-UNDO-LOG Logging Parent; LP=&log`[after(last(sortby(sort_log,lattr(me/LOG`*))),`)] me;@pemit/contents loc(me)=[ansi(hw,OOC)]: The last entry in the log has been undone. &INCLUDE_OOC Logging Parent; LP=0 &LISTEN Logging Parent; LP=* @set Logging Parent; LP/LISTEN=no_command prefixmatch &LOG Logging Parent; LP= &LOGGING Logging Parent; LP=0 &MESSAGE_LOGGING0 Logging Parent; LP=[ansi(y,OFF)] &MESSAGE_LOGGING1 Logging Parent; LP=[ansi(hg,ON)] [ansi(hr,- SCENE IS BEING LOGGED)] &SHORTDESC Logging Parent; LP=is currently [u(message_logging[v(logging)])]. &SHOW_FOOTER_PLAIN Logging Parent; LP=[line_with_text([ansi(hw,end of log)])] &SHOW_FOOTER_WIKI Logging Parent; LP=[line_with_text([ansi(hw,end of log)])] &SHOW_HEADER_PLAIN Logging Parent; LP=[line_with_text([ansi(hw,[name(me)]'s Log)])] &SHOW_HEADER_WIKI Logging Parent; LP=[line_with_text([ansi(hw,[name(me)]'s Log)])]%r[[include LogInfoBox%r|summary=[get(me/SCENE`SUMMARY)]%r|date=[get(me/SCENE`DATE)]%R|location=[get(me/SCENE`LOCATION)]%r|related=If there are no related logs, put 'None', -- please don't leave blank! [!-- IMPORTANT: The formatting MUST be: [http://marvel1963mush.wikidot.com/log:name NameOfLogGoesHere] --]%r|themesong=None%r]]%r[[include LogPlayerTop]]%r[iter(get(me/SCENE`CAST),[[include LogIcon name=[lcstr(name(%i0))]]],%b,%r)]%r[[include LogPlayerBottom]]%R%R====%R%R &SHOW_LOG_PLAIN Logging Parent; LP=[setq(0,get(me/%0))][ansi(hx,%[[timefmt($H:$M:$S,first(%q0))]%])] [rest(%q0)] &SHOW_LOG_WIKI Logging Parent; LP=[rest(get(me/%0))]%r%r*%r &SORT_LOG Logging Parent; LP=comp(after(%0,`),after(%1,`),N) -- END -- This is the master room: note the last command, set @VP to the dbref of the parent: -- START -- @create Logging Commands; LC @lock/Use Logging Commands; LC=IS_APPROVED/1 @lset Logging Commands; LC/Use=no_inherit @set Logging Commands; LC = TRUST @set Logging Commands; LC = WIZARD &CMD-+LOG/CAPTURE Logging Commands; LC=$+log/capture *:@include me/DO_CHECK_BASIC;&scene`cast %q<logger>=[lvplayers(%l)];&scene`location %q<logger>=[name(%l)];&scene`locationdesc %q<logger>=[ifelse(hasflag(%l,temporary),get(%l/tempdesc),get(%l/desc))];&scene`date %q<logger>=[ictime()];@pemit %#=Captured. &CMD-+LOG/CAST Logging Commands; LC=$+log/cast *=*:@include me/DO_CHECK_BASIC;@eval [setq(cast,iter(%1,pmatch(%i0)))];@break strmatch(%q<cast>,*#-1*)={@pemit %#=I can't find anyone named: [iter(%1,ifelse(t(pmatch(%i0)),,%i0))].};&SCENE`CAST %q<logger>=%q<cast>;@pemit %#=[ansi(hy,OOC)]: Cast set to: [itemize(iter(%q<cast>,name(%i0),%b,|),|)]. &CMD-+LOG/DATE Logging Commands; LC=$+log/date *=*:@include me/DO_CHECK_BASIC;&scene`summary %q<logger>=[ifelse(strmatch(lcstr(%1),today),ictime(),%1)];@pemit %#=[ansi(hy,OOC: Date set to: [ansi(hw,%1)]. &CMD-+LOG/LOCDESC Logging Commands; LC=$+log/location/desc *=*:@include me/DO_CHECK_BASIC;&SCENE`LOCATIONDESC %q<logger>=[switch(%1,here,objeval(%#,u(%l/desc)),%l)];@pemit %#=[ansi(hy,OOC)]: Location description set to: [get(%q<logger>/SCENE`LOCATIONDESC)].; &CMD-+LOG/LOCNAME Logging Commands; LC=$+log/location/name *=*:@include me/DO_CHECK_BASIC;&SCENE`LOCATION %q<logger>=[switch(%1,here,name(%l),%1)];@pemit %#=[ansi(hy,OOC)]: Location name set to: [get(%q<logger>/SCENE`LOCATION)].; &CMD-+LOG/MAKE Logging Commands; LC=$+log/make *:@eval [setq(logger,locate(%#,%0,Tn))];@break hastype(%q<logger>,PLAYER)={@pemit %#=You can't make a player a logger!};@assert t(%q<logger>)={@pemit %#=I can't find an object named [ansi(hw,%0)].};@break match(parent(%q<logger>),%vp)={@pemit %#=That object is already a scene logger.};@parent %q<logger>=%vp;&LOGGING %q<logger>=0;@lock/listen %q<logger>=logging/1;@listen %q<logger>=*;@pemit %#=You have made [ansi(hw,name(%q<logger>))] a Scene Logger.; &CMD-+LOG/OFF Logging Commands; LC=$+log/off *:@include me/DO_CHECK_BASIC;@assert get(%q<logger>/logging)={@pemit %#=[ansi(hw,name(%q<logger>))] is not logging this scene.};@tri %q<logger>/DO-STOP-LOG=%q<logger> &CMD-+LOG/ON Logging Commands; LC=$+log/on *:@include me/DO_CHECK_CONTROLS;@break get(%q<logger>/logging)={@pemit %#=[ansi(hw,name(%q<logger>))] is already logging this scene.};@tri %q<logger>/DO-START-LOG=%q<logger> &CMD-+LOG/OOC Logging Commands; LC=$+log/ooc *:@include me/DO_CHECK_CONTROLS;@tri %q<logger>/DO-SET-LOG-OOC=%# &CMD-+LOG/RECLAIM Logging Commands; LC=$+log/reclaim:@pemit %#=[ansi(hw,OOC)]: Reclaiming all loggers...;@dol children(%vp)={@assert strmatch(%#,owner(##));&logging ##=0;@pemit %#=... [ansi(hw,name(##))];@tel ##=%#} &CMD-+LOG/RETURN Logging Commands; LC=$+log/return *:@include me/DO_CHECK_BASIC;@tri %q<logger>/DO-STOP-LOG=%q<logger>;@tel %q<logger>=owner(%q<logger>);@mail [name(owner(%q<logger>))]=Logger Returned/[name(%#)] has returned your logger to you from [name(%l)]; &CMD-+LOG/SHOW Logging Commands; LC=$+log/show *:@break strmatch(%0,*=*);@include me/DO_CHECK_BASIC;@tri %q<logger>/DO-SHOW-LOG=%#,plain &CMD-+LOG/SHOW-LAST Logging Commands; LC=$+log/show *=*:@assert isint(%1)={@pemit %#=The second argument is expected to be a number, got [ansi(hw,%1)]};@include me/DO_CHECK_BASIC;@tri %q<logger>/DO-SHOW-LOG=%#,plain,%1 &CMD-+LOG/SUMMARY Logging Commands; LC=$+log/summary *=*:@include me/DO_CHECK_BASIC;&SCENE`SUMMARY %q<logger>=%1;@pemit %#=[ansi(hy,OOC)]: Summary set to: [ansi(hw,%1)]. &CMD-+LOG/UNDO Logging Commands; LC=$+log/undo *:@include me/DO_CHECK_BASIC;@tri %q<logger>/DO-UNDO-LOG=%q<logger> &CMD-+LOG/WIKI Logging Commands; LC=$+LOG/wiki *:@include me/DO_CHECK_BASIC;@tri %q<logger>/DO-SHOW-LOG=%#,wiki &CMD-+LOG/WIPE Logging Commands; LC=$+log/wipe *:@include me/DO_CHECK_CONTROLS;@wipe %q<logger>/LOG`*;@wipe %q<logger>/SCENE`*;@pemit %#=[ansi(hw,name(%q<logger>))] has had its current log wiped. &CMD-+LOG/POSE Logging Commands; LC=$+log/pose *=*:@include me/DO_CHECK_BASIC;@tri %q<logger>/ahear=%1;@pemit %#=[ansi(hw,OOC)]: Pose added. &DESCRIBE Logging Commands; LC= @set Logging Commands; LC/DESCRIBE=no_command visual prefixmatch public nearby &DO_CHECK_BASIC Logging Commands; LC=@eval [setq(logger,locate(%#,%0,Tni))];@assert t(%q<logger>)={@pemit %#=I can't find an object named [ansi(hw,%0)].};@assert match(parent(%q<logger>),%vp)={@pemit %#=That object is not a Scene Logger.}; &DO_CHECK_CONTROLS Logging Commands; LC=@include me/DO_CHECK_BASIC;@assert controls(%#,%q<logger>)={@pemit %#=You do not control that scene logger.}; &IS_APPROVED Logging Commands; LC=not(strmatch(get(%#/status),NEW)) &UFAIL Logging Commands; LC=You must be approved to use the logging system. @set Logging Commands; LC/UFAIL=no_command prefixmatch @VP Logging Commands; LC=#396 -- END -- Here's the help file: -- START -- The +log system is used for logging of scenes in such a way that it minimizes the amount of stuff you have to clean before posting, not to mention making sure you post the log in the correct format. The scene revolves around Scene Loggers, which are plain objects that you own and re-use from one scene to the next. You never really need to have more then one. To create a <logger>, type: @create <logger> and then drop it. You can make this a scene <logger> then by typing: +log/make <logger>. Once you drop the <logger>, the following commands are available: +log/on <logger> - activate logging +log/off <logger> - deactivate logging +log/ooc <logger> - toggle if OOC communication is logged. Default: off. +log/show <logger>=X - show the current log or X lines of it. (=X is optional.). +log/wipe <logger> - clear the current log. +log/undo <logger> - remove the last entry in the log. Useful to repose a correction. +log/pose <logger>=<pose> - add a pose directly to the logger Before posting, you can store the scene information with: +log/summary <logger>=description - set summary of current scene +log/cast <logger>=person1 person2 .. personN - set participants in log +log/location/name <logger>=name - name of place where log takes place. 'here' gets current room name. +log/location/desc <logger>=text - description of place where log takes place. 'here' takes current room desc. +log/capture <logger> - cast, location/name and location/desc all in one handy command When you're ready to post your log, +log/wiki <logger> will show you the current log and wiki formatting. When done, just 'get' your <logger> and take it with you. If you see someone's <logger> laying around, +log/return <logger> will return it to their inventory. If you've lost your logger, +log/reclaim will teleport ALL of your loggers to your inventory whether they're in use or not. -- END --
This is the Rhost version of the code. It probably would require very minimal tweaking to work on MUX but I don't know.
This is the Rhost version of the code, though it requires the penn_setq option to be set to on. The logging parent: --START-- @create Logging Parent; LP=10 @Ahear Logging Parent; LP=@include me/CHECK_INCLUDE_OOC[v(include_ooc)];@include me/CHECK_CONNECT;&log-[inc(after(last(sortby(sort_log,lattr(me/LOG-*))),-))] me=[secs()] %0 &CHECK_CONNECT Logging Parent; LP=@break strmatch(%0,* has connected.);@break strmatch(%0,* has disconnected.);@break strmatch(%0,* has reconnected.);@break strmatch(%0,* has partially disconnected) &CHECK_INCLUDE_OOC0 Logging Parent; LP=@break strmatch(first(%0),*OOC*) @Desc Logging Parent; LP=Status: [ifelse(v(logging),[ansi(hg,ON)],[ansi(hr,OFF)])]%ROOC Included? [ifelse(v(include_ooc),[ansi(hg,YES)],[ansi(hr,NO)])]%R%R[ansi(hw,Scene Information:)]%R%T[ansi(hw,Summary)]: [get(me/SCENE-SUMMARY)]%r%t[ansi(hw,Date)]: [get(me/SCENE-DATE)]%r%t[ansi(hw,Cast)]: [iter(get(me/SCENE-CAST),name(##))]%R%t[ansi(hw,Location Name)]: [get(me/SCENE-LOCATION)]%R%t[ansi(hw,Location Description)]: [get(me/SCENE-LOCATIONDESC)]%R%R[ansi(hw,Log entries recorded)]: [words(lattr(me/LOG-))] &DO-SET-LOG-OOC Logging Parent; LP=&include_ooc me=[not(get(me/include_ooc))];@remit %l=[ansi(hy,OOC)]: [name(me)] is now set [ifelse(v(include_ooc),[ansi(hg,TO)] include OOC communication,[ansi(hr,TO NOT)] include OOC communication)]. &DO-SHOW-LOG Logging Parent; LP=@dol/inline HEADER [setq(0,sortby(sort_log,lattr(me/LOG-*)))][ifelse(t(%2),extractword(%q0,mul(%2,-1),%2),%q0)] FOOTER={@pemit %0=[switch(%d0,HEADER,u(SHOW_HEADER_%1),FOOTER,u(SHOW_FOOTER_%1),u(SHOW_LOG_%1,%d0))]} &DO-START-LOG Logging Parent; LP=&logging me=1;@listen me=*;@remit loc(me)=[ansi(hy,OOC)]: This scene is now being logged by [ansi(hw,name(me))]. &DO-STOP-LOG Logging Parent; LP=&logging me=0;@remit loc(me)=[ansi(hy,OOC)]: This scene is no longer being logged by [ansi(hw,name(me))]. &DO-UNDO-LOG Logging Parent; LP=&log-[after(last(sortby(sort_log,lattr(me/LOG-*))),-)] me;@pemit/contents loc(me)=[ansi(hw,OOC)]: The last entry in the log has been undone. &INCLUDE_OOC Logging Parent; LP=0 @Listen Logging Parent; LP=* &LOGGING Logging Parent; LP=0 &MESSAGE_LOGGING0 Logging Parent; LP=[ansi(y,OFF)] &MESSAGE_LOGGING1 Logging Parent; LP=[ansi(hg,ON)] [ansi(hr,- SCENE IS BEING LOGGED)] &SHORTDESC Logging Parent; LP=is currently [u(message_logging[v(logging)])]. &SHOW_FOOTER_PLAIN Logging Parent; LP=[ui-footer([ansi(hw,end of log)])] &SHOW_FOOTER_WIKI Logging Parent; LP=[ui-footer([ansi(hw,end of log)])] &SHOW_HEADER_PLAIN Logging Parent; LP=[ui-header([ansi(hw,[name(me)]'s Log)])] &SHOW_HEADER_WIKI Logging Parent; LP=[ui-header([ansi(hw,[name(me)]'s Log)])]%r[[include logheader%r|summary=[get(me/SCENE-SUMMARY)]%r|location=[get(me/SCENE-LOCATION)]%r|desc=[get(me/SCENE-LOCATIONDESC)]%R]]%r%r[[include logcastbegin]]%r[iter(get(me/SCENE-CAST),[[include logccon name=[lcstr(name(%i0))]]],%b,%r)]%r[[include logcastend]]%r%r[[include logstart]]%R%R====%R%R &SHOW_LOG_PLAIN Logging Parent; LP=[setq(0,get(me/%0))][ansi(hx,%[[timefmt($02H:$02T:$02S $P,first(%q0))]%])] [rest(%q0)] &SHOW_LOG_WIKI Logging Parent; LP=[rest(get(me/%0))]%r%r-----%r%r &SORT_LOG Logging Parent; LP=ncomp(after(%0,-),after(%1,-)) @set Logging Parent; LP=NO_COMMAND --STOP-- The master room commands: be sure to set @VP to the dbref of above: --START-- @create Logging Commands; LC=10 &CMD-+LOG/CAPTURE Logging Commands; LC=$+log/capture *:@include me/DO_CHECK_BASIC;&scene-cast %q<logger>=[lcon(%l/player)];&scene-location %q<logger>=[name(%l)];&scene-locationdesc %q<logger>=[ifelse(hasflag(%l,temporary),get(%l/tempdesc),get(%l/desc))];&scene-date %q<logger>=[time()];@pemit %#=Captured. &CMD-+LOG/CAST Logging Commands; LC=$+log/cast *=*:@include me/DO_CHECK_BASIC;@eval [setq(cast,iter(%1,pmatch(%i0)))];@break strmatch(%q<cast>,*#-1*)={@pemit %#=I can't find anyone named: [iter(%1,ifelse(t(pmatch(%i0)),,%i0))].};&SCENE-CAST %q<logger>=%q<cast>;@pemit %#=[ansi(hy,OOC)]: Cast set to: [itemize(iter(%q<cast>,name(%i0),%b,|),|)]. &CMD-+LOG/DATE Logging Commands; LC=$+log/date *=*:@include me/DO_CHECK_BASIC;&scene-summary %q<logger>=[ifelse(strmatch(lcstr(%1),today),time(),%1)];@pemit %#=[ansi(hy,OOC: Date set to: [ansi(hw,%1)]. &CMD-+LOG/LOCDESC Logging Commands; LC=$+log/location/desc *=*:@include me/DO_CHECK_BASIC;&SCENE-LOCATIONDESC %q<logger>=[switch(%1,here,objeval(%#,u(%l/desc)),%l)];@pemit %#=[ansi(hy,OOC)]: Location description set to: [get(%q<logger>/SCENE-LOCATIONDESC)].; &CMD-+LOG/LOCNAME Logging Commands; LC=$+log/location/name *=*:@include me/DO_CHECK_BASIC;&SCENE-LOCATION %q<logger>=[switch(%1,here,name(%l),%1)];@pemit %#=[ansi(hy,OOC)]: Location name set to: [get(%q<logger>/SCENE`LOCATION)].; &CMD-+LOG/MAKE Logging Commands; LC=$+log/make *:@eval [setq(logger,locate(%#,%0,Tn))];@break hastype(%q<logger>,PLAYER)={@pemit %#=You can't make a player a logger!};@assert t(%q<logger>)={@pemit %#=I can't find an object named [ansi(hw,%0)].};@break match(parent(%q<logger>),%vp)={@pemit %#=That object is already a scene logger.};@parent %q<logger>=%vp;&LOGGING %q<logger>=0;@lock/use %q<logger>=logging/1;@set %q<logger>=!no_command;@listen %q<logger>=*;@pemit %#=You have made [ansi(hw,name(%q<logger>))] a Scene Logger.; &CMD-+LOG/OFF Logging Commands; LC=$+log/off *:@include me/DO_CHECK_BASIC;@assert get(%q<logger>/logging)={@pemit %#=[ansi(hw,name(%q<logger>))] is not logging this scene.};@tri %q<logger>/DO-STOP-LOG=%q<logger> &CMD-+LOG/ON Logging Commands; LC=$+log/on *:@include me/DO_CHECK_CONTROLS;@break get(%q<logger>/logging)={@pemit %#=[ansi(hw,name(%q<logger>))] is already logging this scene.};@tri %q<logger>/DO-START-LOG=%q<logger> &CMD-+LOG/OOC Logging Commands; LC=$+log/ooc *:@include me/DO_CHECK_CONTROLS;@tri %q<logger>/DO-SET-LOG-OOC=%# &CMD-+LOG/RECLAIM Logging Commands; LC=$+log/reclaim:@pemit %#=[ansi(hw,OOC)]: Reclaiming all loggers...;@dol children(%vp)={@assert strmatch(%#,owner(##));&logging ##=0;@tel ##=%#} &CMD-+LOG/RETURN Logging Commands; LC=$+log/return *:@include me/DO_CHECK_BASIC;@tri %q<logger>/DO-STOP-LOG=%q<logger>;@tel %q<logger>=owner(%q<logger>);mail/send [name(owner(%q<logger>))]=Logger Returned//[name(%#)] has returned your logger to you from [name(%l)]; &CMD-+LOG/SHOW Logging Commands; LC=$+log/show *:@break strmatch(%0,*=*);@include me/DO_CHECK_BASIC;@tri %q<logger>/DO-SHOW-LOG=%#,plain &CMD-+LOG/SHOW-LAST Logging Commands; LC=$+log/last *=*:@assert isint(%1)={@pemit %#=The second argument is expected to be a number, got [ansi(hw,%1)]};@include me/DO_CHECK_BASIC;@tri %q<logger>/DO-SHOW-LOG=%#,plain,%1 &CMD-+LOG/SUMMARY Logging Commands; LC=$+log/summary *=*:@include me/DO_CHECK_BASIC;&SCENE-SUMMARY %q<logger>=%1;@pemit %#=[ansi(hy,OOC)]: Summary set to: [ansi(hw,%1)]. &CMD-+LOG/UNDO Logging Commands; LC=$+log/undo *:@include me/DO_CHECK_BASIC;@tri %q<logger>/DO-UNDO-LOG=%q<logger> &CMD-+LOG/WIKI Logging Commands; LC=$+LOG/wiki *:@include me/DO_CHECK_BASIC;@tri %q<logger>/DO-SHOW-LOG=%#,wiki &CMD-+LOG/WIPE Logging Commands; LC=$+log/wipe *:@include me/DO_CHECK_CONTROLS;@wipe %q<logger>/LOG-*;@wipe %q<logger>/SCENE-*;@pemit %#=[ansi(hw,name(%q<logger>))] has had its current log wiped. &CMD-+LOG/POSE Logging Commands; LC=$+log/pose *=*:@include me/DO_CHECK_BASIC;@tri %q<logger>/ahear=%1;@pemit %#=[ansi(hw,OOC)]: Pose added. &DO_CHECK_BASIC Logging Commands; LC=@eval [setq(logger,locate(%#,%0,Tni))];@assert t(%q<logger>)={@pemit %#=I can't find an object named [ansi(hw,%0)].};@assert match(parent(%q<logger>),%vp)={@pemit %#=That object is not a Scene Logger.}; &DO_CHECK_CONTROLS Logging Commands; LC=@include me/DO_CHECK_BASIC;@assert controls(%#,%q<logger>)={@pemit %#=You do not control that scene logger.}; &IS_APPROVED Logging Commands; LC=[!hasflag(%#,wanderer)] @Ufail Logging Commands; LC=You must be approved to use the logging system. @set Logging Commands; LC=SHOWFAILCMD INHERIT STOP @VP Logging Commands; LC=#359 --STOP-- Help file is the same as Penn version.
-
Now that we've moved from Penn to Rhost on M1963, I've expanded the Rhost loggers to allow posting from in-game directly to the website.
One does: +log/post logger=plot avengers plot-name/Title Of Log=Summary Of Action
Where 'plot avengers plot-name' are the tags the log should have. (First tag must be either Plot or Social.)
Its only possible if you have at least a Pro Lite wikidot account and requires some setup-- but if anyone is on Rhost and wikidot and wants this, PM me and I'll share with you the scripts and how to make it all go.
-
Small suggestion... I'm not sure if M1963 uses a wiki, but if you are utilizing a wiki, I threw together a command I call +getcast, which basically grabs not only the list of players in the room, but then processes their +finger information to pull their wiki site. It then outputs
[[Page Name|Bit Name]]
.If the logs are getting posted on the wiki, it really saves some annoyance.
-
Heck, why stop there? When someone enters the room, put them on a temporary list. When they pose, move them to the 'cast' list. When the log ends, spit out that list with the log.
If someone is 'just passing through', you can have the logger exclude them from the log. ('log/exclude bob')
A scene-set system can also introduce the scene to the wiki version of the log, and if it changes then it can log it when it changes and format it all nice and pretty for the wiki.
Educate quotes, if possible!
You can put a timestamp on each pose by encapsulating it in a <span> with a hint of metadata. The logger probably should be timestamping the poses anyway if you want it integrated in some kind of 'pose tracker' system. Use timestamps to the hundredths of a second!
This started as just one thought and became many more. This is why I take so long to code; all of the above seem to me like exciting additions to any logger.
Minor Warning: Some games allow players to make their own 'OOC' prefix; the above code won't know one from another.
-
@Thenomain I don't think it pose tracks, but it does allow something like +repose. And it definitely lets you input additional information that gets output in a wiki-friendly format, based on the Template:Log that seems to have spread everywhere.
Auto-grabbing the cast list would be nice, tho.
-
Small suggestion... I'm not sure if M1963 uses a wiki, but if you are utilizing a wiki, I threw together a command I call +getcast, which basically grabs not only the list of players in the room, but then processes their +finger information to pull their wiki site. It then outputs
[[Page Name|Bit Name]]
.If the logs are getting posted on the wiki, it really saves some annoyance.
We have this. +log/capture logger captures the current date, the location, and everyone in the scene all for inclusion in the log.
There's separate commands to adjust these individually, but generally this is what people do:
drop logger
+log/on logger
+log/capture logger
<scene>
+log/post logger=social/My Title=In which Ixokai and Bob become friendsAnd that gets posted to www.marvel-1963.com/log:1964-06-27_-_My_Title, and it includes the wiki output and (more importantly) tags the log with the characters involved (and social). The tagging is important because our entire activity tracking system keys off of tags.
-
@ixokai Awesome! Good. We have something very similar (older, maybe? I don't even know) that doesn't format names into the wiki-friendly stuff.
-
In honor of Ix's coding prowess, and because I was asked, here is the TinyMUX version of the Logger, formatted for Muxify.
Skol.
/* This is the TinyMUX version of the code The logging parent: ================================================================================ == LOGGING PARENT ============================================================== -------------------------------------------------------------------------------- -- Setup: Logging Parent ------------------------------------------------------- */ @create Logging Parent <LP>=10 // use your own code here if you want &.header Logging Parent <LP>=header( %0 ) &.footer Logging Parent <LP>=footer( %0 ) @ahear Logging Parent <LP>= @break cor( u( include.check_ooc, %0 ), u( include.check_connect, %0 ) ); &log-[inc( after( last( sortby( sort_log, lattr( me/LOG-* ))), - ))] me= [secs( )] %0 &include.check_ooc Logging Parent <LP>= cand( strmatch( v( include_ooc ), 0 ), strmatch( first( %0 ), *OOC* ) ) &include.check_connect Logging Parent <LP>= cor( strmatch( %0, * has connected. ), strmatch( %0, * has disconnected. ), strmatch( %0, * has reconnected. ), strmatch( %0, * has partially disconnected ) ) @Desc Logging Parent <LP>= Status: [ifelse( v( logging ), [ansi( hg, ON )], [ansi( hr, OFF )] )]%r OOC Included? [ifelse( v( include_ooc ), ansi( hg, YES ), ansi( hr, NO ))] %r%r [ansi( hw, Scene Information: )]%r %t[ansi( hw, Summary )]: [get( me/SCENE-SUMMARY )]%r %t[ansi( hw, Date )]: [get( me/SCENE-DATE )]%r %t[ansi( hw, Cast )]: [iter( get( me/SCENE-CAST ), name( %i0 ))]%r %t[ansi( hw, Location Name )]: [get( me/SCENE-LOCATION )]%r %t[ansi( hw, Location Description )]: [get( me/SCENE-LOCATIONDESC )] %r%r [ansi( hw, Log entries recorded )]: [words( lattr( me/LOG-* ))] &DO-SET-LOG-OOC Logging Parent <LP>= &include_ooc me=[not( get( me/include_ooc ))]; @remit %l= [ansi( hy, OOC )]: [name( me )] is now set [ifelse( v( include_ooc ), ansi( hg, TO ), ansi( hr, TO NOT ))] include OOC communication. &DO-SHOW-LOG Logging Parent <LP>= @eval [setq( 0, sortby( sort_log, lattr( me/LOG-* )))]; @dolist HEADER [ifelse( t( %2 ), revwords( extract( revwords( %q0 ), 1, %2 )), %q0 )] FOOTER={ @pemit %0=[switch( ##, HEADER, u( SHOW_HEADER_%1 ), FOOTER, u( SHOW_FOOTER_%1 ), u( SHOW_LOG_%1, ## ) )] } &DO-START-LOG Logging Parent <LP>= &logging me=1; @listen me=*; @remit loc( me )= [ansi( hy, OOC )]: This scene is now being logged by [ansi( hw, name( me ))]. &DO-STOP-LOG Logging Parent <LP>= &logging me=0; @remit loc( me )= [ansi( hy, OOC )]: This scene is no longer being logged by [ansi( hw, name( me ))]. &DO-UNDO-LOG Logging Parent <LP>= &log-[after( last( sortby( sort_log, lattr( me/LOG-* ))), - )] me; @pemit/contents loc( me )= [ansi( hw, OOC )]: The last entry in the log has been undone. &INCLUDE_OOC Logging Parent <LP>=0 @Listen Logging Parent <LP>=* &LOGGING Logging Parent <LP>=0 &MESSAGE_LOGGING0 Logging Parent <LP>= [ansi( y, OFF )] &MESSAGE_LOGGING1 Logging Parent <LP>= [ansi( hg, ON )] [ansi( hr, - SCENE IS BEING LOGGED )] &SHORTDESC Logging Parent <LP>= is currently [u( message_logging[v( logging )] )]. &SHOW_FOOTER_PLAIN Logging Parent <LP>= [footer( [ansi( hw, end of log )] )] &SHOW_FOOTER_WIKI Logging Parent <LP>= [u( .footer, ansi( hw, end of log ))] &SHOW_HEADER_PLAIN Logging Parent <LP>= [u( .header, ansi( hw, [name( me )]'s Log ))] // this, er, is literal text for the wiki. why aren't the [[ ]] escaped? &SHOW_HEADER_WIKI Logging Parent <LP>= [u( .header, ansi( hw, [name( me )]'s Log ))]%r [[include logheader%r |summary=[get( me/SCENE-SUMMARY )]%r |location=[get( me/SCENE-LOCATION )]%r |desc=[get( me/SCENE-LOCATIONDESC )]%r ]] %r%r [[include logcastbegin]]%r [iter( get( me/SCENE-CAST ), [[include logccon name=[lcstr( name( %i0 ))] ]], %b, %r )]%r [[include logcastend]] %r%r [[include logstart]] %r%r====%r%r &SHOW_LOG_PLAIN Logging Parent <LP>= [setq( 0, get( me/%0 ))] // [ansi( hx, %[[timefmt( $02H:$02T:$02S $P, first( %q0 ))]%] )] // penn/rhost [ansi( hx, %[[timefmt( %r, first( %q0 ))]%] )] // mux [rest( %q0 )] &SHOW_LOG_WIKI Logging Parent <LP>= [rest( get( me/%0 ))]%r%r-----%r%r &SORT_LOG Logging Parent <LP>= sub( after( %0, - ), after( %1, - )) @set Logging Parent <LP>=NO_COMMAND /* ================================================================================ == LOGGING COMMANDS ============================================================ %vp is used globally as 'the logging parent' %ql is used globally as 'the logger object' (%q<logger> in penn/rhost) -------------------------------------------------------------------------------- -- Setup: Logging Commands ----------------------------------------------------- */ @create Logging Commands <LC>=10 @set Logging Commands <LC>=INHERIT @fo me=@VP Logging Commands <LC>=[num( Logging Parent <LP> )] &lock.isapproved Logging Commands <LC>=isapproved( %# ) @lock/use Logging Commands <LC>=LOCK.ISAPPROVED/1 // would be nice to have a fail message here, but not for mux // penn/rhost version also sets this no_inherit. not sure why. /* -------------------------------------------------------------------------------- -- Functions: Logging Commands ------------------------------------------------- return '1' if check passes, '0' if failed. */ &include.locate_object Logging Commands <LC>= strcat( setq( l, locate( %#, %0, Tn )), case( 0, t( %ql ), pemit( %#, I can't find an object named [ansi( hw, %0 )] at your location. )0, 1 ) ) &include.do_check_basic Logging Commands <LC>= strcat( case( 0, u( include.locate_object, %0 ), 0, match( parent( %ql ), %vp ), pemit( %#, That object is not a Scene Logger. )0, 1 ) ) &include.do_check_controls Logging Commands <LC>= case( 0, u( include.do_check_basic, %0 ), 0, controls( %#, %ql ), pemit( %#, You do not control that scene logger.)0, 1 ) &include.owns_object Logging Commands <LC>= case( 0, t( u( include.locate_object, %0 )), 0, controls( %#, %ql ), pemit( %#, That object is not yours. )0, 1 ) /* -------------------------------------------------------------------------------- -- Commands: Logging Commands -------------------------------------------------- %qc: cast to who? (%q<cast> in penn/rhost) */ &CMD-+LOG/CAPTURE Logging Commands <LC>=$+log/capture *: @assert u( include.do_check_basic, %0 ); &scene-cast %ql=[lcon( %l, connect )]; &scene-location %ql=[name( %l )]; &scene-locationdesc %ql= [ifelse( hasflag( %l, temporary ), objeval( owner( %ql ), u( %l/tempdesc )), objeval( owner( %ql ), u( %l/desc )) )]; &scene-date %ql=[time( )]; @pemit %#=Captured. &CMD-+LOG/CAST Logging Commands <LC>=$+log/cast *=*: @assert u( include.do_check_basic, %0 ); @eval [setq( c, iter( %1, pmatch( %i0 )))]; @break strmatch( %qc, *#-1* )={ @pemit %#=I can't find anyone named: [iter( %1, ifelse( t( pmatch( %i0 )), , %i0 ))]. }; &SCENE-CAST %ql=%qc; @pemit %#= [ansi( hy, OOC )]: Cast set to: [itemize( iter( %qc, name( %i0 ), %b, | ), | )]. &CMD-+LOG/DATE Logging Commands <LC>=$+log/date *=*: @assert u( include.do_check_basic, %0 ); &scene-summary %ql=[ifelse( strmatch( lcstr( %1 ), today ), time( ), %1 )]; @pemit %#=[ansi( hy, OOC: Date set to: [ansi( hw, %1 )]. &CMD-+LOG/LOCDESC Logging Commands <LC>=$+log/location/desc *=*: @assert u( include.do_check_basic, %0 ); &SCENE-LOCATIONDESC %ql= [switch( %1, here, objeval( %#, u( %l/desc )), %l )]; @pemit %#= [ansi( hy, OOC )]: Location description set to: [get( %ql/SCENE-LOCATIONDESC )].; &CMD-+LOG/LOCNAME Logging Commands <LC>=$+log/location/name *=*: @assert u( include.do_check_basic, %0 ); &SCENE-LOCATION %ql=[switch( %1, here, name( %l ), %1 )]; @pemit %#= [ansi( hy, OOC )]: Location name set to: [get( %ql/SCENE-LOCATION )].; &CMD-+LOG/MAKE Logging Commands <LC>=$+log/make *: @assert u( include.owns_object, %0 ); @break hastype( %ql, PLAYER )={@pemit %#=You can't make a player a logger!}; @assert t( %ql )={@pemit %#=I can't find an object named [ansi( hw, %0 )].}; @break match( parent( %ql ), %vp )={ @pemit %#=That object is already a scene logger. }; @parent %ql=%vp; &LOGGING %ql=0; @lock/use %ql=logging/1; @set %ql=!no_command; @listen %ql=*; @pemit %#=You have made [ansi( hw, name( %ql ))] a Scene Logger.; &CMD-+LOG/OFF Logging Commands <LC>=$+log/off *: @assert u( include.do_check_basic, %0 ); @assert get( %ql/logging )={ @pemit %#=[ansi( hw, name( %ql ))] is not logging this scene. }; @tri %ql/DO-STOP-LOG=%ql &CMD-+LOG/ON Logging Commands <LC>=$+log/on *: @assert u( include.do_check_controls, %0 ); @break get( %ql/logging )={ @pemit %#=[ansi( hw, name( %ql ))] is already logging this scene. }; @tri %ql/DO-START-LOG=%ql &CMD-+LOG/OOC Logging Commands <LC>=$+log/ooc *: @assert u( include.do_check_controls, %0 ); @tri %ql/DO-SET-LOG-OOC=%# &CMD-+LOG/RECLAIM Logging Commands <LC>=$+log/reclaim: @assert u( .isapproved, %# )={ @pemit %#=Approved characters only }; @pemit %#=[ansi( hw, OOC )]: Reclaiming all your loggers...; @dol children( %vp )={ @assert strmatch( %#, owner( %i0 )); &logging %i0=0; @tel %i0=%# } &CMD-+LOG/RETURN Logging Commands <LC>=$+log/return *: @assert u( include.do_check_basic, %0 ); @tri %ql/DO-STOP-LOG=%ql; @tel %ql=owner( %ql ); @mail/quick [name( owner( %ql ))]= Logger Returned//[name( %# )] has returned your logger to you from [name( %l )]; &CMD-+LOG/SHOW Logging Commands <LC>=$+log/show *: @break strmatch( %0, *=* ); @assert u( include.do_check_basic, %0 ); @tri %ql/DO-SHOW-LOG=%#, plain &CMD-+LOG/SHOW-LAST Logging Commands <LC>=$+log/last *=*: @assert isint( %1 )={ @pemit %#= The second argument is expected to be a number, got [ansi( hw, %1 )] }; @assert u( include.do_check_basic, %0 ); @tri %ql/DO-SHOW-LOG=%#, plain, %1 &CMD-+LOG/SUMMARY Logging Commands <LC>=$+log/summary *=*: @assert u( include.do_check_basic, %0 ); &SCENE-SUMMARY %ql=%1; @pemit %#=[ansi( hy, OOC )]: Summary set to: [ansi( hw, %1 )]. &CMD-+LOG/UNDO Logging Commands <LC>=$+log/undo *: @assert u( include.do_check_basic, %0 ); @tri %ql/DO-UNDO-LOG=%ql &CMD-+LOG/WIKI Logging Commands <LC>=$+log/wiki *: @assert u( include.do_check_basic, %0 ); @tri %ql/DO-SHOW-LOG=%#, wiki &CMD-+LOG/WIPE Logging Commands <LC>=$+log/wipe *: @assert u( include.do_check_controls, %0 ); @wipe %ql/LOG-*; @wipe %ql/SCENE-*; @pemit %#=[ansi( hw, name( %ql ))] has had its current log wiped. &CMD-+LOG/POSE Logging Commands <LC>=$+log/pose *=*: @assert u( include.do_check_basic, %0 ); @tri %ql/ahear=%1; @pemit %#=[ansi( hw, OOC )]: Pose added. /* ================================================================================ == HELP TEXT =================================================================== This text has no hard-breaks at 80 columns. Format to your liking -- BEGIN -- The +log system is used for logging of scenes in such a way that it minimizes the amount of stuff you have to clean before posting, not to mention making sure you post the log in the correct format. The scene revolves around Scene Loggers, which are plain objects that you own and re-use from one scene to the next. You never really need to have more then one. To create a <logger>, type: @create <logger> and then drop it. You can make this a scene <logger> then by typing: +log/make <logger>. Once you drop the <logger>, the following commands are available: +log/on <logger> - activate logging +log/off <logger> - deactivate logging +log/ooc <logger> - toggle if OOC communication is logged. Default: off. +log/show <logger>=X - show the current log or X lines of it. ( =X is optional. ). +log/wipe <logger> - clear the current log. +log/undo <logger> - remove the last entry in the log. Useful to repose a correction. +log/pose <logger>=<pose> - add a pose directly to the logger Before posting, you can store the scene information with: +log/summary <logger>=description - set summary of current scene +log/cast <logger>=person1 person2 .. personN - set participants in log +log/location/name <logger>=name - name of place where log takes place. 'here' gets current room name. +log/location/desc <logger>=text - description of place where log takes place. 'here' takes current room desc. +log/capture <logger> - cast, location/name and location/desc all in one handy command When you're ready to post your log, +log/wiki <logger> will show you the current log and wiki formatting. When done, just 'get' your <logger> and take it with you. If you see someone's <logger> laying around, +log/return <logger> will return it to their inventory. If you've lost your logger, +log/reclaim will teleport ALL of your loggers to your inventory whether they're in use or not. -- END -- */