Parser TA object options

Jay's recent demo has inspired me to start experimenting with the functionality of the traditional parser TA. I hope you take it as a compliment Jay, rather than see this as me stealing your idea.

Anyway, I was looking at TP's thread on making TA function like a gamebook, and learned that navigation can be set as links within the description by using You are in the hallway. The {command:go to kitchen:kitchen} lies at the far end. but would like to know how difficult it would be to implement object links within the description which when clicked offer interactive options such as look, take and use

I know the default settings do this, but I'd like something slicker, such as the options popping up on a new line. Something like this (assuming the links are clicked):

You are in the hallway. The kitchen lies at the far end.

You are in the kitchen. There's a toaster here.

Examine toaster / take toaster / use toaster


If you add verbs to the toaster object, they will show up using the standard object tag when you click on it. I'd have to go back and see how that manifests. I'll see if it's possible to reformat them.

(And it's no problem you taking any ideas I offer and running with them. That's why I offered it! :) )


Thanks :)

I'll try the verb thing, but not sure how to make the object a link in the first place.

Got the verb thing working now, but would like the object to be a link in the description rather than on its own line, and also have the interactive options appear on their own line.


Here's a quick game that does some of what you said. The verb choices end up in a pop-up menu, though.

<!--Saved by Quest 5.6.6108.15891-->
<asl version="550">
  <include ref="English.aslx" />
  <include ref="Core.aslx" />
  <game name="linktest">
    <gameid>3872520c-67d6-4bdc-9a17-50b93ffa4da2</gameid>
    <version>1.0</version>
    <firstpublished>2016</firstpublished>
    <attr name="autodescription_youcansee" type="int">0</attr>
    <autodescription_youcansee_newline />
    <attr name="autodescription_youarein" type="int">0</attr>
    <attr name="autodescription_description" type="int">1</attr>
    <attr name="autodescription_youcango" type="int">0</attr>
  </game>
  <object name="hallway">
    <inherit name="editor_room" />
    <description>You are in a hallway. The {exit:kitchen_exit} lies at the far end.</description>
    <object name="player">
      <inherit name="editor_object" />
      <inherit name="editor_player" />
    </object>
    <exit name="kitchen_exit" alias="kitchen" to="kitchen">
      <inherit name="southdirection" />
    </exit>
  </object>
  <object name="kitchen">
    <inherit name="editor_room" />
    <description>You are in the kitchen. There's a {object:toaster} here.</description>
    <object name="toaster">
      <inherit name="editor_object" />
    </object>
    <exit alias="north" to="hallway">
      <inherit name="northdirection" />
    </exit>
  </object>
</asl>```

I just realized that the exit link doesn't work. Not sure why yet.

Edit: I updated the above source to work better (the exit link now works). You have to name the exit and then use its name in the exit text processing markup.


Loading this now (the ``` at the end need to go on the next line) I copied and pasted them into my game and then couldn't work out why I was getting the error.)

I got this far myself except for including the object in the description and your exit code is less complex than my {command... } method.

Would just like to do the verb options differently.

I think your demo is far nearer to implementing all this.


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

Support

Forums