Builder Characters and Items

From Wherigo Foundation Wiki
Revision as of 13:24, 22 April 2018 by Ranger Fox (Talk | contribs) (Created page with "Characters are animate beings with whom the player interacts in the course of the game. For example, the player might talk to a character, give something to a character or tak...")

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Characters are animate beings with whom the player interacts in the course of the game. For example, the player might talk to a character, give something to a character or take something from a character. Items are inanimate things. The player also interacts with items, but in a different way. For example, the player might have (or not have) an item. The player might unlock a box, open an envelope, or read a book. Both characters and items can either help or impede the player, depending on how you design the game.

Although they have different roles in game play, Wherigo characters and items are mechanically very similar. So we'll discuss them together on this page.


What Makes a Character or Item?

Major visible characteristics include the following.

  • A brief, unique name. This is visible to the player in many places and serves to identify the character or item.
  • An optional brief description. This is visible in lists (such as "you see" or "inventory") as well as on the detail screen for the character or item. Always provide a description.
  • An optional picture. This appears on the detail screen for the character or item. This is where the player interacts with the character or item.
  • An optional icon. This is a small symbol that represents the character or item in lists. If you do not provide an icon, the builder provides a dull, boring default.


Location

Both characters and items usually have a location. This is expressed as latitude and longitude (with optional altitude). Typically, the position is within a zone. When you create a character or item in the builder, you can assign an initial location within any zone. During game play, you can move the character or item to a different zone.


Visibility

At any given time, a character or item may or may not be visible to the player. Visibility is determined by a combination of two factors.

  • Each zone has an object visibility setting which applies to all characters and items located in the zone. This setting can be "never", "always", "on enter" and "on proximity". If the zone is set to "on enter", objects can be visible only when the player is in the zone. If it is set to "on proximity", objects can be visible only when the player is near (within the proximity distance of) the zone.
  • Each character or item has an individual visibility setting. An object is actually visible only if the zone allows it and the object itself is set to visible.


Containment

Characters and items can be contained by zones, the player, or other characters or items. A given character or item can only be directly contained by one thing at a time.

  • Containment in a zone means that the object is located within the zone.
  • Containment by the player means that the object (typically an item) is in the player's inventory. For example, the player might have a book, a power cell, or a box.
  • Containment by another character means that the object (typically an item) is held by the character.
  • Containment by another item means that that object is logically within the containing item. For example, a letter might be in an envelope or coins might be in a box.

Initially, the builder allows you to optionally contain a character or item within a zone. This also implies that the object is located within the zone. During game play, you can move an object to a zone, to the player, to a character or to an item.(You can also move an object to "nowhere", meaning that is not contained by any other object.) Note that an object which is contained by the player, a character or an item moves with the containing object. For example, if an envelope contains a letter and you move the envelope to a different zone, the letter moves with it. Similarly, anything in the player's inventory moves with the player.

In script, you can check to see what contains a particular item. This test refers to the immediate container. For example, suppose that an envelope contains a letter and the envelope has been moved to a particular zone. A test to see if the letter is in the envelope will be true. A test to see if the envelope is in the zone will also be true. However, a test to see if the letter is in the zone will be false. The letter's location is within the zone, but it is directly contained by the envelope, not the zone.


Commands

Characters and items can have associated commands. Commands provide a way for the player to interact with the virtual world. For example, you might have a command to talk to a character. Or a command to open a box or an envelope. Or a command to have a character ride a bicycle or a horse. You can also attach script to a command. When the player chooses to perform the command, the script executes. This gives you the opportunity to make changes as a result of the command. For example, if the player chooses to "take" a coin, you can move the coin to the player's inventory. Or if the player chooses to have a character ride the bicycle, you can move the character and bike to a different zone.


Other Properties

Both characters and items have a few additional properties. Each property has a value, which you can set and test during game play. In addition, the builder allows you to give these properties initial values. These properties, especially the ones for items, make it easy to track changes in the state of the virtual world as the game progresses.

Characters have these additional properties.

  • Gender. May be male, female or it.
  • Type. May be NPC (gamer-speak for a non-player character, who is controlled by the computer) or PC (a player character, who is independently controlled by a player).

Items have these additional properties. Both of these attributes are frequently used in games. For example, a box might be locked or unlocked. An unlocked box might be open or closed. A book might be open or closed. In spite of the names, you can use these properties to track any two yes/no attributes of an item.

  • Locked. This is a flag property, which may be either true or false.
  • Opened. This is a flag property, which may be either true of false.


Characters and Items in the Builder

To add or edit a character or an item, begin by choosing Characters or Items from the left sidebar. This will display a list of existing characters or items. To the right of this list, there is a second list of events. When you select an entry in the main list, the events corresponding to the commands for that object appear in the second list.

  • To add a new object, choose Add, and provide the requested information.
  • To edit an existing object, select the object in the list, choose Edit, and provide or change the requested information.
  • To delete an existing object, select the object in the list, choose Delete, and confirm your intention to delete it.
  • To add a script for a command, select the object in the left-hand list, select an event (command) for which no script exists in the right-hand list, and choose New Script. Then create the script.
  • To edit an existing script for a command, select the object in the left-hand list, select an event (command) for which script already exists in the right-hand list, and choose Edit Script. Make any needed changes to the script.
  • To delete an existing script for a command, select the object in the left-hand list, select an event (command) for which script exists in the right-hand list, and choose Delete Script. Confirm your intention to delete the script.

Scripts can also be added, edited and deleted from the Character or Item dialog, on the Events tab, as you add or edit the object.

When you add or edit an object, you will be asked to provide the following information.

  • The name of the object. Required.
  • A brief description. Optional.
  • A piece of media (picture) to represent the object on its detail screen. Optional. If omitted, no picture appears on the detail screen.
  • An icon to represent the object in lists. Optional. If omitted, the builder provides a default icon.
  • The initial visibility setting for the object. Remember that this interacts with the visibility settings for any zone which contains the object.
  • The initial values for additional properties. For characters, gender and type. For items, locked and opened.

You can also define commands for the object. You will see a list of existing commands, which you can use to add, edit and delete commands. In most cases, you will also want to define a script for each command.

Finally, you can set an initial location (zone) for the object.

  • To set or change a location, choose Center in Zone and select a zone from the list. The builder displays a diagram of the zone, showing the object approximately centered in the zone. If you would like to place the object elsewhere in the zone, simply drag it to the desired location. Choose OK when you are satisfied. The builder will show you a confusing message to the effect that the object is not in the zone you've placed it in and asking if you'd like to fix that. Choose Yes. (This message refers to containment, not location. It's always best to make sure that containment in a zone matches location, which is why you should choose Yes.)
  • To clear an existing location without setting a new one, choose Clear.