Register forum user name Search FAQ

Gammon Forum

Notice: Any messages purporting to come from this site telling you that your password has expired, or that you need to verify your details, confirm your email, resolve issues, making threats, or asking for money, are spam. We do not email users with any such messages. If you have lost your password you can obtain a new one by using the password reset link.

Due to spam on this forum, all posts now need moderator approval.

 Entire forum ➜ PennMUSH ➜ Running the server ➜ Room Parent Creation

Room Parent Creation

It is now over 60 days since the last post. This thread is closed.     Refresh page


Posted by Arathor   (1 post)  Bio
Date Sat 02 Nov 2002 01:25 AM (UTC)
Message
I am trying to get started creating my world, but I have already run into some difficulty. I want to set an object as the Master Room Parent, but I am unaware of the code. I know I once was on a blooming mush, and there were lines in the code like:

&DESC_HEADER Master Room Parent= [ansi(bh,[left([repeat(~-_-,20)],79)])]

And I know what that does, but when I set it on the soon to be parent, and then parent a room to it, it does nothing. do you think you could point me in the right direction?

-Arathor
Top

Posted by Krenath   USA  (76 posts)  Bio
Date Reply #1 on Tue 25 Feb 2003 07:05 PM (UTC)
Message
The &DESC_HEADER code was part of other softcoded commands which formatted and displayed the description of the room.

Many older room parents put their own code in the parent's @DESCRIBE attribute, forcing you to put your description in another, similarly-named attribute such as &DESC1.

Newer patchlevels of PennMUSH make this unnecessary if the room parent makes proper use of the following attributes:

@NAMEFORMAT - Overrides the display of the roomname. Can contain lots of softcode to dress up the room name, show zone names, and anything else youd like to display before the description.

@DESCFORMAT (sometimes known as @DFORMAT on games that want to avoid name conflicts with @DESCRIBE) - overrides the display if the Description itself, allowing the room parent to control colors, wrapping, and whatever else you can add softcode for. Putting your formatting softcode here lets the builders just put plain descriptions in @DECRIBE without lots of extra work.

@EXITFORMAT - Inhibits the display if exits from the room, allowing you to add code that displays the exits formatted in whatever way you choose.

@CONFORMAT - Unhibits the display of room contents, allowing you to write code that displays the contents in any way you choose. You'll have to add your own support for the DARK and LIGHT flags, however.

Proper use of the above attributes can allow builders to build normally without having to use custom attributes or commands or set additional flags or do anything out of the ordinary, yet *still* benefit from all the formatting code of the room parent.

On the MUSH I help administrate, we've added some attributes for parents and zones:

@APARENT - Triggered on the *parent* when a new child is added. Allows the parent to perform setup steps or even allow the parent to determine if the child is valid and detach it if not.

@ACHZONE - Triggered on the *zone object* whenever a new item is added to the zone. Since a new room is automatically @Chzoned upon creation to the zone the builder is standing in, you could add code that would automaticall set up parents and any default attributes.

The end result could be a room that needs only digging and describing, while softcode fills out all the rest of the details with defaults. Then you can change anything you want just by overriding the defaults...


- Krenath from
bDv TrekMUSH
ATS TrekMUSH
TNG TrekMUSE
TOS TrekMUSE
Top

The dates and times for posts above are shown in Universal Co-ordinated Time (UTC).

To show them in your local time you can join the forum, and then set the 'time correction' field in your profile to the number of hours difference between your location and UTC time.


13,228 views.

It is now over 60 days since the last post. This thread is closed.     Refresh page

Go to topic:           Search the forum


[Go to top] top

Information and images on this site are licensed under the Creative Commons Attribution 3.0 Australia License unless stated otherwise.