Setting pTraits

There’s been some back and forth on the Storytron forums about how perceivedTraits (pTraits) are set using Trait and accordanceTraits (aTraits), and other inputs. Here’s a list of rules for reference (may change as new information is gleaned):

  1. In the Actor editor, the checkbox next to a Trait determines if it’s visible or invisible. If checked, the Trait is visible; if un-checked, the Trait is invisible.
  2. In the Relationship editor, the checkbox next to a PTrait determines if it will be calculated based on the rules below. If checked, the PTrait is calculated using rules #3-#6. If un-checked, the PTrait can only be changed manually by the storyworld author.
  3. At storyworld startup, if a Trait is visible, pTrait[Viewer, Patient] is set equal to Trait[Patient] if KnowsMe[Viewer, Patient] is true (KnowsMe is set in the Actor editor). All pTraits based on visible Traits are initialized this way.
  4. At storyworld startup, if a Trait is invisible, pTrait[Viewer, Patient] is set by an algorithm that takes Trait[Patient] and aTrait[Viewer] as inputs. All pTraits based on invisible Traits are initialized this way. The algorithm pseudocode is:
    1. weightFactor = 1.0 – ((1.0 – StrangerKin[Viewer, Patient])) / 2.0)
    2. pTrait[Viewer, Patient] = Trait[Viewer] * weightFactor + aTrait[Viewer] * (1.0 – weightFactor)
  5. When a Viewer enters a stage and a Patient is on that stage:
    1. KnowsMe[Viewer, Patient] and KnowsMe[Patient, Viewer] are both set to true.
    2. For visible traits, both actors pTraits are re-calculated according to rule #3.
  6. For visible traits, pTraits are re-calculated whenever two actors meet.
  7. For invisible traits, pTraits can only be changed by EmotionalReaction scripts (you don’t get an idea of a person’s character until you observe their behavior).

Laura Mixon also let me know that she and Chris came up with some semantics regarding changes to Storytron variables.

  • “Set” – To specify an actual value for a pTrait, either by assigning a BNumber or through a calculation.
  • “Initialize” – To set a value of a pTrait at the beginning of the storyworld.
  • “Adjust” – To change a pTrait using an AdjustPActorTrait EmotionalReaction script (which applies aTrait[Viewer] as a dampening or enhancing effect).
This entry was posted in Side Projects and tagged . Bookmark the permalink.