Playtesting and Bugfixing
Lots of new bugs fixed thanks to the playtesting team!
Fixed a very rare issue where important NPCs, moving in a map grid you are in, and then you leave, will crash upon trying to calculate how long it will take them to hypothetically complete their task, which is a number the game needs in case the player doesn’t return to that map grid, and therefore the important NPC must “tick” over into their next task at the appropriate time – and, if the player returns to the grid half-way through the NPC concluding their task, the important NPC should be half way there. The problem would arise from a random NPC being placed on the important NPC’s target square, and preventing them from reaching it and the game from acknowledging that they’d finished testing out their remaining steps. To fix this the game checks if there is a random NPC, and if there is, it deletes it. If there’s another important npc there (super rare, but… I think it has to be possible?) then it shifts them aside by one tile, has the first important NPC test their route, then shifts them back. It’s not super-elegant, but it’s entirely unseen by the player and gets the job done, and fixes a crash bug that a good two or three people reported.
Fixed an issue with guards under very rare circumstances in castles not correctly exchanging themselves with the other appropriate guards, which now works fine again. (Again, as before, they tend to change over at the exact same time, and that’s a truly minor aesthetic thing I’ll alter in the future).
Fixed another bug where, for a small subset of possible nomadic fortresses, merchants wouldn’t spawn because I’d failed to ensure that there were spawn points for all the (twelve?) possible market generation algorithms. Fixed another bug which had slaves/servants failing to spawn in large-but-not-massive mansions in upper class districts, due to a rather silly typo in the function that generates them and wasn’t adding beds on the bottom floor to the list of beds that slaves/servants could spawn upon. Also fixed a bug with doors and iron bars in torture chambers in dungeons in castles, whereby looking at the bars would very rather fail to produce a picture, whilst looking at the doors would often result in a crash, due to the lack of a wall nearby for the game to use as the correct terrain/texture (this was quickly fixed by adding an exception telling the game to look further in the map for the right wall terrain instead of just the surrounding tiles, which is adequate in every single case/scenario except this one).
At this point, it is actually looking like… dare I say it… everything for NPC AI / scheduling / pathfinding is basically working? The volume of bug reports have slowed down from a torrent to a mere stream, and nobody has found any truly catastrophic issues that required me to seriously rewrite large portions of code.
Guards and Merchants in Fortresses
I’ve also continued to work on AI and NPCs and whatnot in the background whilst I wait for my playtesters to send me more bugs and issues. For instance, similar to a question I posed a little while ago about NPCs working correctly in towns, i.e. out of cities, came a similar question – would guards and merchants work correctly in nomadic fortresses?! Short answer: no, there were some serious issues with merchant scheduling, although guard scheduling appears to work completely fine. I had to put in quite a bit of new code to ensure that merchants were spawned correctly at the right places (whether in house or at their stalls), and to ensure that when merchants awake for the day and leave the house, they actually go directly to their stalls, and that when you leave and come back, the game actually correctly spawns the merchants at their outside shops instead of placing them in an imaginary “shop” building (which would be correct for a city, but is not correct for a fortress). Here’s a bunch of gifs from fortresses, the first three of merchants selling their wares, at home, and then emerging and returning to their location (a two-part gif).
However, as you will note… this does again raise the issue of skin tone and soil/sand colours. As I said a few entries ago, I’m going to try fiddling with the sand colours, and potentially making soil more of a “red brown” and even the darkest skin tones a little closer to “light brown”. It’s damned tricky though when you only have one-colour tiles to play with, in most cases, and there are only so many shades which are even light enough to see in the first place! Still: I’ll fiddle with these colours a bit and try to make sure that darker skin tones and soil/sand stand out a little better than they do at the moment, since although you can follow this, it’s obviously nowhere near as clear as dark skin tones on lighter terrain types / light skin tones on darker terrain types, and this is an issue that needs fixing somehow.
You’ll notice a few other slight changes to the conversation list: “Exchange” and “Challenge” have been added, whilst one or two other options have either been removed, or subsumed into a larger category. “Exchange” is distinct from “Trade”, which is only an option for merchants and is explicitly for offering money, in exchange for an item, which they are selling; by contrast, “Exchange” will allow you to either demand something from them for nothing, or offer them something for nothing, or propose an exchange of items/information/money/anything else. It’ll then up to the other character to determine whether or not they want to accept the offer/demand/exchange, or they’re offended by it, flattered by it, etc. I realized that this was a pretty crucial thing to add, so that’s now in there, and will lead to a slightly different screen to the rest of the conversation options, although some of the others are definitely going to have unique/distinct stuff too. When clicked on, it’ll bring up three windows – one for your items/intelligence, one for their items/intelligence, and then a middle window to put in items from both lists and see what they think of it. The same window will be used for bartering in nations that aren’t especially fond of coinage.
“Challenge”, meanwhile, will be another more detailed function to allow the player to challenge another NPC at various things – or, at least, offer/demand a challenge. This could be a battle, or to accuse them of something, or offer to gamble with them, or anything of that sort. This will probably be developed a little later once I have some idea of what kinds of things you should be able to challenge NPCs at/with/for! This will bring up two windows, one for the nature of the challenge, and one for the stakes that you propose .The same two windows will probably be used for “Smithing” as a conversation topic, to decide on what you want smithed, and the resources/payment you want to contribute. Anyway, I think both of these more complex options will be very interesting and very important, alongside the other “standard” conversation options which will list topics the player can potentially speak about.
In this gif, we look at a standard conversation option which will give you one window with a list of things you can say and whether you know how to convincingly say them in that dialect, then we move onto the “Challenge” option which shows us two windows, and then “Exchange” which shows us three. Hopefully by next week we should have some idea of what’ll be in these options! (You’ll note the below gif was taken before name implementation)
0.8 Small Changes
I’ve spent some of this past week also putting in a somewhat sizeable range of small edits for 0.8 across a range of areas.
I’ve removed the “History” and “Heresies” options from the encyclopedia. The histories option has been removed because it no longer correlated well with the new forms of name generation for each nation (as outlined in this and the previous entry), and because this needs a substantial re-write anyway, and because in the near future players should be discovering the world’s history through their actions and conversations, rather than in the encyclopedia. The “heresies” option has been removed because it was always just a very early draft when I first implemented it, and it really needs a lot more work before I’m happy making it a core part of the game. Equally, as discussed before, the encyclopedia won’t be around for long anyway, so I don’t think it’s a tremendous loss to remove these options. In the Guidebook, meanwhile, I’ve updated the “Controls” list, disabled the “Histories” section, and updated the “NPC Types” list, as well as changed a couple of comments in a few entries which were no longer totally accurate.
I’ve also updated the policy descriptions for each nation, since these were out of date, and didn’t fit! Again, before too long these will probably be less visible and abstracted out, but it’s an important improvement for now. I’ve also updated the “0.7” stuff everywhere to “0.8”, and various other fiddlings just to fix things here and there. Quite a few people reported as bugs things that I’d just put in as placeholders, so I thought it was important to prevent any future confusion! I also disabled the “grab” function (for pulling/pushing large objects) since a) it isn’t relevant right now and b) it doesn’t seem to be working properly.
Names will be integrated from the experimental file into the main game, and I’ll be figuring out how exactly dialects are learned. I have come up with four main options, and I think the fourth is definitely the strongest from a gameplay perspective, but I want to get some feedback before I go ahead in put in all the infrastructure for this! And probably some more bug fixes, but I am rather pleased to note that bug reports have trickled off, so I’m quietly hopeful we’ve now fixed all the major issues with 0.8…