AskTravelConnector Bug(?)

#charset "us-ascii"

#include <tads.h>
#include "advlite.h"

versionInfo: GameID
    IFID = 'fb228ce5-cb48-45b1-8d28-6442a3140043'
    name = 'Your New Game Title'
    byline = 'by Your Name'
    htmlByline = 'by <a href="mailto:your-email@host.com">Your Name</a>'
    version = '1'
    authorEmail = 'Your Name <your-email@host.com>'
    desc = 'Put a brief "blurb" about your game here'
    htmlDesc = 'Put a brief "blurb" about your game here'
;

gameMain: GameMainDef
    /* Define the initial player character; this is compulsory */
    initialPlayerChar = me
;


/* The starting location; this can be called anything you like */

startroom: Room 'The Starting Location'
    "Add your description here. "
    south = quinnRoom
;

+ me: Player 'you'        
;
 



quinnRoom: Room 'Quinn\'s Room'
    "Quinn\'s twisted abode"
    north = startroom
    south: AskConnector 
    {
        options= [vinRoom, jimRoom]
        
       
    }
;

jimRoom: Room 'Jim\'s Room'
    "Jim's lovely abode"
   north = quinnRoom
    visited = true
    
;

vinRoom: Room 'Vin\'s Room'
    "Vin's lovely abode"
    north = quinnRoom
;

I’m having a perplexing issue, I think it has to do with the way AskConnectors work.

This is the transcript:


The Starting Location

Add your description here. 


>s



Quinn’s Room

Quinn’s Homely Abode


>s

That way lie the vin’s room (providing light) and the jim’s room (providing light). Which do you want to use?


>vin's room

I don’t understand that command.


>s

That way lie the vin’s room (providing light) and the jim’s room (providing light). Which do you want to use?


>jim's room

I don’t understand that command.


>s

That way lie the vin’s room (providing light) and the jim’s room (providing light). Which do you want to use?


>

Quinn’s Room

Quinn’s Homely Abode


>goto Jim's room

You see no jim’s room here.


(If this was an accidental misspelling, you can correct it by typing OOPS followed by the corrected word now. Any time the story points out an unknown word, you can correct a misspelling using OOPS as your next command.)


>goto

Where do you want to go?


>Jim's room

I don’t understand that command.


>s

That way lie the vin’s room (providing light) and the jim’s room (providing light). Which do you want to use?


>jim's room

I don’t understand that command.


>quit



Do you really want to quit? (y/n)?
>y

Of course if you say, start in Jim or Vin’s room in this example and go up to Quinn’s room, you can then travel to Jim and Vin’s room perfectly fine. This makes sense for say, pathfinding, but for simply going to the rooms it doesn’t, even setting one of them to visited didn’t seem to help.

Am I simply missing something?

1 Like

The problem here is that AskConnector wasn’t designed to be used with Rooms in its options property; I assumed it would be used with objects like doors or passages that the player character could see from his current location.

As a first attempt at using it with rooms, you could try customizing your AskConnector a bit more:

 south: AskConnector 
    {
        options= [vinRoom, jimRoom]
        travelAction = [GoTo]
        
    }   

I think you’d also need to define vinRoom and jimRoom as familiar. EDIT familiar and visited

You’ll also need to ensure that VerbRule(GoTo) includes:

    verbPhrase = 'go/going to (what)'
    missingQ = 'where do you want to go'

This will be in the latest version of adv3Lite just uploaded to GitHub, along with tweaks to AskConnector to handle the marking of Rooms in an options list as visited and familiar and changing the travelAction to GoTo automatically so game authors don’t have to worry about it (as well as removing the awkward ‘providing light’ from the list of rooms). Note that you still can’t mix Rooms and non-Rooms in the same options list.

3 Likes