intfiction.org

The Interactive Fiction Community Forum
It is currently Wed Jun 19, 2013 5:09 am

All times are UTC - 6 hours [ DST ]




Post new topic Reply to topic  [ 11 posts ]  Go to page 1, 2  Next
Author Message
PostPosted: Thu Jul 02, 2009 8:52 am 
Offline

Joined: Thu Jul 02, 2009 8:31 am
Posts: 14
Location: Singapore
OK, I just signed up to ask a single question:

I'm writing an interactive fiction where you can switch consciousnesses between different random people. This is my code so far:
Code:
A thing can be animate or inanimate. Things are usually inanimate. People are always animate. Animals are always animate.

Being is an action with past participle been, applying to one thing.
Understand "be [a thing]" as being.
Check being:
   If the noun is not animate:
      say "You can only do that to something animate." instead;
   Otherwise if the noun is the player:
      say "You are already you." instead;
   Otherwise:
      say "With great exertion, you attempt to disembody your awareness and move it into another person. It seems to be working, but not as you hoped.[paragraph break]You are now [the noun]."
      
Carry out being:
   now the player is the noun;
   try looking.
   
Does the player mean doing something to the player: it is very unlikely.

Does the player mean being a person: it is very likely.

However, Inform automatically assumes that the noun must be visible, which I don't want to be the case. How can I override this?

_________________
Embrace imagination


Last edited by chinkeeyong on Fri Jul 03, 2009 11:59 pm, edited 1 time in total.

Top
 Profile Send private message  
 
PostPosted: Thu Jul 02, 2009 9:53 am 
Offline

Joined: Tue Dec 25, 2007 10:06 am
Posts: 898
You need "any thing" in the understand line to take any object into account. Also, the action needs to be defined as applying to one visible thing (as opposed to something that you can touch from where you are), otherwise the parser will give a "you can't reach there" error.

Code:
Being is an action with past participle been, applying to one visible thing.
Understand "be [any thing]" as being.


Top
 Profile Send private message  
 
PostPosted: Thu Jul 02, 2009 6:57 pm 
Offline

Joined: Thu Jul 02, 2009 8:31 am
Posts: 14
Location: Singapore
That makes sense, and it works. Thanks!

Edit:

Is it possible to remove something from scope?

_________________
Embrace imagination


Top
 Profile Send private message  
 
PostPosted: Fri Jul 03, 2009 1:36 am 
Offline

Joined: Tue Dec 25, 2007 10:06 am
Posts: 898
chinkeeyong wrote:
Is it possible to remove something from scope?


You could do something like this:

Code:
Understand "be [any possessible thing]" as being.

Definition: a thing is possessible if it is in the possession chambers.
[or alternatively: A thing can be possessible. A thing is usually possessible.]


But if you want the player to be able to only become people he has met, you could download Eric Eve's Epistemology extension from I7's web site that does most of that work for you.

Code:
Include Epistemology by Eric Eve.

Understand "be [any known thing]" as being.


Top
 Profile Send private message  
 
PostPosted: Fri Jul 03, 2009 1:52 am 
Offline

Joined: Thu Jul 02, 2009 8:31 am
Posts: 14
Location: Singapore
No, this is completely unrelated. I want the player to not be able to see or interact with a hidden door until he's performed an action. Unfortunately, doors can't be moved out of play, so I don't know how to go about this.

_________________
Embrace imagination


Top
 Profile Send private message  
 
PostPosted: Fri Jul 03, 2009 1:59 am 
Offline

Joined: Tue Dec 25, 2007 10:06 am
Posts: 898
Ah, ok. Sorry about that. Well, for the door problem you could use a couple of extensions: Hidden Items by Krister Fundin or Secret Doors by Andrew Owen. Both should do just that.


Top
 Profile Send private message  
 
PostPosted: Fri Jul 03, 2009 2:17 am 
Offline

Joined: Thu Jul 02, 2009 8:31 am
Posts: 14
Location: Singapore
I'll go check them out. Thanks!

Edit:

I think something with my source is very wrong. I'm getting spammed by programming errors that say this:

Code:
[** Programming error: nothing (object number 0)  has no property parse_name to read **]

