Burnout and the Future

So… this is what burnout feels like.

I’m almost now ready to submit the manuscript for my first academic monograph. It will have taken two months longer than anticipated, which was a great disappointment to me – it’s the only piece of academic work I’ve ever had to ask for an extension on. There were many factors at play there, some within my control, and some outside of my control, but the bottom line was that had I taken on less than I wound up taking on (and had the circumstances I was working within been different), I would have been able to get it submitted on time. Although I’m very happy with the final product, and I’m confident the work will be a valuable contribution to the study of unpredictability in games (of all its forms), I find myself reflecting specifically on the process by which the final parts of it – the crunch, if you will – were written. From around the start of March until the start of June, I can truthfully say I did effectively nothing with my spare moments except writing the book. All day on both days of every weekend was book writing; every evening was book-writing; every train journey and flight and coach trip was book writing. During this period I spent effectively no time with friends, no time exercising, and no time whatsoever doing any programming, much to my chagrin.

During this period, I began to experience for the first time what I believe is called “burnout” – my appetite dropped, I developed some anxiety (a deeply new experience for me), I developed some depression (similarly), and it felt at times as if there wasn’t really any point to what I was doing; that was I just speaking into the void because nobody else would read it; that I was letting everyone down by not working on URR (which I still feel quite acutely); and other feelings I’m not going to share here. Although certainly not the darkest time in my life, it has been, in many ways, a deeply unpleasant three months. Travelling a lot in this period helped me, and finding some times to engage with nature – whether meeting wild bison and wolves in the frozen tundra of Northern Canada or meeting wild tropical birds and lizards in the equatorial jungles of Hong Kong and Singapore – helped my mood a lot, but it only stemmed the bleeding, without addressing the underlying issues.

Academia, especially early-career academic before one secures a tenured faculty position, is notoriously stressful and time-consuming. One is always in competition with vast numbers of recent PhD graduates for a ludicrously small number of postdoctoral or junior faculty positions; one is constantly bombarded with requests and obligations and things that need to be done; one is strongly encouraged to submit only to top-tier journals, and yet doing so leaves one waiting for potentially years until publication, damaging one’s employability in the short term. The other crucial element of academia is that there is always more one can do. As academics, we don’t really have working hours, as such – just contracts that say we must “fulfil the expectations of the job”, or some equivalent language, using however many hours across however many days per week that takes. Many contracts even explicitly state we are expected to use evenings, weekends and holidays to meet those requirements where necessary – and that, assuming one wants to spend one’s academic career actually doing research, will always be true.

Up until now, I’ve always been able to field this and maintain the other things I want in my life, but in these last three months, I am not exaggerating when I say every spare moment has gone into the book. For the three months before that extreme compression of my time, almost every spare moment went into the book, and looking back, I can see my free time shrinking into a smaller and smaller gap with every passing day. Something inherently enjoyable – and I do enjoy academic work tremendously – quickly ceases to be enjoyable when it is something one must do, and when it is the only thing one is spending one’s time doing. Because of this the book became something of a chore, which itself made it harder to write, and which itself made it more of a chore, and made more painful my inability to spend my time on other things, and so forth. As a result of the stress leading up to and during the book-writing, I screwed up. I made two serious errors of judgement – one being a different but major piece of academic work I submitted, and another being a piece of work I submitted elsewhere. In both cases I made poor judgements about what I wrote, and over-estimated my knowledge of those domains, and was – quite appropriately – brought down a rung by those who do know those domains. They were both humbling experiences, which really brought home how much my judgement had been impaired by the stress of finishing the book.

But now, the book is basically finished, and I’m on my final visiting position of the year, having also just been offered an amazing new two-year postdoc opportunity in Canada where I will be able to drive my own research and make my own hours. However, as I sit here for now in a cafe in Nevada, trying to take stock of things, I realise that there are four things I must make time for, and a fifth change I need to make overall, from now, moving forward, no matter what, in order both to be the kind of academic I want to be, and to have the life I want beyond the academy.

