reaching outside of vehicles

I am writing a practice game to help me review the manual. In it, I have an office chair that I have made into a rideable vehicle(to work with Nelson’s extension Rideable Vehicles), so I can go Vroom! into any of the rooms. The problem here is that I cannot seem to talk to my NPC while in(or, actually, ON) the chair, because that touches off my ‘rule for reaching outside of the office chair’, which is the response, ‘You’ll have to get off your lazy duff, first.’ How can I alter the rule to allow this? Because, presumably, I should be able to talk to an NPC who is nearby, but I would have to get off the chair for other actions.

Thanks.

Hm. You probably want to look at the “scope” section of the manual: inform7.com/learn/man/WI_18_29.html

You’ll need to exclude this case from your accessibility rule. You could put conditions into the existing rule; but my preference would be to have two rules.

Rule for reaching outside of the office chair when making conversation:
   allow access.

Asking someone about is making conversation.
Telling someone about is making conversation.
Answering someone that is making conversation.

Rule for reaching outside of the office chair:
    say "You'll have to get off your lazy duff, first.";
    deny access.

It’s curious that these actions all require touchable nouns in the Standard Rules (and listening to is another one). I don’t know why this is.

It almost seems like instead of making an office chair a rideable vehicle, you’d want to make it an enterable supporter that is “pushable between rooms”. Then it’s just a matter of finding the likey “can’t push something while the player is on it” check rule (no idea what it’s actually called - you’d need to set it up and turn on ACTIONS and try it to see what interrupts) and then overriding it when the player is on the office chair so you can “push the office chair north” while sitting on it.

ON EDIT: or possibly you could do it altogether with “Rule for reaching outside the office chair: allow access.”

I think “rideable vehicles” are really meant to be like motorcycles and horses and parade floats that would naturally restrict interaction with objects that aren’t also on the vehicle, which really doesn’t match what someone would do in an office chair.

I don’t know that it would make anything easier; your access rule will need a special case however you model it. The desired behaviour is to deny access for, e.g., taking, but allow it for conversation. But both taking and the conversation actions are set up to require touchable nouns. So whether you deny or allow access by default, you’ll need a rule overiding the default for some actions. It seems easiest to make conversation the special case.

Thank you all for your help!

HanonO, originally I did make it an enterable supporter that was pushable, but later I wanted to try out the extension, because I had never included an extension in my games(preferring to ‘figure it all out myself’–although you and the other experts on this site have proven indispensible)–also I thought the extension was for making vehicles out of something that the player gets ‘on’ rather than ‘into’, so I guess I was wrong. I’ll try your ideas and see if I can manipulate my access rules to make it work.

Thanks!

The main difference is: do you want >GO NORTH to bring the chair with, or do you want to have to >PUSH CHAIR NORTH? I’d go with the former, which means a Rideable Vehicle is the way to go.

HanonO,

The rule is the ‘can’t push from within rule’–I unlisted it (and used ACTIONS)–it made me get out of the chair first(and I don’t have a rule that would do this). Specifically, it broke the command down into three actions, in order-- (1)going [direction], (2)exiting - silently, and (3)getting off the swivel chair - silently. All succeeded, but I ended up not in the swivel chair.(for some reason, I could not ‘copy’ the list from the story panel) I guess I could add a ‘try silently entering the swivel chair’ to an After rule, such as–

After pushing the swivel chair to a direction: say "Vroom! You launch the chair in that direction..."; try silently entering the swivel chair.

I guess the ‘push it to’ action includes a ‘going’ action that forced me out of the chair, because that’s what would happen had I tried ‘going’ while in the chair…??

thanks.

Draconis,

You know, I think really what I want to be able to do is enable the player to do either one–maybe I could create an action such as ‘shuffling it to’–sort of like ‘pushing it to’(for pushable between rooms items)–so that when the player is on it, he could push it to another room, but also be able to say ‘[go][a direction]’ while he is on it, by including an ‘Instead of going while the player is on the swivel chair’ rule.
Actually, this is really only a practice game that I am using to help me review the manual so I can know the material more thoroughly and make better games. Trying to pick up stuff that I missed while I was creating and learning as I went. I really want to avoid using extensions ‘IF’ I can, though I know the Rideable Vehicles mechanism must be rather prohibitive to re-create…??

