Things slowed down a little in the past few weeks due to a lot of unexpected travel and some job negotiations (more on this very soon), but here’s another set of fixes and corrections:

– Fixed a complicated bug which spent a long time to hunt down, and involved guards trying to exchange positions with other guards. Normally if you enter a map grid, relevant NPCs will spawn and play out an appropriate number of actions before you gain control of your character. For example, if a guard entered the map grid twenty turns before you enter the grid, then the guard needs to catch up with those twenty turns in the real grid rather than in the abstract grid. Normally it is possible for a guard in that “interim” period of movement to find the guard they should exchange positions with and exchange positions with them;  however, in some cases this wasn’t happening, and both the new guard and the old guard were standing on top of each other once the player properly entered the map. This, er, shouldn’t have been happening. I eventually discovered it was because in very rare situations, the “old” guard would spawn later than the “new” guard, and so the new guard would walk to where the old guard should be but not find the old guard, then the old guard would spawn on top of them. The new guard is not then programmed to detect being on top of the old guard (as that should never happen!) and so the two would just stand still doing nothing. This has now been fixed! Upon moving the new guard into position, if the new guard is where the old guard is shortly going to spawn, the new guard just takes two steps back; then once they’ve spawned the new guard will meet the old guard properly, and everything will work correctly.
– Resolved an issue where sometimes a set of guards or equivalents, upon returning to a building after leaving that building to sleep, would not be able to figure out where to put themselves if the player entered the map containing that building long after they switched back over with the previous set of guards (I know, it’s a complicated one). I’m not entirely sure what the cause of this was, and I actually think there’s a good chance this was caused by my own playtesting (and fiddling around with saving/loading to test other things) rather than a bug in the game itself, as I’ve never encountered this issue before, and the save file I was testing stuff on I had been playing around with a lot before this bug emerged. Nevertheless, redundancies are important, so I have now implemented a system whereby a generated building stores the initial locations of all guards or equivalents, and if a later guard ever cannot figure out where to return itself to for whatever strange reason, then the guards will look at this master list, find a location which matches their class (Guard, Knight, Sodier, whatever), and an x/y/z coordinate set which hasn’t yet been occupied by a different returning guard, and put themselves there. Sorted.
– Found another issue related to the above where sometimes you would get two guards trying to go to the same location if you returned to a location after a long period away, because one of them would have recognised it was where their guard “partner” was stationed, while the other would see it as a free spot. This has also been fixed.
– Resolved a minor issue with NPCs selecting homes in appropriate districts under certain conditions, particularly if the player has previously been in that map grid.
– Fixed quite a few points where words could be duplicated, such as “that is not a question I want to give an answer to to”, and I’ve now hopefully got to the bottom of the last of these.
– Handled a bug slowing down NPCs who were trying to find a path to staircases in larger buildings, yet spent most of their time dithering around and examining walls in great detail.
– Fixed issue with some soldiers being unable to properly about their ranks with appropriate grammar.
– Handled a very strange issue where iron bars, such as those in jails, dungeons, or between an audience and an arena, very rarely become invisible.
– Handled a problem where Tellers don’t spawn correctly in banks if you first enter the bank after the first day of world generation.
– Changed the name of the speech category “Past Life” to simply “Life”, as this is far more descriptive (since you can ask them about their current job and things like this).
– Fixed issue where plants could not spawn inside a nomadic citadel, and crashed the game.
– Resolved a problem with NPCs who spawn in town halls in towns not having any idea where to go, and getting stuck in an infinite loop of uncertainty.
– Resolved a problem involving NPCs in barracks in towns, not knowing what to do when they decide to go for a wander (unlike in military districts in cities, where there is always something for them to do). These NPCs can now always find something relevant/sensible to do when they decide to move.
– Fixed an issue with some NPCs in taverns being unable to find their way to the door when they’re done drinking (and I do appreciate that there is an obvious comedic interpretation of this particular bug).
– Soldiers in castles no longer crash the game as a result of not knowing what to wear.
– NPCs are now even less likely than they were before to clog up a doorway and thereby block you or anyone else from going through it (I thought this was completely fixed before; it wasn’t; I now once more think it is completely fixed…)
– Wandering versions of important NPCs like priests and the like can no longer be asked questions which would make them crash, such as “what relics are there here?” while they’re walking through the streets and therefore nowhere near any relic of any sort.
– Finally, resolved a bug where sometimes reloading the game, going immediately to fast travel, and taking a particular path (NE or NW after moving N, SE or SW after moving S, etc) will take an infinite amount of time, and the game will attempt to perform 9999999 turns before giving up. I am not entirely clear why this happened, but it no longer does. No infinite hikes for anybody!

So: more progress, getting closer and closer! My list of buildings and conversation possibilities to check is getting shorter and shorter as time goes by, and it has now been well over a week since I found any large bug. This means I’ve almost exhausted everything I know I need to playtest, and once that’s done, I’ll be onto polishing things like menus, displays, information, and the like. More coming in early May!

21 Comments

Leave a Reply

Your email address will not be published.