Firstly, I need to make time again for programming, starting now. It’s something I enjoy tremendously, it’s creative work which forms a crucial balance to the intellectual work I make my income from, it’s something a lot of people are following and counting on me for, it’s something absolutely tethered to my online presence, and it’s something I simply deeply want to start doing again, and which gives me valuable balance in my life. It makes me deeply sad that I wasn’t able to get 0.8 out before I went into this period of total time compression and book-only-focus, and I want to put this right and get 0.8 released as fast as possible, and certainly before my new position starts later this year. Once 0.8 is out URR will be more than half-done, and psychologically, that’s an important marker I need to hit. Therefore, starting next weekend, I intend to devote a day per week to programming, no matter what else might be looming over me or might be requiring my attention. Either Saturday or Sunday each week, but probably I think Sunday, my intention is to always spend that day – as a minimum – programming. Despite the long hiatus, URR is not cancelled, but has certainly been on hiatus, and it’s finally time for that hiatus to properly, and truly, end.

Secondly, I need to make time again for fitness and exercise. I haven’t exercised once in the last three months, with the exception of hiking up and down Victoria Peak in Hong Kong and a couple of hikes in Alberta and Nevada. Normally I would exercise for at least an hour at least four or so days a week, but the book has simply dominated my time and my thought to such a degree that I’ve let this slip completely, down to zero. I can tell and feel that I’m less fit now, I’m less strong now, and less healthy now, and I don’t like it. It’s an unsettling and disturbing change from the state of being I’ve become used to, and I want to get back to my previous level of fitness as soon as possible. I’ve now managed to get this back to exercising twice a week, and hopefully I can push that back towards four as I decompress in the coming months. As I’m moving to Alberta, I’m keen to do lots of hiking there, too, and I have some interesting future travel plans which should also help with that.

Thirdly, I need to make time for a personal life. The fact that I am likely moving to a new country/city in a few months feels like a good time to make this kind of resolution – both to renew existing acquaintances in the UK and elsewhere, especially important now that I’m no longer in physical proximity to my friends in the UK, but also to go out there and find new friends and new colleagues. I’ve always been someone with a small group of close friends instead of a far wider social circle, but this, also, has shrunk to nothing in recent months, and my personal relationships have definitely suffered for it. I’m making amends to those I have unintentionally hurt, which I believe to be an important first step, and from this point onward I’m going to make a lot more time with friends and family in the coming months. It seems that the importance of this to one’s mental health only appears after it is lost, and that’s a lesson I don’t want to have to repeat again in the future.

Fourthly, I need to make time to actually play games. I got into game design and game scholarship and game writing and competitive game play because I love games; because I’ve played hundreds, probably thousands, and certainly own thousands; and I’ve been playing them since I was as young as I can remember. But I no longer find myself with the time to actually play any; in the last year I’ve played only two games for pleasure, which were Bloodborne and Dark Souls 3. Both were incredible experiences, but that’s only a fraction of the time I would normally spend playing games. Even in other periods of stress – such as when I was simultaneously finishing my PhD and dealing with a life-threatening illness – I still found far more time to play. It’s fun (most crucially), but it’s also important for my ability to be a good game designer and good games scholar. As such, my goal is now to at least double the number of major games I play each year for starters, and hopefully increase this number as time goes by. Right now, The Witness, Demon’s SoulsShadow of the Colossus, The BridgeAntichamber, and perhaps even returning to playing roguelikes all look very appealing, and that’s where I plan to start.

Fifthly, and lastly, I need to focus. Forgive the cliched phrase, but I now realise I need to work smarter, instead of working harder. I’ve been trying to be a game scholar, and a competitive game-player, and a game designer, and a game writer, and all the other things in my life outside games. This is just too much. As a result, I’ve decided to permanently “retire” any competitive gaming from my life. I want to really focus on scholarship/writing/coding, and in turn, to present myself specifically at the intersection of those three things. My background in poker remains a major informing element on my academic career – especially as I move toward studying gambling more seriously as a topic of study – but I think I’m spreading myself too thinly, both in terms of my effort, and in terms of how I appear. I want to focus in on my strengths, instead of trying to be everything, and do everything, when it comes to games.I think this will, without a doubt, be for the best, and strengthen my ability to work in my core domains without “distracting” myself with others.

