[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Tads3] knowledge / 'seen' / npc knowledge base



Eric Eve writes:

One reason that springs to mind for distinguishing between known and seen
might be in connexion with the hints system; for example a goal might become
open on the PC's becoming aware of the existence of an item (known) and
closed when the PC physically finds it (seen). I can also imagine situations
where one might want to preserve this distinction in the isActive condition
of TopicEntrys, where what the PC asks may be different if s/he has actually
seen an object from what it would be if s/he had merely heard about about.
Good points. It does appear that at least some objects can be both known and seen, and that these two things don't necessarily mean the same thing. In this case, I would revise my suggestion for knowledge base thusly:

Let's have two vectors for each actor, one for 'knowledge' and one for 'experience' or something like that (I guess the latter would be able to include sounds having been heard or invisible objects having been felt or whatever -- but this is a complication which draws us away from my main point).

(The above seems nicer than giving each Thing an isKnownBy and hasBeenSeenBy vector, but that would work also.)

Whenever we encounter code which is to mark an object as known, we should add this object to the knowledge vector of the actor in question; likewise with the experienced or 'seen' stuff. This would simplify and expand the present setup as I understand it.

If we have a basis for this in the main library, any modules which need to deal with NPC knowledge don't have to write a new mechanism for doing this. (And I imagine this coming up in more than one module, so it would be nice to have some convention for NPC knowledge to avoid conflicts and streamline the code.)

(An example of good NPC knowledge (or sight) usage: the map data by which actors find the shortest route between rooms could include only connectors known to the NPC. Another: NPC knowledge of topics or objects; certain responses might be active only when a corresponding topic is known to the actor. Another: handling of a '>BOB, GO FIND THE BALL' command; this command might only work if bob has seen the ball before, or if the ball has already come up in conversation, or some such knowledge/sight precondition.)

_________________________________________________________________
Fast, faster, fastest: Upgrade to Cable or DSL today! https://broadband.msn.com