Ghost touchObj PreCond? [Adv3Lite?]

I’m so confused…

Here’s my code:

// Badness value because there's another action that uses 'search'
// that should get priority, but that action is not the one being
// called during tests. It's PROVEN to be this action:
modify VerbRule(Search)
    [badness 20] ('search' | 'srch' | 'src' | 'sr') singleDobj :
    allowAll = nil

// The only thing I can come up with is I'm modifying the VerbRule
// incorrectly. However, here is the snippet where I prove that the
// precondition should be nil:

modify Thing {
    dobjFor(Search) {
        preCond = nil
        remap = nil
        verify() { }
        check() { }
        action() {
        report() { }

Nowhere else in my entire project am I modifying Search or dobjFor(Search). For some reason, it’s insisting to use the touchObj precondition at all times. I’ve proven this by making the touchObj precondition announce what action is calling it, and it’s being called from Search.

If I run a keyword search for Search, this snippet of code is the only place that has results.

I just don’t understand. I’ve tried everything I can think of.

Please send help.

Thank you for your time.

EDIT: Before anyone asks why I want a nil precondition for Search, it’s because Search is being used as a generic starting point for other actions, but the debug messages indicate those other actions are not being called. I’m going to set the precondition to objVisible later, but I’m setting it to nil as part of the scientific method here.

1 Like

Okay, so I just ran a test. If I remove the part of the code that modifies the VerbRule(Search) nothing changes.

So I can rule that out.

Also, the specific method that keeps being mysteriously called is reachProblemVerify(a, b), from a custom Special object. I’m pretty sure that method should only be called during the touchObj precondition, though. I don’t understand why a nil precondition is still causing that method to be called.

1 Like

In adv3 no preconditions are represented by an empty list, is that part different on Lite?
Is the thing in question a Surface? Because that overrides Thing handling and requires touchObj… for the Search verb


In Adv3Lite I think you can represent it with nil as well. I tried both nil and an empty list earlier.

I think it’s just a SubComponent that has isBoardable = true, but the parent object might be a Booth… I’ll have to check once I’m back at my computer in a few minutes.

It didn’t occur to me that classes would override the handling for Search. I’ll need look into this more.

Might also going to call a stack trace when the reach check starts. Maybe that’ll narrow things down. But I’ll check the overriding classes first.

Thank you for the new leads!


AHAHAHAHAHA this was it!!

The object was defined as the following:

cabinet: Platform { 'tall lab cabinet'
    "A locked, metal cabinet, likely containing lab materials. "
    isFixed = true
    isListed = true

    remapIn: SubComponent {
        isOpenable = true
        isOpen = true
        isEnterable = true
    remapOn: SubComponent {
        isBoardable = true

And Platform inherits from Surface!!!

Once I added these search mechanics to Surface, everything works smoothly!!!

Thank you so much!!


Yay, I helped someone with adv3Lite, and Inhaven’t even learned it yet! :joy: