Query: ExitDescriptions v1.0 Release - Give exits in-room descriptions just like objects!

Is there an updated version of this? In the post, the author said a couple of days and it would be posted so that the exits have links again. It looks really cool, and I was wondering myself what the best way to add would be.


Can you link to the post? I had been craving that sort of thing for exits forever, myself.


Do you mean something like this, where you put the exit description in the room description???
You step into the living room and see the door to the east, going to the kitchen, closed again. But you know you left it open just a moment before.


@Darklizerd, no this was done on the exit object. So where it listed "you can go, north, south, east, west." His demo game had "there is a dirt path to the North," "A bridge crosses over the river to the east," "The rockface to the south looks climbable," "You could probably squeeze through that tunnel to the west."

Type of thing, but I ust made those up.

@Jennifer, I'll look for the forum article and link!

Took forever to find!! His demo is short and has fun descriptions! https://textadventures.co.uk/forum/samples/topic/6izrcq2-pku7ytuaodzwla/exitdescriptions-v1-0-release-give-exits-in-room-descriptions-just-like-objects#341eccef-8968-4f2f-adc0-b26fb972b807


I did reply with some code off the top of my head so you could include {exit:this} in the descriptions to make links work; and the exit would only be removed from the default "You can go:" list if it included a link. No idea if my code would work or not; but it might be worth trying.


Thanks mrangel!

I did see that. I'm wondering whether or not to try using it that way. But I wondered if the author had instead added those two checkboxes you'd recommended.

I am playing with other people's existing libraries, but still limited in my knowledge.

I can add additional code to Pixie's CombatLib because it calls regular html documents. But I don't know how to edit or create .aslx libraries from scratch.

I've got your suggestions saved in my notes though in case I do have to figure out how to do it myself haha. I'll just copy and paste the whole thing into a Pixie Library and update as needed if I have to. Once I know how.

In the mean time, I was just wondering if the author had done the work already, since I'm working on other aspects of my game/code.

Thanks for always being there and being so great mrangel!


I did see that. I'm wondering whether or not to try using it that way. But I wondered if the author had instead added those two checkboxes you'd recommended.

I think the way the original author did it is a little different from mine.
But off the top of my head, here's a first guess at what mine would look like wrapped in a library, and with the checkboxes in the editor. (I don't have the Windows version of Quest on this computer for testing; so this is complete guesswork)

<?xml version="1.0"?>
<library>
  <function name="FormatExitList" type="string" parameters="preList, list, preFinal, postList"><![CDATA[
    result = ""
    // first, the ones with descriptions
    foreach (item, list) {
      linkedexits = NewObjectList()
      if (HasString (item, "inroomdescription")) {
        desc = item.inroomdescription
        if (IsRegexMatch ("\\{.+\\}", desc)) {
          game.text_processor_this = item
          desc =  ProcessTextSection (desc, QuickParams ("linked_exits", linkedexits))
        }
        if (not ListContains (linkedexits, item)) {
          if (GetBoolean (item, "inroomdescriptionlink")) {
            if (Instr (desc, item.alias) > 0) desc = Replace (desc, item.alias, "{exit:" + item.name + "}")
            else desc = "{exit:" + item.name + ":" + desc + "}"
            list add (linkedexits, item)
          }
          else if (GetBoolean (item, "nolink")) {
            list add (linkedexits, item)
          }
        }
        result = result + desc + " "
      }
    }
    result = LTrim(result)
    listFiltered = ListExclude (list, linkedexits)

    // Process exits without descriptions
    listLength = ListCount(listFiltered)
    if (listLength > 0) {
      count = 0
      result = result + " " + preList + " "
      foreach (item, listFiltered) {
        result = result + GetDisplayNameLink(item, "exit")
        count = count + 1
        if (count = listLength - 1) {
          result = result + " " + preFinal + " "
        }
        else if (count < listLength) {
          result = result + ", "
        }
      }
      result = result + postList
    }
    return (result)
  ]]></function>

  <function name="ProcessTextCommand_Exit" type="string" parameters="section, data"><![CDATA[
    exitname = Mid(section, 6)
    // Was 'GetObject', which is silly. Should use the more appropriate function
    exit = ObjectForTextProcessor(exitname)
    if (exit = null) {
      return ("@@@open@@@" + ProcessTextSection(section, data) + "@@@close@@@")
    }
    else {
      // Makes a list of linked exits that the calling function can check
      if (not DictionaryContains (data, "linked_exits")) dictionary add (data, "linked_exits", NewObjectList())
      list add  (DictionaryItem (data, "linked_exits"), exit)
      verbs = GetDisplayVerbs(exit)
      alias = GetDisplayAlias(exit)
      command = LCase(StringListItem(verbs, 0)) + " " + alias
      style = GetCurrentLinkTextFormat()
      return ("<a style=\"" + style + "\" class=\"cmdlink exitlink\" data-elementid=\"" + exit.name + "\" data-command=\"" + command + "\">" + alias + "</a>")
    }
  ]]></function>
  
  <tab>
    <parent>_ExitEditor</parent>
    <caption>[EditorObjectSetupInroomdescription]</caption>
    <onlydisplayif>game.appendobjectdescription</onlydisplayif>
  
    <control>
      <caption>[EditorObjectSetupInroomdescription]</caption>
      <controltype>textbox</controltype>
      <attribute>inroomdescription</attribute>
    </control>

    <control>
      <controltype>label</controltype>
      <caption>By default, the "in room description" will be displayed before the regular "You can go:" links. Exits which have a link in their in-room description (using {exit:this} or the checkbox below) won't be displayed again in the list.</caption>
    </control>

    <control>
      <caption>Make the description a link. (If the exit's alias appears in its description, the alias will be turned into a link; otherwise the whole description will)</caption>
      <controltype>checkbox</controltype>
      <attribute>inroomdescriptionlink</attribute>
    </control>
      
    <control>
      <caption>Removes this exit from the "You can see:" list whether or not its in-room description contains a link.</caption>
      <controltype>checkbox</controltype>
      <attribute>makeobjectdescriptionlink</attribute>
    </control>
  </tab>
</library>

Mrangel, you're a wonder!

I'm going to copy and paste this code and give it a try in my "Test" game when I get a chance!


I thought this sort of thing already existed.
If you go into the exit object of the room on the 'exit tab', you will notice boxes labelled 'Prefix' and 'Suffix' so you could have

You can go [prefix] down a corridor leading south, west [suffix] across a narrow ledge and [prefix] over a deep ravine north [suffix] across a rickety old bridge.

You can choose to put in either the prefix or suffix, or both.


I thought this sort of thing already existed.
If you go into the exit object of the room on the 'exit tab', you will notice boxes labelled 'Prefix' and 'Suffix' so you could have

Good point… I should have seen that option sooner. Do the prefix and suffix get used anywhere else?


Do the prefix and suffix get used anywhere else

I don't think they do. I think they are just specific to that rooms exit. I would imagine that if the exit became visible, or invisible or locked, during the game so description would change. The text processor commands {...} work inside the prefix/suffix boxes


I can find a couple of use cases where inroomdescription would be more flexible, but they're all pretty niche and contrived
situations that are very unlikely to come up in a real game (such as having an exit whose alias doesn't appear in its description; or wanting an exit to be described without a link).

So… yeah. Use the prefix and suffix.


But it would be exciting if the arrows, themselves, could have. Hover descrions, or "look".


hmmm. do you mean the description, or do you mean matching the link and grid colors?


You know, I had not thought of matching the grid rooms and arrow colours, but that would be neat. Really, what I meant I would want is not a verb list for arrows on the compass, but even just "look" or "inspect" when hovering over an arrow that could lead to a script or text being activated.


interesting idea. Like "display in inventory" verbs on objects? Only it would be "display when hovering over compass" hmm... I have no idea what that code looks like.


It took me a while to find this, because I just now realized I'd put it in the wrong forum!

So sorry that this wasn't in the "Libraries" forum.

I copy-pasted mrangel's proposed library above, and found that it didn't seem to create a new tab to edit exit descriptions, nor did it add fields in extant tabs that I'd noticed.

But he did say that he'd thrown the proposed library together off the cuff. My next step in looking at this will be to see if I can make a derivative by grabbing mrangel's boxes from his library code, and adding them under the tab that exists in the other guy's library.


Of course dr.agon might be right that we should just use prefix and suffix for the sake of ease.


I copy-pasted mrangel's proposed library above, and found that it didn't seem to create a new tab to edit exit descriptions, nor did it add fields in extant tabs that I'd noticed.

Did you enable "in room descriptions" on the features tab?


That might be the issue. There doesn't seem to be a features tab on the Exit editor. Only "exit" and "Attributes"


In-room descriptions are enabled through the game's features tab.


I'm such an idiot!

I forgot when I made the "mrangelexitdesctest" game that there had been "Game" "features" I'd enabled for my other game sandboxes!

Thank you Mr. Angel!

Yes, the in-room description tab is now there and populates with your boxes!

But running the game gave me this error:

Error running script: Error compiling expression 'IsRegexMatch ("{.+}", desc)': SyntaxError: Unexpected character: "Line: 1, Column: 15
Error running script: Error compiling expression 'LengthOf(line) > 0': FunctionCallElement: Could find not function 'LengthOf(Object)'
Error running script: Error compiling expression 'LengthOf(desc) > 0': FunctionCallElement: Could find not function 'LengthOf(Object)'


Ugh… escaping error.
Not sure, but I think the line if (IsRegexMatch ("\{.+\}", desc)) {
should be if (IsRegexMatch ("\\{.+\\}", desc)) {

I didn't realise that the forum swallows extra backslashes, making it extra hard to paste code.


It seems to have helped, but produced a new error lower down:
Error running script: Error compiling expression 'ListCount(listFiltered)': Unknown object or variable 'listFiltered'
Error running script: Error compiling expression 'LengthOf(line) > 0': FunctionCallElement: Could find not function 'LengthOf(Object)'
Error running script: Error compiling expression 'LengthOf(desc) > 0': FunctionCallElement: Could find not function 'LengthOf(Object)'


Error running script: Error compiling expression 'ListCount(listFiltered)': Unknown object or variable 'listFiltered'
Error running script: Error compiling expression 'LengthOf(line) > 0': FunctionCallElement: Could find not function 'LengthOf(Object)'
Error running script: Error compiling expression 'LengthOf(desc) > 0': FunctionCallElement: Could find not function 'LengthOf(Object)'

This error found in the line:
listFiltered = ListExclude (list, linkedexits)


Yes, that changed it so no error appears upon startup.

This makes for a good tutorial in sleuthing errors and making corrections.

So now the tab is there, has the checkboxes and in-room description field, however the boxes don't seem to do what they say they do.

When both boxes are checked, I get:
A slippery tunnel heads south through a maze of fetid sludge. You can go south.
No link in either.

When I believe the intent with both boxes checked would be that the "south" in the description would turn into a link, and the "you can go south" would be dropped.

I'm imagining that at least one of these checkboxes is meant to set an attribute on the object?

Makeobjectdescritpionlink is set to True
anonymous is set to true
visible is grey and true
scenery is grey and false
lookonly is grey and false

If I manually set anonymous to false, it does nothing
same if I set makeobjectdesciptionlink to false manually

The description reads the same either way.

Is this because we're overriding some function deeper in the game code that has additional code related to exits we might not be aware of?


I can't believe how many careless mistakes I've made in this thing.

We had

<attribute>makeobjectdescriptionlink</attribute>

where it should be:

<attribute>inroomdescriptionlink</attribute>

so that the attribute set by the tickbox is the same as the one the code is looking for.

The way this code works is that if the object's alias is south, it should render your example line as something like:

A slippery tunnel heads south through a maze of fetid sludge.

The second checkbox will have no effect if you check both of them. Although now I think about it, you probably want one with the opposite effect as well.

You could have got the same output by making the in room description A slippery tunnel heads {exit:this} through a maze of fetid sludge.; or put the link elsewhere with something like A {exit:this:slippery tunnel} heads south through a maze of fetid sludge. (in which case the checkboxes won't do anything)

Is this because we're overriding some function deeper in the game code that has additional code related to exits we might not be aware of?

No; all the code from the original function is included in the new version. Of course, this is code written a long time ago and I'm very much out of practice these days… I guess it's only natural that I've forgotten some bits of how stuff works.


... mrangel... are you the creator of Quest?!

I hadn't thought of it before, but if you are, you're more amazing than I thought. I can't tell you how excited I've been since I discovered that someone made it possible to build our own text adventure games!

I figure if there are careless mistakes in your suggested library, then you were probably tired when you made it up off the top of your head. Also, you did say that you hadn't had access to the desktop version at the time and couldn't test it yourself.

I'm going to go in, revise your code as you suggested, and give it a whirl. Speaking of your code, I hadn't looked closely at the second checkbox, but had imagined it was for making the "you can go south" disappear. Now I see that it isn't. I'm curious whether there's a way to do that. If the link is in the description, one doesn't really need the summary to remind them they can go south. hmm. Anyway, thanks again for sharing your awesomeness.


Ok, we're making progress little by little, and I'm loving it because I'm learning along the way.

So after the correction, it seems to do some of what was proposed?

With nothing checked:
the exit in the first room says "A slippery tunnel heads South through a maze of fetid sludge."

            The south is a link until clicked on and becomes not a link after room 2 is printed.

            From in room 2 under these conditions, it now says "There is a pristinely clean staircase... wait... what?  You can go north."

           Neither the description nor the "you can go north" have links.

Now checking the first checkbox results in:

           The same results for the exit in Room 1
            {exit:exit2:There is a pristinely clean staircase... wait... what?}  Being printed in room 2 with no links.

Checking the second checkbox results in:

           The same as not checking any checkbox.

Here's hoping that you're having a great evening!


... mrangel... are you the creator of Quest?!

No. Just another user; but I've played around with modifying the core functions quite a bit over the last few years (and a couple of bits of code I posted on the forums have been included in the core libraries in versions 5.7.2 and 5.8)

Speaking of your code, I hadn't looked closely at the second checkbox, but had imagined it was for making the "you can go south" disappear.

It was supposed to be. However, the "You can go south" should also disappear if there's already a south link in the description.

{exit:exit2:There is a pristinely clean staircase... wait... what?} Being printed in room 2 with no links.

Ah… that's confusing.

Facepalm I assumed that {exit: works the same way as {object:, but apparently not.

Let's fix this:

<?xml version="1.0"?>
<library>
  <function name="FormatExitList" type="string" parameters="preList, list, preFinal, postList"><![CDATA[
    result = ""
    // first, the ones with descriptions
    foreach (item, list) {
      linkedexits = NewObjectList()
      if (HasString (item, "inroomdescription")) {
        desc = item.inroomdescription
        if (IsRegexMatch ("\\{.+\\}", desc)) {
          game.text_processor_this = item
          desc =  ProcessTextSection (desc, QuickParams ("linked_exits", linkedexits))
        }
        if (GetBoolean(item, "forcelinkinlist") or not ListContains (linkedexits, item)) {
          if (GetBoolean (item, "inroomdescriptionlink")) {
            if (Instr (desc, item.alias) > 0) desc = Replace (desc, item.alias, "{exit:" + item.name + "}")
            else desc = "{exit:" + item.name + ":" + desc + "}"
            if (not GetBoolean(item, "forcelinkinlist")) list add (linkedexits, item)
          }
          else if (GetBoolean (item, "nolinkinlist")) {
            list add (linkedexits, item)
          }
        }
        result = result + desc + " "
      }
    }
    result = LTrim(result)
    listFiltered = ListExclude (list, linkedexits)

    // Process exits without descriptions
    listLength = ListCount(listFiltered)
    if (listLength > 0) {
      count = 0
      result = result + " " + preList + " "
      foreach (item, listFiltered) {
        result = result + GetDisplayNameLink(item, "exit")
        count = count + 1
        if (count = listLength - 1) {
          result = result + " " + preFinal + " "
        }
        else if (count < listLength) {
          result = result + ", "
        }
      }
      result = result + postList
    }
    return (result)
  ]]></function>

  <function name="ProcessTextCommand_Exit" type="string" parameters="section, data"><![CDATA[
    exitname = Mid(section, 6)
    alias = ""
    colon = Instr (exitname, ":")
    if (colon > 0) {
      alias = Mid (exitname, colon + 1)
      exitname = Left (exitname, colon - 1)
    }
    exit = ObjectForTextProcessor(exitname)
    if (exit = null) {
      return ("@@@open@@@" + ProcessTextSection(section, data) + "@@@close@@@")
    }
    else {
      // Makes a list of linked exits that the calling function can check
      if (not DictionaryContains (data, "linked_exits")) dictionary add (data, "linked_exits", NewObjectList())
      list add  (DictionaryItem (data, "linked_exits"), exit)
      verbs = GetDisplayVerbs(exit)
      if (alias = "") alias = GetDisplayAlias(exit)
      command = LCase(StringListItem(verbs, 0)) + " " + GetDisplayAlias(exit)
      style = GetCurrentLinkTextFormat()
      return ("<a style=\"" + style + "\" class=\"cmdlink exitlink\" data-elementid=\"" + exit.name + "\" data-command=\"" + command + "\">" + alias + "</a>")
    }
  ]]></function>
  
  <tab>
    <parent>_ExitEditor</parent>
    <caption>[EditorObjectSetupInroomdescription]</caption>
    <onlydisplayif>game.appendobjectdescription</onlydisplayif>
  
    <control>
      <caption>[EditorObjectSetupInroomdescription]</caption>
      <controltype>textbox</controltype>
      <attribute>inroomdescription</attribute>
    </control>

    <control>
      <controltype>label</controltype>
      <caption>By default, the "in room description" will be displayed before the regular "You can go:" links. Exits which have a link in their in-room description (using {exit:this} or the checkbox below) won't be displayed again in the list.</caption>
    </control>

    <control>
      <caption>Make the description a link. (If the exit's alias appears in its description, the alias will be turned into a link; otherwise the whole description will)</caption>
      <controltype>checkbox</controltype>
      <attribute>inroomdescriptionlink</attribute>
    </control>
      
    <control>
      <caption>Removes this exit from the "You can go:" list even if there is no link in the in-room description.</caption>
      <controltype>checkbox</controltype>
      <attribute>nolinkinlist</attribute>
    </control>
    <control>
      <caption>Includes this exit in the "You can go:" list even if there is also a link in the in-room description.</caption>
      <controltype>checkbox</controltype>
      <attribute>forcelinkinlist</attribute>
    </control>
  </tab>
</library>

Not sure I've got all that right, but it seems to make sense…


Mrangel, you've done it!

Just tested the revised library and it works exactly as advertised. You even subtly added a third check box in case they'd like the "you can go" to appear.

Now it shows:

 You are in a room.
 A slippery tunnel heads south through a maze of fetid sludge. 

> go south

 You are in a room 2.
  To the north, there is a pristinely clean staircase... wait... what? 

With links when wanted and with "you can go" when asked.

I'm wondering whether the finished product and a example should be posted to the "libraries" forum.... I'll probably do that soon, even though you did all the work!


Ok, I "published" a sample game using the new library. After trying variations on description types and checkbox selections, there appear to be some very useful things that can be done with it, and also a few instances of unexpected results that might count as "bugs?"

https://textadventures.co.uk/games/view/qroo13j8m0ihtv9ho6k18w/mrangelexitdescsample

Feel free to check it out. All thanks goes to Mr Angel for actually creating and editing the library above here.

Mr. Angel, if you feel it's worth perfecting the code so that there are no bugs, I'll edit this sample and use the updated library in the newer version. I'm personally working on a chart to and am thinking that possibly all I'd do with it is rename the checkboxes so that it's more explicit what they do and don't do. Or maybe I'll just have a quick chart of what to use when I want particular results. Either way, this is the best library out there for making exit descriptions as is!


My demo revealed 8 types of results. Alias in Description yields 2 possibilities. No alias in the description yields 4 possibilities. And interestingly a Compound Alias in the Description (eg. "Outside") yields it's own unique 2 possibilities.

With alias, you can either make that alias linked or not, and the exit will always appear in the "you can go" list.

Without alias: The desc can be a link and either appear in "you can go" or not. Or it can have no link, yet appear in "you can go" OR it can be neither linked nor appear in "you can go."

If the alias appears in the description as part of a compound word either only the alias part of the word will be linked AND the exit will not appear in the "You can go" list. OR there will be no link in the description, but the exit will be in the "you can go" list.

Now I didn't intentionally test for compound words, so there might be more variation possible there. Next I'm going to look at these charts I made of results and see which combinations of checks are the simplest for the desired result. Also, I'll look into whether naming checkboxes more specifically will remove the surprise factor from the occasions when an exit appeared in "you can go." It seems to be that if an alias is in the description, it cannot be removed from "you can go" unless part of a compound word. So likely only one checkbox needs renamed.


Ok, these descriptions for the boxes keep it strictly to what I have so far proved they can do, and leave out what they don't do, but I'd expected from the original descriptions:

Box 1 Description perfect as is.
Box 2 Removes exit from "you can go" if no alias in the description
Box 3 Includes exit in "you can go" if no alias in desc.


Hmmm... looking closely at what the buttons do, and at my cheatsheet for the simplest way to use the buttons to get desired results... It looks like Box 3 isn't really necessary, it might not actually do anything... unless one means to check box 2 and then negate it by checking box 3.

So I'm thinking to quickly rename box 2 and remove box 3. Then add a statement.

"If the Alias appears in a compound word it will either appear in "you can go" if not linked, or not appear in "you can go" if linked. Otherwise an exit with alias in the description will always appear in "you can go."

That makes it work as advertised without needing to revise code, and simplifies usage a little.


So my slight revision to Mrangel's brilliant library is as follows:

Changing the caption to:

By default, the "in room description" will be displayed before the regular "You can go:" links. Exits by default will appear in those links, unless the alias is part of a compound word in the description, and linked using the checkbox below.

and box 2 description to:
Removes this exit from the "You can go:" list if no alias in the in-room description.

and deleting the code for box 3


Ack!

This library was working well enough to build a testgame, test it out with several rooms, make a chart of how the results of all the buttons affected user experience, publish a test game for people to try on the server....

Then I added it to my "real" game, which admittedly does have several other libraries in it. It loaded up fine, but when It started it gave me this error in between the first part of my roomdescription and the weather report.

Error running script: Error compiling expression 'ListExclude (list, linkedexits)': Unknown object or variable 'linkedexits'
Error running script: Error compiling expression 'LengthOf(line) > 0': FunctionCallElement: Could find not function 'LengthOf(Object)'
Error running script: Error compiling expression 'LengthOf(desc) > 0': FunctionCallElement: Could find not function 'LengthOf(Object)'

In my limited understanding, something in one of the other libraries must have interfered with Mrangel's script for creating the list for linkedexits

Not only that list is conflicting, but the room didn't print any of the many objects with multiple attributes and beautiful colour-coded links for what world they belong to in the game.

What I'm imagining is that the error might have to do with this bit:

    desc = item.inroomdescription
    if (IsRegexMatch ("\\{.+\\}", desc)) {

I know for certain that Pixie modified the "Look" command for CombatLib because it now automatically sorts for certain extra types of descriptions including a speciallised "lore" and "truesight" description.

I've built upon that machine to add an exponentially vast array of possible description scripts through the simple "descriptions" tab on every object except the exits. (for some reason that editor wouldn't take the description tab the ways I tried it..) but maybe I can compare the code used to add these to other tabs, the codes I used to try and add that tab to the exit editor, and the code that Mrangel actually used to add it to the exit editor... and find a workaround way using Pixie's manner of editing descriptions to add descriptions to the exits?

I kind of like the options to play with the links from Mrangel's library though, and the quirk of having a linked "south" in Southward while the rest of the description just reads like a description.

If I were to look through Pixie's code for conflicts, what would I be looking for? Is it as simple as checking for scripts that deal with "regex"?

Then I'd try to make Mrangel's look like Pixie's modified version?

Challenge accepted haha. I'm going to try searching Pixie's CombatLib collection for a possible source of the conflict... If/once located, this library can either be integrated into Pixie's or it can be modified to be "Pixie compatible."


BTW, what's the proper forum etiquette? I know I'm addressing a large group in general, but also largely I'm hoping that Mrangel is popping in and joining in the conversation specifically. Should I call sometimes address "you" and "Mrangel" directly, or just keep talking about "you" "him" in the third person when referring to "your" /"his" work?


Looking at the codes closer, and not exactly understanding everything in the functions, I couldn't readily see what was causing the conflict between Mrangel's library and Pixie's libraries.

(small chance it could be one of EightOne's libraries, but they're very straightforward and only seem to add a function for adding attributes, then add that function to the GUI for editing your game.)

So I started on Option 2 and compared Pixie and Mrangel's tabs side by side in notepad++

With Mrangel's bit about the ExitEditor, and Pixie's existing mods for customizing descriptions, I added this extra tab to Pixie's CombatTabs.xml just underneath the existing Tab to add the descriptions to objects.

<tab>
<parent>_ExitEditor</parent>
<caption>Description</caption>
<mustinherit>editor_object;defaultexit</mustinherit>


<control>
  <controltype>textbox</controltype>
  <caption>Description</caption>
  <attribute>desc</attribute>
</control>

You can then add your various description conditions as controls as many as needed. and close the tab with a

 </tab>

All that remains is to add script into your look that checks the condition and prints the description.

I've been sticking with if getboolean and hasattribute this.xdesc
print xdesc

or a switch script for the descriptions if they're meant to be exclusive to one another.

This doesn't add a fancy way to customise inroom descriptions like the original exit descriptions fella had been trying to do.

But between this and the prefix and suffix, it's enough flavour added to the exits to make me happy.

Now I can describe the exit in-room in one specific way, and have the look be extremely customizable for various perspective types.

It might say
you can go
Prefix "A little path leads" + alias "north" + Suffix "through some thick brush."

But if looked at it could say either:

"There might be some good game that way" for a hunter
"You don't like the idea of scraping your clothes against those branches" for the rich
"Was that a Wil O' the Wisp just through there?" for a Fairy
etc, ad. nauseum.

Maybe when I grow a bit more knowledgeable in code, I'll be able to help truly reconcile Mrangel's Library and Pixie's. But at least right now the above library Mrangel made works beautifully for a non-Pixie game.


This topic is now closed. Topics are closed after 60 days of inactivity.

Support

Forums