carrying a person; verbose debugging output

Hi –

I’m an experienced programmer, but new to Inform 7.

In trying to understand how the parts of the system fit together, I was reading through the Standard Rules, coming across the second rule in the “check” section:

I’d like to make one or more classes of “people” carryable (which means takable?). Say, a baby or a miniaturized person or a pet cat – I want to be able to pick up such a character and move him / her / it, and set the character down again in some other room or some container or the like.

I tried a couple of things (alternatively):

and

But neither of these seemed to allow me to pick up the cat:

So, a couple questions:

  • What steps are required to make persons “takable”? Should this have worked, or am I missing other rules that need to be tweaked to allow this to happen?
  • Is there some other approach to carrying around a person that isn’t the “take” action that could be more appropriate?
  • Is there a known example of doing something like this in an inform 7 IF game that I could take a look at as an example?

In a related note, is there any way to put Inform into a verbose/debug mode so I can see in excruciating detail how it’s responding to my command? I want to know what series of rules/rulebooks/steps my command “take spot” went through, and which rule actually rejected it and produced the message I see printed in response?

I kind of like Inform 7, but I find the Natural Language “squishiness” kind of hard to reason about and to know what all the rules are. I think given some time, I can learn the rules of it and work with it, and might even like it. But for other folks out there who are programmers and have used both I6 and I7, might I6 be a better fit for an IF author who is starting from the perspective of “software engineer”?

Thanks,
Matt

Try typing the command “rules” (or “rules on”) while the game is running in the Inform Development Environment – does that do what you want? (You can also try typing “actions” to see what actions it is performing.)

…and I think your problem is that the name of the rulebook is the “check taking” rulebook rather than the “check” rulebook; each action has its own check/carry out/report rulebook. So this should work:

The can take cats rule is listed instead of the can't take other people rule in the check taking rules.

Though you’ll need to write the rule so that it stops you from taking people who aren’t cats (or other takeable people), thus:

Check an actor taking (this is the can take cats rule): if the noun is a person and the noun is not a cat, stop the action with library message taking action number 3 for the noun.

Thank you sir! Yes, that was the problem; don’t use the “check rules”, use the “check taking rules”.

This seems to work well:

[*** Take some people rule ***] A person can be takable or untakable. A person is usually untakable. Check an actor taking (this is the can take some people rule): if the noun is a person and the noun is untakable, stop the action with library message taking action number 3 for the noun. The can take some people rule is listed instead of the can't take other people rule in the check taking rules.

I didn’t know about tracing with “rules” and “actions” – that’s the kind of thing I was looking for. Good to know. Thanks for that too.