Argax Project

Node Status: COMPLETE

Story-Level Events: Actions

Every world-level deed is then translated into a story-level event based on the current story context. Specifically, the player's deeds are represented as story-level actions. Action events have a structure like that of deeds that includes both the particular action and its affected objects or characters.1

Through a processes called casting, every deed has a default translation to an action. For example, the verb Drop generally translates to the MANIPULATE action. This default translation may take the current state of the world or characters into account. So the deed Kiss(Alice) should translate to the event ROMANCE(Alice) only if Alice already has a high affinity for the player. If Alice detests the player, this same deed would be better translated to ASSAULT(Alice).

Occasionally, this default casting can be completely overridden by the story context. For instance, if Alice has been transformed into a frog, then Kiss(Alice) should perhaps instead become RESCUE(Alice).

A deed can also be translated into more than one action. In this case, the extra action events form of a tree of sub-events called recasts. So, if the player has already established a girlfriend relationship with the character Betty, Betty might take offense at this kissing of Alice. This secondary effect would be appended as a recast, producing the following structure:

RESCUE(Alice)
|-- OFFEND(Betty)

Actions have effects associated with them. Since only deeds change the "physical" state of the world, action effects are generally limited to character state changes. So RESCUE(Alice) will probably increase Alice's affinity for the player, and possibly increase the player character's morality value.

Unlike deeds, actions do not produce any narration. After each event has occurred, it (including all of its recasts) is appended to an event history list, which forms a transcript of story-level events that have occurred so far. Once recorded there, the DM can respond to the action with a scene.

Not every action the player performs will be equally significant. To represent this, every action also includes a pre-defined import value which suggests how dramatically exciting it is. For example, a MANIPULATE action (which represents such verbs as Take, Drop, and Push) would generally have a very low import, while a MURDER action would have a very high import. This import value is used by Marlinspike when prioritizing how to respond to various actions. This way, actions of high import receive more attention from the system than actions of low import.

Thus actions are fairly simple, as shown by the following pseudo-code definition of an INSULT action.

  Action INSULT {   
  
    super.import = 5
    
    function do(event) {
      //Reduce insulted NPC's affinity for the actor
      affinity = (event.dirObj).affinityFor(event.actor)
      affinity.modify(-10)
    }
  }
Example pseudo-code definition of an INSULT action.

Marlinspike architecture: actions
Verb-based deeds are then cast (and recast) into action-based events.

Notes

  1. The current Marlinspike implemenation actually uses the same data structure for both deeds and events. This event data structure looks like this: Event(actor, ACTION, verb, directObject, secondObj, location). If an event contains a verb value but is missing an action, then it is a deed. If an event contains an action value, it may or may not also include a verb. If the event started as a deed that was then cast into an action, it will have a verb. On the other hand, if the event is a recast sub-event, it will usually not have a verb. Scenes--discussed in the next section--also use this data structure, replacing the ACTION with the name of the scene played.