How to make an action take up no turn?

I know I’ve seen this somewhere before, whether in the documentation or somewhere else, but now I can’t find it. How do I make an action take up no turn? Examine is the action in particular I’d like to be instantaneous.

I tried searching for it since I figured someone else probably asked this before, but apparently every word in “how to make an action take up no turn” is too common to search for. Seems overly restrictive, but no harm done I suppose.

I think the phrase you want is ‘out of world’, but I don’t know how to apply that to existing actions.

Here is rough code:

[code]“procedural” by Andrew Schultz

room 1 is a room.

to decide whether the action is procedural:
if examining, decide yes;
if taking inventory, decide yes;
decide no;

every turn:
if action is procedural:
decrement the turn count;
continue the action;
[/code]

There are probably details to tweak, but hopefully you can add new verbs already in place with little problem.

You might be thinking of WWI 18.14 Procedural Rules in the 6G60 version of the documentation. That approach won’t work now since procedural rules have been eliminated.

The fallback might be something like the following, which I can’t test in the new version yet since I haven’t upgraded:

[code]Examining something is instantaneous activity.

First turn sequence (this is the instantaneous activity takes no time rule):
if the current action is instantaneous activity, rule succeeds.[/code]

Then you can define other actions as being instantaneous activity and have them covered with the same rule.

Sorry if this just plain doesn’t work; like I said, I can’t test it yet.

Hm, yes…your code is a bit slicker. But I’ve been able to compile something like the above.

The name “procedural” is arbitrary for me. I chose “instantaneous,” but the compiler didn’t like that. So “freeturny” or something is a perfectly good word.

[code]“turn turn” by Andrew Schultz

take-no-time is a truth state that varies.

room 1 is a room.

Examining something is instantaneous activity.
taking inventory is instantaneous activity.
going nowhere is instantaneous activity.
exiting is instantaneous activity.

First turn sequence (this is the instantaneous activity takes no time rule):
if take-no-time is true:
now take-no-time is false;
the rule succeeds;
if the current action is instantaneous activity, rule succeeds.

check going south:
say “Bzzt.” instead;

when play begins:
now right hand status line is “[turn count]”;[/code]

The example above lets you define a boolean so you can/can’t take time. I compiled it in 6L & it builds on OtisTDog’s code.

Well I have no idea why, but aschultz’s code works perfectly. It even stopped my every turn rules from going off, which is exactly what I was hoping for.

In the interest of better knowledge, what exactly is going on in that code? I tried following it, but I don’t quite understand. What is first turn sequence (the documentation didn’t say anything on it except for one tiny mention)? And when will take-no-time ever be true?

If you poke around a bit in the Standard Rules (an included “extension” – really the basic default rules built into every project), it’s easy to understand this.

The turn sequence rulebook is one that is triggered after processing actions. It contains various rules that trigger things like running the every turn rules, advancing the turn count, etc.

By creating a rule that goes at the top of that rulebook, and by causing that rule to “succeed” (i.e. return true) if the action is instantaneous (as defined with “ is instantaneous activity.”), processing of the turn sequence rulebook stops immediately, and the other rules within it are not followed.

You might look into documentation on “kinds of actions” and “rulebooks” for more details, if that’s not clear.

The Standard Rules are a great place to look to learn about, well, anything. And it’s not just a matter of searching text and helping. The RULES ON command is a big help when I want to see what is firing, when. It will tell me when a rule I made didn’t fire, and which is trumping it. And that often leads back to another Standard Rule.

You don’t want (or need) to tinker with Standard Rules, as you can create procedural rules to zap anything you don’t like, e.g.

the block singing rule is not listed in any rulebook.
the block burning rule is not listed in any rulebook.

This is all I really knew about big-picture rule organization for a long while, but it’s good enough to start.

Standard Rules is in C:\Program Files (x86)\Inform 7\Inform7\Extensions\Graham Nelson on Windows for 6G. It may be in My Documents in later versions. Just looking at it every now and then can really help to make sense of things that seem odd in Inform.

To be technical, this is neither a rule nor procedural. It’s a rule-listing declaration. (“Procedural rules” are what went away in this year’s Inform update.)

I see, thanks for all the advice. I’ll look through the Standard Rules sometime then!