User Tools

Site Tools


dromed:pseudoscript

Pseudo-Script

A pseudo-script is a limited, though comprehensive, set of actions that an AI can be told to perform. Pseudo-scripts are used by the following properties:

Script message

This action sends a message to the current actor/AI. See the final entry for a slightly different implementation.

Argument 1: The name of the message.

Argument 2: The first data value.

Argument 3: The second data value.

Suitable data values depend on what message is being sent.

Play Sound/Motion

Plays a line from a conversation, and/or performs a motion. Either can be used, or both.

Argument 1: The sound concept. This is a name for the conversation as defined in the schema files. The original conversations are in conv.sch, and the concepts have names like c0203 (mission2, conversation 3). That format isn’t essential, so custom conversations can use a different style.

Argument 2: Sound Tags. This is where the line number is specified. LineNo 1 is the format. If you look in the Tags section of speech.spc you’ll see some more, but their usage is unknown to the author.

Argument 3: Motion Tags. Allow the actor to play a motion which is associated with the specified tags. There is a demo of many motion tags here. Note that some tags are associated with several motions, and the AI will choose one at random.

Alert, Become hostile & Enable Investigate

These actions do not work.

Goto Object

Makes the actor walk, or run, to the specified object.

Argument 1: The object name or ID. It’s more reliable to use names as IDs can be variable.

Argument 2: Speed. If left blank the AI will walk. Other values can be Fast or Very Fast.

Argument 3: Motion Tags. FIXME Usage unkown.

Frob Object

Makes the actor frob an object (just by sending the relevant script message, not by actually going to it and pressing it).

Argument 1: The object name or ID. It’s more reliable to use names as IDs can be variable.

Argument 2: With Object. This allows the AI to frob the object in argument 1 with the object in argument 2. E.g. frob a door with a key.

Wait

The actor will stand still, and not perform any other conversation actions, until the time has elapsed. It is also possible that it won’t respond to more important things, like seeing the player or raising its alertness level.

Argument 1: The time to wait, in milliseconds.

Argument 2: What motions to play while waiting. With no motion specified, the AI would be absolutely still, which may look unnatural. IdleGesture 0 is typically used to make the AI appear more natural. Be warned that when the time as elapsed, the actor will finish the current motion before resuming.

Mprint

Prints some text to monolog.txt (in the games installation folder).

Argument 1: The text to be printed. Useful for finding out where a problematic conversation is failing.

Add/Remove Metaproperty

Argument 1: Add or Remove

Argument 2: The name of the metaproperty.

Argument 3: The object(s) to which it is added/removed. This can be left blank if the object in question is this actor. A * represents all objects. @ followed by an archetype name means all instances of that archetype. Multiple target objects can be used, in the form name1, name2, name3 etc.

Argument 1: The flavour of the link.

Argument 2: The destination(s), i.e. what you’d usually have in the To field in a link dialogue box. Multiple objects can be written in the form name1, name2, name3 etc. The field can be left blank to refer to this actor.

Argument 3: The source(s) of the link, i.e. the From object(s).

The opposite of the above.

Face Angle/Object

Face either a direction, and object, or an angle relative to an object.

Argument 1: The angle to face, in radians.

Argument 2: The object (name or ID) to face.

If an angle and object are specified, the actor will face a direction which is the heading of the object minus the specified angle.

Signal

Send a signal to another AI. The property AI→Responses→Signal Response can be used to have this AI react. One advantage of this is that this AI can act independently of the conversation.

Argument 1: The name of the signal. This can be any string of text.

Argument 2: The object(s) to which the signal should be sent.

Argument 3: The maximum distance to send the signal.

Dest. Script Message

The same as Script Message, but when these actions are part of an AIWatchObj link, the message is sent to the To object.

dromed/pseudoscript.txt · Last modified: 2016/09/05 14:17 by r_soul