As for the wider future, academia certainly remains my career path of choice. I take tremendous satisfaction from the unfolding of intellectual ideas on paper; I love travelling around the world to do research, to attend and present at conferences, to meet colleagues, and to experience new parts of this earth; I enjoy the freedom of working hours that academia (generally) gives one, even if that same freedom means working a lot of those hours, and the ability to largely work where and when I want. But these last three or four months have shown me what can happen when I take on too much – I make mistakes, and my ability to do anything else with my time beyond academia gets reduced down to a minimum, and then disappears altogether. This is not a “New Year’s” resolution, but this is certainly a mid-year resolution: I need to adjust my life back toward the kind of life I want to have, and I am confident this will have benefits both within and beyond my academic work. So with this written, and with this posted, I’m going to head to the gym in this hotel and work out for an hour, then head back to my hotel room and play something, anything, on Steam, then do some programming in the evening. The change starts now.

Questions, International Relations, Geography, PCG Alcohol, Relics

A big update this week, summarising everything from the last three weeks of coding work. Succinctly, the game now has NPCs who can reply to even more “list questions” than they were previously able to, adds in what I am calling “meanderings” into speech from time to time in order to make everything feel and read more realistically, boasts a rather more developed international relations system which NPCs can draw on when making comments to the player, and procedurally generated alcohol is now present in the game. This last one is, obviously, the most crucial of the bunch. Oh, yes, and I’ve also expanded and finished the system for generating the names of relics, although their procedurally-generated images are of course not yet present. So without further ado, read on:

More List Questions

I have now finished off almost all the “list questions” – which is to say, questions where the answer often takes the form of a list, such as “What towns are nearby?”, or “What animals are sacred to your people?”, and so forth. Here are some examples of the recent additions:

Animals and Plants

You can now ask people about the animals and plants that are local to their homeland, and whether any animals or plants are considered especially important in that homeland, as part of your conversation. They’ll now give you a list of the local flora or fauna as appropriate, which is always grammatically correct, and also lists these things in a fairly logical order. The number is never too high, either, so you never find yourself reading through a gigantic list of things. Although not currently implemented, in the very near future these animals and plants will be spawning, and should be found referenced throughout a culture, and are designed to be another clue the player can potentially use to find out about the world.

International Relations and Geography

The game can now generate appropriate and logical sets of relationships between nations, based on their ideologies, religions, proximity, and so forth. You can now ask people about their relationships with other nations, what they think about other cultures in general, what kinds of cultures are nearby, what tribes and nomads can be found nearby, and so on. The same system is then used for overall geography, so you can now ask a range of questions about things that are near to where the player and an NPC are having their conversation. For example, you can ask whether there are mountains (or mountain passes) in the proximity, and so forth. These questions then redirect to a function which chooses an appropriate area for the NPC to have knowledge of (more educated NPCs will have a wider area, and NPCs more well-disposed towards you will think about giving you a longer response). This system needs expanding to all kinds of conversations, which I will talk about more in the future, but for the time being, people can tell you quite a bit about the surrounding areas:

Laws

Also, here are the law responses from last time:

You’ll notice the first of those is rather long. This is an example with a nation with a lot of laws on violence, and talking to someone who is well-disposed to you, and is therefore willing to actually talk to you. I think I need to find some way to chop this down; for such a long potential answer, maybe even people who like you the most will tell you the top laws or bottom laws, or maybe they’ll say “Do you want to know punishments for the worst crimes or the most common crimes?”, or… something. I’m not quite sure yet. Either way, it’s pretty clear that a reply this long isn’t really workable, and is very hard to read, and will probably lose the reader’s interest part-way through.

Meanderings

