Pronouns

Hi all!

I know, beyond a shadow of a doubt, that I've scanned across the solution to my (minor) 'problem' whilst perusing the documentation, but I'll be [expletive deleted] if I can find it now!

I want "you" to print when referring to the player, but I want randomNPC.name to print if #object2# is not the player.

The way I have it set up now: 'you' is the alias for player. I added 'me' to the pov_alt so the parser would still understand that 'me' meant player. Now the parser understands 'you', as well as 'me/myself', as player.

I'm worried this may cause a problem, but all I can think of is if someone uses 'you' in a command. E.g., upon entering: RALPH, FOLLOW YOU, Ralph begins to follow the player... That doesn't bode well for numerous reasons.

Is there any easy fix to this?
Should I change this and just write an IF...THEN... with two separate messages? (Sorry to ask. I know it's in the documentation, but I've been scouring through everything for so long, my eyes have grown weary.)

What I'm up to:
I'm merging Followers with PathLib, but I'm changing followers so you can tell an NPC to follow another NPC or yourself. Plus, I'm (planning on) setting it up so that the follower will take the best route to whomever is being followed. This is because the player can go a few places some of the followers can't enter. In this instance, the follower(s) will wait where they are. Then, when the player re-emerges into the 'normal map', the follower(s) will automatically travel, room by room, across the map until they reach their target's location.
(This will also come in handy when the player enters the underground tunnel on, say, the north side of town. The horse can't follow him. The exit of the tunnel leads to the south side of town. The tunnel, a one-room shortcut, allows the player to skip across, let's call it, four rooms. The horse will then adhere to PathLib, moving room by room, turn by turn, towards the player.

Code _**New Command**_

Command pattern:
ask #object1# to follow #object2#;tell #object1# to follow #object2#;#object1#, follow #object2#


if (not object2.gender ="it") {
  if (HasAttribute(object1, "shadowing") and ListContains(object1.shadowing, object2)) {
    msg (""+object1.alias+" redoubles the effort to follow "+object2.alias+".")
  }
  else if (HasAttribute(object1, "shadowing") and not ListContains(object1.shadowing, object2)) {
    delete = ObjectListItem(object1.shadowing, 0)
    msg (""+object1.alias+" ceases to follow "+delete.alias+".")
    list remove (object1.shadowing, (ObjectListItem(object1.shadowing, 0)))
    list remove (delete.followers, object1)
    msg (""+object1.alias+" begins to follow "+object2.alias+".")
    if (not HasAttribute(object2, "followers")) {
      object2.followers = NewObjectList()
      object1.shadowing = NewObjectList()
    }
    if (not ListContains(object2.followers, object1)) {
      list add (object2.followers, object1)
    }
    if (not ListContains(object1.shadowing, object2)) {
      list add (object1.shadowing, object2)
    }
  }
  else {
    msg (""+object1.alias+" begins to follow "+object2.alias+".")
    if (not HasAttribute(object2, "followers")) {
      object2.followers = NewObjectList()
      object1.shadowing = NewObjectList()
    }
    if (not ListContains(object2.followers, object1)) {
      list add (object2.followers, object1)
    }
    if (not ListContains(object1.shadowing, object2)) {
      list add (object1.shadowing, object2)
    }
  }
}
else {
  msg (object1.alias+" can't follow an inanimate object.")
}

// I haven't added PathLib in as of yet, but I think that should be fairly simple
STDOUT

>ralph, follow me
Ralph begins to follow you.

> ralph, follow sally
Ralph ceases to follow you.
Ralph begins to follow your horse.

> ralph, follow sally
Ralph redoubles the effort to follow your horse.

>rp, follow you
Ralph ceases to follow your horse
Ralph begins to follow you.

If I were using Inform 7 (not that I'm saying I want to), I could do:

Instead of asking something to shadow the player when the player's command includes "you/yourself":
    say "[The noun] can't follow [itself].".

NOTE: In this example, [The noun] is capitalizing the Quest equivalent of #object1#, and [itself] will print "himself", "herself", or "itself".

I'm fairly certain that I read how to do such things in the Quest documentation...

Anyone happen to have the link saved in their favorites/bookmarks?


not sure if this helps you or not:

http://docs.textadventures.co.uk/quest/elements/object.html (most/all of the built-in Attributes for the 'Object' Element)

http://docs.textadventures.co.uk/quest/attributes/prefix.html (this can be easily found/done in the GUI/Editor: as it's a text box option, and/or there's the global controls of it I think, within the 'game' Game Settings Object too)
http://docs.textadventures.co.uk/quest/attributes/suffix.html (same as above comment)

http://docs.textadventures.co.uk/quest/attributes/article.html
http://docs.textadventures.co.uk/quest/attributes/gender.html

you can always also create and use a String Attribute for your 'you' or whatever grammer word you want/need.

(for example: creating/using a 'first_name', 'preferred_name', 'nick_name', 'middle_name', 'last_name', 'full_name', and 'title_name' String Attributes, instead of using the 'alias' String Attribute. Another example of creating/using your own/custom/additional String Attributes: marital/non-marital names: Mr./Mister/Mrs./Misses/Mistress/Madam/Ma'am/Ms./Miss/spouse/husband/wife/etc)


there's also the use of Templates too (but I've not learned how to use them myself yet):

http://docs.textadventures.co.uk/quest/elements/template.html
http://docs.textadventures.co.uk/quest/changing_templates.html
http://docs.textadventures.co.uk/quest/guides/using_templates.html


Thanks, HK!

Were I trying to do something that made any sense, that would have been exactly what I needed.

But... I wasn't thinking fourth dimensionally.

My primary objective, you see, is to generalize as much as possible. (If that is not the correct terminology, forgive me.)

I.e., instead of just adding a simple 'if object1 = player, say this, else, say blah', I was over-complicating things in an effort to make said things less complicated to deal with later, on an object by object basis. (In other words, I like to do extra work in the beginning so I can be lazy forever-after.)

I was trying to make it print a name for an object, but not understand that name as an object.

...but I'm much better now.


If you know how to print out the last command that was entered, though, that would be spectacular!


Just in case anyone wants to see my corrected version of the above code (suggestions are welcomed):

Code: followers who will follow any male or female object
if (not object2.gender ="it") {
  if (HasAttribute(object1, "shadowing") and ListContains(object1.shadowing, object2)) {
    if (not object2 = player) {
      msg (""+object1.alias+" redoubles the effort to follow "+object2.alias+".")
    }
    else {
      msg (""+object1.alias+" redoubles the effort to follow you.")
    }
  }
  else if (HasAttribute(object1, "shadowing") and not ListContains(object1.shadowing, object2)) {
    delete = ObjectListItem(object1.shadowing, 0)
    if (not delete = player) {
      msg (""+object1.alias+" ceases to follow "+delete.alias+".")
    }
    else {
      msg (""+object1.alias+" ceases to follow you.")
    }
    list remove (object1.shadowing, (ObjectListItem(object1.shadowing, 0)))
    list remove (delete.followers, object1)
    if (not object2 = player) {
      msg (""+object1.alias+" begins to follow "+object2.alias+".")
    }
    else {
      msg (""+object1.alias+" begins to follow you.")
    }
    if (not HasAttribute(object2, "followers")) {
      object2.followers = NewObjectList()
      object1.shadowing = NewObjectList()
    }
    if (not ListContains(object2.followers, object1)) {
      list add (object2.followers, object1)
    }
    if (not ListContains(object1.shadowing, object2)) {
      list add (object1.shadowing, object2)
    }
  }
  else {
    if (not object2 = player) {
      msg (""+object1.alias+" begins to follow "+object2.alias+".")
    }
    else {
      msg (""+object1.alias+" begins to follow you.")
    }
    if (not HasAttribute(object2, "followers")) {
      object2.followers = NewObjectList()
      object1.shadowing = NewObjectList()
    }
    if (not ListContains(object2.followers, object1)) {
      list add (object2.followers, object1)
    }
    if (not ListContains(object1.shadowing, object2)) {
      list add (object1.shadowing, object2)
    }
  }
}
else {
  msg (object1.alias+" can't follow an inanimate object.")
}

//Adding in the PathLib and turnscript options next

For fun...
change:
msg (object1.alias+" can't follow an inanimate object.")
to:
msg (object1.alias+" stands there waiting for it to move. This could take awhile.")


@DarkLizerd

msg (object1.alias+" stands there, waiting for "+(GetDisplayName(object2))+" to move. (This could take a while...)")

> ralph, follow the riverbed
Ralph stands there, waiting for a riverbed to move. (This could take a while...)

Bwahahaha!

(DarkLizerd, ye shall be included in the special thanks of the Quest port of http://textadventures.co.uk/games/view/ogj8kixyx0emjknru3nckg/they-call-ya-mister!)

^That is the original version (now in testing), made in Inform 7.

(I'm having much more fun making it in Quest!)


That's where all the REAL fun lies!

In the little, 'insignificant' responses...

NOTE: This is written in Informese, because I have yet to have memorized all the actual, real-life codes, such as the ones used in Quest.


Instead of hitting the player, end the story saying "YOU HAVE DIED". /*H2G2 style!*/

Instead of exiting when the player is not in something and the player is not on something and the player's command matches "get down", say "You do a little dance.".

> ralph, follow the riverbed
Ralph stands there, waiting for a riverbed to move. (This could take a while...)

Altho... Ralph could follow the riverbed as it runs along the river...
Or, he could follow the river, upstream or downstream...
Actually I was picturing Ralph following a tree...
Following a rock could be entertaining if it was on a hillside and there was a small earthquake...

Giving a silly command deserves a silly response!


The riverbed just happened to be the object in the first room, but you're right! (Glad it wasn't a snake! I've been learning so much during the past 2 weeks of using Quest... My mind needs to be defragmented!)

Ralph will probably end up just making a snide remark on this one.

NOTE: Ralph is a penguin who stars in stories written (but not published) by a good friend of mine. I threw in a line for him while he was testing my first game. 'You can see a penguin here.'

Well, I ended up deciding to let Ralph follow you around to help you out in that game, and he's migrated over to this second game. Truth is, I have no control over Ralph anymore. He shows up where he wants, when he wants, and does what he wants. (This is usually a good thing.)


That's good stuff: following a rock during an earthquake, especially. (Note to self: make a location with a rocky promontory in the next game. (But no electric monk. (A bored horse is probably okay, though. (If you haven't read Dirk Gently's Holistic Detective Agency, I probably just totally lost you at the monk. All apologies for that.)))


It would be a long, dark, tea-time of the soul. Just don't ask what that fish in my ear is for. lol


>TALK TO SVLAD
"Do you know what my old aunt in Winnipeg used to tell me?" asks Svlad.
"No," you reply. Then, you quickly take off all of your clothes and dive into the canal.

Canal
You can see a life belt here
>


This topic is now closed. Topics are closed after 60 days of inactivity.

Support

Forums