[** Programming error: tried to find the ".&" of nothing **]

[** Programming error: tried to find the ".&" of nothing **]

[** Programming error: nothing (object number 0)  has no property parse_name to read **]

[** Programming error: tried to find the ".&" of nothing **]


and so on. As far as I can tell, the parser is trying to find nonexistent properties of nothing, but nothing in my code seems to be the problem. I've uploaded my (massive) source file in a zip here, in case it's useful.

_________________
Embrace imagination


Top
 Profile Send private message  
 
PostPosted: Sat Jul 04, 2009 1:29 am 
Offline

Joined: Sun Mar 01, 2009 8:02 pm
Posts: 904
I had a look at the game ... and I don't know the answer. It only happens after the player has used 'be' to become the second guy, so suspicion is bound to center on the line

now the player is the noun;

But on closer examination, if I try 'be the first guy', the problem goes away. So that theory is on the back burner.

On yet closer examination, the problem seems to occur only in the Tall Room. So my best guess is that one of your Before or Instead rules that involves checking whether the player is in the Tall Room has got a bug in it.

That's the best I can do. Sorry.

--JA


Top
 Profile Send private message  
 
PostPosted: Sat Jul 04, 2009 3:06 am 
Offline

Joined: Thu Jul 02, 2009 8:31 am
Posts: 14
Location: Singapore
Well, you tried, I guess. As far as I can tell, it happens when the player is in the Tall Room or the Utility Closet. It also doesn't actually do anything other than regurgitate buckets of messages, since I can progress through the game no problem.

Oh, and when trying to yell at the first guy from the Tall Room, a new message appeared!

Code:
[** Programming error: tried to find the "parent" of nothing **]

[** Programming error: tried to find the "parent" of nothing **]

[** Programming error: tried to test "has" or "hasnt" of nothing **]

[** Programming error: tried to test "has" or "hasnt" of nothing **]

[** Programming error: tried to test "has" or "hasnt" of nothing **]

[** Programming error: tried to test "has" or "hasnt" of nothing **]

[** Programming error: tried to test "has" or "hasnt" of nothing **]

[** Programming error: tried to test "has" or "hasnt" of nothing **]

[** Programming error: tried to test "has" or "hasnt" of nothing **]

[** Programming error: tried to find the ".&" of nothing **]

[** Programming error: tried to find the "parent" of nothing **]

[** Programming error: tried to find the "parent" of nothing **]

[** Programming error: tried to test "has" or "hasnt" of nothing **]

[** Programming error: tried to test "has" or "hasnt" of nothing **]

[** Programming error: tried to test "has" or "hasnt" of nothing **]

[** Programming error: tried to test "has" or "hasnt" of nothing **]

[** Programming error: tried to test "has" or "hasnt" of nothing **]

[** Programming error: tried to test "has" or "hasnt" of nothing **]

[** Programming error: tried to test "has" or "hasnt" of nothing **]


I am more and more certain that this is an Inform 6 thing, but I don't know how to fix it.

_________________
Embrace imagination


Last edited by chinkeeyong on Sat Jul 04, 2009 3:37 am, edited 1 time in total.

Top
 Profile Send private message  
 
PostPosted: Sat Jul 04, 2009 3:25 am 
Offline

Joined: Tue Dec 25, 2007 10:06 am
Posts: 898
I took a look at it with RULES debugging on, and the culprit seems to be the After deciding the scope of the player rule. You have a line there that places a random person in the prison cell in scope, but there's nobody there so the game tries to place "nothing" in scope, which gives the error messages. If you add tests whether there actually is someone there before adding them to scope the errors go away.

Code:
After deciding the scope of the player:
   If the player is in the Jail Cell or the player is in the Prison Cell:
      place the Tall Room in scope;
      place the wooden door in scope;
      place the hallway in scope;
   If the player is in the Tall Room:
      if a person (called the prisoner) is in the Jail Cell, place the prisoner in scope;
      if a person (called the prisoner) is in the Prison Cell, place the prisoner in scope.


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

All times are UTC - 6 hours [ DST ]


Who is online

Users browsing this forum: No registered users and 3 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