Secondly, I added in a set of what I’ve now taken to calling “meanderings”. As part of making conversations as realistic as possible, I felt it was important to add in code for people thinking for a moment before they reply, or being semi-reluctant to quickly reply, and just generally having the umms, ahhs, and oks, that characteristic real speech. At the same time, of course, having too much of this would quickly get annoying. To balance this out, there are two elements. Firstly, people will only start to use these phrases if they begin to get annoyed about the conversation, and they’re starting to lose interest in you. When their full interest is on you they won’t falter in the conversation, but this might change as time goes by. Secondly, they will not use it too often; an NPC that has just used one will definitely not use it on the next sentence, and beyond that, it is randomised, but becomes more and more likely the less and less interested in the conversation the NPC becomes. If you look at the conversations above, you’ll see a few of those present here and there.

International Relations

As noted above, the game now generates appropriate relationships between each nation in the game, whether feudal, tribal, or nomadic. In essence, the game looks over the ideologies of each nation, and looks at where they match, and where they clash. In some cases a pair of ideologies could be seen as a match or a clash; for instance, two monarchies might get on well because they have the same system of leadership, maybe the families are related, and so forth; or they might hate each other and have a rivalry between their ruling families. In these cases the game chooses at random whether these are “good” commonalities or “rivalry” commonalities. Equally, some shared ideologies will always cause conflict – two theocracies or two especially religiously zealous nations which do not share religions are never going to get on, and likewise two imperialist nations – whilst others will always generate friendship, such as a shared commitment to religious tolerance, or a shared appreciation of gladiatorial combat. Then, in turn, various religious beliefs, geographical distributions, and so forth, further affect matters. These are then categorised into nations that are close allies, friendly, neutral, disliked, or firm enemies; these five categorisations then affect speech, whilst the more specific like/dislike values will play into other elements later on. This is basically akin to the kinds of systems one sees in the recent Civilization games, but somewhat more complex and with many more factors at play determining what cultures think of one another.

Along the civ.relations dictionary, there is also a civ.trade_relations dictionary. This is similar, obviously, but actually somewhat distinct. Whereas relations simply tells you what one nation thinks of the other, in the case of trade_relations, we’re talking specifically about how much trade passes between two nations. Of course, trade is not going to be passing between nations that loathe each other, but two nations that share a massive border and are somewhat friendly are likely to trade more than two nations that are the best of friends, but half the world apart (bearing in mind, of course, that we are talking about the renaissance rather than the modern day here). Trade_relations therefore tells you the volume of trade going on between each nation and each other nation, and in some stores the player will therefore be able to sometimes find the items of other nations for sale. The reverse will actually happen in black markets – if X and Y hate each other, the goods of X might secretly appear in the black markets of Y, and vice versa. In this way I’m aiming to make the potentially someone “abstract” idea of international and trade relations much more concrete; it shapes who appears in each nation, what items appear where and under what conditions, and will also – of course – affect where the player can safely go.

Alcohol

For a fun little diversion for an hour this week, I also implemented the system for procedural alcohol – I’m sure we’ll all agree, a truly vital component of any procedural world. Each nation now selects an archetype of drinks that they tend to enjoy drinking, which can be beer, spirits, or wine; these are designed so that a full world will not have a completely equal distribution, but some generations should have a high volume of beer, spirits, or wine drinkers; much as in the real world, we don’t see these equally distributed. It then generates an appropriate set of alcoholic drinks for each nation, with words drawing on the terrain and climate types enjoyed by that nation, a wide set of default words for each alcohol type, and names – a class of alcohol might be named after the particular monastery where it is brewed, a particular town where it is particularly favoured, and so forth.

The player can also now ask innkeeps about the kind of alcohol they sell, and they’ll give you an appropriate list! Taverns stock a high percentage of all the alcohols drunk by one nation, but will never stock the full collection; equally, I’ll shortly implement a system so that taverns particularly near the border with another country will (assuming that is a nation with a particular set of alcohols, so not a tribal nation) sometimes carry one of the alcohols from “across the border”. Later on I will also add actual “breweries” in the locations where the various alcohols in a nation are brewed; these will have minimal gameplay value, so I certainly won’t spend more than a few hours on that, but for the sake of completeness I think they need to go in to make the world look just that little bit more complete, more varied, and so forth.

