Moving Room Description/Notes into main Room Code

User avatar
SlySven
Posts: 1023
Joined: Mon Mar 04, 2013 3:40 pm
Location: Deepest Wiltshire, UK
Discord: SlySven#2703

Moving Room Description/Notes into main Room Code

Post by SlySven »

At present it is possible to store a MUD Room description and arbitrary notes in RoomUserData - what would be the implications to moving these particular possible data items explicitly into the main code structure of the Room data? I would like this so that access/corrections could be made easily through a right-click on a map-room (to a "properties" menu choice perhaps?) I guess that it ought to be possible to achieve such access with scripts in the existing code base but I wonder if this (e.g. a getRoom{Desc|Note} & setRoom{Desc|Note} pair of pair of commands) would be of interest to more than a small percentage?

In passing I would note that I have visions of hashing a numerical index from the text of the description data to speed up identification of the room I am in where a MUD has multiple rooms with the same room name but much less duplication of descriptions and I feel this would be faster in C++ than LUA. :geek:

User avatar
chris
Posts: 493
Joined: Fri Jun 17, 2011 5:39 am

Re: Moving Room Description/Notes into main Room Code

Post by chris »

You can do this already with the map menu hooks.

User avatar
chris
Posts: 493
Joined: Fri Jun 17, 2011 5:39 am

Re: Moving Room Description/Notes into main Room Code

Post by chris »

Something that I think would be cool though is to have a room properties menu that contained a table of the user data key values, the exit info, etc. Basically combine the menu items that make sense to into a single option.

User avatar
Vadi
Posts: 5042
Joined: Sat Mar 14, 2009 3:13 pm

Re: Moving Room Description/Notes into main Room Code

Post by Vadi »

I'd prefer to make the generic solution work, rather than hardcode every new option in.

User avatar
chris
Posts: 493
Joined: Fri Jun 17, 2011 5:39 am

Re: Moving Room Description/Notes into main Room Code

Post by chris »

What do you mean by generic solution?

User avatar
SlySven
Posts: 1023
Joined: Mon Mar 04, 2013 3:40 pm
Location: Deepest Wiltshire, UK
Discord: SlySven#2703

Re: Moving Room Description/Notes into main Room Code

Post by SlySven »

Are room "Descriptions" an add-on though? For a text playing environment I'd say they were a pretty fundamental aspect! They are also something (MUD creators dependent) that can be a stable part of a MUD which for some can be grabbed and used to identify a player's position in that environment. ;)

Notes are different I suppose, but if one is documenting a MUD (possible to share that information to others) it is sometimes that you'd want more than a short text label on the Map - besides I think it is currently not possible to edit the text that one might put onto a Map label (though if I have that wrong I can stand correction - if right, something for the future development blueprints...) - whether a data item such as "notes" is significant enough to bring into a designated item in the Room structure is what I've opened this topic to hear the discussions for and against. :D

I can see Chris's idea for a room properties dialogue - in a separate topic / bugtrack I've got some suggestions for the exit dialogue which I'm working on which touches on that I think. I get the idea of using part of a room properties dialogue for display/edit of all the items stored under the roomUserData - simplest would be a two column table of keys and values. I know that Filion (I'd know him as Groderick) is storing "desc" keyed room descriptions in that place and also door names using (full, unspace, all lowercased) exit words as keys, for the Wheel of Time MUD mapper (s?)he's developing.

The trade off as I see it is between adding hard-coded elements to the Room/Area structures with specific access code which may be of interest to only a small portion of users but can be optimised for their (the elements) use and the "generic" roomUserData which can be customised for a range of purposes but which each user will have to develop or source scripts to use for the way they want.

User avatar
chris
Posts: 493
Joined: Fri Jun 17, 2011 5:39 am

Re: Moving Room Description/Notes into main Room Code

Post by chris »

Descriptions exist within the room user data. I don't see why that is an issue having them there since there isn't an limit to what you can store in the user data. instead of doing setRoomDescription(...) you do setRoomUserData(...)

I think having a general room properties that encompasses exits, custom lines, color, letter, lock, weights, and user data would be nice, reduce the clutter in the right click menu, and be just as time consuming as the current setup. The room properties dialog can be a tabbed or grid layout.

User avatar
Vadi
Posts: 5042
Joined: Sat Mar 14, 2009 3:13 pm

Re: Moving Room Description/Notes into main Room Code

Post by Vadi »

Room descriptions aren't important to me at all, in fact I don't even track them. MUDs I play give me GMCP coordinates and the room ID I'm in, so I'm never lost.

By a more generic solution I meant make the right-click menu be scriptable - but chris' has already done this, so... hm... what am I missing?

User avatar
SlySven
Posts: 1023
Joined: Mon Mar 04, 2013 3:40 pm
Location: Deepest Wiltshire, UK
Discord: SlySven#2703

Re: Moving Room Description/Notes into main Room Code

Post by SlySven »

@Vadi: At least one MUD (with perhaps coders in absentia) does not offer such interesting features such as GMCP - and keeping track of where you are is an issue, I speak of WoTMUD but I'd be surprised if that was the only one. Comparing your location by Room Name alone doesn't work e.g. you might have a series of twenty or more connected rooms all called "The Old Road" and searching on Room Description does cut down (but does not eliminate, sadly) the ambiguity about where you might be located; that particular MUD does also have situations that can place you almost anywhere in the whole world (try to "travel" = teleport beyond your capabilities and you will "misport"). The longest room description I've found so far in that MUD ("The Study of The Brown Ajah" for those interested BTW) has 13 lines of text - though the Creator's design recommendations to his Immortals recommends an averages 4 lines of a maximum of 78 printable characters per line. That will be a load of text to search through so I'd hope to include some sort of indexing/search for (entire) descriptions as well as names and of course this would be faster in native C++ rather than interpreted LUA scripts however it is done, IMHO. Bringing descriptions into the room data structure strikes me to be part of that unless we have some really efficient search facilities made available to or scripted by skilled users, for the room user data.

@Chris: I do see some scope for stuff there, is it possible to build tabbed dialogues with Geyser? I envision a way to select particular room user data items or groups of them to put on particular tabs perhaps with a final hide-able "other" tab for everything not to be shown or not otherwise chosen (depending on where it is currently hidden or not).

User avatar
chris
Posts: 493
Joined: Fri Jun 17, 2011 5:39 am

Re: Moving Room Description/Notes into main Room Code

Post by chris »

Searching user data is done in c++. There aren't any speed issues here and what are you asking for exists already through the user data. I play a non gmcp mud as well (3scapes) and use room descriptions to find myself.

Post Reply