ID:154187
 
I'm trying to think of a good way to have a usual setup where any room in a text-based MUD can contain descriptions for objects that don't really exist. For example, maybe a room is described like this:

Yards of carpet stretch out in all directions from
beneath the vast oaken table that dominates the center of
the great room. The warm glow of torches circles the entire
hall save for the back wall upon which a half-dozen banners
are arrayed, and where a massive hearth burns continually.
I don't especially want to discuss the quality of that description (wrote it in 30 seconds, you know), but suppose a player in the room wants to take a closer look at the banners at the back. Ideally, I'd use associative lists to just give each item in the list a description (or link to one), such as:

viewables["banners"] = "GreatHallBanners" which would link to the "GreatHallBanners" description in 'castle.txt'. But, since there is a limit of 60,000some lists in any BYOND game, that number would get filled rather quickly if each room contained a list of all viewable objects.

Does anyone have any alternative ideas that I could use to contain information like this?
I think that looking at things would be done in user time. The built-in list is nice for speed, but users would be looking at things rather slowly. I think you can make your own linked lists or trees or whatever and not have to worry much about performance unless you have many many users on at once.
Foomer wrote:
<code>viewables["banners"] = "GreatHallBanners"</code> which would link to the "GreatHallBanners" description in 'castle.txt'. But, since there is a limit of 60,000some lists in any BYOND game, that number would get filled rather quickly if each room contained a list of all viewable objects.

Does anyone have any alternative ideas that I could use to contain information like this?

Sure, a couple.

The first is to use a simple text variable for the information.

room/viewables = ":banners:This is the banner description.:"

So when someone used the examine verb or whatever, it'd search viewables for ":[argument]:" and give them everything until the next colon. Or you could use a text-to-list proc to make lists on the fly out of a text variable.

Another option is to use datums.

datum
Viewable
var/desc

And put them in the room. Then you could allow D as datum in area as an argument for your look verb, but your other, more interactive verbs, just atoms.

Z