Relics

In the last fortnight I also finished the generation system for relics, and here are some example debug logs, where “RT” means “Relic Type”. Some of these do have rather lengthy names, because the names of the people associated with the relic can be quite long. It’s a little unwieldy, but honestly, I think it’s fine. I’m extremely happy with how these work and how these look, and I don’t think I’ll make any more changes here before the 0.8 release, beyond making sure everyone in the game can speak about relics of their religion correctly.

Blog Update Speed

So, once again, this has been a fortnightly update. As such, I’m just going to stop commenting on this for now or trying to predict when the next update will be, and I’ll just say to everyone: I’ll update as soon, and as rapidly, as I can. I am developing URR actively again, as you can see from the above, but I am also changing jobs, taking up two visiting positions in two other continents, and finishing my first academic monograph… so we’ll see how it goes. See you all next wee-… er… next time!

Paper, Laws, Political Parties, List Questions

This week (well, fortnight) we have some laws, some new list questions, some political parties, overall a reasonably large entry to make up for silence last week, and a paper, so let’s get to it:

Semiotics of Roguelikes

Firstly and briefly, the paper I wrote a couple of years ago now on the semiotics of various ASCII roguelike games has moved from being published online to being published with in actual edition/volume of Games and Culture. To mark this momentous event, I’ve uploaded a pre-submission version of the paper onto my academia.edu account, so if you’re interested in reading the paper – the abstract is below here – then click here and give it a read, and do let me know what you think.

This article explores the semiotics of the “roguelike” genre. Most roguelikes reject contemporary advances in graphical technology and instead present their worlds, items, and creatures as American Standard Code for Information Interchange (ASCII) characters. This article first considers why this unusual graphical style has endured over time and argues that it is an aesthetic construction of nostalgia that positions roguelikes within a clear history of gameplay philosophies that challenge the prevailing contemporary assumptions of role-playing games. It second notes that the semantic code for understanding the ASCII characters in each and every roguelike is different and explores the construction of these codes, how players decode them, and the potential difficulties in such decodings. The article then combines these to explore how such visuals represent potential new ground in the study of game semiotics.

Violence Laws

The game now generates a full set of laws for violence in each nation. These are not done in quite the same way as the other two sets of laws. Whereas “religion” and “trade” have a set number of values and each value always create a law in every nation, not all nations will even have some of the violence laws. It depends on the ideologies of the nation in question, and what they consider to be a meaningful violent event, and how severe they think it is. The game selects a set of laws, ranks them, and then distributes punishments according to the ranking of the crime, not the crime itself. Here is the sequence by which the game selects laws for violent acts, where the ones that a nation cares about the most come first, and the less important ones come later. As a result, you’ll see some very different values at play here, and what counts as a severe punishment in one nation will be far less severe in another, because it will be much further down the crime list, as a result of the nation being more concerned by other things:

If I’ve calculated this correctly, this means the shortest set of violence laws is five, and the longest possible set is thirteen, with most nations naturally falling somewhere in the middle. In each case the top crimes merit a “Punishment 5”, which is the highest level of punishment – such as three arena battles to the death, or a lengthy imprisonment, or a severely damaging physical ordeal – and the bottom will merit a “Punishment 1”, and the others in the middle will be distributed appropriately. I’m confident this will again generate an interesting and unique set of consequences for your actions in each nation, and when coupled with the wide variation in punishments, and the kinds of punishments that your character might or might not be able to withstand depending on your build, items, etc… I think some very interested decisions will emerge from this process.

More List Questions

Parents, Siblings, Grandparents, Children

