ADRIFT Forum


The place to discuss the ADRIFT Interactive Fiction toolkit

How to use Referenced Text

This forum is the place to discuss the older ADRIFT versions 3.9 and 4.0.

Please refer to the ADRIFT 4 Manual for more information.

Postby Chilli » Mon Nov 01, 2010 7:28 pm

Hi all:

I'm trying to create a command to override the default "look" for certain items. I defined the command as:

[look/ex/x/examine] {at} %text%

However, this doesn't seem to work. Am I not allowed to use the extended command structures (that is, anything involving brackets, slashes, or braces) when using %text%?

I suppose that I could create a list of commands to take into account each option, but that seems like the more difficult solution. Of course, if that's the only way it will work, then I guess my options are limited.

Thanks in advance!

"Chilli"
Chilli
 
Posts: 22
Joined: Mon Sep 27, 2010 6:13 pm
Location: Illinois

Postby David Whyld » Mon Nov 01, 2010 11:39 pm

Instead of using extended command structures (which are pretty pointless anyway) just have "ex", "examine", "look" and "look at" as synonyms of "x". Then in the task you have:

x %text%
David Whyld
 
Posts: 6866
Joined: Sat Dec 18, 2004 5:15 pm
Location: United Kingdom
Points: 35

Postby Duncan_B » Tue Nov 02, 2010 6:34 am

If you're just doing it for particular items, use the item names rather than %text%, or else you could end up blocking the use of the x command entirely. I suppose you could set it with the restriction that Referenced Text is equal to some certain object's name, but that seems to me a really roundabout way of just putting the item's name in the task input to begin with.

How is the command going? Are you getting it to work?
User avatar
Duncan_B
 
Posts: 1219
Joined: Fri Apr 01, 2005 8:26 pm
Location: Chicago, Illinois
Points: 11

Postby Chilli » Tue Nov 02, 2010 6:59 am

Hi Duncan:

The command at the present is going nowhere. It acts as though it is being totally ignored.

I wish I understood why it's not working....

I do see why you're recommending creating specific entries for the items that I want to reference. Maybe I'm trying to get too involved with how I'm trying to implement this.

Sincerely,

"Chilli"
Chilli
 
Posts: 22
Joined: Mon Sep 27, 2010 6:13 pm
Location: Illinois

Postby TedSwippet » Tue Nov 02, 2010 9:50 am

Probably best tackled by simplifying it into something that you know will work, then build back up from there.

For example, start with literally "fiddle %text%", with output "You're fiddling %text%". Create a new command entirely for this, rather than re-using an existing one -- Adrift is notorious for improperly handling deleted tasks, objects, and so on. Maybe even start a completely new toy game just to be sure of a clean slate.

If this works, move on to "fiddle {with} %text%", "[poke/prod/fiddle {with}] %text%", and finally "[x/exam/examine/look {at}] %text%". Where in this process the task stops working should help identify the cause of your problems.

A couple of other notes. %text% is always lowercased in Adrift, which may not be ideal. Worse is that %text% is totally non-selective, and could lead to your game printing some really odd responses. You probably want to use %object% here, so that your task only triggers on actual (and visible, rather than remote or non-existent) game objects. There's also %character% for NPCs.
TedSwippet
 
Posts: 314
Joined: Sat Sep 07, 2002 12:34 am

Postby Duncan_B » Tue Nov 02, 2010 7:01 pm

You probably want to use %object% here, so that your task only triggers on actual (and visible, rather than remote or non-existent) game objects.

This is true, but again, since Chilli is just blocking examine for a couple of objects rather than all objects, just typing in the name of the objects to be blocked is probably the easiest way to do it, like "* x * potato *". Using "* x * %object% *" would block examine for all objects.
User avatar
Duncan_B
 
Posts: 1219
Joined: Fri Apr 01, 2005 8:26 pm
Location: Chicago, Illinois
Points: 11

Postby Chilli » Tue Nov 02, 2010 8:45 pm

Actually, the examine that I'm trying to control is really related to the characters in the game. I didn't know that %character% was available -- I guess I missed that in the manual.

Does anyone know if the Player character is included in %character% matching? And, if it is, what values are used to reference Player? I'm thinking of things like "me," "self," "player," but I suspect there may be more. And, does this matching have to be case-matched? That is, if I type in "examine bill" do I need to use "bill" in the restriction, or can I use "Bill"?

And, speaking of the restrictions, when I'm comparing the entered value, do I continue to use the "Referenced Text" option from "Variables"?

I guess I need to try out some things here....

Thanks for all of your help, everyone! Truly appreciated!

"Chilli"
Chilli
 
Posts: 22
Joined: Mon Sep 27, 2010 6:13 pm
Location: Illinois

Postby Duncan_B » Tue Nov 02, 2010 9:40 pm

The player character does not seem to be included in %character%. If you want to reference the player, use "me" and the player character's name (should they have one).

Are you restricting for a specific character or all characters? Again, %character% will reference all NPCs, but you should use a specific name for the input ("* look * bob *") if you just want to restrict it for a specific character.

As far as I've seen, it doesn't matter if you ask for upper or lowercase input.

And, speaking of the restrictions, when I'm comparing the entered value, do I continue to use the "Referenced Text" option from "Variables"?

What values are you comparing?
User avatar
Duncan_B
 
Posts: 1219
Joined: Fri Apr 01, 2005 8:26 pm
Location: Chicago, Illinois
Points: 11


Return to ADRIFT 3.9 and 4.0

Who is online

Users browsing this forum: Google [Bot] and 6 guests

cron