Check an actor putting something on (this is the convert put to drop where possible rule):
if the second noun is down or the actor is on the second noun,
convert to the dropping action on the noun.I get the “down” part, but can someone explain the idea behind the “actor is on the second noun” part? I’d like to just replace the rule without that bit, but since I don’t really understand why it’s there I’m worried if I’ll mess something up without realizing it.
I’m curious why that rule is in there. Is it just to shortcut checking other putting down rules? If we can quickly convert it to a drop it would bypass all the other checks for put? Is it done for efficiency reasons or is there something else I’m miss understanding?
BTW: I’m a software developer so not only do I love creating IF, but the internals fascinate me as well.
Inform defines several physical relationships, such as containers and supporters. The grammar lines define “put X on Y” and “put X Y” as the putting something on verb, but it can’t tell at that stage what physical relationship is intended. The check rules then consider various conditions to decide which one is relevant.
The down part of it is because the player might type “put apple down” which the parser will interpret as “put the apple on the down direction” - clearly not the right result.
The interesting part about the second condition is that it implies that when dropping things while on a supporter, it will put the objects on the supporter rather than into the room. I didn’t know it was smart enough to do that! But does that mean that if you’re on a ladder and you drop something, it will say that the thing you dropped is also on the ladder…?
harpua, have you had a look into the Standard Rules extension? With all the commands and actions listed in there, it’s a good way to see what Inform is trying to do by funnelling various commands.
So the section for “put” looks like this:
Understand "put [other things] in/inside/into [something]" as inserting it into.
Understand "put [other things] on/onto [something]" as putting it on.
Understand "put on [something preferably held]" as wearing.
Understand "put [something preferably held] on" as wearing.
Understand "put down [things preferably held]" or "put [things preferably held] down" as dropping.
Longstanding IF tradition is that DROP always means ‘I want to drop an object in my location’. The default interpretations of PUT are listed above. So the ‘convert to drop’ rule is just Inform trying to respond to what it thinks the player really wants to do if they type something like ‘put apple down’. At such time we don’t want inserting, putting it on, or wearing - we want actual dropping, so Inform switches to that action. It’s not so much about bypassing checks for PUT as deciding that PUT is entirely the wrong action this turn, at least as Inform has defined it.
Bear with me here, I’m a little slow on the uptake.
I’m with you so far.
But why? I don’t see how this is any different to following the standard putting it on behaviour.
Edit: Sorry, having read the subsequent posts it does kind of make sense, I think. But in real life, if I was standing on a table and decided to put something on it, I wouldn’t just drop it, I’d squat and place it down. So I think I’ll just change the rule.
You’re probably right, Dannii. I just can’t think of a single circumstance where dropping would be the desired behaviour, unless the player was for some story reason physically unable to stoop and put the thing down. Am I missing the point?
And “put cornichon on down” results in “You must name something more substantial,” because the second noun is supposed to be touchable (I think). Which may mean that the “if the second noun is down” is just legacy code.
mostly, I think most games after Adventure don’t really distinguish dropping an object and squatting to put it on the floor or whatever you may be standing on. And if they did then dropping wouldn’t be the desired response when the player types “put egg down” even if they’re standing on the floor. Which is to say that the standard dropping action is equally (in)appropriate whether or not you’re on a supporter.
I’m speculating now, but is it because of the way Inform models the fact of you being in or on something as if you were in a ‘new’ location, albeit one where you might be able to see stuff in the enclosing location? That is to say, it’s some kind of symptom of the way Inform models containment? That it would prefer to think of you as dropping it in your current location (atop the ladder) than placing it on the ladder.
Maybe it helps more if we think of ‘putting something on something’ as an action more geared to expect a specific result (though doesn’t necessarily have to be). Like Indiana Jones putting an idol on a pedestal, triggering a switch. We don’t necessarily have to think of DROPping as gracelessly hurling an object to the floor, but it’s about putting it down nearby in our current location without expectation of further result, and without carefully putting it in a particular place.
In a 2-word Scott Adams game, lots of stuff was implied. If you had to put something important on something else, DROP (THING) in the correct location would probably do the trick. I just see this DROP/PUT thing as about being about a basic level of finesse that’s developed in the parser over the years. DROPping is for basic discarding to the location, PUTting gives a more graceful mechanism for targeting where to put something, and maybe to get a result in doing so.
So again with the ladder, you can imagine yourself not tossing the thing to the top of the ladder, but if we’re not expecting something unusual to happen (like a secret door opening) when we put something on the ladder, I mentally file the action as ‘dropping’ in the IF sense. And it looks like that’s Inform’s default idea if we’re standing on top of something.
I think the point is to harmonize “drop ming case” and “put ming vase on carpet”, when one is standing on the carpet. If they funnel into the same action (dropping) then it’s easier to write a rule to cover that situation, if one happens to want to do that.
I wouldn’t say it’s a huge deal, but enterable objects are a bit of a corner case and this simplifies them a tiny bit.
I suspect so. There was a time (long before I7) when “floor” was a synonym for the down direction. This may be a dead reference to that.