Is it possible to check if a text ends in a period without using indexed text?
Maybe it’s silly, but I’m aiming for a no-indexed-text game.
I’d like to do something like this:
Rule for writing a paragraph about a person (called P):
Say "[initial appearance of P]";
if the initial appearance of P ends in a period:
Say " [He's-She's-It's for P] ";
otherwise:
Say " is ";
Follow the behavior of P;
(where behavior is a person-based rulebook that says what P is doing right now)
It’s not really necessary, but I didn’t like the way the initial appearance of every person looked when it ended in “is” or “He’s”.
I can’t argue with the no-indexed-text game – I’ve done my last few that way.
However, the only other way to determine what’s in a string is to write some I6 print it to an array. That’s easy, but it’s essentially recreating some of the indexed-text mechanism for a specific task.
Since you’re trading off game speed for programming effort anyway, you might as well define a separate property:
A person can be initial-appearance-periodic.
Then apply this property to any person whose initial appearance ends with a period. You’ll have to keep that in sync by hand, of course.