NPCs are now able to talk about their parents, siblings, grandparents and children, in a pretty wide range of ways. For instance, if you ask about parents, they might simply answer that their parents are nobody important (if they feel you’re disinterested, or of a much higher social status), or might name only one, or both; alternatively, if their parents are consequential people recorded by the game, or they are important, then they’ll probably have some more info they’ll (proudly) be willing to give out. For the longer lists, the game also takes account of the sex of the people being mentioned, so they might say “My two brothers are X and Y and my sister is Z”, or “My maternal grandparents are X and Y, my paternal grandparents are A and B”, which will also vary based on any particular bias towards either sex present in that nation; for extremely long lists, lastly, such as children or siblings, they can now reel off a full list that is always grammatically correct. These lists also include titles, too, so you might get “My mother was Queen X the 1st, Keeper of the Brass Casket, and my father was Prince Y, Consort to Her Majesty” – or whatever.

Trade, Violence, Religion Laws

We covered these briefly in a previous entry, but NPCs are now able to tell the player about everything in these categories. Some of these require different lines of code, as in the case of trade and religion laws there is a finite set of “things” that each nation will have laws on, whereas for violence, some potential violent acts simply won’t be recognised or won’t be relevant to particular nations, and therefore won’t be there. Either way, people now give you a nicely detailed list of these laws; and as with everything, how much people tell you will be modified by mood, and their knowledge of their own nation…

Nearby Things

I’ve started to implement the code for NPCs replying to questions of the sort “are there any X nearby”, where X might be cities, towns, nomads, tribal nations, mountains, coastline… you get the idea. There’s a pretty wide number, and some of them have to request information from different parts of the game’s databases, but this code is now being put into place. There are also now appropriate sentence structures here for people to word things appropriately; for instance, if there are individual things, such as towns, you’ll just get a list. By contrast, mountains do not take up individual map tiles but stretch across mountain ranges, so someone might say “There are mountains far and very far to the northwest, far to the north, and somewhat far to the northeast”, which should give the player a decent impression of what the mountain range looks like. (The same then applies to deserts and coasts and so on).

Political Parties

Returned to political parties and developed names for the parties, which will soon be matched up delegates, and we should be able to get some kind of political system actually working. The game first selects a number of parties for each nation, which is semi-random and partly influenced by several ideological factors (outside of their commitment to a democratic form of government), and then (as we discussed before) ranks the various overall trends in the nation, such as individualism or collectivism, nationalism or globalism, and so forth. It then creates parties for the dominant trends, and sometimes with a secondary ideology from lower down in that chart, and now it finally creates names. As such, we can now find NPCs who might be willing to tell you about parties such as:

The Liberal Sovereignty Party
The Party of Enlightenment
The Conservative National Party
The Devout Singular League
The One Reformist Party
The Association of Independent Selfhood

And so on and so forth. As with most things in URR, you should be able to extrapolate some reasonable guesses about the commitments of these parties from their names. In a later version I’ll connect these to delegates, and get the political system in democratic nations working properly.

Next Week

As you’ll have noticed, we’ve slipped back to a fortnightly update this time – although I’m generally back to a post every weekend, this last week has again just been absolutely jam-packed, and I had to push things back. However, hopefully, updates will resume the weekend model from next weekend moving forwards, and I promise lots of screenshots next week. I must apologise for this, but leaping back into the weekly blog posting has been quite a bit new pressure on my time, and although I thought I could go from sparse blog posts to every week: it hasn’t been quite that easy. Things are ramping back up, but maybe just a little more unevenly than I’d hoped. I am also working on finishing my first book at the moment, which is of course taking up a lot of my time, as well as planning how best to get around the world and take up three visiting positions in three countries in the coming months, so there’s a lot of admin in my brain at the moment. I’m desperately hoping to get 0.8 before April, as otherwise that’ll be a ridiculous two years between release… and that’s just too damned long, however much detail I’m putting in to this major version. Nevertheless, normality should resume again next week, with hopefully an even more significant URRpdate. See you all then!

More Lexicon Variation, Conversation Development, New Variables

