Finishing 0.8, Part I

Firstly, I’d like to express my sincere and heartfelt appreciation for the outpouring of kind wishes after last week’s blog post, both here, and on Reddit, and Twitter, and by email, and elsewhere. They are deeply appreciated and deeply felt, and are a real credit to what a supportive bunch of people the roguelike community (and those who read my blog for the non-roguelike posts!) are. I don’t think there are a lot of games communities that would have responded so positively, and it really means a lot to me. I won’t disappoint you all; we’re back to coding, and 0.8 is back in development. I’m also going to get back to weekly updates, which will mostly be development logs/patch notes in style – however short they might be – with some longer pieces interspersed.

So, as mentioned in last week’s entry, my objective is now to devote one full day – either Saturday or Sunday – each week to programming until 0.8 is released, and beyond. As such, this weekend has been the first weekend of that new pattern (I’ve actually been coding both Saturday and Sunday), and for the first time in months I opened up URR’s files (or rather, file…) and took a look at where everything was; I also took some time wandering around the game world to see how everything was functioning and what still needs to be done. My first feeling, I must be honest, was a deep satisfaction at coming back to the project and wandering around the game world. Having slightly forgotten where I was up to before the monograph crunch/burnout began, I was pleasantly surprised to see just how many topics one could talk to NPCs about, and how intelligently (I think) they responded; how alive with activity the cities and towns were; and just how different the world felt to anything else that I’ve played, something in its texture, or the potential to fall down a rabbit hole of conversation, or ‘l’ooking in detail about the world. It was a tremendously motivating return, and one long overdue. So, without further ado, here’s the changelog for this weekend:

  • The second I loaded up and tried to ‘s’peak to someone, we saw the first problem: the speaking crosshair seemed able to traverse the entire length of the screen, which was deeply puzzling. I discovered this only happened when the player was near the edge of one of the 200×200 grids the player actually walks around in, and this was because of a piece of code designed to prevent the crosshair from slipping off the screen; in this case it was registering that the player was near the edge, but thinking the player was using an infinite-length crosshair (e.g. the ‘l’ook crosshair) instead of one which is supposed to be contained to a 3×3 area. A quick fix took care of this, and told the game to handle edges differently depending on the crosshair the player is using.
  • Then discovered that if the relationship between your nation and another nation was classed as “Unknown”, then one particular piece of code relating to greetings wouldn’t work, because it was looking for a friendship_value which didn’t exist. Instead, encountering an “Unknown” civilization now sets the friendship_value to a number determined by the ideologies of the nation in question, so a more outward-facing nation will be more friendly to total unknowns than an inward-looking nation.
  • Have added the start of NPCs commenting when you ask the same question twice, and also forgetting after a lengthy period when you last asked something. In the first case, NPCs will give a new response if you ask or say the same thing a second time, and a third time, and then a final response at the end when you’ve asked over twice. The final response will be more or less exasperated depending on the mood of the NPC. Also, asking the same question over and over again will cause the mood variable of the NPC to drop. In some sensitive topics – e.g. talking to an inquisitor about a heresy – will cause mood to drop extremely quickly, and they might even get suspicious about why you keep asking…
  • In the second case, all NPCs now have a hidden “forgetfulness” trait, which is influenced by a small number of other factors and determines how quickly/slowly they forget when you last asked them a specific conversation. In all cases, though, it’ll take at least days, and potentially weeks. As noted in a previous entry, there also needs to be some kind of “geographical memory” function to prevent you just asking Person 1 Question 1, then asking Person 2 Question 1, and going on and on in that manner. Instead, people will know when you’ve asked many others the same questions – they “heard on the grapevine” or whatever – and will refuse to answer. This is an important element to prevent tedious grindy gameplay, and I’ll implement this a bit later.
  • Fixed some issues with asking people about their parents, grandparents, children, siblings, etc, which sometimes led to crashes when the game couldn’t construct a sentence properly. Will need to also come back to this later when special NPCs have relationships to other special NPCs.
  • I’ve also done a lot of fixing of grammatical and spelling errors, which are (as expected) significant in number given the complexity of the conversation system. I had it print out every possible sentence stored for every civilization in a particular world generation – well over one thousand – then went through them all, found every typo, found where in the sentence generation that typo had arisen, fixed it, and moved onto the next. I must have fixed at least a hundred possible errors. I think I’ll do this again, to get another set of sentences, and go through those, and I’ll do this once or twice more before 0.8’s release. Should get the number of errors down to a tiny number by the end.
  • I also discovered that fifteen of the “negative replies” – e.g. when you ask “Do you have X” and they say “I do not have X”, or whatever – were returning “This is a placeholder” instead of an appropriate hand-crafted response. This took a little bit of hunting down, but in the end I discovered this all just came down to fifteen typos in the thousands of words/phrases the game now stores! Things like “unimportant” being accidentally written down in another location as “unimpotant”, and things like that.
  • Also made a list of questions which need special replies if you appear to be of the same nation/religion as the person you’re talking to (“Why are you asking me that?”, “Shouldn’t you know that”?, “The same as you, surely?”) or a particularly hated nation (“Why do you want to know that?!”, “There’s no way I can tell you that!”, etc). This will connect to the function that allows NPCs to estimate what nation/religion you’re from, which I’ll be working on soon.
  • Added a ton (100 or so?) of new words that can be varied across nations, allowing nations to say even more things in a greater variety of ways than they could before. I also found a few cases where a culture would choose a way of saying X1 (e.g. “interested”) but wouldn’t always transfer that to ways of saying X2 and X3 (“interest” and “interesting”), so you would wind up with a culture whose people said “interested”, “intrigue” and “fascinating”, instead of “interested”, “interest” and “interesting”, the latter of which is far more logical and consistent for a single given dialect. I think I’ve now fixed all the cases where this could happen, and the differences in dialects should now consequently be just that little bit sharper.
  • Started to think about how to implement what I’ve taken to calling the “metaquestions” that player can ask, e.g. “What do you think about [artwork]” where [artwork] can be replaced by the title of any artwork. I’ve put in general responses for NPCs on these questions now, i.e. I don’t know what this is, I have no opinion, I’ve already told you about this, etc, with more detail to come soon.

