Printing names for actions without "-ing"

I think I have the regexes worked out. Would someone who knows more about this mind looking over them for me?

First rule: cut \w*^(ing\b) (and somehow save it for later).
Second rule: cut ing\b from what remains.
Third rule: if it matches \w*<^aeiou>\b add an e to the end using indexed text.
Final rule: if it matches \w*()(\1)\b cut the second matched group.

To save the unmatched part for later, would this work?

If the text to edit matches the regular expression [rule 1]:
let T be indexed text;
let T be the text to edit;
if T matches the regular expression [rule 2]:
[apply the other rules];
replace the matched text with T.

In other words, will the “matched text” be saved until the end? Or should I ask it to match Rule 1 again at the end?

It does, however, work roughly as wanted for NPC actions in response to direct instructions:

[code]The Place is a room.

Igbut is a man in place.
Igbut carries a sonic screwdriver.

Persuasion rule: persuasion succeeds.

Instead of Igbut doing anything: say “Igbut doesn’t want to [recap of command] at the moment.”; rule succeeds.[/code]

I think he meant by using phrases like every turn: Try Felix going north not as a result of a players command.

It’s actually a bit more complicated than that. The short version is that I’m having the NPC perform stored actions in a way that doesn’t come directly either from the player’s command or from a “try” action that’s directly typed into the source code. Spoilers for Faithful Companion in the long version:

I’m using Editable Stored Actions to have an NPC try whatever the player tried two turns before. So it’s not the player’s command and it’s not a stored action that I can find in my source text.

And in general I’d like to have something like this available for projects with NPCs that act relatively autonomously and unpredictably.

Oh. I guess I didn’t understand either

Well, you weren’t that far off. I’m already getting pretty deep into the weeds of messing around with stored actions before I try to drop the “-ing.”

Strangely enough that’s almost exactly the same thing I need it for. :stuck_out_tongue:

Ha ha, I’ve done it! I now have an extension that can conjugate any verb in the present or progressive tense, any grammatical person and number. It’s fairly expensive because it uses lots of regular expressions, but I haven’t noticed any significant lag if it’s called less than ten times per turn.

Cool. Shoot me a copy and I’ll be happy to see if I can test it. It could be nice for a 2.1 release of Faithful Companion; I had to contort my prose a bit to get the participle to fit.