Page 1 of 1
First-person problems
Posted: Fri Sep 16, 2011 4:04 am
by Bainespal
I need to switch between first person and second person in my game. This sounds like a simple matter in
The Hugo Book -- change player_person to 1 and change the pronouns property of the player character object "accordingly". It actually did seem pretty straightforward for me, except that the default messages are grammatically incorrect, using "Me" instead of "I" in messages such as "Me can't use the word 'whatever'" or "Me can't go that way." I don't really want my first-person character to sound like a caveman. ;-)
Instead of redefining the pronouns property on the default "you" object, I made new player character objects, modeled after the player_character class in objlib.h, which looks like this:
Code: Select all
character player_character
{
! 'nouns' and 'pronouns' as defined below are the defaults
! for second-person, i.e., when player_person is 2--'name'
! should be "you"
!
nouns "me", "myself"
pronouns "you", "you", "your", "yourself"
long_desc
{
print "Looking good."
}
capacity 100
is hidden
is plural ! because player_person defaults to 2
}
I defined the "pronouns" property as:
. I tried switching the order of "I" and "me" in the list, putting "me" first, but that didn't work.
Posted: Fri Sep 16, 2011 10:47 am
by Roody_Yogurt
Well, looking at ParseError case responses in hugolib.h, I saw that error messages and stuff use the CThe(object) routine which works off of object.name. The comments on the player object in objlib.h reflect that also.
Good thing you had us figure out how to do conditional name properties, eh? You'll want to do this with your regular, in-game player object:
Code: Select all
player_character you
{
name {
if player_person = 1
return "I"
elseif player_person = 2
return "you"
}
}
I played around with this a bit, and it seems right so far (in some player-person cases, you need to remove the plural attribute from the player object) but everything seems to be working.
I'd double check all verb routine code, though.
Posted: Fri Sep 16, 2011 4:52 pm
by Bainespal
Maybe I should have extended the definition of the standard "you" object. It seemed a little simpler to make three PC objects to represent three different first-person narrators. But that's not my problem at any rate -- I'm switching between the four player objects just fine. Giving my first-person player_character objects the name "I" is simple enough; the immediate problem is that I set the name property as "me" for some reason.
I'd double check all verb routine code, though.
But that's the catch! Glancing at verblib.h, it appears that every time the player object is referenced as an object in a command, an ungrammatical sentence will result. Here's two such messages:
"Venting my frustrations on I won't accomplish anything."
"I can't drink I."
There doesn't look like all
that many of routines like this; I'll just block all the verbs like this in the player objects' before properties, when I find them.
Re: First-person problems
Posted: Fri Sep 16, 2011 5:16 pm
by Tdarcos
Bainespal wrote:I need to switch between first person and second person in my game..
Do you have an idea of what the game will be or are you doing it "ad hoc" on the fly?
If you don't, you need to do one thing. Make a list of all dialog generated by the game, and each time you add new dialog, you add that to the list. (This is commonly done now for the purpose of doing closed captions.)
Then you take the pieces that have first person format and you make those as third person.
Can you create a label for a piece of dialog something like
Code: Select all
Man1 = "I am going to take a shit"
Man1PG = "I am going to take a dump"
Now, if you have a variable called Rating, where the uncensored "R" rated version is, rating is equal to nothing, the censored version contains "PG" then you have
Say Man1&Rating
Or some form of macro. If nothing else, create an array, if a particular variable is 1 it picks the one mode, 0 an other, then you put the first person in 0, if it's tripped to third person then it selects the other.
Re: First-person problems
Posted: Fri Sep 16, 2011 5:19 pm
by Tdarcos
Tdarcos wrote:Now, if you have a variable called Rating, where the uncensored "R" rated version is, rating is equal to nothing, the censored version contains "PG" then
Correction, to get an R rating (or possibly PG 13) it would have been "I am going to take a fucking shit," The PG rating would allow "I am going to take a shit," or "I'm going to take a goddam shit." Now, the example I gave, "I am going to take a dump" would actually be acceptable for a G rating. Even "I'm going to take a damn dump," would still get G.
Posted: Fri Sep 16, 2011 5:20 pm
by Roody_Yogurt
Yeah, playing with it, switching player objects seems like the right way to go.
In any case, the player object with name "I" should have this for their pronouns:
Code: Select all
pronouns "i" "me" "my" "myself" ! these, unlike name, have to be lowercase
Posted: Fri Sep 16, 2011 5:50 pm
by Roody_Yogurt
Also, Tdarcos, the help is appreciated. You should read the Hugo manual available
here and write a text adventure. Show ICJ how it's
really done!
Re: First-person problems
Posted: Sat Sep 17, 2011 10:13 am
by Bainespal
Tdarcos wrote:
Can you create a label for a piece of dialog something like
Code: Select all
Man1 = "I am going to take a shit"
Man1PG = "I am going to take a dump"
Now, if you have a variable called Rating, where the uncensored "R" rated version is, rating is equal to nothing, the censored version contains "PG" then you have
Say Man1&Rating
Or some form of macro. If nothing else, create an array, if a particular variable is 1 it picks the one mode, 0 an other, then you put the first person in 0, if it's tripped to third person then it selects the other.
Thanks for the pointer. I can understand that concept, even though I've never really worked with arrays before. I may try that if I need a more complicated system, but I also think it may be possible to simply block everything that could give an incongruity in first person during the sections of the game that are told in first-person narration.
Roody_Yogurt wrote:In any case, the player object with name "I" should have this for their pronouns:
Code:
pronouns "i" "me" "my" "myself" ! these, unlike name, have to be lowercase
I noticed the capital problem as I was typing the first post in this thread and then changed it, hoping that that may have been the only problem. It wasn't, of course.
Roody, as a status update, I'm pretty sure that I'm not going to be entering the Comp at this point, just so you don't feel any need to answer my questions as soon as possible. It would have been good to have a Hugo entry to mix things up with all the I7 dominance, but college caught me, alas. I'm now trying to hold myself to a late November release date, perhaps Thanksgiving weekend. Hopefully I'll be able to take care of the many mounting details, such as Tdarcos's system for matching pronouns.
Posted: Sat Sep 17, 2011 11:02 am
by Tdarcos
Roody_Yogurt wrote:Also, Tdarcos, the help is appreciated. You should read the Hugo manual available
here and write a text adventure. Show ICJ how it's
really done!
I did something very unusual, which I only did for the first few days to try it out, then more or less forgot about until now.
My monitor and video card also support Poitrait orientation, which means you turn the monitor 90
o on a side (it has internal casters so you just rotate it), then you tell the video card to rotate everything 90
o counter-clockwise.
What you get is the perfect orientation to read documents as they appear fully on the page, and you can use Page Down to go on to the next page. Much easier for reading a document, more like what you see when reading paper.
I still have it in Poitrait, I finished the book but never got around to resetting it. I was really tired this morning, so I went back to bed and basically shut down the TV. After an hour-and-a=half nap I feel much better. I'm feeling chills plus some other minor miscellaneous items that all equate to that "blah" feeling. I dunno, touch of the flu or a cold, maybe? but it ain't that cold, the thermometer in my room says its 64. Oh, yeah, that would do it
Posted: Sat Sep 17, 2011 11:27 am
by Roody_Yogurt
Bainespal- That is too bad about the comp, but oh well, another Hugo game before the end of the year still contributes to 2011 changing EVERYTHING so keep up the good work.
Tdarcos- It sounds like the game is shaping up nicely!