A huge update this week, so let’s skip the introduction and get on with it!
AI Refinements
I’ve had a wealth of fantastic feedback from my playtesters this week – thank you to you all! As such, I’ve implemented a whole range of fixes, some of which were for issues that I thought had been resolved ages ago, but some code edit in the mean time had apparently ruined, leading to these problems.
Firstly, we had a wealth of problems with servants/slaves in upper-class housing districts entering non-crucial mansions, and then when players enter them, a whole suite of Very Strange things happened, normally resulting in a crash. Quite a few people reported it. This bug was a leftover from a previous model of NPC handling, and required me to prevent random crowd servants/slaves from going into buildings, so now they just move around the district or sometimes leave the district instead; in turn, I’ve disabled servants/slaves in second-tier upper-class houses, and I’ll put them back once I come to 0.9 and I’m putting in all the other NPCs and NPC variations 0.8 will lack. This should all now be fine!
Secondly, I’ve had a bunch of reports of crashes when saving/loading the game, and these are very hard to diagnose, unfortunately, but I think I’ve fixed it. One was a rather strange issue with the pathfinding maps in buildings; these were just saved and loaded, but for some reason this has stopped working when you save and close the program; save and reload works fine. In truth, I don’t really understand what could be causing this in the slightest, but it takes just a few milliseconds to recalculate when you load the game instead of trying to load it from scratch, so I’ve dumped in some code to that effect, which will be sufficient for now. Debug logs still look crazy, though.
Thirdly, a major problem arose with non-“important” NPCs sometimes straying into the code for important NPCs, and being asked by the game to report their “current_step” variable (which relates to how far through they are moving from one district to another on a regular/routine schedule), and the game thereby crashing because they don’t have that variable at all. A lot of people reported this, and it turned out to be pleasingly trivial to diagnose and fix, since it basically required the addition of “if npc.important:” to a particular piece of AI code, and that sorted it out. Result!
We also had an issue with guards failing to appear to relieve other guards in upper-class districts, which has now been fixed:
And ambassadors were not always in their embassies at night, which needed a quick fix:
There were also reported issues of jailers sometimes getting into an infinite loop (fixed), an issue with castles that contained both slaves and jailers/torturers in the basement and they would sometimes try to path to beds in the other segment of the basement and cause the game to go into a loop (fixed), farmers sometimes didn’t always appear on their farms at the right times (fixed), and entering a farmhouse after a farmer who you saw enter, entered, and that farmer wasn’t an important farmer, would cause a crash (fixed), due to them inexplicably attempting to use a line of code designed for guards and knights moving between floors in castles, and the game freaking out with concern about the impossibility of pathing to duplicate mutually-exclusive staircases which didn’t exist. Weird. Also, we had a problem with guards sometimes teleporting themselves into the inside doors of a castle, which was screwing up their ability to exchange places with their counterparts at the right time (fixed, below) and a whole host of little minor problems which I didn’t write down whilst solving, but were generally not crash bugs, but just strange actions.
There is still one issue, which is that if you enter a “farm” map grid at night, the farmers spawn outside and then immediately rush inside to sleep; this really should be fixed, but it’s low priority, so in 0.9 I’ll make sure they appear in their buildings. It’s basically because most farmers being unique, but unimportant, AND being in their own buildings, is a unique combination, which requires some special code to it though. If I don’t mention on the blog that I’ve fixed this in the next couple of months, somebody remind me!
If you’re on the playtesting team, you should have a link to a new version in your inbox in the next few days. For everyone else, suffice to say that major bug-fixing improvements are taking place at the moment, and the team are doing damned well. More news as and when…
Talking Screen
Insanely exciting developments this week! We have a first draft of the conversation screen! It is heavily *in progress*, but check this beautiful thing out:
Now, I’ve been working on how this should look for quite some time and there’s a lot of stuff here to explain and describe, so let’s take it in order. Firstly, when you want to talk to someone you press ‘s’ for speak – ‘t’ is currently used for throw, and the options are therefore “throw” and “speak”, or “chuck” and “talk” – I think we can all agree that chuck is far too informal, so the first option is obviously better. This gives you a crosshair like the look function and the grab function and so forth, which can be moved in a 7×7 square centred on the player. Anyone in that area, and without your line of sight and on an explored tile (so you can’t exploit it by trying to speak through walls and finding where other NPCs are!) can be spoken with by pressing Enter, which brings you to the above screen. (In the below gif I quite rudely start talking to an NPC whilst they’re sleeping, but these are early days – naturally waking someone else will soon have some effect on their mood in the conversation).
Once you’re there, we have a bunch of options, which fall into three categories. Firstly, we have the “standard options”.
These are the options that the player will be given for every single person they ever talk to. These will be related to the player’s “memory” (which will soon replace the existing “encyclopedia”, which is to say that you can ask anyone a question about any sub-topic within these topics, so for every important painting you’ve seen, you’ll be able to raise it as a potential topic of conversation (if you’re thinking “this will make for extremely tedious optimal gameplay – don’t worry, I have a solution, which is later in this entry). These options will likely form the majority of one’s conversations, and allow for a great breadth in potential conversation topics. Naturally, some people will be more or less willing to discuss each topic, for reasons of their own preferences or their culture/religion.
Then, we have the “special options”.
These are options specific to the class of NPC you’re talking to. A priest will give you options like “Worship”, “Holy Book” and “Relics” that we see here; a servant or slave will show “Tasks”; a noble or lord might show “Family”; an archivist will show “Archives” and “Tombs”; and so on and so forth. There are never more than four special options, but quite a few classes of NPC now have four special options listed. These will often be the crucial topics to speak about with an NPC, but naturally the standard options will also often yield important or interesting data of various sorts. I think these add a nice sense of variety when encountering new types of NPC, and also direct players to some almost “recommended” topics of conversation, which might be especially important when people are learning the game and find themselves a little overwhelmed by the sheer volume of Stuff you can talk about.
And thirdly we have the “dialect” option.
Now, you may be thinking – what is to stop the player simply asking every single question to every important NPC in the hope of extracting some information? We all know that gamers can often be satisfied with performing some very unexciting things in games if they are gameplay-optimal, and naturally I therefore don’t want it to be gameplay-optimal to “grind” in this way and just ask everything you can in the hope of landing upon something which matters. Once you’ve explored the world a fair bit, you are going to have hundreds, and potentially (in the late game) thousands of things which you could ask a given NPC. The solution to this problem is rather simple, and I think rather elegant. Basically, all NPCs will have a “conversation interest” meter, hidden to the player, but reflected in the tone with which they speak. If you ask relevant questions, the conversation continues. If you don’t, they will quickly become disinterested, and past a certain point, just end the conversation with you. This will therefore strongly encourage the player towards focusing only on conversation topics you know are important, or towards those you think might be important, getting the player to make intelligent and informed judgements instead of just taking a shot on every conversation option. This is very different to most games with conversation options, in which players are generally strongly encouraged to exhaust every conversation tree, and I think it’ll be interesting to see how this plays out.
Also, I then thought of a way even this could be exploited – end the conversation, start a new conversation, try some more options, etc – but that’s also readily fixed. Characters who end the conversation due to your stupid or irrelevant questions will be unwilling to start a new conversation for a period of time, and since time will be the fundamental “food clock” resource in URR, you won’t (in almost all cases) be able to just wait around until they reset (a few days? A week?), and if you do, then it will have to be a strategic choice because you strongly feel you need to speak to a character who has previously shunned you.
Anyway, back to the screen. When you select an option you’ll get a list of every possible topic, and whether you know the dialect well enough to speak that question in that dialect (I’m still working on how exactly that will be “acquired”). These are empty for now, but will be one of the next things I’ll work on. We also see two images at the top of the screen, for the player and the person you’re talking to, whilst the conversation will scroll up (and be scroll-able) in the middle of the screen, with your comments left-aligned and the comments of the other character right-aligned. These are all the things I’ll be putting together in the next few weeks!
Lastly, on dialects, I would also like to add (on a more personal note) how enjoyable it is to be working on the speech generation/conversation system stuff! There’s a real pleasure to be found in starting to work on an entirely new and very cool system, and the past few days have been a great little period of starting to piece the disparate components required together. I’m really happy with how this initially looks and excited to keep working on this in the coming weeks. Stay tuned!