Verb Stuff

I'm hung up over some interrelated problems with verbs. First is the problem of Verb #0. Right now this is AcceptApology. That's stupid. It should be something special. But do I reserve Verb #0 for some special NIL placeholder so that my internal tests can skip over a verb ID of zero? This seems inappropriate &emdash; I should think that the right way to do it is to use -1 as the NIL value.

 

The other consideration is the need for runtime calculated consequences. I see two ways to do this:

 

First, use a placeholder verb ID #0 and declare all the slots. Then simply have a call in S-code that looks like this: 

 

Weight[Verb#0] = CalculateConsequence(parameterlist);

 

The function CalculateConsequence then figures out the result and stores the correct value in Consequence array. This at least keeps some of the material out in the open where the storybuilder can see it.

 

The second approach is even simpler and more hidden: we just have a single consequence, VerbID#0, and then call it once, and it calculates all the consequences and stores all the results in the various arrays. Completely hidden stuff.

 

I just don't like the idea of hidden values. Isn't there some way I can make this more accessible to the storybuilder? What if VerbID#0 is a kind of variable? The storybuilder then treats it as a variable, calculating it directly, and then stores it into the Consequence array with a special function. It still shows up on the screen as the variable, but at least the storybuilder can see it right there. Here's an example from the Pascal justice code:

 

InclinedAgainst, InclinedFor:

IF WhoIsDirObject THEN

BEGIN

z := SubStory.CausalEvent;

z := History^^[z].CausalEvent;

z := History^^[z].CausalEvent;

x := History^^[z].Verb;

j := Abs(x - JusticeAmbush);

Result[1] := StatesHisCaseAmbush + j;

Result[2] := CharacterAssassAmbush + j;

Result[3] := KissUp;

Result[4] := ThatsAll;

FOR i := 1 TO 4 DO

BEGIN

NewIndObject[i] := LIndObject;

NewThirdObject[i] := SubStory.ThirdObject;

END;

IF SubStory.Verb = InclinedAgainst THEN

z := 2

ELSE

z := 0;

Weight[1] := Affection[Arthur] + Loquacious[Arthur];

Weight[2] := z * Pride - Good - Affection[LIndObject];

Weight[3] := 20 + LoveMe + Affection[Arthur];

Weight[4] := (z + 1) * Pride - Loquacious[Arthur];

END;

 

This Pascal code would be translated as follows:

 

The four consequences would be listed as _VariableVerb, _VariableVerb, KissUp, and ThatsAll. The weighting equations would use a special function that would assign both the weight and the consequence, like so: (I'm using the Pascal notation for clarity, you'll have to convert it to Erasmo-language yourself)

 

Weight[_VariableVerb] = AssignWeightAndResult(Affection[Arthur] + Loquacious[Arthur], StatesHisCaseAmbush + j)

 

This would assign the first term to the weight, and the second term to the consequence.

 

There's still a problem if we have a variable number of consequences, but I think I can rule out that possibility, or at least use multiple roles to partially address it.

 

This can work.