So: for a first week back, I’m incredibly happy with this progress! In the coming weekdays I’ll be focusing on my current academic work and continuing to put the final touches and edits to the book, then next weekend, I’ll be back to coding for at least one of the two days. I really feel incredibly invigorated by this weekend, I have to say – I’m really excited to continue pushing the conversation system to point where I can release the first version of it in 0.8. Lastly, and very briefly, here’s a little debug of some sentence generation and whatnot; you’ll see the sentences (on the right hand side) are almost entirely grammatically correct (they are the generated versions of the default sentences on the left); I really like letting these run and just seeing what the game can produce, and the different ways the game can utter the same sentence. And now, to conclude this entry on a sentence I’ve been wanting to say again for months: see you all next week for another URR 0.8 update!

Be Sociable, Share!

14 thoughts on “Finishing 0.8, Part I

  1. >>> I opened up URR’s files (or rather, file…).

    I’m sorry, I’ve got to ask: is the source of URR really one huge file? You certainly have your reasons, but having to go back and forth in a really long file must really add some unnecessary cognitive overhead, even with the aids and niceties of modern IDEs.

    • Hahaha, it is. It doesn’t add that much extra time, I don’t think, and time would of course also be taken up remembering what files different things are in, and so much. I didn’t do this on purpose and it just kind of “happened”, but at this point I’m not going to add a new file for 0.8. However, in all seriousness, I am going to add a new file for later versions; it has become… a little bit too big.

      • Now I’m curious. I think most people tend to split things into files in order to keep track of what code is where. If you have one large file, do you have some sort of organizational method or tools?

        • Most people do, yeah; my only method is just remembering what the names of important functions and variables are. Whatever game I make next once URR is done in a few years will be far more organised, and might even – gasp – have multiple files, but for now, it’s mostly just a memory game!

  2. Glad to see you are back.

    Looking forward to see progress in U.R.R. again.

    Specially considering NPC interaction is one of the more interesting differentials of this project to me.

    Welcome back and good luck.

  3. I’m glad to see that URR is back in development. And I’m intrigued by the forgetfulness, annoyance, and grapevine factors in conversations. I can’t think of another game that has anything similar, and I think it will be important not only for URR but for the development of future games that will take note of this and perhaps utilize similar systems.

    • Me too! And I can’t either; I think they’ll do a lot for making NPC conversations more human and more convincing, having the NPCs respond like people instead of Q&A robots, and (as I’ve talked about before) will add a strategic element when it comes to who to ask, about what, and when.

  4. I’m conflicted : I’m really happy to see URR back but at the same time, I hope you don’t feel forced to come back. I mean, if I believe what you wrote (and why won’t I?), it doesn’t look that way so I’m cool in the end.

    Ohhhh 0.8, one day you’ll be in our hands!

Leave a Reply

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