Making a "Rules" Command

Hey All–

I’m trying to make a RULES command, and Inform won’t let me.

Understand the command "rules1" as something new. Understand "rules1" as rules1ing. Rules1ing is an action applying to nothing.

Understand "rules" as rules1ing.

Carry out rules1ing:
	say "List rules here.".

Error message:

rules is a built-in Inform testing verb, which means it is reserved for Inform's own use and can't be used for ordinary play purposes.

I suppose I can just make a different command, but it bothers me to just not be able to do this. Is there a way around this, or should I just go with GUIDELINES or REGULATIONS?

1 Like

You forgot to decouple the “rules” grammar:

The Lab is a room. "It's a lab."
A rock is here.		
Understand the command "rules" as something new.
Understand "rules" as looking.
test me with "rules".

This works as expected.

2 Likes

Thanks. But is it a bad idea? I didn’t know RULES was a testing command and have never used it. Will redirecting it cause any problems down the road?

I use it all the time when coding and debugging. Turning it off for me would be about as helpful as turning my screen off. :wink:

If you want to use it in your game because (for example) you have some game-within-a-game element, or you just think that your players are likely to try it in some situation, I would create a different command for that and leave rules as it is for the debug build. You can always add the “rules” synonym for your custom action before release.

3 Likes

RULES is disabled when you compile for release so it won’t have any direct impact on the game, other than you not being able to use it in the interim which it sounds like you don’t do - personally I find it such a useful command while debugging that I’d be very loath to part with it, though!

3 Likes

Huh. Your sample code doesn’t compile for me. Still gives me the error message. If Inform hates it THAT much, fine. I’ll figure something else out.

I’m away from my computer at the moment, but does it work if you select release / compile to release rather than play/ compile for testing?

1 Like

I see. I just tried it in 6M62 and got the same error. The code works in 10.1.2.
Any reason why you might not be using the latest version. (Like maybe this is a WIP that was started in an older version and is now too big for you to want to risk upgrading?) Note that the new version allows you to compile to previous versions if needed.

1 Like

The debugging commands aren’t conventional commands; they’re weird special cases. You can’t replace them in 6M62, at least not if you’re compiling not for release. You probably can if you’re compiling for release; I’m not positive.

But in v10 you can just understand "rules" as new-actioning and it works. The rules debugging command automatically becomes !rules instead.

understand the command "rules" as something new is superfluous. It compiles without error just like understand the command "any-garbage-string" as something new compiles without error. I7’s “thought process” is: “does it contradict anything to say that this is meaningless? Nope, let’s move on”, not “the author may have made a typo or is otherwise confused about something, I should give them a warning”.

5 Likes

I just haven’t packed up and moved yet. My plan is to make the change with anything new in 2023. This one has been kicking around for a while.

I’ll just find an acceptable synonym. Thanks for the help!

1 Like