Thanks

This is the default behavior for vehicles–if you’re in a vehicle and you type GO NORTH, you and the vehicle go north.

That behavior is built into standard Inform–you’re correct that what Rideable Vehicles does is let you make a vehicle out of something you can get ON rather than IN. (I usually say I’m “in” a chair though!) Also I think standard vehicles will also restrict access from the same way, because if you’re in a car you can’t take something that’s outside of it, or even talk to a person that’s outside of it.

Anyway it does kind of seem like you want to have a vehicle and remove the access restrictions as well as the push from within rule. This lets that happen (without the accessibility modifications):

[code]Office is a room. “The hallway is to the west.” Hallway is west of Office. “The office is to the east.”

The office chair is a vehicle in the office. The office chair is pushable between rooms.

The can’t push from within rule does nothing when the noun is the office chair.[/code]

But it also produces two room descriptions when pushing the chair from within, for reasons I’m not sure of. And I have to go shovel the driveway!

Also I think standard vehicles will also restrict access from the same way, because if you’re in a car you can’t take something that’s outside of it, or even talk to a person that’s outside of it.

Yes, that’s kind of what started my trouble. I had made the chair a vehicle which was pushable between rooms, and I had to write some access rules, but it would not let me converse with my NPC.

Anyway it does kind of seem like you want to have a vehicle and remove the access restrictions as well as the push from within rule. This lets that happen (without the accessibility modifications):

[code]Office is a room. “The hallway is to the west.” Hallway is west of Office. “The office is to the east.”

The office chair is a vehicle in the office. The office chair is pushable between rooms.

The can’t push from within rule does nothing when the noun is the office chair.[/code]

But it also produces two room descriptions when pushing the chair from within, for reasons I’m not sure of.

Thanks, Matt, I’ll try this.

Whoops, looks like I did the ‘quote’ function wrong…

Matt, your suggestion worked. Also, I did an ACTIONS check, and it showed that when you say ‘push swivel chair south’, it will first attempt (1)going south–it does a look automatically–then says [going south–succeeded]. Then it attempts a (2)looking, and looks again.
But when I move into rooms in the chair, as I would a vehicle, it only ‘looks’ once.
As for accessibility, I kept in my original access rules(allowing access to the desk and its items), but added one more–

if the noun is a person: allow access;

This seems to allow conversation, and it doesn’t seem to affect any of the usual rules disallowing other actions done to persons.

So the only thing is the twice looking–which only happens after I say “push swivel chair [direction]”, while in the chair(I tried it outside of the chair, and of course it worked normally). Maybe I can say something like–

Instead of looking while the current action is pushing it to action:

But this will disallow the first look as well as the second, won’t it?

I looked into it a bit more, and I discovered that the pushing it to action gets handled by some I6 stuff that I didn’t want to try to figure out, so I punted:

[code]Office is a room. “The hallway is to the west.” Hallway is west of Office. “The office is to the east.”

The office chair is a vehicle in the office. The office chair is pushable between rooms.

Instead of pushing the chair to a direction (called the way) when the player is in the chair:
say “You scoot along in the chair.”;
try going the way.[/code]

The Instead rule just captures the pushing the chair to action before it even hits the check stage (where the can’t push from within rule would apply) and turns it into a going action, which does what we want. Also this gives us a hook for a message about it. (Technically it also means that the action of pushing the chair to the west fails, which usually won’t make a difference, but should you find yourself in a situation where that matters you can add “rule succeeds” to the end of the rule and the action will be recorded as having succeeded.)

Thanks so much, Matt.

The double room description is down to the ConvertToGoingWithPush routine in Actions.i6t.

The routine (for actor pushing object to direction) is roughly:

  1. move object to actor (unless actor is in object);
  2. try actor going direction;
  3. move object to location of actor;
  4. (if going succeeded and player is inside object) try looking.

The problem is that if the player is both the actor and inside the object (and only in that case), both 2 and 4 cause a look. I guess that could be considered a bug, though its pretty esoteric (I don’t think I’ll report it). Redirecting the whole thing to the going action is an easy workaround anyway.