Top Mud Sites Forum Return to TopMudSites.com
Go Back   Top Mud Sites Forum > Mud Development and Administration > MUD Coding
Click here to Register

Reply
 
Thread Tools
Old 10-22-2002, 07:14 PM   #1
Samson
Member
 
Samson's Avatar
 
Join Date: Apr 2002
Location: United Socialist States of America
Home MUD: SmaugMuds.org
Home MUD: Arthmoor MUD Hosting
Posts: 249
Samson is on a distinguished road
Here's an interesting one for everyone. Smaug has "B" resets in areas. What exactly are they supposed to be for anyway? mud.h has the following defines:

/* Constants for arg2 of 'B' resets. */
#define BIT_RESET_DOOR 0
#define BIT_RESET_OBJECT 1
#define BIT_RESET_MOBILE 2
#define BIT_RESET_ROOM 3
#define BIT_RESET_TYPE_MASK 0xFF /* 256 should be enough */
#define BIT_RESET_DOOR_THRESHOLD 8
#define BIT_RESET_DOOR_MASK 0xFF00 /* 256 should be enough */
#define BIT_RESET_SET BV30
#define BIT_RESET_TOGGLE BV31
#define BIT_RESET_FREEBITS 0x3FFF0000 /* For reference */

I've looked these over several times and can't figure out what possible purpose they serve. Obviously they have something to do with doors, though I can't see how this would be any easier than using the standard "D" resets for doors. So if anyone can shed some light on this, I'd appreciate it.
Samson is offline   Reply With Quote
Old 10-22-2002, 08:05 PM   #2
Ingham
 
Posts: n/a
Hmm, I'm far from being a really capable coder (so far), but what does it churn out when you grep for "BIT_RESET_" (w/o quotes)? Maybe it'll shed some light on things if you knew where those constant were being applied/used? Or maybe they are just decrepated constants?
  Reply With Quote
Old 10-23-2002, 08:02 AM   #3
Samson
Member
 
Samson's Avatar
 
Join Date: Apr 2002
Location: United Socialist States of America
Home MUD: SmaugMuds.org
Home MUD: Arthmoor MUD Hosting
Posts: 249
Samson is on a distinguished road
I took a closer look, and all these things appeared to be doing was duplicating the function of other reset commands and flag settings. I've since removed them since they appear to be unique to Smaug and none of our areas were dependent on them existing. Looks like something they were working on but never used.
Samson is offline   Reply With Quote
Old 11-03-2002, 12:39 PM   #4
jornel
Member
 
Join Date: Sep 2002
Location: Canada
Posts: 73
jornel is on a distinguished road
The B resets are designed to allow you to either set, reset, or toggle bits in either:

- The exit_info of a door
- The room_flags of a room
- The extra_flags of an object
- The affected_by of a mob

Whether you want or need this level of control seems to be up to you.  (I think 99.5% of cases don't need this degree of control).  But who knows, when you are making an automated quest and you want to kill every possible player exploit/abuse, then such control seems worthwhile.

Say you want a bolted door.  A player unbolts the door and then quits.  When the area resets, the B reset would rebolt the door.

Say you wanted an invisible sentinel mob.  A player casts dispel magic and then flees without killing the mob.  That mob would remain visible forever until someone killed it.  The B reset could re-apply the "AFF_INVISIBLE" bit.

Say you wanted a buried treasure.  Someone digs it up, but doesn't take it.  The B reset could re-apply the "ITEM_BURIED" bit.

I admit, these examples may seem strained, but I know from experience that sometimes a builder wants or needs things to be 'just so' and gets frustrated when SMAUG's default actions don't quite do what is wanted.  For this reason, I would recommend leaving the capability of doing 'B' resets intact.  Besides, removing it doesn't save you anything.
jornel is offline   Reply With Quote
Reply


Thread Tools


Smaug "B" resets - Similar Threads
Thread Thread Starter Forum Replies Last Post
Surviving theme resets? Brody Roleplaying and Storytelling 4 06-14-2006 08:38 PM
Smaug bug Samson MUD Coding 0 10-23-2002 07:57 AM
Ranking List Resets Synozeer Bugs and Suggestions 3 09-22-2002 10:51 PM
smaug Blank Deed Newbie Help 3 07-24-2002 12:19 PM
Resets Keljorian MUD Builders and Areas 1 05-09-2002 04:59 AM

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off

All times are GMT -4. The time now is 12:21 PM.


Powered by vBulletin® Version 3.6.7
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Style based on a design by Essilor
Copyright Top Mud Sites.com 2014