Lots of major developments (and some minor ones) in URR this fortnight! Firstly, all the content I added last week meant that a whole new set of words and phrases had to be added to the lexicon; the best part of a thousand in total, if I’m counting correctly. I’ve now implemented all of these, and the game can correctly vary the words from all these new sentences by drawing on these new additions to the central lexicon. Secondly, I’ve now almost finished what I’m calling the “standard” or “basic” conversation system, which is ensuring NPCs can reply to every question they are asked; this should be done by this time next week. Thirdly, a wide range of further variables for individuals and the cultures they hail from have been implemented, and are now having an effect on what kinds of things NPCs will say. Another very, very text-heavy post this week – although next week’s will contain a lot of screenshots, this week continues to be lots of under-the-hood programming and content addition that cannot, yet, be reflected in screenshots, but is getting pretty damned close. Read on!

More Variations for New Words

Firstly, as above, there was a huge set of new words and phrases that needed to be varied for each culture, as with all the others. These entered the game because I was writing the new “option” answers (see last week’s entry), and needed to be written up. This was one of those tasks that isn’t especially intellectually challenging or needs a lot of programming experience, but mostly just involves adding a massive chunk of “content” which the game will then deploy in the appropriate situations. With this finished, I’m very happy with those look, and the sentences read really well and really nicely. Here’s a screenshot from the new set – I’m sure you can see how/where a lot of these fit in…

I also went through the existing words, and decided to statistically bias some of them back towards slightly shorter variations, and therefor slightly shorter sentences, as a response to the feedback I regularly get about some of the sentences being too wordy. You’ll see the same in the earlier example, where we have some sets using the same short word twice to boost the chance of that word being selected (this is of course not an especially elegant way to do it, but let’s be honest: my programming is not known for its elegance). This should ensure that sentences will tend to be just a little shorter and a little less wordy, and I’m going to continue this trend of chopping out irrelevant words whilst maintaining sentence variety – though this is a tricky balance to strike.

Nearing Completion on Standard Conversations

The development of the game towards what I’ve been calling the ability to have a “basic conversation” – i.e. the traditional question-and-answer session that one gets in most games, where the player asks something, the NPC responds, and this pattern continues until all conversation options have been exhausted – is now extremely close. NPCs respond correctly for all the “basic” questions (about 1/2 of all questions), and for the “options” questions (about 1/4 of questions), and are in the process of being programmed to respond appropriately to the “list” questions (also about 1/4 of all questions). This is the final step to them being able to ask any NPC any question, and get a response. For now these responses are all truthful, and they always answer, but this will still be a huge milestone once finished. As such, by this time next week, I’ll be able to show off the basic conversation system working universally, for all possible inputs and outputs, even if a few placeholders like “[holybook]” will still be in place, rather than the appropriate text itself. From my current trials with it, it looks amazing, and the experience of being able to select any question from this gigantic list and get an appropriate and sensible response is really something. It has been a long time coming, but I’m very confident that 0.8 will be worth the wait.

New Individual and National Variables

This week I also found myself needing to implement a large number of additional variables for both individuals, and in some cases for nations and religions and cultures, which NPCs would need to draw upon when they give their responses to particular questions and sets of questions.

Mercenaries

A range of new variables were implemented this week for mercenaries, along with quite a complex formula to decide on how much mercenaries cost to hire. There are four elements here – how much training a mercenary has had (counted in years, generally as a soldier, or in an arena, or they simply became a mercenary immediately and learned on the go), how much experience they’d had (how many years they’ve served as a mercenary, and also some specific stories/information about what they’ve done during their tenure), and then a list of benefits and conditions each mercenary brings. For each mercenary, the game develops a possible list of each according to their  background. For instance, a particularly zealous mercenary might refuse to fight their own religion (a condition) but be especially keen to fight other religions (benefit). This system is naturally comparable to a lot of modern roguelike games where you have PCG characters with selections of “traits” (or an equivalent term) that mix positives and negatives, and task the player with interesting strategic decisions. The game then figures out how much “true money” a mercenary costs to hire (a secret number converted into in-game currencies whenever it’ll appear on screen), which goes by a formula I’ve developed. Broadly speaking, better-trained and more-experienced mercenaries will naturally cost more, and the more benefits they bring the more they cost, but the more conditions they bring, the less they cost. There’s a bit more to it than that, but some initial testing has shown that this attends some very satisfying results.

