JWZ's TADbits (#15: some Lite overlap)

A smaller dump, but this completes my “scratch pad” list of items that were all put in one place… from here on out I’ll have to wade through my source code itself and extract the rest, probably much more slowly.

RANDOM TADBITS #4

With Noises, take into consideration whether you should set isMassNoun or isQualifiedName, or else your transcripts might end up with things like "You can’t do that to a singing. "


It may be useful to realize that whatever a TopicEntry is marked as for isConversational, any AltTopics added under it will copy the same value without having to be defined themselves.


Ordinarily, getEnteredVerbPhrase will return a string with placeholders for the grammatical objects, like: ‘put (dobj) in (iobj)’. Be aware (for testing purposes etc. where you may be making assumptions about what the method returns) that in the case of implicit actions, the parenthesized placeholders are replaced with actual object names! Have not yet dug to the bottom of that, but the answer is probably somewhere around action.t, line 757, where if the condition is not satisfied, literal text is added to the string instead of the “(dobj)” etc. placeholder.


Something to be aware of: if in a certain location or situation you wish to prevent a wide range of actions with one particular message, beforeAction is not going to prove as helpful as you might hope. Again, if the point is that you really want this situation-specific fail message to show, it’s probably not going to in a lot of cases because beforeAction comes after verify, and so a lot of actions will just be failing with stock responses. I can’t remember what prompted me to make this note, or what I did instead, but this approach would be my suggestion, for adv3 perhaps around line 1346 of action.t in doActionOnce before verifyAction is called.


I found a number of NestedRooms or Vehicles in my game where I wasn’t interested in hearing the customary “You are in the [obvious place].” acknowledgment on every EXAMINE or SEARCH. A quick fix is:

modify BasicLocation
    showPCSD = true
;
modify me
    useSpecialDesc = inherited && location.showPCSD 
;
bench : Chair
    showPCSD = nil
;

I’m afraid I don’t recall the exact circumstances of this one. But I believe that if you try to make a Booth a MultiLoc, if there is a situation where an Actor is reported in that Booth by remoteSpecialDesc (probably because of a DistanceConnector), then you will get a run-time error. I never troubleshot the whole thing at the time, and ended up implementing the Booth as two objects rather than a MultiLoc.
[Edit: I couldn’t reproduce the error, but I know it was a hair-pulling experience at the time.]


I seem to recall getting errors by trying to locate MultiInstance objects within Booths (or perhaps any Container). If I get around to recreating that scenario I’ll report more on it.
[Edit: I tried a test scenario and it seemed to work, but I know that at some point there was some complication that drove me to abandon using MultiInstance to populate several similar Booths with similar features, and put those features under each separate Booth with + instead.]

4 Likes