Greetings, Farewells, Compliments, Insults, Threats, Thanks

This week I’ve finished off the generator for greetings, farewells, compliments, insults, threats, and giving thanks; each of these can produce easily over tens of thousands of variations, and then when you factor in elements outside the sentence generator itself – the name of a god, the title of a ruler, and so forth – we readily push well up into the millions. In this entry I’ll talk a little about how these generate, give some examples, and look at the kinds of roles I want these elements to play within the conversation system.

In working on the speech generation, it quickly became clear that having a set of phrases distinctive to each nation will be an easy and quick way to potentially identify the national origin of a character you’re talking to (and an easy way to fake your own, if you know all the common phrases…) and so I’ve tried to break these down into appropriate groupings. In the end I decided that there were six major categories I could vary from culture to culture: greetings, farewells, insults, compliments, threats, and thanks. Each of these will be generated for each culture, and will also vary each individual time anyone says one, so one person from Culture X might say “So long for the time being, and may our great military leadership lead us ever forwards”, whilst another from the same culture might say “Goodbye for now, and let us hope our grand military leaders lead us forever onwards” – and so forth. This has required another large table of syllables, of course, but since these are very regular and common sayings I thought it was extremely important to make sure these varied even within cultures and between individuals, rather than (as with most phrases) having them vary only, or primarily, between cultures and religions and backgrounds, and so forth.


For greetings I wanted to make sure that these would be sentences that wouldn’t be too lengthy and therefore potentially annoying to see repeatedly, but should also contain at least a little bit of detail in them (this applies to most conversation elements, but I think greetings are particularly relevant in this regard). I went through several iterations of how these might be generated until I was able to settle on one that hit these two requirements (brevity and detail) reasonably well. At this point, therefore, greetings tend to be of the structure “[Greetings] [from] [X]”. The first element will vary between cultures and between individuals, such as “Greetings”, “Good [time of day]”, “I greet you”, “My greetings”, and so forth. These can sometimes be pushed to the back, so you might get “From X, Greetings” or “Greetings from X” – some variations are grammatically correct in both variations, whilst some are only correct in one variation, and this is all coded in. The second element will vary in the same kind of way – “from”, “on behalf of”, etc – and so will the third, which is inevitably the most varied element. This third element will look at who the individual is and the kinds of beliefs they have, and then generate or select an appropriate greeting as a result. In most cases they will explicitly mention their nation of origin (e.g. “Greetings from the brave soldiers of [nation]”), though in some rare case they will mention their religious belief in their greeting instead of a national or cultural origin (“My greetings on behalf of the zealous defenders of [god]”). As you can see from those two examples, in the first case it seems reasonable to assume the speaker is proud of their army – perhaps a standing army, or perhaps an imperialist nation? – whilst the latter is clearly strongly religious, so perhaps they come from a theocratic or religious zealous nation? Here are a bunch of examples – see you can take some guesses about the political / religious / cultural / geographical / etc backgrounds of the speakers…



So, farewells once more needed to be something that could vary sufficiently much and sufficiently often for them to not get boring when somebody might be talking to the player multiple times, or the player might be talking to numerous people in the same civilization or who worship the same religion. This varies by being broken down into polite, neutral, and sharp farewells. A polite farewell would be of the form “[1]” + “[2]” + “[3]” + “fond_farewell” + “specific_farewell” + “!”. So, this might be something like “I’m afraid I” + “have to” + “take my leave.” + ” Now I bid you goodbye, and” + “may you find enlightenment in study” (for a monastic nation). Or, alternatively, “Alas, I” + “must” + “depart.” + “I say farewell, and” + “may all of your hunts bring trophies and glory” (for a venatic nation). A neutral farewell does not contain the first section, and does not contain the “Now I bid you goodbye”, so whereas a polite farewell might be “I’m afraid I have to take my leave. Now I bid you goodbye, and may you find enlightenment in study!”, a neutral farewell would be “I have to take my leave. May you find enlightenment in study.”, whilst a sharp farewell uses the same earlier components and a different end component – rather than a culture or religion-specific end point, you would get something like “I have to take my leave. May all be well” – a generic, general departure which is sharp and not especially friendly. Again, here are some examples, which should give you clues about the speakers…



Next up, a pair of related elements – compliments and insults. Each of these will come up less often, but I still naturally wanted these to be very distinctive for each nation, and each example will be worded differently on each generation. “I wager you are as wise and far-sighted as a hawk”, or “I believe you are as clever and sage as the hawk”, or “I know you to be as smart and far-seeing as a great hawk”, and so on and so forth; it’s clearly the same greeting, but each person says it in a different way and will say it in a different way each time, too, to ensure that kind of variety is maintained. These again generate according to ideologies and religions and so forth, and I think they yield a very pleasing level of variation. Examples:



Insults were slightly tougher. Whereas compliments can work quite well if saying pleasant generic things, insults have to be relevant to a range of reasons why they might be insulting the player – refusing a trade, stealing from them, challenging them in combat, being a worshipper of a forbidden religion, or whatever. You wouldn’t want a character to kill somebody in an arena, and then someone from a pacifist nation praises them for their pacifistic tendencies. I’ve mixed things up to therefore create broader, and more sweeping sentences that should be applicable to a range of possible situations, whilst still allowing the character to say a logical compliment. Originally my plan was to make insults and threats fairly interchangeable, but just alter the first few words. So an insult would start “May you”, or “You should be”, “You ought to be”, or whatever, whereas a threat would be “I will see you”, “You will be”, “I will have you”, and the like. In the end I decided not to go with this model and to introduce variation between the two and thereby more overall variety into the conversation system (the kind of decision I’ve usually made!) and I split these into two. It was much easier to build appropriate threat generation than insult generation, actually, but the insults have come out really nicely and have a rather unusual sense to them; they’re quite distinctive, and run through quite a range of different ideas and concepts. Examples once more:



Threats, then, are similar to insults, and the variation is best illustrated simply by showing some examples:



Last, but not least: we have “thanks”. These start with words like “As”, “Being”, “Speaking as”, and so forth, and then something to do with their background, and then a form of thanks. For instance, someone from a conscript nation might say “Being a conscript proud to serve [herhis] [homeland], [thanks]”, or someone from a zealotry background might say “Being as one with the great light of [god], [thanks]”, and so forth. These are shorter and snappier than some of the other generated sentences in this set of six, but they work very well, and again get the point across snappily and effectively, whilst being relevant in a lot of situations. Whereas insults and threats were tricky because they were dependent on what the player had done to merit the insult/threat, thanks are dependent on the speaker who is relating what particular traits or characteristics they find especially valuable. Examples:


Next Week

By next week I should have these actually implemented into the game, rather than Python’s output log, and these will come up during conversations. I’m still deciding how exactly things will work with regard to when you say greetings – perhaps they will be automatic, or perhaps they will come up as a default option, or something like that – because I want these to be present to make conversations appropriate and smooth and realistic, but also not add unnecessary work greeting every time. Right now I think the best solution is for the game to automatically give you the greeting options when you open a conversation, rather than having you enter the greeting options manually, but I’ll try a few options and decide on which runs the best. Aside from that, I’ll be continuing work onto speech generation, and slowly moving towards the conversation system – the former is easier to get back into, so I’ve been working there so far, but I’ll now be slowly transitioning into handling the conversation system elements. See you all next week!

Be Sociable, Share!

10 thoughts on “Greetings, Farewells, Compliments, Insults, Threats, Thanks

  1. I greet you from the free lands of France !
    One such as yourself is well suited to the crafting of roguelikes !
    Being one who follows the ordained wisdom of my fellow internet lurkers, I’m most thankful for your devotion.
    I’m afraid I must depart, I bid you farewell and may you have a merry christmas !

  2. These are really well done, but they seem overly wordy to me. You’ve talked in the past about naturalizing and shortening phrases, and this is a case where that’s needed. Of course, these are very enlightening about the character and nation, but they should appear by chance, interspersed with shorter variations. The insults, for instance, look very repetitive, and an easy solution would be just removing the first sentence, say, half the time. The greetings and goodbyes, too, don’t need to be lengthy every time, and the thanks could do without the starting phrase.

    That said, I don’t really know the context as well as you, so perhaps it wouldn’t work in the game, or this was your plan all along! It’s your decision in the end.

    I love watching the progress on this! Thanks for posting these updates, especially the ones of speech generation – procedural text generation is a amateur passion of mine 😀

    • Thanks! As for wordiness, I suppose there’s two things: firstly, you’ll of course see them in a conversation rather than in a sequence like this, with lots of shorter words and sentences in the mix; and secondly, there are shorter versions for neutral or sharp responses! In the case of insults, the first sentence is indeed not always there (I’ll be updating this in next week’s blog entry). I do want these to feel somewhat natural, but I also acknowledge that in the Renaissance (the era in which URR is sort of set) English was spoken in a very different manner. And you’re welcome! Do let me know what you think of the next update…

  3. This has made me think of a couple of aspects of our language. First of all, have you planned for modeling idiots?

    By this I mean, individuals that are clearly a member of a given culture, etc, but get the conventions of their culture wrong? For example, “I speak English real good, I ain’t some dummy”. This same case could be extended to other less confident speakers of a given language, such as children or new adult learners.

    Also, I agree with Ryan, above. Many of these seem very wordy, especially when I compare them to the conversations I actually have. It’s only when speaking with people very unfamiliar to me that I speak in such a formal way. Among my friends and family, a simple hello or goodbye, or perhaps a constructions like “Hello, Lover”, or “Hey man, how’s it going”, for greetings. Goodbye’s are often, “Have a good one”, or “Take care man.”.

    As I think about it more, it seems that, there is an axis between formal and casual, and a sort of sense of decorum informs where a person will be on that axis at a given time, but that position is modulated by the familiarity and relationship of the speakers involved, and modified further by exigent circumstances such as time constraints, or some nearby danger.

    I don’t know, really, whether this added complexity would be beneficial. It would, however, let you sort of model a rapport developing between the player character and npcs, and could even serve as a warning of danger. If a guard you chat with often, who tells you the best dirty jokes, is suddenly terse and circumspect, perhaps something is wrong?

    Just some thoughts I had reading your post. Have a wonderful day, and thanks again for all of your hard work.

    • Firstly – that’s a really interesting idea! I hadn’t considered that at all, but I suppose I should. It won’t make it into 0.8, certainly, but once 0.8 is out I’ll return to the concept and see if there is some way I could work things into the generation system.

      Axis of formality: yes, definitely, and partly see my reply above; and partly a lot of these are for the nicest and most friendly comments, whereas less friendly comments might be shorter and sharper. I should soon be able to show some demonstrations of how these are now looking in practice, but maybe the formality will need to be toned down a little. And, also, these are the greetings and farewells and so forth, whereas I’m trying to make the conversations in the middle a little more fluid. But if it still feels too formal in a couple of weeks in the coming updates, let me know, and I’ll address matters…

      • Thanks for the reply! I’ll certainly keep watching. Some things just don’t look right until they are in their proper context, so it’ll be useful to see how it looks with the system fully in motion.

        As always, it’s a pleasure to read your posts and to get a glimpse into your thinking. Thanks for all of your hard work, and I’m looking forward to 0.8!

Leave a Reply

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