intfiction.org

The Interactive Fiction Community Forum
It is currently Wed Jul 18, 2018 5:27 am

All times are UTC - 6 hours [ DST ]




Post new topic Reply to topic  [ 17 posts ]  Go to page Previous  1, 2
Author Message
PostPosted: Tue Mar 13, 2018 1:59 pm 
Offline

Joined: Mon Dec 15, 2014 9:15 am
Posts: 336
Draconis wrote:
Exactly. Privately-named isn't a real property, in that you can't use it during play.

Well, you can if you really want to.
Code:
The foo is a privately-named thing. The bar is a thing.
When play begins:
     say the list of privately-named things.

Prints "yourself and the foo".


One reason not to use privately-named extensively is that you'll quickly run up against bugs; apparently it's not too robustly implemented. I've found two in just a few minutes of playing around with it.

Number one:
Code:
X is a room. The foo is a privately-named thing. The bar and the qux are things.
When play begins:
   say "[the list of privately-named things].";
   now the foo is not privately-named;
   say "[the list of privately-named things]."

Prints
Quote:
yourself and the foo
yourself, the bar and the qux

(This is weird. Probably the code shouldn't compile anyway, because it doesn't mean anything to toggle privately-named at runtime.)

And number two:
Code:
X is a room. The foo and the bar are privately-named things in X.

Quote:
X
You can see two here.

>

(Not serious, because you wouldn't use privately-named without setting a printed name, or otherwise dealing with how they appear in room descriptions. But it contrasts oddly with the case where only one privately-named object is declared:
Quote:
X
You can see a foo here.

>


Last edited by jrb on Tue Mar 13, 2018 2:19 pm, edited 2 times in total.

Top
 Profile Send private message  
Reply with quote  
PostPosted: Tue Mar 13, 2018 2:13 pm 
Offline

Joined: Tue Mar 09, 2010 2:34 pm
Posts: 5311
Location: Burlington, VT
Quote:
I looked in the documentation and found a bit of explanation under 17.17, but it says that if something is privately-named, the player can never refer to it.


To be clear, the context is this:

Quote:
As this demonstrates, the either/or property "privately-named" makes Inform create a thing or room which starts out with no automatic understandings at all. The name it happens to have in the source text is ignored. If we simply write:

The ungraspable concept is a privately-named thing in the Dining Room.

then nothing the player can type will ever refer to it; though he will see it, and even be able to pick it up by typing TAKE ALL.


which is saying that if you declare something privately-named and don't include any other "Understand" lines for it then the player won't be able to refer to it. In your code, the player could refer to the guards because you had another "Understand" line that let them use "guard" to refer to guards.


Top
 Profile Send private message  
Reply with quote  
PostPosted: Tue Mar 13, 2018 2:20 pm 
Offline

Joined: Fri Oct 18, 2013 10:13 am
Posts: 2631
Location: The Midwest
jrb wrote:
And number two:
Code:
X is a room. The foo and the bar are privately-named things in X.

Quote:
X
You can see two here.

>

(Not serious, because you wouldn't use privately-named without setting a printed name, or otherwise dealing with how they appear in room descriptions. But it contrasts oddly with the case where only one privately-named object is declared:
Quote:
X
You can see a foo here.

>


I'd file that as a bug. Privately-named shouldn't affect how it displays, according to the manual. It only affects the parser.

_________________
Daniel Stelzer


Top
 Profile Send private message  
Reply with quote  
PostPosted: Tue Mar 13, 2018 2:39 pm 
Offline

Joined: Tue Mar 09, 2010 2:34 pm
Posts: 5311
Location: Burlington, VT
I'd guess the thing that's going on there is that, when two things have the same dictionary entries, Inform tries to lump them together as generic objects of their kind. Usually this happens with a kind creation like "A rock is a kind of thing. Two rocks are in the Quarry." The foo and bar have the same dictionary entries because they have no dictionary entries at all, but it prints a blank instead of "things."

In fact you can create the same effect with this:

Code:
Lab is a room. Two things are in the Lab.


You get "You can see two here" because Inform doesn't distinguish the two things, and doesn't have anything to call them.


Top
 Profile Send private message  
Reply with quote  
PostPosted: Tue Mar 13, 2018 6:40 pm 
Offline

Joined: Mon Dec 15, 2014 9:15 am
Posts: 336
Yes, you're right. It's not really a bug with privately-named at all.

Actually, I don't think it counts as a bug. If the author doesn't give Inform any vocabulary to work with, what's it supposed to do? (The thing that upsets me a little about it is the double space between "two" and "here"; but that probably says something about me.)


(I stand by my number one bug, though. Trying to toggle privately-named off for one object shouldn't toggle it on for everyting else!)


Top
 Profile Send private message  
Reply with quote  
PostPosted: Tue Mar 13, 2018 6:46 pm 
Offline

Joined: Fri Oct 18, 2013 10:13 am
Posts: 2631
Location: The Midwest
I'd still call it a bug tbh. "There are two people in the lab" is valid, why not "two things"? But it does make more sense where it's coming from now.

_________________
Daniel Stelzer


Top
 Profile Send private message  
Reply with quote  
PostPosted: Wed Mar 14, 2018 9:47 am 
Offline

Joined: Tue Nov 08, 2011 8:11 am
Posts: 2516
Location: US - Central
This example is kind of useless, but likely applies more complicatedly to other things:

Code:
Lab is a room.

some trousers are here. They are wearable. The indefinite article of trousers is "a pair of". Understand "pair" and "pair of" as trousers.

Some underpants are here. They are wearable.

A wearable thing called The Amulet of Moloc is here. It is proper-named.

The indefinite article of underpants is "[if underpants is worn by the player]your[otherwise]some[end if]".

Understand "my underpants" and "your underpants" as underpants.

Report taking inventory:
   if the player wears something:
      say "You look spiffy in [a list of things worn by the player]."

Quote:
Lab
You can see a pair of trousers, some underpants and The Amulet of Moloc here.

>l
Lab
You can see a pair of trousers, some underpants and The Amulet of Moloc here.

>wear amulet
(first taking The Amulet of Moloc)
You put on The Amulet of Moloc.

>wear underpants
(first taking the underpants)
You put on the underpants.

>wear trousers
(first taking the trousers)
You put on the trousers.

>i
You are carrying:
a pair of trousers (being worn)
your underpants (being worn)
The Amulet of Moloc (being worn)

You look spiffy in a pair of trousers, your underpants and The Amulet of Moloc.


_________________
http://hanonondricek.wixsite.com/pyramidif
https://pyramidif.itch.io/


Top
 Profile Send private message  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 17 posts ]  Go to page Previous  1, 2

All times are UTC - 6 hours [ DST ]


Who is online

Users browsing this forum: No registered users and 7 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group