Phantasmal MUD Lib for DGD
|
Phantasmal Site > Design > OLC Attributes Attributes for On-Line CreationOn-Line Creation (OLC) is used extensively in Phantasmal. Normally, all features of Phantasmal are first enabled by allowing them to be used from the command line. The @make_room command and its derivatives can make this especially easy. The first generation of @make_room code, while simple, was not very general. It used a lot of hardcoded checks and repetitive code to make sure, for each question that it asked, that a reasonable answer was given. Fundamentally, for every question it asked, @make_room would give an initial summary of the question (along with a prompt) and wait for a response. If the response was considered unacceptable for some reason, @make_room would explain why and then prompt again for data. At any time, 'quit' could be typed to exit @make_room mode and return to the standard command line. There were some odd concerns. Inheritance, for instance, required a user to be able to enter special values to indicate that the value should simply be inherited from the appropriate parent(s). Being able to edit the object again afterward was difficult as well, since there was no equivalent @edit_room command. State has functions to return:
|