Adequate subtype that mirrors backdrops?

Elsewhere, I asked about “boringthing” types that rejected your attempts to do much with them, so you knew they weren’t important. I managed to make a “boringscen” subtype that worked well as scenery.

But then I ran into backdrops I wanted to make boring. So I wrote this code, which compiles, but I’m worried I may be missing something abstruse.

a boringthing is a kind of thing. a boringbackdrop is a kind of boringthing. a boringbackdrop has a rule called move-rule.

after choosing notable locale objects:
	repeat with item running through boringbackdrops in location of player:
		set the locale priority of the item to 0;

after going:
	consider the shift-backdrops rule;
	continue the action;
this is the shift-backdrops rule:
	say "Setting backdrops.";
	repeat with X running through boringbackdrops:
		consider the move-rule of X;
		if the rule succeeded:
			move X to the location of the player;
			say "Moved quasi-backdrop [X].";
	continue the action;

r1 is a room. r2 is north of r1. r3 is east of r2. r4 is south of r3. r1 is west of r4.

when play begins:
	consider the shift-backdrops rule;
b14 is a boringbackdrop. move-rule of b14 is the b14-move rule.

this is the b14-move rule:
	if player is in r1 or player is in r4, the rule succeeds;
	the rule fails;

Am I missing anything I should know about backdrops? I don’t want to do anything tricky–I just want to make sure I have backdrop-ish stuff you can’t do much with.

I’m not sure if you’re missing anything, but since backdrops are implemented in I6 I’d be wary of trying to replicate them exactly.

Why not make “boring” an adjective, and then you can have “a boring backdrop” or “a boring container” (just like you can have “a scenery backdrop” etc)?

That’d be a good solution, though I was led to believe that adjectives ran things a bit slower than defining types.

With my code, though, I’ve uncovered a lot of different types that could be considered boring. So maybe I can and should forego the small boost in performance.

Or make a kind. A boring backdrop is a kind of backdrop. That way it is a backdrop, but just a special kind you can filter out.

I was going to say the same thing as HanonO. Make it a kind of backdrop instead of a kind of boringthing. That way you only have to replicate your own code, instead of a lot of deep I6 code that you can’t directly access.

@mikegentry @HanonO this is a good suggestion in general.

It sounds like something I’d use in the future, but one reason I would like to change something from a backdrop is that I’ve had problems with hint code that says

definition: a thing is hint-worthy:
    unless map region of location of thing is map region of location of player, no;
    if location of thing is unvisited, no;

Inform (or at least my version) throws an error, as backdrops don’t really have a location per se. So my converting a backdrop to mobile scenery could help. Now, I could put in special code for if the thing is a backdrop, but that gets tricky.

So I think I have a case for making a “dumb backdrop” type here. I think it’s time I poked through the I6 code to see what backdrops really do, to see if I can get away with what I’m asking about.

If you’re using them for hint purposes, perhaps you could use both scenery and backdrops - scenery for individual locations, and backdrops for multi-room or regional hints.

In my project, I went with an adjective for this sort of situation. Here’s the code I’m using, which you can tweak as you see fit:

A thing can be faraway or non-faraway. A thing is usually non-faraway.

Last instead of doing something (this is the can't generally interact with faraway things rule):
	let N be an object;
	if action requires a touchable noun:
		if the noun is part of a faraway thing (called the parent):
			now N is the parent;
		otherwise if the noun is faraway:
			now N is the noun;
	otherwise if action requires a touchable second noun:
		if the second noun is part of a faraway thing (called the parent):
			now N is the parent;
		otherwise if the second noun is faraway:
			now N is the second noun;
	if N is a thing:
		if we are listening to N, continue the action;
		if we are smelling N and the scent of N is not empty, continue the action; [In my game I made it possible to smell everything. You probably want to take this out]
		if N provides the property faraway response:
			say "[faraway response of N][line break]";
			say "[They're] too far away.";
		continue the action.
The can't reach inside rooms rule response (A) is "That's too far away."

Example of this in action:

The burgeoning rain is faraway scenery in Via Terminalis West End. The indefinite article is "the".
The description is "More than mist, but less than rain."
The burgeoning rain has some text called the faraway response. The faraway response is "The rain is barely there."
1 Like