Where to Next?

I'm a little lost just now. I've been working hard on the problem of plot generation, which is a difficult and demanding problem, but I am also grinding along with code issues, and have come to the point of no return on the data typing problem. Specifically, I am concerned with the decision to add a bunch of special objects to the substory record. I know that I've already made this decision, but it seems so damned messy. Isn't there any other way around this problem?

 

How about this: what if we assume that all those extra fields are empty, and just don't attach them UNLESS they have something in them. Thus, the substory record becomes a variable-length record. There's a set of flags indicating which fields have something in them; the remaining longs in the record hold the indicated fields. Thus, the data structure looks like this:

 

Short Subject

Short Verb

Short DirObject

Long Time

Short Location

Boolean WhoKnows[32]

Boolean Secret

Boolean Fallacious

Boolean ObjectList[16]

 

 

Perhaps we could accomplish the same thing with a linked list of objects; it would look like this:

 

SpecialObjectPointer FirstSpecialObject

 

SpecialObjectStruct {

Long Value;

DataType Type;

SpecialObjectPointer NextSpecialObject;

}

 

But would the editor be capable of enforcing datatypes with such an arrangement? In order to enforce data types it would have to look backwards... no this is far too complicated. Let's just go ahead with the damn clunky version.