Overriding Global Parent Room?
-
Is there a setting that allows for exitformat and conformat on a room to override the global (config file) set parent room look? I thought just setting the attribute on the room would do it, but apparently not.
Anyone?
-
@Rainbow-Bright Hopefully you'll get a better answer from someone else, but it should work the way you describe, at least for attributes. @formats might be special, though. I only have two possible suggestions if nothing better comes up:
- If it's a one-off room, don't parent it and just copy the parts you need from the parent.
- If it's for several rooms, have a parent chain, where the first parent room only has the formatting common to all rooms and then two (or more) sub-parent rooms for more specific use.
Sorry if you've already thought of this, just throwing out ideas.
-
That is how it's supposed to work;
- Config file has
room_parent
etc set to some dbref - That dbref has the conformat/descformat/nameformat/exitformat stuff set
- Newly created rooms default to the room_parent dbref for their
@parent
- To make different kinds of rooms, create new a new dbref, parent it to the main one, override attrs to taste, then set rooms to use that new object as their
@parent
. - To update existing rooms with no parent or something wrong, use
@parent
.
Note that iirc nameformat won't be used unless you are inside the object, for peculiar and largely traditional reasons. Easy to change, but it's a hardcode thing, no one wanted it or cared, and I'm not sure what changing it might break.
You can have as many layers of roomparents as you want. Usually, though-- a small set works best.
- A default room parent specified in room_parent in the config file.
- An OOC variant of that (e.g. for setting a flag to ooc, displaying people/things differently, not counting poses, formatting of posebreak/ooc chatter, etc)
- A quietroom parent that sets attrs and things needed for making quiet rooms quiet.
- A temp-rp-room parent for places that need such things.
- A code-variant of that useful for the Master Room, Zones, various db/closet rooms, etc.
Games with coded day/night/weather tend to have indoor/outdoor roomparents and so on. The more MUDlike you get, the more useful refinement of these becomes.
- Config file has
-
Currently, I have it set in the conf file:
room_attr_defaults 200
Does room_attr_defaults work differently than room_parent?
Trying to force @parent room=#200 and then overriding the formatting doesnt' seem to work. I'll try with room_parent set instead and see if it breaks the rest of the game.
-
Interesingly enough, room_parent isn't quite what I wanted and after thinking on it last night, I realized I could just toss a switch that checks to see if there is a preexisting exitformat or conformat on the room and utilize that instead.
Thanks though, somehow, I missed room_parent existing.
-
@Rainbow-Bright said:
Interesingly enough, room_parent isn't quite what I wanted and after thinking on it last night, I realized I could just toss a switch that checks to see if there is a preexisting exitformat or conformat on the room and utilize that instead.
Nnnnhhh, no, this is horrible coding. The point of parenting rooms is that the most immediate parent will give the information that you need.
As
room_attr_defaults
doesn't seem to be a config parameter, it's not going to do anything. Instead, what @Glitch and @Chime said are correct; you want to override the main room parent's @conformat by using a different parent room, or see if you're having config issues by trying:@conformat here=blah
If that doesn't work, you have a larger problem.
-
Actually, as I am using it, room_attr_defaults is a config parameter. I'm not sure where you're not seeing it as one?
-
@Thenomain said:
@Rainbow-Bright said:
Interesingly enough, room_parent isn't quite what I wanted and after thinking on it last night, I realized I could just toss a switch that checks to see if there is a preexisting exitformat or conformat on the room and utilize that instead.
Nnnnhhh, no, this is horrible coding. The point of parenting rooms is that the most immediate parent will give the information that you need.
As
room_attr_defaults
doesn't seem to be a config parameter, it's not going to do anything. Instead, what @Glitch and @Chime said are correct; you want to override the main room parent's @conformat by using a different parent room, or see if you're having config issues by trying:@conformat here=blah
If that doesn't work, you have a larger problem.
Oh, there's the quote button.
Ok, so, room_attr_defaults just picks up attributes on a thing or room (though theoretically, I wonder if there's anything preventing it from being a player object). Instead of utilizing room_parent, which is what I was not aware of for some reason (or discarded as not precisely what I needed at the time), I utilized this to hold exitformat, nameformat, conformat, and desc attributes that would proliferate across the game.
The problem, it seems, is that room_attr_defaults does not behave as it, theoretically, should. It's hard to tell what it should be doing as documentation for Tinymush in general is crap. It should, in my mind, be able to be overridden on individual rooms that overwrite that attribute. However, that does not work.
Whether, I should be utilizing room_parent or not is secondary, at the moment, to how room_attr_defaults should be working (or not be working).
-
If it's not working correctly, then the best action is to check for an existing bug report here, and adding one if it's not there.
I still can't find the
room_attr_defaults
help file.(edit: that is, please provide etc.)
-
@Thenomain said:
I still can't find the
room_attr_defaults
help file.More specifically, it isn't in the source code... at least for mux. Maybe Rhost/Peen/etc?
-
@Thenomain said:
If it's not working correctly, then the best action is to check for an existing bug report here, and adding one if it's not there.
I still can't find the
room_attr_defaults
help file.Tinymush 3.2.
-
Huh. Between @Chime, @Glitch and I, we don't really know TinyMUSH, which explains why our answers are in such disjunction with what you were expecting.
If we can't get you a good answer, Lydia might be on the Amber game, Road To Amber, and there is a support mailing list as well.
-
@Rainbow-Bright said:
@Thenomain said:
If it's not working correctly, then the best action is to check for an existing bug report here, and adding one if it's not there.
I still can't find the
room_attr_defaults
help file.Tinymush 3.2.
Definitely check the TinyMUSH docs. I'm sorry I'm too lazy to do so myself, but if I'm in a mush-oriented-codey-mood I'd better use it on Mux.
However, the fact that it is 'attr_defaults' suggests to me that it's a specification of a template object rather than a parent object-- that is, the attributes you set on the room_attr_defaults object probably get copied to the new object as a one time thing during the
@dig
and never again. This is a guess, tho. Good luck....and write back with what you discover!