Code Request: RP Nexus
-
I need a RP Nexus type thing. Nothing I googled looked quite right and the ones I have in my store of old MU*code are pretty dated. (Maybe I'm searching for the wrong thing - "RP Nexus", "Roleplay Nexus", "RP rooms", etc. "Temprooms" is not what I'm looking for - I only want this thing opening rooms in one location.) If anyone has one they'd like to share here, I'd be grateful to the tune of 1,000 internets!
This is hopefully the last major code request I've got. Trying not to reinvent the wheel but if no one comes up with anything I'll write one - it seems fairly straightforward. I have a hope there's a repository somewhere that I've missed with the relevant code in it, though. It would save me time/labor and a coder who is not lazy is not a proper coder.
Thanks!
-
You can set up temp rooms so it only works in certain locations. Otherwise, dig a room, dig a bunch of rooms off that room, and you're done.
-
Are you looking for code to list which rooms are occupied?
Just
@dig
a room, then set its@exitformat
to list the exits and the number of people in each linked RP room.Might be worth setting up code to scoot disconnecting people back out of RP rooms too.
-
@Chime More like what @Thenomain described - a room which creates temporary rooms on command, so that players can have a private place to RP without @digging their homes or popping up floating rooms everywhere.
Reasons: Build projects take longer to get approved, no one wants to @dig the rooms for their trip to Miami, sometimes you just want to use a place that isn't part of the regular grid so nobody can just walk right in, etc. Plus, RP Nexuses are accessible to unapproved players, which can be handy for pre-approval RP.
Temprooms looked like a bit of overkill for what I'm doing but I'll try it out. Looks like it does do what I need it to without putting it on the entire grid.
-
@Melpomene
Can people just @create object as 'my house' and go from there until their build project is taken care of? -
@Melpomene said:
Temprooms looked like a bit of overkill for what I'm doing but I'll try it out. Looks like it does do what I need it to without putting it on the entire grid.
I looked at the code and what you want is here:
&d.zone-include trm=#64 #65 #66 #67 #120
Those are Zone Master Objects (ZMOs).
You could alternatively leave that entirely blank and use, just beneath:
&d.room-include trm=#1124
This was Darkwater's RP Nexus. I am not 100% this is what the system wants, but I am 80-90ish-% sure.
-
@Bobotron Honestly I'm not sure. It's a new game, the buildstaffers are stil working on policy. They might decide that digging your own is fine; they might decide that floating rooms are clutter... I don't even have a clue. I will note that on some games I've played, buildstaff controlled the quota with an iron fist - @digging was verboten unless you had a project in the Build Nexus and nobody but NOBODY could RP there. I doubt this game's buildstaffers would be that bad - they're too nice! - but the gods have decreed that there should be a RP Nexus so the players won't have to resort to @digging their own.
@Thenomain OK, I'm giving this a shot. It took a bit of kicking - I found two bugs - but I believe I have it working. Below is the fixed +temproom function - two of the @asserts returned 0s for valid values, and the @trigger didn't specify what object had the trigger - since no @parent was specified I just went with an explicit call, set up during the install process.
Also: I got 90% of the way through implementing this as a RP Nexus only, and one of the gods told me that they actually want +temprooms available everywhere, to anyone. D'oh! So yes, +temprooms is exactly what I needed. Working on that.
These are the changes I made, in case anyone wants them:
&c.temproom trm= $^\+?temproom (.*)$: @assert [or( isstaff( %# ), u( f.valid-room?, loc( %# )))]= { @pemit %#= You're not in a location that can take a temproom. } ; think >> [setr( s, u( f.scrub_name, %1 ) )] %r >> [setr( n, u( f.format.roomname, %qs ) )] %r >> [setr( e, u( f.format.entrance, %qs ) )] %r >> [setr( x, u( f.format.exit, %qs ) )] ; @assert valid( roomname, %qn )= { @pemit %#= u( .msg, temproom, I can't take that name for a temproom. ) } ; @assert valid( exitname, %qn )= { @pemit %#= u( .msg, temproom, I can't make that name into a good exit name. ) } ; @assert not(t( match( elements( %qe, 2, %; ), v( d.illegal-anagrams ))))= { @pemit %#= u( .msg, temproom, The exit name would be too close to commonly used commands. ) } ; @assert not(cor( t( locate( %#, elements( %qe, 2, %; ), E )), t( locate( %#, elements( %qe, 3, %; ), E ))))= { @pemit %#= u( .msg, temproom, That would create an exit with an identical name as an exit in that room. ) } ; @trigger [v(d.digger)]/tr.dig-room= loc( %# ), %qn, %qe, %qx, %# ; @eval u( f.monitor, temproom: [name( %# )] creates "%qs" off [name( loc( %# ) )] ( [loc( %# )] )) ;
-
Thanks! I will try to fold in the bug fixes tonight. You can report any more here, or to me, or on the github. Whatever works.
-
@Melpomene
That's why I suggested @create'd objects. You, as staff, can wander around and nuke them, force them to go home (which puts them in peoples' inventory) and such thing as stopgap measures.