Today was spent polishing and re-polishing my "parting words" code.
The addition of this code is borderline frivolous, and I doubt that it will see a lot of usage. I had a specific use in mind, but after some reflection, I'm not sure that I can use it the way that I had envisioned. The script that powers NPC speech would require much finer control over what the NPC says – and when it says it. For example: the standard greeting for NPCs is "Greetings, Your_name_here." The NPC will then say its text, and when it runs out of things to say, it starts from the beginning by saying "Greetings, Your_name_here." I want a way for NPCs to recognize "oh, I've already said hello to Yappy, so I don't need to repeat that part." Furthermore, with this new parting words function, if the NPC's parting words are "And remember: tell no one of this matter!", then these words make no sense if the player moves away from the NPC just after being greeted. The NPC isn't clever enough to realize "oh, Yappy didn't listen long enough for me to tell him about this secretive matter, so I shouldn't be saying that as he walks away." I want more control over how NPCs speak to players. A really cool technology would be an NPC never having to say "stop me if you've heard this one before..." because it would remember what it has told you.
Writing this short bit of code has given me a better understanding of how NPCs process their chunks of speech. I feel that I this exercise has moved me closer to enabling NPCs To Talk To Each Other. I just hope that they're smart about it – and I hope that I'm smart about making them smart.
Kill An NPC Every Session
5 days ago
No comments:
Post a Comment