Description Types

Post a reply


This question is a means of preventing automated form submissions by spambots.
Smilies
:smile: :sad: :eek: :shock: :cool: :-x :razz: :oops: :evil: :twisted: :wink: :idea: :arrow: :neutral: :mrgreen:

BBCode is ON
[img] is ON
[url] is ON
Smilies are ON

Topic review
   

Expand view Topic review: Description Types

by Ice Cream Jonsey » Wed May 05, 2004 2:53 pm

Cryptonomic wrote:Actually, this is very similar to a question I was going to pose as well after finding this board. I am using Hugo for my first work of Interactive Fiction and one of the things I was doing to do was tell the story in first-person perspective. And part of that was the ability to not so much "memorize" things (although I guess that makes sense), but to allow for something like the "first impression" concept.
Welcome to JC! You probably saw it already in either sample code or the manual, but just in case -- Hugo has a flag to let you put your game into either first or third person. You probably noticed that already, but when I wrote my first one I didn't and I consequently spent a ridiculous amount of time changing over the library by hand. So I'm now the Hugo equivalent of that annoying guy who got three DUIs in a year and is out to ruin the good times all his friends that drink much more responsibly than he ever did when they go out, asking for everyone's keys when they haven't even averaged a drink per two hours much less one ... I mean, going "NARRATOR FLAG NARRATOR FLAG!" over and over again.

by Kent » Wed May 05, 2004 6:16 am

With regard to

Code: Select all

routine DoRemember(object)
{
   run object.memory_desc
}
you might try a somewhat more elaborate version:

Code: Select all

routine DoRemember(object)
{
    if object.memory_desc
        return true
    else
    {
        "You can't recall anything in particular about ";
        print The(object); "."
    }
}
since this provides a back-up in case you don't provide a memory_desc for every object that might be referred to.

by Debaser » Wed May 05, 2004 4:51 am

Cryptonomic wrote: My goal there would be to have a way that the player could type "what is {X}?", where {x} would be some object, or "who is {x}?", where {x} would be some NPC. So instead of memory_desc or impression_desc, I might have who_desc and what_desc.

Does that sort of make sense?
That's actually a really good idea. It would be easy enough, too. All you'd have to do is set up your verbs like:

Code: Select all

verb "who" "what"
 *      DoVague
 * "is" Object    DoWhatIs


And then you'd just set up a DoWhatIs routine "what_desc" property like Robb has outlined above. You could also do "who" and "what" as seperate verbs if you liked, obviously, though the opinion of the author of this post is that that's unneccessary.

by Cryptonomic » Wed May 05, 2004 4:39 am

Actually, this is very similar to a question I was going to pose as well after finding this board. I am using Hugo for my first work of Interactive Fiction and one of the things I was doing to do was tell the story in first-person perspective. And part of that was the ability to not so much "memorize" things (although I guess that makes sense), but to allow for something like the "first impression" concept.

I am also wondering if this somehow might tie into another element I eventually want to get into, since it would probably involve some property of this sort.

My goal there would be to have a way that the player could type "what is {X}?", where {x} would be some object, or "who is {x}?", where {x} would be some NPC. So instead of memory_desc or impression_desc, I might have who_desc and what_desc.

Does that sort of make sense?

by Ice Cream Jonsey » Tue May 04, 2004 8:15 am

You betcha. I did something similar in a couple of cases: I created a

break_desc token to be run when a breakable object is broken and a data_desc to be run when a data object is placed within something like a CD-ROM.

Here's a quick way to whip it up:


1) Place property memory_descript below your #includes, in your main gamename.hug file. Actually, you probably want to put an attribute rememberable in there as well, as it makes things easier later on.

2) For objects that you wish to have the character be able to recall, just put in something for that like you would long_desc. For example:

Code: Select all

LightRoom Basement "Basement"
{
is rememberable

 long_desc
 {
    "It's your basement! Oh no, it's flooded!"
 }

 memory_desc
 {  
    "You recall all the adventures of your basement and tug up on your pant legs in memory."
 }

}
3) OK, now you want to create a verb for "remember."

Code: Select all

verb "remember"
	*		DoVague
	* rememerable	DoRemember
4) Lastly, just make the following routine:

Code: Select all

routine DoRemember(object)
{
   run object.memory_desc
}

I think that the object will get passed to you automatically from the verb definition. If it doesn't, you'd want to change the above line to * rememberable DoRemember(object) but I am pretty sure that's not necessary.

Let me know if any of this seems unclear. I'd be happy to whip up a fully-compilable example source for you.

Robb

by Guest » Mon May 03, 2004 8:31 pm

I should probably add that idea would be that user could type some command or something to get the "impression". Or maybe better thing is something like "memory_desc" property. And then user types "remember room x" and the memory_desc is called. Does that kind of thing make sense?

Description Types

by SoonMinYee » Mon May 03, 2004 8:28 pm

I'm wondering if it is possible to somehow have different types of descriptions. How would I code something like that in Hugo? To give an idea of what I mean, I guess I would like to make something where you have your normal long_desc but there is something else like impression_desc or somthing like that. And impression_desc would be the player character's "impression" of a room that they have seen.

Does that make sense?

Top