Parent Room Problems

  • Coder

    I'm coder for a game using MUX, and I'm having trouble with parent rooms. I want the ConFormat to show a list of who's connected, their idle time, and their &shortdesc.

    Tidy list of names? Check. Idle times? Check. &shortdesc? #-1 PERMISSION DENIED.

    It works fine when I'm on my wizbit, but when I switch over to a regular player character, I get permission denied even on my own &shortdesc. I've set the room INHERIT, !INHERIT, ROYALTY, !ROYALTY, etc., and fiddled around with objeval(), but nothing changes.

    (I'm also totally unable to get u(#some other object/attribute) to work, which I assume is related. But since I can just copy the attributes over to the parent room object and use u(attribute), it's not a big deal.)

    Help? I don't have a lot of experience with parent rooms, so feel free to point and laugh at whatever ridiculously simple thing I've overlooked.

  • I'm having a similar issue on my little pennmush server. I usually get the Huh? reply when I make interactive objects.

    When I copypasta from, I get arguments must be intergers quite often.

    Many things get nuked.

  • Speaking about TinyMUX only:

    To do it purely through @ConFormat every single room on the game will need to beset INHERIT, because it is the room itself running the code, not the parent.

    You can create a global function with @function that can fetch this information on behalf of the room. See; "wizhelp @function". The function will need to be /privileged.

    Use this with caution. The function running with wizard privileges will be able to see contents that are DARK and on reality levels other than the observer. Off the top of my head I don't recall if the enactor will be the room or the observer.

    With the function being global, anyone will be able to use it. If it turns out that the enactor is the room you could write the function to verify that the enactor is in fact a room, but a player could just use a room they control to run the function.

  • Coder

    The following mess of code is from Eldritch's parent room:

    Main Room Parent
    %r%tThis is an un-@desc'd room!%r
    Owner: Code Wizard  Key: *UNLOCKED* Pennies: 0
    NameFormat: wheader( name( %! ))
    DescFormat: strcat( %0, if( cor( get( %!/placesmax ), places( list, %! )), strcat( %r, wrap( Places are active here. Use '%xhplaces%xn' and '%xhplace #%xn' to see descriptions., width( %# ), c ), %r )), )
    ConFormat: strcat( if( 0, strcat( setq( u, setdiff( lcon( %!, connect ), iter( %qp, elements( %i0, 4, : ), | ))), if( t( %qu ), strcat( setq( c, 1 ), wdivider( Unplaced Characters ), %r, u( display.allchars, %qu ))), iter( %qp, if( setr( t, elements( %i0, 4, : )), strcat( if( t( %qu ), %r, setq( c, 1 )), wdivider( strcat( elements( %i0, 1, : ), .%b, capstr( elements( %i0, 2, : )))), %r, u( display.allchars, %qt ))), |, @@ ))), if( setr( 1, filter( fil.notdark, lcon( %!, player ))), strcat( setq( c, 1 ), wdivider( Characters ), %r, u( display.allchars, %q1 ))), if( setr( o, filter( fil.notdark, lcon( %!, object ))), strcat( if( %qc, %r, setq( c, 1 )), wdivider( Objects ), %r, u( .vtable, map( map_stuff, %qo, %b, | ), 0, | ))), if( 0, strcat( if(  %qc, %r ), wdivider( +Views in this location ), %r, u( .vtable, %qv, 0, | )) ))
    ExitFormat: strcat( if( setr( 1, filter( fil.dir, filter( fil.notdark, lexits( %! )))), strcat( wdivider( v( directions_name )), %r, u( .vtable, map( map_exit, %q1, %b, | ), 0, | ), %r )), if( setr( 1, filter( fil.exit, filter( fil.notdark, lexits( %! )))), strcat( wdivider( Exits ), %r, u( .vtable, map( map_exit, %q1, %b, | ), 0, | ), %r )), wfooter( if( u( .isic, %! ), cat( IC Area -, get( %!/coord )), OOC Area)))

    Some is missing, but you get the idea. We are using an edited version of @Chime's parent room code from The Reach. Both available upon request.

  • Coder

    Thank you! Used a @function to grab the shortdesc, and it's working fine now. I incorporated objeval() into it, which should prevent most mischief.

  • Not sure if it works on MUX but you can also make an attribute visual, which means anyone and anything can see it with ex or get() as well.

  • Coder

    @Bobotron said:

    Not sure if it works on MUX but you can also make an attribute visual, which means anyone and anything can see it with ex or get() as well.

    That's what was done on TheReach.

    Setting attributes visual is persistent in the DB and global across all objects.

  • @Chime
    Yeah, it's how my Room Parent on TheatreMUSH handles form tags and Virtual NPCs, and is especially useful for player builds that might have issues with having a function call or some other power. It's also not something that is easily abusable.

Log in to reply

Looks like your connection to MU Soapbox was lost, please wait while we try to reconnect.