I7 irrelevant remark

[code]Instead of asking Joe for screwdriver:
say “[‘]I got just what you want, podnuh,[’] Joe says.[line break]
Joe roots around in his stores and comes back to the counter holding up a cheap screwdriver.”;
continue the action.

The screwdriver is a thing in Hardware Store. It is undescribed.

Instead of buying the screwdriver:
if the wallet is not carried by the player or the dollars of the wallet are less than 3:
say “[‘]I can[’]t just give you the screwdriver. You got to pay for it, podnuh.[']”;
otherwise:
now player carries screwdriver;
decrease the dollars of the wallet by 3;
say “You hand Harley three bucks.[line break]
[‘]Nice doin[’] business with you, podnuh,['] Joe says as he hands you the screwdriver.”[/code]

Here’s what I7 does:

Hardware Store
A neat shop with all its wares stored in bins lining the walls. There’s an exit to the south.

You can see Joe here.

Make like a checker and jump!

ask Joe for screwdriver
‘I got just what you want, podnuh,’ Joe says.
Joe roots around in his stores and comes back to the counter holding up a cheap screwdriver.

(Joe first taking the screwdriver)
Joe has better things to do.

Mickey says it’s getting late. What’cha gonna do about it?

buy screwdriver
You hand Harley three bucks.
‘Nice doin’ business with you, podnuh,’ Joe says as he hands you the screwdriver.

How do I get rid of the sentence “Joe has better things to do.”?

The action of “the player asking Joe for the screwdriver” is converted automatically into “the player asking Joe to try giving the screwdriver to the player”. That action is phrased as a request, so it runs the persuasion rules to see if Joe is willing to do that. If he is, it then converts the action into “Joe giving the screwdriver to the player”, and runs from there.

By default the persuasion rules always fail, with the message “[Name] has better things to do.” You need to add a new rule if you want something different.

A new persuasion rule?

Persuasion for asking [person] to [action] when [condition]: persuasion succeeds.

I put that in there, and the unwanted sentence goes away?

It will result in Joe being willing to follow the player’s orders, so “ask Joe for screwdriver” -> “Joe, give me the screwdriver” -> Joe gives you the screwdriver.

In this case, I would put that rule in, then change your “instead of asking…” rule to “instead of Joe giving the screwdriver to the player”. That’ll neatly cover both commands I listed. And as an Instead rule, it’ll block the usual behavior, so Joe will hold on to the screwdriver until the player pays him for it.

As to the new persuasion rule, it didn’t compile. Any idea why?

Problem. You wrote ‘Persuasion for asking to when’ , which seems to introduce a rule taking effect only if the action is ‘asking to when’. But that did not make sense as a description of an action. I am unable to place this rule into any rulebook.

You need to replace [person] with the actual person’s name, [action] with the action you’re writing the rule for, and [condition] with the conditions under which your rule should apply. It looks like you just left those as is.

OK, I’m still a bit confused.

I could write:

Persuasion for asking Joe to sell the screwdriver when [condition]: persuasion succeeds.

What condition?

Whatever condition you like. In this case perhaps none is necessary, just remove the “when” part altogether.

But there is no action called “selling” unless you’d defined one. And even if there were, that would only fire if the player typed JOE, SELL ME THE SCREWDRIVER.

That seems like it takes me too far afield.

In the game, all the player has to do is type “buy screwdriver” and he does indeed take possession of the screwdriver. Do I really need the persuasion rule to get rid of the unwanted sentence?

No, you could also remove the “continue the action” at the end of your first rule. But it’ll come back again if the player asks Joe to do anything, such as “Joe, give me the screwdriver”.

I think that’s probably the way I’m going to do it; otherwise, it looks as if I’d have to rewrite a bunch of code.
Thanks very much for the help.