Tricks with the LOOK command

Chris H.'s Ultima / ACS-style game development system!

Moderators: Ice Cream Jonsey, Chris H

Post Reply
rld
Posts: 223
Joined: Sun Jan 25, 2009 2:17 am
Location: Dallas, TX

Tricks with the LOOK command

Post by rld » Wed Mar 02, 2011 2:21 pm

Something that I have been thinking about for a while now relates to the LOOK command and how it displays object names.

Normally, when you [L]OOK in a game, and you select an object, if there is no long description set, and no other trigger caused by EXAMINE NEAR/FAR, then the game simply displays:

YOU SEE: <object>

in the bottom message area. Which is fine under most circumstances, but there might be some times where you want to hide this information from the player.

For example, let's say you have a FLOOR object (basically an empty square), and then you have other 'floor' objects that have special functions. They might be traps of some kind, or triggers that start off macros or other events. So what do you call them in the game?

If you have a space object that looks like a floor but is actually a trapdoor dropping the player into a pit, you don't want to call it "TRAPDOOR FLOOR", because if the player [L]OOKs at it, they know not to step on that square.

You can just call all these objects "FLOOR", which is the typical approach used, but then you have to keep a list of the object numbers or something so you can tell them apart when you are picking them in the room editor. Which can be annoying.

What I had thought about was having a special code in the object name that told the game, 'don't display the actual name when a player LOOKs at this object - show something else instead.'

For example, you could say that if the object name starts with "#0", the game will call it a "FLOOR" when the player looks at it on the map, regardless of its actual name. So you could have a number of objects named:

#0TRAPDOOR
#0ARROW TRAP
#0TELEPORTER
#0ACTIVATE ALL

and all of these would appear to be identical "FLOOR"s when examined by the player.

There could be other codes, too, so you might have

#0 --> FLOOR
#1 --> WALL
#2 --> GRASS
#3 --> ROAD

or whatever might be useful.

Garth

Object Name Obfuscation

Post by Garth » Thu Mar 03, 2011 10:40 pm

Please please do this rld. PLEASE!

rld
Posts: 223
Joined: Sun Jan 25, 2009 2:17 am
Location: Dallas, TX

Post by rld » Fri Mar 04, 2011 9:24 am

Well, this should be simple enough. I didn't know if this was one of those limitations that was only bugging me, or if other people had run into it as well.

So I will do the four codes mentioned above as a starting point, and if anyone thinks of some other ones I can always add them in.

I was trying to think if there was anything different I wanted to do for the 'LOOK at creature' option since it's in the same section of the code - right now you get (if cheats aren't on):

YOU SEE: <creature> (HOSTILE)
or
YOU SEE: <creature>

followed by:

CONDITION: NOT WOUNDED/WOUNDED/etc.

which is ok, I guess. I haven't been able to think of anything I would change about that particular feature.

User avatar
Tdarcos
Posts: 5602
Joined: Fri May 16, 2008 9:25 am
Location: Arlington, Virginia
Contact:

Re: Tricks with the LOOK command

Post by Tdarcos » Fri Mar 04, 2011 1:11 pm

rld wrote:[T]here might be some times where you want to hide this information from the player. [DELETED] What I had thought about was having a special code in the object name that told the game, 'don't display the actual name when a player LOOKs at this object - show something else instead.'
Collossal Caves adventure does something like this with the beanstalk, it's "plant" until you water it, then it becomes a climbable beanstalk, but in that mode its name is *PLANT instead of "PLANT". If you overwater it, it shrinks and is renamed "$PLANT". The code knows objects starting with a different character have special properties.

Visit My Site; now with more than 103,716% more content than Pnback's!
"We don't try, to understand, the New York Times affect on man."
- The Bee Gees, Night Fever

rld
Posts: 223
Joined: Sun Jan 25, 2009 2:17 am
Location: Dallas, TX

Post by rld » Mon Mar 14, 2011 10:57 am

rld wrote: I was trying to think if there was anything different I wanted to do for the 'LOOK at creature' option since it's in the same section of the code - right now you get (if cheats aren't on):

YOU SEE: <creature> (HOSTILE)
or
YOU SEE: <creature>

followed by:

CONDITION: NOT WOUNDED/WOUNDED/etc.

which is ok, I guess. I haven't been able to think of anything I would change about that particular feature.
It might be useful under certain circumstances to run a macro or display a short message when the player [L]OOKS at a creature, instead of displaying the default message. I may look at this more later if it proves to be interesting enough to do something with.

joebonk
Posts: 112
Joined: Mon Aug 27, 2012 3:16 am
Location: las cruces, nm

look

Post by joebonk » Sun Sep 02, 2012 4:37 am

One of the task in the game i'm making will hopefully use the look command with extra info. The player has to make a copy of a room in the dream world, but to do this he has to look "gaze" at every tile that composes the room. Would this be a custom macro to run? Is this possible. Really the dream room is a map already made, but by looking at each tile, the player can unlock this dream room and enter it.

User avatar
Garth's Equipment Shop
Posts: 638
Joined: Fri Dec 05, 2008 5:55 pm
Location: Festering Foothills
Contact:

Post by Garth's Equipment Shop » Wed Sep 05, 2012 10:13 pm

Hi Joe, welcome to Jolt Country and to the ACK community. Without a whole lot of thought put into it I would say make a list of variables to associate with each type of object in the room that will be mirrored in the dream room and have the objects action a macro that increments the associated variable by 1 triggered by examining. Have each of the macros check if the variable already has been raised from 0 to 1 and if it has the macro just stops. A regional step macro, or global if you wish, or even an hourly macro, could check all of the variables and if they are all incremented, all set to 1's, or all add up to the total equal to the number of objects you are mirroring, then you change the player loc variable accordingly to the dream room. You could have some mosaic or series of images for a cutscene to make the transition more dramatic.

Post Reply