Finishing 0.8 Part II

Lots more progress this week! Still feels so great to be back into coding, and make solid and rapid progress on the conversation systems too; it’s striking how much can be done in a day when one really focuses. In keeping with our new method of rapid blog-entry-writing which is something akin to a changelog, here we go:

  • Finished off all the possible “annoyed responses”, which fall into four categories, which I’m calling “general responses”, “class responses”, “default responses” and “special responses”. When you ask someone the same thing twice or thrice, they give increasingly annoyed or puzzled responses; then, when you ask again, one of these comes into play. 50% of the time when you ask someone the same question over and over, they’ll give a response similar to the responses they gave when you’d asked the same question twice or thrice, i.e. “why are you still asking me this?”, which will sound more or less annoyed depending on their mood (“general”).
  • However, sometimes instead of a general response they will give a “class” response, which is a response tailored to their class. For instance, a ruler will specifically scold you for wasting their time; a torturer or a gladiator might make veiled threats about wasting their time; monks will express anxiety about the fact they aren’t getting on with their studies; and so forth. These give a nice little bit of flavour; roughly half of all the NPC classes have “class responses” of this sort when you get on their nerves, but they don’t always come into play. These will also later on appear when you ask irrelevant questions, as well repeated questions.
  • Then, the other 50% of the time (when general/class responses are not triggered) the game will look to see if there is a special response for being annoyed about that particular topic, which might be annoyed after giving a positive response (the NPC answered you, yet you keep asking) or a negative response (the NPC didn’t answer you, yet you keep asking). Some questions have special responses for positive/negative original answers, others just for one. If one exists, it then picks one; for instance, if you asked an inquisitor about heresy, and they didn’t answer, and you repeatedly ask, they might say “At this point, I begin to find your fascination with heresy concerning…”, or if you asked them about nearby volcanoes, and they answered, and you keep asking, they might give a snide response like “I’ve said all I can – these things are hard to miss”. If a special response exists, it is chosen 75% of the time.
  • Then, if there is no special response coded for the question and the specific positive/negative modifier in question, the game then goes for a “default response”. If they responded positively, they might say something like “I’ve told you everything I know about [topic]”, or if negatively, something like “I will not speak about [topic], can we move on?”. The [topic] in this case will be drawn from a large library of phrases, like “buildings”, “my health”, “my homeland”, “weapons”, “fighting”, “these tombs”, “noble houses”, or whatever makes sense for the topic.
  • These also vary according to mood, so an NPC who still likes you after your constant questioning might say “What interests you so much about [x]” or “I’ve already told you about [x]”, whereas an NPC annoyed with you will give sharper “Why do you persist in asking about [x]” or “I have got nothing more to say to you about [x]”.
  • What all of this means is that the responses of NPCs when you get on their nerves is tremendously varied according to their mood, their background, their NPC class, their origins, what you’re asking about, how many times you’ve asked them, a wide range of other factors. It would take a tremendously long time for anyone to come close to seeing all the possible annoyed responses in the general/ class/ default/ special response categories.
  • Some questions being asked repeatedly cause a bigger mood drop than others. For example, if you ask about sensitive topics, they get miffed much faster; if you ask about particularly mild topics, there is now a small chance they will not lose 1 mood; in general, though, asking a question twice will, 90% of the time, cause mood to drop by 1 (for those who don’t recall, “mood” is on a nine-point scale, and if it drops to 2, there is a 33% chance they end the conversation; at 1 there is a 66% chance they end it; if it’s at 1 and should drop again, they will always end the conversation).
  • Also, asking people from more hostile or more closed nations the same question over and over comes with a die-roll for an extra mood drop alongside the default “1”. What all of these points mean is that (in the extreme cases) asking someone from a friendly nation about a neutral topic will take a while to annoy them if you repeat the same query; asking someone from a much more hostile nation about their work as an inquisitor is going to tire them out extremely quickly; and all other interactions fall somewhere in the middle of that spectrum.
  • Lastly, some NPC classes will always have their mood drop faster if you annoy them: this means rulers of various sorts, top-tier military officers, inquisitors, archivists… basically any high-rank NPC will get annoyed with you far more rapidly.
  • I’ve also coded in what NPCs say when they want to leave a conversation with you; for now, this only happens if you ignore them. There are a wide range of default goodbyes that any class can potentially use, and some classes can only use because they don’t have special goodbyes. Other classes do have special goodbyes, where they will explain that they need to go and do X, or talk to Y, or handle Z, or otherwise that your inane blather is generally less important to them than whatever else they might be doing. They then conclude with a “goodbye”, “farewell”, or similar.
  • Note that these are very different from the goodbyes you get from NPCs if you say goodbye first and they echo the goodbye; they will give you at least a reasonably nice response back, even if their mood value is getting quite low. These goodbyes only happen if the NPC decides on their own account to end the conversation because whatever the player is saying is too annoying/irrelevant/distracting to continue the conversation.
  • On some goodbyes where appropriate, NPCs might mention the time, e.g. “Good day to you” or “I bid you good night”, etc, and the word used will be appropriate to the time of day, i.e. morning/day/evening/night.
  • Also, of course, made sure illogical goodbyes cannot be said – for example, a prisoner will not say “I must attend to other matters now!” and then just go back to walking around their cell; whereas free NPCs might say that, a prisoner might instead say “This conversation has become too trying”, or “Your tedious questions have become too much”, or whatever.
  • Added another 100 words/phrases that can be unpacked and spoken differently in each nation, and made sure they can conjugate all the other versions of the phrase sensibly; so “say” can be “say”, “utter” or “speak”, then “said” could be “said”, “uttered”, “spoke”, and “saying” can be “saying”, “uttering” or “speaking”, and so on and so forth. Also added new conjugations of existing phrases or words which hadn’t previously been put into the database.

