NPC Personalities, Option Responses, Insults and Compliments

This last fortnight has been extremely productive for finishing off the development of URR 0.8. It has been really great to properly get back into the swing of things and see, and be able to play, major changes to the game at the end of each night. I’ve produced three substantially new things this week – the first initial steps towards NPC personalities, the set of answers to questions that have a range of distinct options rather than only one possible reply with words being switchable in and out, and lots of extra detail for insults and compliments. I’m also about half-way through the establishment of a comprehensive baseline for conversations, meaning that the player can now successfully have a Q&A-esque conversation with any NPC they encounter on any topic, which is the biggest and most important first stage towards the full conversation system that’s being developed here. That will be finished by next week, and will be focus of next week’s blog post! For now, however, read on…

(Warning: due to the nature of this update being entirely programming, the adding of new content, and developing elements that aren’t yet finished and ready to show off, I’m afraid there are no images. Hopefully some screenshots will be back next week!)

NPC Personalities

Firstly this week, in the process of filling out the “options” responses (see below), I needed to actually come in and add some of the personality modifiers for NPCs. In some cases these apply to all NPCs irrespective of whether they are important or not, and in some cases they apply only to the important NPCs that game tracks independently as the player moves around the world, and then in other cases they are relevant only to important NPCs of particular classes (for example, only a gladiator needs to have a fully-formed opinion about the crowds who watch gladiatorial combat). There is now a pretty large set of personality traits that NPCs possess, which affect their actions and their responses – and as with everything, should give the player hints about their origins, backgrounds, allegiances, and so forth. There are definitely too many to look at them all in depth here, but there’s a few particularly interesting ones which I’ll recount here. These include:

like_of_other_countries: This personality trait, somewhat obviously, determines what individuals think about other countries beyond their own. As with many of the traits here, this trait is modified by a range of factors. These include the NPC class and background of the individual person, and the wider ideologies of their nation, and their religion, alongside a small random component throw in to ensure that two NPCs with the same demographics will not always match up exactly, but will still generally be within a logical variation on either side of a set of beliefs. For example, an “explorer” from an “internationalist” nation is likely to think very positively about the rest of the world; a “jailer” or “officer” from an “imperialist” nation is likely to think very negatively about the rest of the world; and so on across all the NPC classes, and potential modifiers for national and religious preferences. Taken on a broad scale, you’ll be able to identify commonalities and overall feelings in a culture, but individuals will still vary significantly according to their individual life experiences.

like_of_art: This trait determines what kind of interest the person has in artistic outputs (paintings, sculpture, etc – there is an equivalent for “literature”, which will cover books, poetry, etc). This is affected once more by the kind of NPC you’re talking to, and to the ideologies of the nation in question. For example, a nation with a strong cultural interest in aesthetics will naturally produce those who like art a lot more; whereas a nation with a strong intellectual interest in mathematics or mechanical engineering will likely be less interested in works of art. This will affect how much people are willing to tell you about the artwork of their homeland, how much they know about it, and give you some hints about the place of artwork in that culture and therefore where (and what) artwork you might be able to find, which might yield clues in your central quest.

religious_zeal: This is a trait affecting quite a range of responses. This will affect how NPCs respond to you if it becomes apparent that you belong to a different religion, what NPCs think about heresy, how friendly and well-disposed they are towards inquisitions and other religious rules and strictures, how they act towards priests, what kinds of money or resources they give to their church, and so forth. Although most obviously living in a theocracy will boost the average religious zeal, this still varies a lot between individuals, in large part from their status in society, their contact with other nations and religions, and their personal history and relationship with the religion in question. There’s a wide set of speech replies that draw on this particular trait, and I’m very happy with how these have all turned out.

