Properties

From ADRIFT 5 Manual Wiki
Jump to: navigation, search
THE MAIN ITEMS
Locations
Objects
Tasks
Characters
Events
Variables
Groups
Properties
Text Overrides
Hints
Synonyms
User functions

If you create a variable then there is only one copy of it for the whole game. Properties are similar to variables in that they store a value, however there is a separate copy of each property inside each item (object, character and location) that each stores its own value.

Properties in v5 are now dynamic. Rather than the pre-defined list that you get in v4 objects, you can define your own. These can be applied to Locations, Objects, Characters or all three.

There are several types of properties. These are:

  • Character – the property value must be a character
  • Integer – the property value must be an integer value
  • Location Group – the property value must be a location group
  • Location – the property value must be a location
  • Object – the property value must be an object
  • Selection Only – the property is either True or False
  • State – the property value must be one of a pre-defined list
  • Value - Similar to a state, except each state has a specific integer value associated with it
  • Text – the property value can be any text

Each property will by default always appear. If you want to restrict when a property will appear (for example, you wouldn’t want a Static object to have a wearable property), you can select a property and value that must be true for this property to be available. So, in the wearable example, you can select that the property will only be available if property “Object type” is set to value “Dynamic”.

You may want to make a property mandatory. This means, that if the property is available, it must be selected. So, object type is mandatory, as all objects are either Static or Dynamic. Similarly, you may want to make a property mandatory dependant on another property, or even another property value. Examples of this are the “Held by who” property, which is a character list type. This property is mandatory when the “Location of the object” property is set to “Held by Character”, as you would always want the “Held by who” property to appear.

If you create a property of type “Object”, you can restrict the list of objects displayed to ones having particular properties. So, for example, the “Inside what?” property which is displayed when the location of an object is set to “inside object”, is restricted to container objects. This prevents you from being able to put objects inside other objects that are not containers.

Properties Tab

Characters, Locations and Objects all have a property tab which lists the properties that can be specified for the item.

ObjectProperties.jpg Properties tab for an Object.

  • Characters, Locations and Objects use completely different sets of properties from each other.
  • Not all of the available properties are displayed all the time. Many properties require another property to be selected or set to a particular value before they themselves are displayed.
  • Most of the contents of the "Description" tab are also properties.

Down the left side you will notice that every property has a tick-box next to it. This is how a property is "selected" for use with a particular item.

Most of the properties shown above are of the "Selection only" type, and dont contain data.

If you select the "Object can be opened and closed" property, two new properties will appear under it:

PropertyObjectOpenClose.jpg

If a property has a tick which is greyed-out, such as "Open status" above, then that property is mandatory for the item and cannot be de-selected.

The property "Open status" is a state property that has two possible states. It is shown with two radio buttons so you can easily select the wanted state.

A state property with more than two states will instead display them in a drop-down list from which you can select the one you want, as shown in the "Character position" property below:

PropertyCharacterPosition.jpg

A value property is similar to a state property, except that a value property gives each state a value. The value given to each state is not visible on the properties tab, but if we print the property or use it in an equation then we will be using the value:

PropertyObjectSize.jpg

Character, Location and Object properties also have drop-down lists, but the list will contain all (or a defined subset) of the characters, locations or objects in the game, as appropriate:

A location group property contains a drop-down list of location groups. Character groups and Object groups are not available as properties.

A text property actually contains a text box, so it can not only contain multi-line text, it can have multiple alternate descriptions controlled by restrictions and composition options:

PropertyCharacterEnterExit.jpg

Integer properties are of two types. The "<normal integer>" type is simply displayed as a number which you can set. Any value property can be selected for the second type of integer. This property type contains both a number that can be set, and a drop-down list of the state names listed in one of the value properties. The entered number is multiplied by the value of the selected state to produce the actual value of the property.

For example, characters have a property called "maximum weight of held items" which has a drop-down list of type "Object weight":

PropertyMaxWeight.jpg

Object weight is a value-list property which gives the state "Heavy" the value 27, so if you set "maximum weight of held items" to "10 Heavy" then the property gets the value 10*27=270, so the maximum weight that your character can lift (the sum of the weight of all held objects) is 270.

Defining a new property

You can create a new property by clicking the "Add new property" button at the bottom of the Properties tab of a Character, Location, or Object. You can also right-click the open "Properties" folder and select "Add Property", or right-click any other open folder and select "Add new/Property".

  • If you use the second method, make sure you change the "Property of" field to "Characters" or "Objects" if you dont want the default of a "Location" property.
  • If you select "Any item" then this property will appear on all of the property lists of Characters, Objects and Locations.

NewProperty.jpg

The "Restrict by property" field refers to another property of characters (or locations or objects), and "Restrict by value" is the value that that property must have for a particular character/location/object) to be listed in the drop-down list of THIS property.

In the pictured example we are restricting by "Gender = Female", so only female characters will be listed in the drop-down list and hence this property cannot be set to a male character.

In the "This property will only appear if the following are true" section we similarly choose a property and (optionally) a value. The new property will only be displayed in a property list if the chosen property is "selected".

If a value is also given then the new property will only be displayed when the chosen property is set to this value.

The section at the bottom of the form is only used for properties of type "state" or "value".

On each line of this text box you can type the name of one of the states that this property can be set to.

The name's are usually one or two words each.

At the bottom is a drop-down list of other state properties that allows you to append the states from this property to the end of another state property.

Using the tabs just under the name of the property you can switch from the "Definition" page to the "Description" page. On this page you can explain what this property was created for, so that you can refer back to it in the future.

Private Properties

After saving your new property by clicking the OK button, if you then select it on a single item's property sheet, save that item and then re-open the property, you will see a new option at the bottom of the property's dialog box:

PropertyPrivate.jpg

If you tick this box then the item becomes private to the item that you selected it in.

This means that this property will now not appear at all in any other item, and is a good way to limit the size of property sheets by hiding all of the properties that are only going to be used by a single item.


<<< Groups/ClassesMain_PageCharacter property type >>>