Next week? I’ll be playtesting all of this stuff, and once that’s all working fine, working on some other aspect of conversations. As mentioned before, I am actually not trying to do everything needed for conversations per se for 0.8 – the “metaquestions” (“What do you think of [artwork]”, etc) are being omitted until 0.9 at least, for example – but just enough to get the release off the ground and let people explore the central elements of the conversation system. As well as playtesting these elements, I want to start going through all the questions you can ask people, and check those work – I’m sure there are some bugs or typos in there I haven’t spotted yet. I’m confident by the end of next week I can have all that done, after which I’ll start working on having things like “[god]” or “[nation]” or “[house]” or “[officertitle]” or whatever correctly appear in speech. Those are a complex set of variables which will have to draw on a lot of different parts of the game, and I don’t want to tackle that until everything here, and the standard Q&A, are all implemented. See you all next week!

Some of the new word variables/extensions, where the comments remind me which other conjugations also need to be covered:

The general words people will use when they ask things like “why are you still asking me about X”:

As you can tell, a large part of this week has been writing massive lists! At least next week it’ll be back to playing the game itself and seeing how things play, so hopefully some in-game screenshots will come your way next time…

Be Sociable, Share!

31 thoughts on “Finishing 0.8 Part II

  1. To be honest, you and your work is one of the greatest sources of inspiration for me, thanks to which i have started my own crawl in world of programming (LUA, mostly). Thank you.

  2. Wow, this adds yet more depth to conversations. I particularly like the class-based responses.

    This is probably beyond the scope of URR, but I wonder about how to convey emotion in conversations that are text-based and lack narrative description or sound. You see this in the real world, with people misinterpreting text messages or email due to lack of body language, etc., which has led to the simultaneously useful and annoying rise of emoticons.

    In URR for example, the line “At this point, I begin to find your fascination with heresy concerning…” sounds ominous, but could just as easily be comedic based on context (imagine the inquisitor, perhaps tipsy, laughing as he says that). It’s difficult to convey emotion without seeing changes in a face, hearing tone of voice, or getting a text description of either or both of those two things (as we might get in a novel). Will there be any way to infer the emotion or ‘seriousness’ (for lack of a better word) in characters during a conversation in URR? Or should we assume that all inquisitors are serious all the time? Actually, that’s probably not a bad assumption to make…

    • Perhaps simple tag wouldn´t be too hard. Specially considering the game´s NPC´s already have moods. It ha sbeen used in text muçltiplayer games


      :Curiously: “The hell you doing?”
      :Angrily: “The hell you doing?”

      might not be good, but might be easy to implement. Color coded tags like this are something I am trying to implement in my own project and they help with emotion signaling for a relatively small investment.

      • Color-coding spoken text to show emotion is a really interesting idea! Reminds me a bit of the paragon/blue and renegade/red options in Mass Effect, although obviously with a lot more variation.There might need to be an in-game guide to some of the less-obvious color:emotion meanings, and there are some cultural and color-blind accessibility hurdles to overcome, but I can see this working. Perhaps there could be an option to customize the color:emotion meanings from the game menu?

        • Agreed on needing more variation for more emotions, and agreed on culture/accessibility questions, but yeah, colour coding could work. I like the idea of being able to customise it! Or, maybe one can customise a set of visual markers, so you can choose colours, or symbols, or a combination, or denote different moods? I’ll definitely have to think about this some more…

      • I don’t particularly object to that method, but I do fear those tags might take the player out of the world just a little bit, especially as I’m generally trying to build quite a “naturalistic” game world. I think the colour-coded tags idea is the strong one, and ditto the possibility of using characters like * for emphasis. I’ll probably end up trying them both out and seeing which one works better.

    • Just as others have suggested solutions, I don’t think this is beyond the scope. Right now, the main way is two-fold. Firstly, to an extent, what people say will of course give *some* sense of their tone; nobody is going to insult you in a pleasant tone, for instance. Secondly, the ends of the sentences are designed to give the player some more information about this: an “!” will imply they’re very positive, a “…” is very negative, and “.” is somewhere in the middle, or could be either. I know these aren’t perfect, but they’re a start. I love your tipsy inquisitor example, and you’re right, something more might be needed. I think the colour idea has legs, and possibly surrounding messages with other characters, such as “*”s if especially angry?

    • Great to see the conversation work coming along so nicely. In my own work I’ve been mulling over the problem of conversation-generating data structures myself, so it’s always interesting to read about how other people are tackling these issues.

      Do you think you’ll try factoring “voice” or “speaking style” into your lists at some point? I’ve noticed in many of the examples you’ve shown, the speakers all tend to speak with a fairly formal style or voice, which risks making them come across sounding rather same-y. For example, “At this point, I begin to find your fascination with heresy concerning” comes across as formal and educated, for example. Whereas an NPC who is a rougher dockworker or miner, for example, might be more likely to frame a similar response as something like, “Now look here matey, you’re getting on my nerves with all this heresy talk!”

      I’m personally of the opinion that the tone/cadence/voice/speaking style of a character is the most important factor in giving them individuality, more so than volume of variety – although variety is important too, of course. My dream procgen dialogue engine is one that would be able to mesh together all the variables of character traits, feelings, education level, and so and then spit out a character-and-situation-appropriate response that feels true to the character’s personality. Ah, it’s exciting to think of it.

      Anyway best of luck with your new life balance goals, and I’m looking forward to 0.8!

      • Thanks for the comment! It’s awesome you’re looking into conversations too, and it’s great if my own efforts/ponderings in this area wind up being of any help.

        Voice/speaking style: to… an extent, yes; although if one asked another NPC about heresy, they would generally say they weren’t interested in responding, but I am trying to broaden the range of voices that NPCs can speak in. At the same time, though, this might need to be a 0.9 rather than a 0.8 think; trying to add informality is just another level of complexity. Of course, not that that’s a bad thing, and I’m certainly not objecting to adding extra levels of complexity, but I think it’s something that needs to wait a little beyond the first release. As for the “dream procgen dialogue engine” – I mean, that’s what I’m aiming for! Though people are going to speak in *relatively* similar ways this release in terms of tone, things like traits, feelings, background, etc, are all being factored in now (in this regard, this week’s blog entry I’ll be uploading just a few minutes after I post this comment will give some more info). And many thanks for the good wishes, I really appreciate them :).

  3. Will the game keep a log of conversations?
    I completely agree that repeatedly asking the same question should get npcs annoyed, but sometimes life distracts you. You know, you get that bit of dust in the keyboard that forces the enter key to stick thus skipping vital information. Or the cat jumps on the keyboard, whatever. If the clues are gone forever, would be enough to rage quit.

    • Heh, good point; yes, definitely, but not in 0.8; doing the “minimum” I can for a functioning version of the conversation system. But yes, I’ll totally make sure conversations are stored and can be accessed/searched again.

  4. >As you can tell, a large part of this week has been writing massive lists!

    I understand that you do not want to make your game open source, but could you consider releasing your corpus under a Creative Commons license so that future rogue-like developers could reuse your corpus when developing their own games? Doing so will make it much easier for a developer to implement “qualitative procedural generation” since they’d start off with a boilerplate that they can customize to their own liking (rather than spend a significant part of time writing massive lists). And obviously, you don’t have to release *everything*, you can probably release 75% – 85% of the corpus, and keep some of the “custom” bits related to the gameplay of “unmasking/fighting the secret conspiracy” hidden.

  5. hmm… you could also add some additional responses which come into play when the character talks to an npc again which he annoyed or unnerved previously, like, eg.
    „Oh, it’s YOU again.”
    „Please, you have already found the door, so please close it. From outside.”
    „I would really appreciate it if you kept your questions to yourself this time.”
    „Would you mind bothering someone else?”

    • …forgot the polite, but spiteful ones:
      „I *might* answer your questions. If you *listen* this time.”
      „Oh! You. You know, I’m tempted call the guards. So keep it quick and be gone even quicker.”

      btw, do you intend to implement a kind of gift-presenting from visitor to host (like it is common in many cultures) and/or bribery? What I basically mean is „improving the odds” and (re)gaining favour to some extent by it? Or losing favor/worsening the odds by *not* bringing a gift?

      Regards & happy coding!
      (I want to play 0.8… sometimes being patient is tiresome even if you know it will pay off … 😉 )

      • The gift-presenting is also a totally great idea; I had considered bribery, but I hadn’t considered giving gifts. There is an early draft of a trading screen in place, although that will only be a placeholder for 0.8 (as that’s an entire system by itself to be implemented in the future). I can basically just allow you to select items in your half, and no items in the other half, and then maybe the confirmation… yes, I know how this will work! The “confirm” button will change wording; if you only put things in your side, it says “Gift”; if you put things in your category and their category it’ll say “Suggest Trade” or “Trade” (if in a store so you know prices); if you only put things in their category, it’ll say “Demand”.

        And thanks! I… can’t believe quite how long it has been in development. This will never happen again. But the burnout is done, and I’m moving past it, and loving every second of being back to coding; I’m deeply excited about the future!

        • Heyheyhey… we don’t want to hear you apologize like that („will never happen again”) for the delay when there were good reasons for it to happen. It is your one-man’s-project, and „when it’s done”, it’s done, not earlier. That it has a lot of attention should not matter in this context –– you know what I mean, there’s always something not working as planned or screwing up where it shouldn’t. As an IT professional I know a lot of such cases ;-)))

          • A quick note on the trade screen button text:
            Don’t generalize into „Gift” when there is only an item in the PC side selected, or it will break trade in those cases where the player only wants to sell something, without buying anything.

          • Ah, not to worry – in the case of selling, one would put one’s item in your side and put their money in the other side, in which case it would register as “sell” (or buy if the other way around). My intention, given that there will be many currencies in the game of different relative values and use in different contexts, is to have currency be *items* rather than just a “number” on the sidebar somewhere; so that’s how that will work!

          • oops… pressed „post” by accident…

            Concerning the inventory/trade screen button text:
            *don’t* do it that way. It will break those many occasions where the player wants to buy-only or sell-only. Better use additional buttons or another „Give/Demand” action for that (same screen, where the button says Give/Demand instead of Trade).

      • Oh, should have said in first reply; I think the idea of “boosting” an NPC’s mood through gifts is actually a really great one, and could set up some great additional situations where money and items influence the player’s actions!

        • glad you like it –– but consider the following as a general concept: the wrong gift should do the reverse. Eg, giving a statuette of the goddess Azura to a follower of Mad God Tarjan (borrowing names from Morrowind and Bard’s Tale) might not be a good idea and take you so much closer to being, politely put, an unwanted encounter…

          • Hahaha, lovely idea; I hadn’t considered gifts that wouldn’t be “good”, but would be actively “bad”. Or you go to the ruler of Nation X who hate Nation Y then you offer them a dozen shields of their fallen soldiers slain by Nation Y… heh, there’s a lot of excellent potential there!

    • Heh, I like all of these a lot. I’ll definitely add those in for when you return to a conversation! I’ll also do so for “culture” memory as well as “individual” memory, so you might get something like “Ah, you’re the person who has been asking around about the church…” or whatever. Those will be great additions – I’m so glad you suggested them!

Leave a Reply

Your email address will not be published. Required fields are marked *