National Voting Rights

Here’s an interesting one – the question of national voting rights. At the moment when each nation generates, a die is rolled to decide whether women, men, or both are allowed to hold the throne (or whatever the equivalent of the “throne” is). It then considers who is allowed to join the military – if only one sex is allowed to hold the throne, then that sex will always be able to serve in the military, and sometimes the other one will be too; if either is allowed to hold the throne, then both will be allowed to serve (generally). I’ve now extended this to voting right; if either can hold the throne, then both can vote, but if only one can hold the throne, then normally only that sex is allowed to vote, but sometimes the other sex is allowed to vote at a “reduced vote”, e.g. one quarter of the other. There is no real-world bias here so it’s totally randomised between F/M/either, and all variants are equally likely, although certain ideologies make “Only one not the other” decisions more likely than others (Imperialist nations are more likely to restrict, democratic nations are less likely to restrict, and so forth, although this is not absolute or guaranteed).

Nomadic and Tribal Relations

There are now variables to determine how much particular NPCs like tribal and nomadic nations. This draws upon the general feelings of individuals about other nations, which in turn of course draws on a range of ideological and historical factors, but also then modulates this further according to particular ideologies (if these are a close match with lots of tribal/nomadic states), and the individual classes of the NPCs. These will therefore be generally close to a more general feeling about foreign lands, but also quite different in particular contexts, and will affect what NPCs say about their nations, what they’re willing to tell you, what they themselves have “bothered” to find out (if they care), and so forth.

Delegates and Parties

This week I also implemented the first half of the system that will determine what kinds of political parties exist in democratic nations, which parties hold power, and how these parties will have shifted over time. To assess the political leanings of each nation, the game first goes through all of their ideological preferences and develops a set of overall political leanings for the nation, going by some axes that the majority of real-world political parties go by: are they primarily globalist or nationalist, are they liberal or conservative, are they religious or atheistic, are they collectivist or individualist, and so on and so forth. For instance, the “Isolationist” ideology will naturally add a lot to nationalist, and some to conservative, and a little bit to conservative; the “Aesthetics” ideology will promote individualism, but also nationalism, but also a little bit of globalism, and might also support religious iconography… and so on and so forth. Then, if there is a strong specific religious belief in that nation, it checks what political leanings that religion has (is it very peaceful towards others? Does it enjoy holy wars? Etc) and adds that into the mix where appropriate. The game then ranks these overall national political leanings, and then selects a number of parties, before going through each party and having the central tenet of that party be one of the leanings, starting with the biggest leaning and working down. So a nation that is first and foremost “liberal” will have its biggest party adopt a broadly liberal position, with smatterings of other political tendencies lower down the list for that nation. Once that is done, the game then looks at whereabouts delegates come from in that nation – do they come from districts of the capital, from towns, from monasteries, from farms – and distributes delegates appropriately to each party, depending on its political leanings (and generates a procedural name for the party, although this isn’t finished yet, but I’ll show some off soon). This party affiliation will allow delegates to comment on the current political situation according to their own allegiance – which was the only reason I implemented all of this now! But it’s nice to have it in place, and it makes the democratic nations just a little more fleshed-out, even if it’ll be the small 0.9 release where we really see this more visibly.

There are also about another thirty new variables added in this week alongside the ones listed here, but I decided to mention these four as they struck me as being some of the more intriguing examples from the selection. As noted last week, these variables are entirely hidden (or rather, the numbers in each variable are hidden) and are always going to be represented instead by who people are, how they act, how they dress, what they say, where you find them, who they worship, who they serve, and so on and so forth…

Next Week

The completion of the standard conversation system, all questions/answers for all possible questions, and a lot of screenshots to show it off! It has been a while since we’ve had any proper in-game screenshots, so it’s definitely time to actually give you all a look at how (incredibly neat) everything is looking now. See you then!

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.

Greetings

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…

greeting1

Farewells

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…

greeting2

Compliments

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:

greeting5

Insults

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:

greeting3

Threats

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

greeting6

Thanks

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:

greeting4

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!