policy_acceptance and X_preference: There is a set of nine related traits: the first is policy_acceptance, and the others are X_preference, where X is foreign, military, leadership, and so forth, for each policy grouping in each culture/nation. The first of these refers to the overall contentment of the individual with the general policies of their homeland. Leaders and regents will, naturally, be extremely positive about the policies that they themselves have implemented and oversee; nobles and lords will generally be very positive, but may express small amounts of concern about particular elements of policy; and so on and so forth across the full set of NPC classes, with some classes having much higher chances to have serious issues with the policies, and some classes having particular issues with particular policies – a jailer will almost always think building prisons is a great idea, a prisoner will almost always disagree, and so forth. The second of these, the set of eight preferences, refers to what policy the NPC would like to see implemented instead of the current policy in each of the eight areas. The number of “other policies” an NPC likes is dependent on their overall policy acceptance, and then what alternatives they like vary according to their NPC class and a range of other elements. For now these just lead to a wide range of interesting conversation replies, but in the future I’m hoping to do much more with these personality traits and individual/personal preferences.

leadership_like: This trait refers to how much the NPC likes the leadership of their nation. This is not to say the leadership policy of their nation, as above – theocracy, monarchy, etc – but the individual personality/personalities of the person/people at the top. There are a lot of elements which go into this particular decision for each NPC, and as with the above set, I’m hoping to later tie this into the potential for social movements, conspiracies, and the like…

fellow_soldier_opinion: For those who are within the military, this determines what they think of their fellow soldiers. This varies by rank, by leadership, and by the individual histories of particular soldiers. I’m not quite sure what else this variable will affect yet – beyond a couple of possible conversation replies – but I think it could be a nice way to build up a sense of how different military forces function in the URR world.

There are many others beyond these, but these should give a good idea of the kinds of personality traits that URR NPCs have. As with much of the game, these numbers will not be explicitly visible to the player, but rather should become apparent by the behaviour of the NPC, which – hopefully – should be rich and detailed enough that one can actually draw these kinds of conclusions, and then use this kind of information to make informed strategic decisions about your relationship to that NPC. In turn, all the sentences that NPCs can say which draw upon these elements have been finished, and offer a massive variety of comments and observations that NPCs can make through drawing on their perspectives, understandings, and past experiences.

Insults and Compliments Revisited

Secondly this past fortnight, I took the feedback from several people on-board about the insults and compliments, and decided to revisit these. Although the greetings and farewells vary substantially in length and detail – and, of course, one will never see lots of these in quick succession as we do in these blog posts – the same wasn’t quite true for insults and compliments, so I’ve adjusted these. There are now a range of shorter and snappier insults and compliments, and these have been added appropriately to the game’s databases of possible statements.

I also this week took all the farewells, greetings, thanks, insults, compliments, and threats out of the demonstration file and implemented them into the main game. This took a while because these sentences are generated in a unique way to give a particularly high amount of variation compared to other sentences (because they are so common) and they need to vary both overall between cultures/religions, and in individual moments of speech, so that two people from the exact same background will themselves offer different farewells at different times. This seems to be all in place now, however, and NPCs can now give these statements at appropriate times!

Option Responses

The third major body of work completed this week was what I’ve taken to calling “option responses”. Some questions are easy to answer, since the answer will always take the same form with a word or two exchanged – these are “basic responses”. Other questions are harder to answer, which split into “option responses” (where responses are very different depending on the nature of the answer) and “list responses” (where a response will always take the form of a list). This week I’ve been working on the option responses. Some of the questions that have these kinds of responses include:

  • What do you think of the leadership?
  • What do you believe your foreign policy should be?
  • What do you think of your culture’s art?
  • What are the religious policies of your nation?
  • How widely spread is your religion?
  • What is your job?
  • What is the history of this monastery?

In all of these cases the game can’t just take a default sentence and then vary it, but it has to instead select a sentence from a wide set depending on the data available, and then create that sentence anew each time. There are substantially more possible “base” responses for option questions than there are for all the basic sentences combined, which gives some idea of the kind of variation that some of these need to have. With this fortnight finished, I’ve now finished these off, and I’m very happy with the kinds of sentences they create – they’re varied, detailed, and will take far longer than the basic sentences before the player will ever come around to seeing the “same” sentences again.


This fortnight has seen some major progress in sentence generation and the conversation system, and we’re almost at the point where the player should be able to have a full – if thus far a little basic – conversation with every NPC you encounter. Stay tuned!

