How do I support dealmaking in the storytelling engine? The crucial function will evaluate the value of a deal expressed in the various secondary objects of the storyatom record. Let's call this function DealValue(). It will be executed inside the interpreter. Now, here's the rub: in order to evaluate the personal value of the action specified in the secondary objects, it must somehow warp over to the verb specified in VerbObject and retrieve the role taken by the DirObject, and then determine the emotional reaction of that DirObject towards tha Subject. This looks like a recursive process, except that it is always one level deep, so we could probably fake it with some variation on the macro facility. So here's the plan:
The DealValue function looks up the data associated with VerbObject. It performs a simple sweep through the role activation equations, looking for the token string "Actor IsSamePersonAs DirObject". As soon as it finds such a role activation string, it skips ahead to the emotional reaction string, which it copies into a buffer area and marks as a macro. It then executes that macro, returning a value corresponding to the overall emotional reaction of the DirObject for the action taken. This is the value it returns.
Variations and problems: should it consider only the change in affection instead of all the relationship adjustments? And isn't a person's gratitude for an action modified by the fact that it was part of a deal? In other words, if you give me a coin, I am grateful, but if you give me a coin in return for a newspaper, I am not grateful. Thus, the very fact of the deal alters the emotional reaction.
Perhaps I could modify the token string to include a deal evaluation term. This would declare the value of this person for this verb, either doing it or having it done to him. Yoiks, yes, that raises the issue that the verb must be evaluated in two directions: giving and getting. There's no way that we can extract that information directly from the emotional reaction material. We shall require a special data structre. Yet, this data structure must be expressed as a token string, because the storybuilder must be able to describe the nature of the reaction.
One alternative is to declare some basic set of human needs, and then assign benefit/injury values to each verb for each of the basic needs. This seems stilted to me; many verbs are subtle in their social impact, I think that the storybuilders will bridle at the imposition.
The other approach is to establish a new substring within the token string, something that assigns DealValueIn and DealValueOut. It defaults to zero, but the storybuilder can enhance it at will.
This is awfully messy.