Object Response Tests by Juhana Leinonen

This topic is for discussions related to Object Response Tests by Juhana Leinonen

Is it possible to use TRY with verbs that take two nouns?

“Try unlocking the box with the golden key.” Just use whatever preposition was used to define the action.

I meant to automate testing actions with two nouns using Object Response Tests extension. Here is what I meant

After defining, for example, a new action like:

Feeding it to is an action applying to two things. Understand "feed [thing] to [thing]" as feeding it to.

Then making the new testing rule:

This is the test feeding it to rule: announce tests for "feeding [the noun] to [the second noun]"; try feeding the noun to the second noun.

Then adding it to the testing table:

Table of analyzing actions (continued) topic testing rule "feeding it to" test feeding it to rule

Then compiling and using TRY FEEDING IT TO , I get things like this:

[code]feeding the telephone to nothing:
You must supply a second noun.

feeding the chair to nothing:
You must supply a second noun.

feeding yourself to nothing:
You must supply a second noun.[/code]

I would like it to automate try feeding everything in the room to everything in the room. That is what I meant.

Ah, I see what you mean now. The object-analyzing action takes only one object, so the second noun will be undefined during that action (which is when those test rules run). The giving it to action has a test rule defined thus:

This is the test giving to rule:
	if the noun is a person:
		if the test-actor is not carrying something:
			say italic type;
			say "(no inventory items; can't test giving to.)" (A);
			say roman type;
			say line break;
			rule succeeds;
		let give-object be a random thing carried by the test-actor;
		announce tests for "giving [the give-object] to [the noun]";
		try the test-actor giving the give-object to the noun;
		rule succeeds;
	if the test-actor is not carrying the noun:
		rule succeeds;
	unless the test-actor can see a person who is not the test-actor:
		say italic type;
		say "(no other people in the location; can't test giving to.)" (B);
		say roman type;
		say line break;
		rule succeeds;
	let give-target be a random visible person who is not the test-actor; 
	announce tests for "giving [the noun] to [the give-target]";
	try the test-actor giving the noun to the give-target.

You could try something like that.

Thanks a lot Draconis!

Version 6 is incompatible with 6M62. A new version has been submitted to the Public Library and should appear there soon. In the meanwhile version 7 can be downloaded here: raw.githubusercontent.com/i7/ex … 0Tests.i7x