New Magazine Piece

Last but not least, myself and my colleague Jamie Woodcock have just had a piece published in Discover Society magazine with some initial thoughts on the sociological and cultural interest of Twitch chat (for those who don’t know, this is the instant messaging window that accompanies streams on Twitch). As we note there, it is certainly difficult to explore all the interesting elements of this phenomenon in a short opinion piece of this sort, but we tried to unpick what we find to be some of the most intriguing dimensions of it, and raise some interesting questions which we’ll hopefully be studying in more depth in the coming months and years. If Twitch is your thing, then do give it a look:

Understanding Twitch Chat: New Forms of Digital Community and Play

Be Sociable, Share!

6 thoughts on “NPC Personalities, Option Responses, Insults and Compliments

  1. Hey Mark, good to know about NPC’s personalities and your progess in the conversation system, i have few questions and doubts about policies, nps and Militarism in the game:
    1- Some Nations Will have Obligatory military enlistment? I think some soldiers of certain nations maybe are on army for obligatory reasons or the policies of nation, could have it somehow, Maybe Preparing for a war or something else as well for Inquisitions like the crusades in our World.
    2- Special Reasons for why Some Soldiers are on Army? To avenge a parent killed(maybe a betrayal) in a battle of a recent war or else to be like a parent who was a Hero in a battle,Killing an important person and maybe Taking his Legendary Weapon, being am important piece to find the lost weapon.
    3- Some cults or religions Banish Fireweapons but the country army actually discovered and maybe uses the gun pownder, will the Religious leaders plot something?
    4- Will some nations send Spies? I think a Spy NPC will be the hardest one to find but what if you find or discover one?
    5- There are diferent languages on the world, will you need to go and read some books to learn words to understand what other language speaker NPC says?
    Well, these are my doubts and questions or maybe sugestions, keep making a Good Work Mark 🙂

    • Hey Gustavus! Thanks for the thoughts.

      1) Yes, some definitely do – for now that’s the “conscription” policy.
      2) Ah, I like those, and I hadn’t thought of a “how did you join the army?” question. I’ll add that in.
      3) Hmmm… I’m not yet sure how those sorts of elements are going to interact, so for now, we’ll have to go with “we’ll see”!
      4) Yes, definitely. I have some idea of how that’s going to work and how you’ll discover them, too!
      5) Different dialects do exist, but different languages… that’s something I’ve struggled with for a while, specifically vis-a-vis finding an actually gameplay-interesting way to have a different-language mechanic. I haven’t decided yet, but that might happen!

  2. That’s quite a list of sample personality traits; it will be interesting to see how many traits are eventually applied to NPCs. It will also be interesting to encounter occasional cultural outliers, e.g. a citizen who likes art a lot but is part of a culture that looks down on art. Would NPCs like this be more hesitant to discuss art? Do you need to establish a higher level of trust with them in order to have them discuss art? etc.

    • Oh, yes, I’m making sure that some outliers exist, and also on a global level, modifying the chances for outliers; so some nations with particular policies are more or less likely to have outliers, some outliers will tend to be stronger or milder (so the outlier in an imperialist hegemonic nation is more likely to REALLY object to their policies, whereas in a more tolerant nation anyway, objection might be milder?)

  3. Would keeping track of NPCs’ personality traits be easier to code if they were all referred to as “affinities” with a given rating using whatever values are easiest for you based on the granularity desired with subcategories as needed? (i.e. affinity_countries_own, affinity_countries_other_(abc123), affinity_religion_general, affinity_religion_(abc123), affinity_laws_general, affinity_laws_(abc123), affinity_countries_leaders_own, etc.)

    As a follow-on to Gustavus A’s comment, If a religion bans “Fireweapons”, would it also ban “Waterweapons” (e.g. “Trigger-fired Water Pistol filled to capacity, 0.5 litres of water”)? 😉

    • In some cases, I think that is how it’s going to work; they’re going to need some more complex affinities for lists of things, for example, but we’ll see how that plays out. Hahaha, I wasn’t PLANNING on including water weapons, but…

Leave a Reply

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