I have implemented the new actor attributes and deleted the old ones, but this has created some difficulties. There are now a number of poisoned scripts with undefined terms — the old attributes that have been ripped out. I’m wondering if this means that I should rip out the verbs that require them.
But another problem, even more serious, has arisen. How am I to organize the huge mass of texts that will be used in the single verb Combat? I’m proposing to have hundreds of these things. I could simply make them all random, but it seems that I should attempt to coordinate the text with the personality of the actor. Remember, there are something like 80 actors here. I’ll also want to take into account their immediate history. I need a system here.
I could break it down by actor, but that would require 80 different verbs, one for each actor. I could simply duplicate some of the texts for each actor, making minor changes along the way. That would work, but how in the world would I break down the 80-verb set? I’d have to use a tree, but how to organize the tree?
I could give a new attribute to each actor: Number2BNumber(actor index). Then the path down the tree is selected by a sequence of if-statements. Gad, this would be clumsy, because I’d need more than 80 such if-statements. I suppose this is what copy-and-paste is for. Still, the 8-bit programmer in me rebels.
With 80 actors, I’d need a tree seven layers deep, and it would take seven minutes of story-time to execute.
Plan B is to do it all with one monster text script, something like this:
PickUpperIf
AND
TopBiggerThanBottom(Number)
BNumber2Number of
IndexValue of
ThisDirObject
31
TopSmallerThanBottom(Number)
BNumber2Number of
IndexValue of
ThisDirObject
33
Text for Actor #32
{Nest of above for Actor #33}
We could make this easier to read with a custom operator:
CustomOperator IsIndex(Index)
AND
TopBiggerThanBottom(Number)
BNumber2Number of
IndexValue of
ThisDirObject
Index
TopSmallerThanBottom(Number)
BNumber2Number of
IndexValue of
ThisDirObject
Sum of:
Index
2
PickUpperIf
IsIndex(31)
TextForActor#32
PickUpperIf
IsIndex(32)
TextForActor#33
This could be condensed into a binary tree (much faster execution) using this approach (I’m going to cheat and act as if there are only 64 actors):
PickUpperIf
TopBiggerThanBottom(Number) of
BNumber2Number of
IndexValue of
ThisDirObject
32
PickUpperIf
TopBiggerThanBottom(Number) of
BNumber2Number of
IndexValue of
ThisDirObject
48
PickUpperIf
TopBiggerThanBottom(Number) of
BNumber2Number of
IndexValue of
56
But this is all so clumsy and messy. I wonder if I shouldn’t create a special operator in the code to handle this kind of problem? It would retrieve a string from an array.