FAQ Search Memberlist Usergroups
Jolt Country Forum Index
Register Profile Log in to check your private messages Log in
Log in Log in

Description Types

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Jolt Country Forum Index -> Hugo's House of Horrors
View previous topic :: View next topic  
Author Message
SoonMinYee



Joined: 03 May 2004
Posts: 1

PostPosted: Mon May 03, 2004 8:28 pm    Post subject: Description Types Reply with quote

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?
Back to top
View user's profile Send private message
Guest






PostPosted: Mon May 03, 2004 8:31 pm    Post subject: Reply with quote

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?
Back to top
Ice Cream Jonsey



Joined: 27 Apr 2002
Posts: 20088
Location: Colorado

PostPosted: Tue May 04, 2004 8:15 am    Post subject: Reply with quote

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:
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:
verb "remember"
   *      DoVague
   * rememerable   DoRemember


4) Lastly, just make the following routine:

Code:

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
_________________
the dark and gritty...Ice Cream Jonsey!
Back to top
View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger MSN Messenger
Cryptonomic



Joined: 05 May 2004
Posts: 55
Location: Chicago, IL

PostPosted: Wed May 05, 2004 4:39 am    Post subject: Reply with quote

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?
Back to top
View user's profile Send private message Visit poster's website AIM Address MSN Messenger
Debaser



Joined: 25 Jun 2002
Posts: 878
Location: Aurora, IL

PostPosted: Wed May 05, 2004 4:51 am    Post subject: Reply with quote

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:
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.
Back to top
View user's profile Send private message Send e-mail AIM Address
Kent



Joined: 27 Jun 2003
Posts: 119

PostPosted: Wed May 05, 2004 6:16 am    Post subject: Reply with quote

With regard to

Code:

routine DoRemember(object)
{
   run object.memory_desc
}

you might try a somewhat more elaborate version:

Code:

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.
Back to top
View user's profile Send private message
Ice Cream Jonsey



Joined: 27 Apr 2002
Posts: 20088
Location: Colorado

PostPosted: Wed May 05, 2004 2:53 pm    Post subject: Reply with quote

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.
_________________
the dark and gritty...Ice Cream Jonsey!
Back to top
View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger MSN Messenger
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Jolt Country Forum Index -> Hugo's House of Horrors All times are GMT - 7 Hours
Page 1 of 1

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001 phpBB Group

Theme by Kage Musha - RPG Garden

Copyrights and trademarks are all of the belonging company. No copyright Infringement intended