Esoteric Update #293 - A Touple Of Things


Today's update will be rather brief. I'm stuck in the middle of a few things, not having finished them in time, and a series of other things I'll talk about are a bit on the technical side and don't present well to a lay audience.

So, in no particular order... I wrote a filter that implements an inversion of first and second-person pronouns in a sentence. Or to explain by example, it takes a sentence like "I love you" and turns it into "You love me". Now, this is nothing new, as we had this in our version of ELIZA, but that uses a much less refined tokeniser than our engine, so moving it to filters just streamlines the process. It can both do more and cover more cases (around twice as many, in fact), doesn't get confused about tokenisation or operation order, and can handle multi-word tokens. It's just better.

I'm also experimenting with something concerning the generic NPC conversations to streamline referencing characters, but I've just got distracted from it around halfway; we'll see how it goes in the future. The point here is that there are cases where the character speaking doesn't need to be referenced by unique characteristic, but rather, it is possible to continue referencing the last established character. For example, if the previous character referenced in the narration is a woman who is the only woman in the conversation, recalling unique characteristics ("the blonde woman", for example) can be replaced with a third-person pronoun.

It is a very minor thing, but our grammatical language now contains the concept of a comment, and it can be used programmatically. There's just sometimes a need to comment on the code in a file containing a sizeable grammatical block, in which case doing so utilising the selector comments is not possible, it has to be handled differently because it is never touched by a selector. As I mentioned, it's a rather technical issue.

I've also added two small expansions to the scripting API. First of them is my take on a tuple assignment, which is not a big deal but is definitely a helpful construction. The second one is that I essentially took two tools that were so far written in the scripting language (str-base and str-params, or even more formerly item-base and item-params) and re-wrote/expanded them as scripting tokens (which means they are now defined in C#). While not offering much of a difference in what can be done with them, the new implementation is much easier to use, less verbose and generally just does more when it's needed (this was instantly used for a few things and, at some point, I'll sit down and replace all of the old uses with the new one).

I've also managed to generalise boxes to be modular. By default, a box meant to have a lock will be able to have a lock attached to it and essentially inherit the lock's properties, the kind of key it requires, and if it has any defined ways to force the lock. I should add that the box itself can also define methods of forcing the box, which I think works great. However, modularising locks raises the question of whether doors and boxes can use the same locks. The answer was initially no, but I'm changing that to a yes upon further consideration. I think it's cool that locks will have the same properties between the two applications. It'll also be an interesting case of a stand-alone item being used to modularise a different item.

The method for narrating rooms as they are "discovered" by the character is still a little bit up in the air. I've tested it, and it doesn't entirely cover all of the cases I want it to cover, and, worse still, it covers some of them badly. So, I'll have to think about this a bit and adjust the writing. But I think I'm getting close. To be clear, it's not even a complicated system in how it's programmed; instead, it's the case that the problem itself is wonky and not something you usually need to think about when doing text games. However, how we handle movement and perception, especially movement from other characters, ends up being essential. Due to these issues, I can't fall back to the usual solution to character movement in a text game.

Anyway, I was at the doctor's for blood tests today. The poor nurse took it badly. But it was brief and painless, though I do feel tired now. I'll return to the unfinished issues mentioned above tomorrow.

Get Esoteric ♥ Esoterica

Leave a comment

Log in with itch.io to leave a comment.