Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  
Pages: 1 ... 185 186 [187] 188 189 ... 222

Author Topic: Dwarf Fortress meets The Outer Wilds? "Ultima Ratio Regum", v0.10.1 out Feb 2023  (Read 636316 times)

Ultima Ratio Regum

  • Bay Watcher
  • Games academic and "Ultima Ratio Regum" person
    • View Profile
    • Ultima Ratio Regum
Re: Ultima Ratio Regum - roguelike/Borges/Eco, v0.7 released!
« Reply #2790 on: March 07, 2016, 03:18:43 pm »

IRDC

This year’s US IRDC has now been booked, and will be at NYU from August 6th to the 7th! Unlike last year where various tedious things got in the way, this year I will 100% be dragging myself across the ocean for this, and staying at least until late on the 8th, and possibly a little longer depending on Various Factors. If I’m going across the Atlantic for it, those of you already in North America have no excuse! I hope to see a lot of URR fans there – for more information, you can check out the information here on Roguebasin http://www.roguebasin.com/index.php?title=IRDC_2016-usa. If you want a European IRDC – and naturally, I do too – then you should pester DarkGod, who volunteered to host it but has since gone mysteriously quiet…

This Week:

Well, in one sentence, even more NPCs now (as far as I can tell) schedule correctly. Here’s a run down!

Guards (again)

Yep, guards needed still more work. Found a bug where if you entered the house of a guard, even if they were actually meant to be in another building, so long as that building was a) in the same district and b) currently unspawned (e.g. an arena, whose guards always spawn in the same lower class district). This has been fixed. Also discovered a bug during testing that sometimes under very specific conditions actually duplicated an NPC – if an NPC went into a building, and you saw them go in (so they had been physically spawned), but the building had not yet been spawned, and you waited until they completed their initial task, and then entered (and thereby spawned) the building, they would appear in the building and behave correctly, but a doppelganger would be made and stored back into the list of abstract NPCs. Then, when it came time for that NPC to take another scheduled action, both the abstract non-existent NPC, and the physically spawned NPC, would both try to take the action (since they shared the same unique identifying number), at which point… Bad Things would happen. This has been dealt with. I know last week I said everything with guards was working, but now I *really* think everything with guards is working. Hopefully.

Prisoners

Due to a classic case of chaos theory, making a totally minor change that was essential to the game’s code for handling important NPCs had the unexpected side-effect of causing only the tiniest fraction of prisoners to ever actually spawn – only the secretly-important prisoners in jails were spawning, whilst the other prisoners who are classed by the game as “important”, i.e. they are saved and still appear when you change map grid, were not being spawned. This has been fixed! Here’s a jail full of prisoners (the “z” characters) wandering about their cells:



And the jailer knows how to go to bed, though I slightly messed up this gif by going up the wrong staircase first and letting the mouse cursor stray in at the end…



And when I go back in at night, they’re all on their beds like good prisoners, and the jailer is where they should be in their quarters:





Mercenaries

There was an earlier bug with mercenaries, and although I didn’t explicitly fix it, something I’ve coded in the interim seems to have fixed it, so I’m assuming it now all works perfectly. Hooray! Mercenaries are found in mercenary guilds, and spend their day wandering/pacing their rooms. In the future, of course, you’ll be able to engage with them, but that’s where they stand for now. Here’s a mercenary guild I entered at night, and sure enough found everyone in their appropriate beds:



And one waking up and starting to wander and pace:



Servants and Slaves

I… think servants/slaves in upper-class houses are now working correctly. The important ones spawn and behave, the unimportant ones spawn and behave, and so forth. Here’s me running around the upper floor in a non-slaving nation (so “v” is servant, “s” is slave) and watching the servants going around their day – though in fairness, we’re in a equatorial region here, so both skin tones and wood colours tend to be darker, and combined with the brown/red in the floor patterns here, I admit that the servants are a little tricky to see! But there isn’t really much I can do about that, as it’s a rare occurence to have all three of those match up. Though this might finally galvanize me towards actually adding a 14×14 font size soon, that should help in situations like this!



And in another mansion, at night, all the servants are sleeping in their quarters!



However, there is some remaining weird issue going on – if we’re physically present when they should be waking up, they don’t! This is the top priority to fix this coming week.

Bugs and Whatnot

Found a weird bug this week when a guard who had left their house and was going towards the arena to relieve the other guard there somehow got switched from the “Local Pathfinding” state (where they move from one point to another on the local map by any means necessary, regardless of roads) to the “Roadmap” state (where random crowd NPCs just follow roads). This should be totally impossible, and having gone over the code many times I cannot find how this could take place, and sadly I had no debugging stuff going to catch that happening since I’ve been doing AI for three months now and this is the first time that’s ever happened. Weird. I’ve put in even more safeguards into the code to prevent this happening, but I suppose there’s got to be a tiny chance that whatever weird collection of flukes led to this occurrence could still be lurking out there. Very peculiar.

Also discovered an issue with the way I was actually playtesting things; due to things now being saved in their own subfolders in the save folder instead of being saved in one massive file, saving/loading is vastly faster and more efficient, but it does mean it’s harder for me to “reset” the game to its previous state to continue testing the same thing in fractionally different scenarios. So I wrote in a bit of stability code to basically help me testing; this probably won’t be noticed, but it just makes saving and loading things in the background a little slicker.

Dialects

I’ve continued to take brief breaks from all this madness to work a little bit on the dialect generation system. I’ve identified a massive set of variables including word order and various other things, and it’s looking amazing even at this early stage. In my brief moments of dialect generation, I am coming to realize that before I go much further, I need a very clear and solid idea of what “a conversation” will actually look like. More on this in a near-future blog entry…

What next?

We are approaching a point where there is only so much I can do to try every possible scenario that I can imagine, and I’ll just need to release a playtesting build and rely on the skills of the masses (you wonderful lot!) to help me find it all. Still debating whether to do a closed or open playtest. Leaning slightly towards open right now, but I was leaning towards closed last week, so I’m very changeable at the moment on this point. I’ll update you all once I have more information. For now, though, my focus this week is on ambassadors, clerks, diplomats, innkeeps, delegates, and finishing that issue with slaves/servants.
Logged

Ultima Ratio Regum

  • Bay Watcher
  • Games academic and "Ultima Ratio Regum" person
    • View Profile
    • Ultima Ratio Regum
Re: Ultima Ratio Regum - roguelike/Borges/Eco, v0.7 released!
« Reply #2791 on: March 13, 2016, 09:56:52 am »

AI stuff going well, aiming for 26-27 on playtesting release, and in the mean time, I wrote up a piece about the AlphaGo vs Lee Sedol matches this week: http://www.ultimaratioregum.co.uk/game/2016/03/13/alphago-lee-sedol-and-grand-ai-challenges/
Logged

Ultima Ratio Regum

  • Bay Watcher
  • Games academic and "Ultima Ratio Regum" person
    • View Profile
    • Ultima Ratio Regum
Re: Ultima Ratio Regum - roguelike/Borges/Eco, v0.7 released!
« Reply #2792 on: March 20, 2016, 05:43:30 pm »

To anyone who sent me an email about playtesting and I didn’t reply: I’m very sorry! I think I’ve caught them all, but I’ve had a lot, and my inbox has recently been blasted with spam, so it’s possible I missed one. If so, rest assured it was entirely accidental and nobody has been shunned on purpose, and I *massively* appreciate every single offer!

But as for this fortnight’s update: YES, as I’m sure you could guess, I’ve done more work on AI, but my goodness, we’re getting close to an acceptable level of completeness here for the 0.8 release. I just realized with something of a shock how close I am to having this release’s AI finished: Chieftains, Priests, Archivists, Mercenaries, Clerks, Diplomats, Farmers, Guards, ordinary citizens, Innkeeps, Jailers, Merchants, Slaves, Tellers, Servants and Prisoners all work! If I can make sure officers work, and all the NPCs in castles and monasteries work, it’ll be done! Then I’ll do speech generation, then release 0.8, then return to finish off the more obscure NPCs – blacksmiths, delegates, explorers, gladiators, and so forth – in a much quicker 0.9. So here’s a run-down of everything this past two weeks, as I enter what I desperately hope to be the last week of concerted AI work in this release. I will be releasing the playtesting release on the weekend of 2/3 April, and I’m probably going for the closed playtest option. For now, though…

Servants and Slaves, Again

Found a few fascinatingly rare errors involving saving and loading specifically when important but non-unique NPCs were next to, or on, a staircase, and were either transitioning to sleeping or transitioning to doing their normal everyday stuff. If next to the stairs they were trying to find a new target when the game reloaded instead of continuing to the stairs, but if they were already on the stairs, they would cause a soft lock with the NPC trying to find another target. I’m pretty certain I’ve fixed this now for all NPCs this might apply to, and if it isn’t finished, they should roll over to a piece of code that will encourage them towards a chair or a bed for a temporary rest, rather than having them lock up the game, so there’s a slightly less-elegant backup solution in there in case the main solution doesn’t work. I went into the basement of a mansion and waited until it was time for the servants to wake up, quickly modified the code to make them all wake up around the same time instead of over a longer period in order to take a nice gif, and voila:



Ambassadors

Ambassadors and innkeeps have a similar thing to them – they spawn and sleep on the upper floor of their building, and when they get up, they head downstairs and do their thing, and then return upwards. As far as I can tell (I know I keep putting this proviso on everything I write about AI, but the stuff is so damned complicated that I have to!) ambassadors work correctly, although there remains a tiny issue with innkeeps because in their business day they can sometimes drift onto the upper staircase, and if they decide to go to the upper staircase when already standing on it, they go up but then don’t look for a target, and freeze. Not quite sure why, but for the ambassadors, here’s a quick gif of one turning in for the night:



Clerks and Diplomats

Clerks and diplomats all now seem to work correctly, using effectively the same code as tellers, albeit with a minor slight difference. They live all over the city, head towards their appropriate embassies, and behave correctly, although there was a really strange issue for a while with the game trying to spawn a duplicate whenever one of them was due to act! Then we had another issue with clerks and diplomats sometimes deciding to sneak upstairs and occupy the ambassador’s bed! Cheeky buggers. All very odd, but now resolved.



Monastery Name Generation

To my amusement, I realized I’d neglected to get monastery names generating! I’d just left them with a placeholder, “Monastery of the Six Halos”, and entirely forgotten about them. I returned there this week and spent an hour putting in a robust name generation system which draws upon the specifics of the religion in question – whether it worships an animal god, a demonic god, a lovecraftian god, an “ordinary” god, a pantheon, etc – and then churns out a series of related but distinctive names for the monasteries in each civilization. Here are a few groups of examples:



Archivists again

Archivists weren’t behaving perfectly and couldn’t find their way back to their desk after a good night’s sleep. Now they do!



Farmers

Farmers now farm! You can head into a farm, and for each farmhouse, we’ll see a farmer doing their thing, which basically involves moving from point to point in the fields, and only moving a few tiles at a time. By this, I mean they select a group of crops to work on, work there for x turns, then move no more than 5 or so tiles in any direction onto another crop, tend that, and so forth, and so you see them slowly moving around their fields. At the appropriate time, they head home. Here’s a gif of a farmer… farming… which is about as exciting as you’d expect, but hey, it works:



And goes to their farmhouse:



And going to bed:



Thrilling stuff!

Innkeeps

Innkeeps are now in the appropriate place in the day, and at night. As above, innkeeps use pretty much the same body of code as ambassadors since they sleep in the building they work, they sleep on a floor above their working floor, and so forth. At the moment they should come down stairs in the morning and tend to the bar. I’m also considering using the graphics for the beer barrels stored in the basement for barrels more generally, and adding those into the generation algorithms for some other buildings to add some variety to the standard chairs/tables (i.e. use them as food storage barrels and that kind of thing). For now, people do still come into the tavern when the innkeep is asleep, but that can be fixed some other time, and definitely fits into the “long set of very minor issues” category that I’ll handle in the future. I assume they just sit around and drink their drinks very slowly until dawn once more spins around.



Next Week

The final AI update before the playtesting release, and hopefully pretty much all the AI needed for 0.8… and what a relief that will be!
Logged

Dorsidwarf

  • Bay Watcher
  • [INTERSTELLAR]
    • View Profile
Re: Ultima Ratio Regum - roguelike/Borges/Eco, v0.7 released!
« Reply #2793 on: March 21, 2016, 01:59:33 am »

Great to see how this is coming along!
Very excited.
Logged
Quote from: Rodney Ootkins
Everything is going to be alright

Ultima Ratio Regum

  • Bay Watcher
  • Games academic and "Ultima Ratio Regum" person
    • View Profile
    • Ultima Ratio Regum
Re: Ultima Ratio Regum - roguelike/Borges/Eco, v0.7 released!
« Reply #2794 on: March 21, 2016, 05:53:24 pm »

Thanks! Bit by bit, 0.8 approaches :)
Logged

Aleksanderus

  • Bay Watcher
  • Champion of the unknown
    • View Profile
Re: Ultima Ratio Regum - roguelike/Borges/Eco, v0.7 released!
« Reply #2795 on: March 23, 2016, 11:57:17 am »

Well, I found the same game on the other forum  :D
Logged
Quote
his title changed to "thruthful chills"
Also known as : "Believe me when I say this guy is a psychotic murderer".

Ultima Ratio Regum

  • Bay Watcher
  • Games academic and "Ultima Ratio Regum" person
    • View Profile
    • Ultima Ratio Regum
Re: Ultima Ratio Regum - roguelike/Borges/Eco, v0.7 released!
« Reply #2796 on: March 23, 2016, 02:15:37 pm »

Wha?! I'm seeing double!
Logged

Ultima Ratio Regum

  • Bay Watcher
  • Games academic and "Ultima Ratio Regum" person
    • View Profile
    • Ultima Ratio Regum
Re: Ultima Ratio Regum - roguelike/Borges/Eco, v0.7 released!
« Reply #2797 on: March 30, 2016, 12:36:51 pm »

I was going to publish this update on Sunday, but I decided to leave it until today so that we could hopefully have all the monastery stuff done. Almost all of the monasteries’ AI now works correctly, along with the other stuff, which means next week’s update will be on castles and everything else that needs doing in the interim. This update looks at monasteries and a ton of extra work on innkeeps and farmers, and a pretty exciting selection of bugs that came up in the process, the combination of which prevented me from also getting castles done this weekend (in the UK we have a four-day easter weekend, so I’ve been coding all Friday and today as well as Sat/Sun/Mon). What all of this means is that in a fortnight from today, I should be releasing the playtesting release. It’s just castles and a few monastery issues to go, and then clearing and neatening some things up, then we’re (finally) good to go to move onto speech. Thanks to everyone for sticking with me this long – it has been tough, but we are so close to having all the AI stuff working for the playtesting release. If you want to be part of the interim playtest, you can still email me at my first name at this domain. For those who haven’t seen me mention this before, this is not 0.8, but rather an interim closed playtesting release for making sure that all the AI stuff is working correctly. For now, though, here’s a summary of all the final AI stuff implemented this week:

Monasteries

Monasteries and castles were always going to be two of the hardest areas to make work perfectly. Castles are complex because they have so many different classes of NPC going about their day and many different floors, whilst monasteries were always going to be challenging because they can contain many buildings – the monastery itself, a nearly religious building for worship, and potentially delegate housing if in a democratic nation that allows its monasteries to have delegates – and the schedules of the monks include interior and exterior behaviours within the monastery (studying), within the religious building (prayer), and outside (tending to the vegetable garden). Additionally, monasteries are an area with a tiny number of important NPCs (i.e. a couple of the monks) and a large number of semi-important NPCs who should be indistinguishable from the other monks (i.e. the rest of the monks), and these categories need to work correctly despite having quite different code with regards to their scheduling. I’ll be working on all the NPC schedules we need in castles this coming week, but as far as I can tell monasteries are now all working correctly! Here are some examples – you’ve seen lots of monks before, but they now tend their vegetable gardens correctly, and head to bed correctly, although there remain a few minor issues that need resolving for next week…





And a monk (I’m using “monk” for women and men, since “nun” has a lot of connotations that are distinct from monk) in such a monastery:



More Farmers and Innkeeps

As is becoming a pattern, it turned out that farmers and innkeeps were not working perfectly. The issue with the former was in matching up both important and non-important farmers in their homes at the appropriate times in their schedules (e.g. night) and then making sure those farmers are the ones that start farming in the day, instead of spawning a second copy. Later issues were then discovered with various combinations of being in buildings, out of buildings, being important, being unimportant, etc, including a few weird errors that arose because “Farmhouse” wasn’t in a few places it should be in order to acknowledge it as a potential type of house for an NPC.

The issue with the latter was that although 95% of the ambassador code was usable, I had forgotten that the usual movement for innkeeps (wandering around behind the counter) uses a very different chunk of code from ambassadors (wandering around their embassy and sitting at chairs and talking to people), which meant that innkeeps, if they had just been awoken and then the player entered and therefore spawned the building, it would often place them outside the bar’s counter and get them wandering around their own tavern instead of serving drinks! I’ve now fixed all of this nonsense.



Bugs

A huge number of bugs were resolved this week. For some reason, wandering NPCs who enter a building whilst the player is outside and the building is not spawned, and then the player enters and spawns that building, were not behaving properly and were causing the game to crash by attempting to path outside the building. I don’t understand what caused this, since I don’t think I changed any code that deals with that stuff, or even any code related to that stuff, but either way, it’s now fixed; fixed by dealing with the effect instead of finding the cause, but fixed regardless.

Then we had another very weird bug which took a while to track down, but basically if you moved onto the same tile as a sleeping NPC, on a different floor, and that NPC was of a specific class and had been spawned in a particular way, they would move onto the staircase down, and then just sit there doing nothing. Turned out this was an incredibly old line of code that wasn’t fit to handle buildings of multiple floors, and just needed a single line added, but that took a good few hours to hunt down…

Another bug emerged whereby when you went up a staircase, if you then immediately tried to move onto a tile which was occupied by another NPC, and that NPC wasn’t moving, you could switch places with them. This one meant that, in effect, you could transfer someone off their bed, whilst sleeping, and put them on the staircase. Very silly. Like the first in this list, I’m still not completely sure what caused this, but I’ve fixed it regardless by adding a special line of code that prevents you doing a “force switch” with another NPC so long as you’re on a staircase, since the staircase definitely creates the problem.

I also ran into a really strange bug involving the corners of city walls placed outside those walls. If you were going from Map Grid XlY to Map Grid X,Y-1 and there was a city on Map Grid X+1,Y or Map Grid X+1,Y-1, then the game would check whether you could path to the corner of the map grid (as it should), but rather than concluding that this couldn’t be pathed to (on account of being city wall), it instead concluded it could be pathed to with a path time of 0 moves. As in, it defaulted to 0 as the “error” path length, rather than 9999 or some equivalent. This took a while to find since it has been a long time since I’ve handled the code for keeping track of the time it takes the player to move around the map, but has now been fixed, and no longer teleports the player into impossible corners if they then instantly re-enter a map grid after travelling out of it, and there’s a city wall in the corner.

Another bug emerged where it turned out that moving from map grid to map grid on foot, if the player was outside a city, caused the important NPCs to mysteriously vanish into oblivion. This was because I had originally codded it on the assumption – falsely, but it just didn’t occur to me – that only cities would have important NPCs… but of course monasteries, farms, towns and so forth do as well. This meant that when you simply walked from grid to grid, it didn’t think to check in on important NPCs because the player wasn’t going through a city gate, and everything was tethered to the gates. This was a quick copy-paste job to call the same “Check what important NPCs are doing” function when going over map grids, and as far as I can tell, that should have done it.

Honestly, a ton of this week has been on bug-fixing. It’s a real case of two steps forward, one step back: I code a bunch of new AI stuff, and then discover loads of weird new bugs in the process, spawned from the massive complexity of URR 0.8. Still, there can’t be that many bugs left now… right?

And finally, since this is a relatively screenshot-light entry, some NPCs from a nation I ran into during the process of playtesting. See you all next week for finished monastery AI, and hopefully the completion of the biggest challenge of all – CASTLES.





Logged

Ultima Ratio Regum

  • Bay Watcher
  • Games academic and "Ultima Ratio Regum" person
    • View Profile
    • Ultima Ratio Regum
Re: Ultima Ratio Regum - roguelike/Borges/Eco, v0.7 released!
« Reply #2798 on: April 11, 2016, 12:47:52 pm »

Well, I wound up taking two days off work and three more days working from home, but I’ve mostly recovered from my recent chest infection through the combination of rest, food, and copious amounts of medicine. This was originally going to be the penultimate AI entry, but having lost over a week in total from this bloody thing, we’ll see how that actually plays out. In the last fortnight, when not hacking and coughing, I’ve been working on finishing off the remaining NPC AI needed to put out the playtesting release in the near future. I worked on castles which were a lot of fun to do all the AI for, most of which is already working really well due to the ability to reuse their code from elsewhere; on making sure merchants, priests and guards in other contexts (i.e. not just cities) all worked correctly, on getting monks and abbots to behave correctly, and on fixing another huge volume of bugs. At this point it’s just castles and monasteries that need finishing, and these are my main tasks for the coming week (assuming, of course, no other illnesses that confine me to bed…). Read on!

Castles

Castles have proved to be a very enjoyable break from the rest of this hell – most of their NPCs never leave the building, their schedules are relatively simple, and they’re just so different and aesthetically pleasing that I’ve found this process all rather pleasant. At the moment almost everything seems to work, though there are some tricky things I’ve had to catch where I’d written code for a particular NPC class, forgetting that they could sometimes spawn in castles as well as elsewhere. One example was servants, who in upper-class housing and mansions automatically always sleep in the basement, but in castles actually live on the ground floor (if present); in castles it is only slaves (if present) who sleep below ground. I had to go through quite a bit of code and make sure that the game checked whether servants were in castles or mansions before directing them. The same applied to a few other NPCs, like guards that both sleep and work inside (unique) and so forth. Similarly, I also found that I needed to add in a special line of code for NPCs trying to do inside schedule targets in castles that checked they coud actually path to the target they’d chosen. This might seem obvious and surprising that I hadn’t put it in before, but previously all upper floors of buildings had only one large connected space (even if some of it had permission requirements), so one could always be sure an NPC could path from X to Y on a floor; by contrast, castle upper floors can have parts of turrets and towers that are disconnected from the main floor, and thereby impossible to path to from certain areas, and so NPCs now always check the path they’ve chosen can actually be walked, instead of relying on the game to never generate/choose an unwalkable path. As I say, this was the case until now, but it isn’t any more! Here’s me approaching a castle with some soldiers (‘5’) and guards (‘g’) outside, showing that this is a nation with a standing army:



Here are a few gifs and images from inside a castle (I’ve been using one particular civilization for all my testing, hence the universal silver/grey colour). First we have a throne room with a lot of knights (‘2’). This is a stratocracy, so the ruler’s throne (the yellow symbol in the middle, which will soon have its own unique generation system) has an unusually large amount of high-ranking protection.



The quarters of some soldiers, with various soldiers sleeping off-duty whilst their duplicates guard the castle outside (soldiers appear in castles in nations with standing armies).



Some priests (very slowly) meandering in their respective chapels in a castle for a nation with religious freedom as its ideology; whereas priests in normal churches are programmed to wander around and look at altars and desks and statues and whatever, these folks use the same body of code as chieftains or prisoners or mercenaries, i.e. wandering around within particular confines (since it would be rather odd to have them looking at the altars of others!).



And here we have a servant on the ground floor going about their day, going up one of the towers at the edges/corners (depending on the layout) of the castle and cleaning one of the chairs on the upper floor; on that floor we also find a guard (‘g’) and a knight (‘2’) sleeping. Somewhere their equivalents will be on



Here’s a monetary cache. This nation has a free trade economic policy, so they have a cache of coinage from a range of other nations in the castle – or, y’know, they will very shortly once I implement currencies. For now though, if you see two guards like this – that’s what they’re guarding. Alternatively, another policy (protectionism, I think) leads to a castle having a large cache of domestic coinage instead, and these are mutually exclusive policies, so there will only ever be one, or neither.



Merchants, Priests and Innkeeps in Towns

Merchants and priests all work correctly in towns. I had a momentary bit of panic as I realized that I’d only tested priests and merchants in cities, and although the code should work in towns just as well… there was always a chance it wouldn’t, since various things are stored in different ways in towns and cities. Nevertheless, a little bit of experimentation confirmed that everything was working fine there. Here are two shops in a town near the above castle:





Monks and Monasteries

Wow. Monks and monasteries. What a nightmare. This is taking so much longer than anticipated – the complexity comes from having multiple buildings on one map, all of which might or might not be spawned, and the presence of tasks that take NPCs from one into the other… and various other things besides. Therefore, I have taken the decision to actually massively simplify them as spawning NPCs from this release. Their schedules are just too damned complicated ordinarily and need too much moving between buildings, acting outside buildings, blah blah… it’s all trivial to handle when the player is on the map grid, but when the player is elsewhere, or they’re present and they’ve spawned some buildings in the monastery complex but not others… urgh, what a nightmare. Therefore, for this release, despite the lovely gif of farming monks from a few weeks ago, monks will actually stay completely indoors. They will awaken, get up, do some work throughout the day, then turn back in. For 0.9 I’ll return here and get them tending to their vegetable gardens and visiting the religious building in their complex, but not just yet.

Bugs

Another fortnight with loads of new bugs discovered and dealt with.

Firstly, we had a bug with categories of NPC who all sleep on the same floor, in the same building, and go to their bed at roughly the same time. If two were targeting the same bed, they would not register it as an inaccessible bed since nobody was on that bed YET, so they would both go there, the person to get there first would claim the bed, and the latter would just stand next to the bed, desperately pining for the bed they could no longer have. Some new lines of code now detect if someone has just stepped onto the bed you’re going after, and NPCs now change directions appropriately; in a future release I’ll have NPCs actually claim specific beds, since right now they only go to general beds – servants will go to any servant bed in their mansion, priests will go to any priest bed in a cathedral, and so forth…

I then ran into a bug that took about four hours to resolve, whereby in a tiny subset of possible religious buildings, priests couldn’t figure out what to do. This took a disappointingly long time to diagnose, especially since it was a block of time that I’d marked out for making sure monasteries worked correctly, but in the end I sorted it out. It happened in religious buildings that contained pools and only a tiny number of chairs/tables, or contained only prayer mats without chairs around tables in the building. These are both pretty rare subsets, but basically the code for choosing locations for humans and priests to meander to weren’t correctly handling pools (they should just gaze into the pool, like the gif below) and weren’t handling prayer mats, since they are stored separately from “chairs”. This is now all sorted, and I think this should work fine for any and all religious buildings.



And here’s a rather nice gif of a matching prayer mat, clothing, and altar, just since I happened to be in a religious building with a pleasing level of colour-coordination:



Then ran into a rather strange bug, whereby people who work in buildings they don’t sleep in, and did everything from their work day before then going to bed and reaching their home away from the player’s observation, would fail to spawn when you then spawned their map grid and went into their home. This one was puzzling, since I’m sure this worked before… but on the other hand, there are so many permutations of saving/loading and whatnot that it may well have been a particular variation I’d missed on my first sweep a few weeks ago. Either way, it all works now!

Next Week

Castle AI finished, Monk/Abbot AI definitely functioning correctly, any remaining tweaking required to put out the playtesting release, and… who knows, I might even start working on the conversation window?!?! But let’s not get ahead of ourselves (for once)…
Logged

Ultima Ratio Regum

  • Bay Watcher
  • Games academic and "Ultima Ratio Regum" person
    • View Profile
    • Ultima Ratio Regum
Re: Ultima Ratio Regum - roguelike/Borges/Eco, v0.7 released!
« Reply #2799 on: April 18, 2016, 04:10:57 pm »

This week I’ve been recovering from my recent thrilling illness, and made a load of progress on the AI for castles, fixing a ton of new AI bugs discovered in the interim, and some other small changes that I wanted to implement. Alas, my week of illness has pushed things back just a tad, but I’m actually still hoping to release the playtesting release next week. It’s going to be close, but my intention is to really focus on URR for the next week and try to get it out next weekend – there aren’t any academic deadlines in the next seven days or so, and those which are a little further past that I’ve made good progress on already, so I’m cautiously optimistic that it might be possible. I still haven’t decided whether to make it public or private (I know, I know…) but I guess I’ll have to decide soon enough. Probably private, though. Either way, here’s a very image- and gif-filled update for you all!

Castles

Almost all the AI requirements for castles are now done. As I mentioned last week, this was quite an easy and enjoyable part of AI programming, both because a large part was already done for all the involved NPCs and because castles are just very interesting spaces I enjoy moving around and exploring (even as their designer). The stuff that still needed doing after our previous update was to ensure that all guard exchanges work correctly (which they do, almost entirely), that monks behave in a sensible way (they do), that everyone goes to a logical bed when they turn in for the night, which is surprisingly tricky in a building with so many beds on so many floors (I think they do). As with everything else, this should work regardless of the player’s actions going in/out of the map grid, leaving the building unspawned, spawning the building, etc. Therefore, here are some screenshots.

Monks awakening for the day and moving around the castle:



A guard switch-over when the castle itself has not been spawned; although some of the colours here make it slightly tricky to see at times (I’m still trying to figure out a solution), I love the complexity of this dance as all the conscripts (“6”) and guards (“g”) exit the castle and exchange places with their comrades, before going back inside. In a later version the timings will be varied a little, of course, so that they don’t all appear at the same time, but for the time being this is more than adequate (and does look pretty cool!).



Here we have a bunch of knights guarding the throne room switching places. Sorry for the laggy parts of this gif – there was a lot of debugging stuff going on in the background which slowed it down every now and then.



In a slaving nation, we have several slaves in a castle going about their day and maintaining upkeep of the great hall; this was the same civilization as all the above gifs. A few minor issues arose here with behaviour that had been coded for mansions and manors not quite working perfectly for castles, but I’m pretty confident that’s all resolved now.



Three debugging images of a generated castle with the NPCs placed within it, and where they start. C = conscript, g = guard, K = knight, s = slave, M = monk. They normally start at their guarding locations or their beds, and then start moving as soon as they’re spawned by the player entering the castle.







More Monks

Monasteries have been successfully simplified for this release – abbots and monks now behave entirely indoors within the monastery, rather than venturing outside into the vegetable garden and the religious building at the core of the complex, and thereby causing all manner of confusion. Here we have some monks going to bed and already in bed, and then for reasons unknown I go for a wander into the next part of the monastery before ending the recording…



Bugs

Lots of fun bugs!

Firstly, something started crashing when I entered inns. It turned out that this was because of a slight typo I’d made in a line of code handling the decisions of important NPCs that accidentally scooped up a particular subset of non-important NPCs (e.g. those who can do their thing in taverns) and caused the game to implode. This wasn’t too tricky to fix once I found the line of code, although it took a fair bit of hunting down. Secondly, we had a bug involving the middle courtyards of castles (see below) which resulted in the player, upon leaving them, sometimes being transported onto the roof of the castle instead of correctly settling into the courtyard. This has also been fixed. Thirdly, we had another bug that caused certain categories of NPCs to duplicate themselves under extremely rare circumstances with the player’s movement and their spawning/non-spawning of buildings at various times in the player’s movement schedule, and this caused a bunch of problems with the clone NPCs overlapping in their schedules, or only doing half of their schedule, or all kinds of strange things. I figured out what the particular permutation was, and dealt with it. Fourthly, I ran into a bunch of problems with soldiers, conscripts and knights attempting to use the code designed for guards (since when guarding, the game should just treat them the same as guards) which needed fixing in a laborious but not massively challenging process, which basically entailed adding [‘Soldier’,’Conscript’,’Knight’] to almost every line of code with ‘Guard’ in it.

Lastly, I discovered a rather fantastic bug whereby guards and conscripts and suchlike inside a castle, who were trying to path outside a castle in order to relieve their comrades, would sometimes path to the internal doors in a castle (if that castle has an external courtyard) and would emerge into the courtyard, not have any idea how to path to their guard partners (despite being outside, and therefore supposedly able to path), and then for reasons I’m not entirely clear on, they would insert themselves into the door (see picture below) and sit there until I noticed them. This has only happened once, because I resolved it immediately after, but I really have no idea how they put themselves into the door. I guess it’s just one of those mysteries.



I also made a range of other minor changes this week in preparation for the interim playtesting release. Firstly, I removed the stat bars from the bottom of the screen, and the stats from the windows on the left of the screen. Those are almost certainly going to need updating/changing in the future, but for now, they’ve just distracting, especially as the game’s current stage is fully about exploration and (once 0.8 is out) talking to people. I’ve also made some minor changes to a bunch of flavour text here and there, primarily relating to travel and the player’s movement in the world, and changed a bunch of things relating to the wording of various items and features and terrain types and the like, as well as clarifying a few mechanics points, keypresses, etc. Naturally my focus is on the AI for the playtesting release, but I want to make it at least a reasonably streamlined experience for the playtesters!

Next Week

All that needs doing is finishing off castle AI, which is mostly done already. Next week will be the last AI update for 0.8, and hopefully the interim playtesting release. Finally!
Logged

Ultima Ratio Regum

  • Bay Watcher
  • Games academic and "Ultima Ratio Regum" person
    • View Profile
    • Ultima Ratio Regum
Re: Ultima Ratio Regum - roguelike/Borges/Eco, v0.7 released!
« Reply #2800 on: April 30, 2016, 06:33:14 am »

Ladies and gentlemen, I am pleased beyond words to announce that, as far as I can tell, all the AI requirements for 0.8 are finished! Now, I must qualify this: there are a number of NPC classes that do not yet exist in the game, but those that do exist perform almost all their actions, although there are a small number of events currently omitted (rare or unique events like religious festivals and the like). What this means is that around 80% of all NPCs now do 98% of their schedules, and I think they work correctly no matter what kind of strange behaviour the player involves themselves in with regardless to moving, saving, loading, spawning/unspawning areas, and so forth. As a result, I am indeed putting out the interim playtesting/bug-finding release in the next few days! If you emailed me asking to be on the list, you should find an email in your inbox with details of how to download the playtesting release, and some things to look for, within the week. For the rest of this blog post, therefore, I’ll go over the final additions and refinements done in the last week, and then from next week onwards, we’ll finally be on to dialect and speech generation! I’m so excited. But, first…

Finishing Castles

On Tuesday, Wednesday and Thursday I finished off everything that still needed to be done for castles, and so as far as I can now tell, all the possible NPCs that can spawn in a castle all function correctly with their schedules, their placement, their tracking whether the castle map grid is spawned/unspawned and whether the castle itself is spawned/unspawned, and so on and so forth. One major issue was with sleeping and waking NPCs, and in a few particular contexts guards who should be spawned sleeping in beds were spawned sleeping at their posts, whilst those who should have been on guard duty at their posts were on guard duty in their beds! This got fixed by copying a line of code which should have applied to all guards, but was instead applying to around 90% of them thanks to a typo. I then ran into some issues with entering a castle after the 1080 time of the day (which has 1440 “ticks”, each being ten “turns”) which is when all the guard schedules should switch over; for some strange reasons, the knights guarding the throne room were struggling to spawn correctly and causing a crash, which had *something* to do with beds, but I wasn’t quite sure what.

The “filled” doors are doors to the outside whilst the hollow doors are within one building, so here we see various guards and conscripts going outside. It’s slightly jerky due to all the debug processes printing, but I think it still looks rather snazzy, and I love seeing such a large volume of people going about their day without the game crashing! (You’ll also see slaves and knights in these gifs also just going about their daily business in the castle)



And then immediately after, the guards/conscripts who were guarding outside come back inside and head to appropriate beds:





Here’s a cache guard switching with another cache guards whilst various other guards/knights/etc on the same timetable also move to wherever it is they need to go in order to switch over:



Guards on upper floors wouldn’t behave

As a result, here are some guards and a knight in one of the towers finding their way down correctly, rather than misbehaving terribly:



I ran into a bug whereby I sometimes ran out of beds on certain generations, but only for knights and guards. It took quite some time to diagnose what was actually happening here, but it finally became apparent that when the smallest possible number of beds spawned in the corner/side towers (four per tower, so sixteen total) and the game was trying to place guards and knights in those towers, and there was a cache in the castle, there simply weren’t enough beds, so the NPCs were stuck trying to find a bed; this meant I had to specifically enable their ability to climb up towers to find another bed, but only specific staircases (because the main staircases are in the main castle, rather than in the towers)! The disconnected nature of the upper floors of castles is unique, and has basically required adding in quite a few exceptions to a lot of NPC behaviour which ordinarliy wouldn’t have to think about impossible paths on a given floor.

After that, though, things went quite smoothly with servants, slaves, and monks. Here we have a basement in this castle containing the castle’s slaves, who were all going about their day most of the time and then filed into the basement as time went by:



And monks sleeping at night in their quarters:



I then turned my attention to priests, who – in castles – can fall into two categories. In religious nations you’ll find a single large chapel with a priest walking around inside, whilst in nations that have freedom of religion you’ll find a large number of small chapels, each with a priest (and altar, book, etc) of the appropriate religion. Here’s a priest wandering around a full-size chapel for a nation dominated by a particular religion (you’ll note various servants coming and going at the same time), and then various priests in smaller chapels in a castle in a nation with a plurality of religions:







And I must say there were some cool religions in this castle. Jaguars for the jaguar god!



Then, servants. They work the same as slaves (aside from being on the ground floor instead of underground), and these worked pretty much immediately thanks to all the code in place for slaves. I then moved onto torturers and jailers, who should be spawning in a different section of the basement, away from slave quarters (if slave quarters are present) and who keep to a very simple schedule. Sure enough, these folks seem to work perfectly well now too. Here’s one of them wandering around (I also really love how under-castle jails look, don’t you?).



And heading to bed:



And here’s a torturer checking out the cells under their control (where unfortunate people will one day appear), and in a later version there will be various unpleasant things in the centre of this room, which will vary from nation to nation (so different nations have different methods of torture, if torture is their thing).



And slave quarters and a dungeon in the basement of the same castle, with two different staircases. This is a rare-ish scenario, but meant I had to make absolutely sure that slaves returning to their quarters knew which staircase to take (servants, being on the ground floor instead of the basement, don’t have this issue)…



And that’s pretty much all the NPCs for castles! In future versions I may add in a couple of extra NPCs, like book-keepers for archives and the like, and also I need to add in concubines at an appropriate point – and the actual leaders themselves! – but for now, castles still appear very active when the player wanders around them, and that’s what matters for 0.8.

Final Check, Final Bugs

The last thing to do before sending out the playtesting release is to active all possible AI actors and spend a little while wandering around the world and trying to break them myself. I’ve now done so, and to my absolute delight, I have thus far discovered that everything seemed to be working correctly, although I do still harbour a tiny, tiny concern that certain NPCs in certain houses might not always appear in their houses at the correct times, depending on the player’s actions… but I couldn’t produce any bugs here, so that’s down to be super-secret super-elite playtesting team to figure out.

I’m also going to implement a few debug tools for my playtesters, so they can now look at a debug print-out which shows all the important NPCs in that area, where their homes are, what their current tasks and schedules and objectives are, and so forth. This, naturally, will not be in the final release, but I thought it was a pretty essential feature to maximize the potential of the interim playtesting beta.

Although I have ever confidence in my team, the complexity of all this stuff does mean it has to be possible that the final 0.8 release will go out with a few minor issues still in place. This would be disappointing, of course, but so long as there are no AI related crash bugs present when 0.8 hits the shelves, I’ll be content – it would obviously be even better if there were no AI bugs of any sort whatsoever, but I’m being realistic. Pathfinding and scheduling is massively complicated already and made even more complex by the variety of permutations of spawned/unspawned/loaded/saved areas the player can bring into existence or push into the background through their movements in the game world, and despite my best efforts, I’m sure it’s still possible for an NPC to duplicate, or to vanish into nonexistence, or something else of that sort. But we’ll see! Maybe the playtesting release will be remarkably stable and nobody will find any problems whatsoever.

HAAAAAAAAAAA.

Next Week

DIALECT GENERATION! For the next week or two I’ll be working on the underlying mechanics for generating different styles of speech for each in-game culture (in the average game we need to produce around 40 very different styles of speech, and ideally many tens of thousands possible across a long enough stretch of time). I’ve started to draft this in various forms over the last month or so, and so next week I’ll give you all a run-down of what I have in mind here. After that we’ll be onto designing the conversation screen! I’ve also been giving this a lot of thought, and I have some idea how this is going to play out, and how it will connect to the dialect/sentence generation stuff I’ve been quietly putting together and experimenting with in the background. See you in a week!
Logged

Dorsidwarf

  • Bay Watcher
  • [INTERSTELLAR]
    • View Profile
Re: Ultima Ratio Regum - roguelike/Borges/Eco, v0.7 released!
« Reply #2801 on: April 30, 2016, 05:07:53 pm »

Great to see URR again!

One play isdue I have quite often is that it can be hard to tell doors apart, especially in slums. Castles look like they'll have similar issues, are there any plans to implement slight coloration for doors? ( so a dark brown wood door would be very very light brown, or a vault door might be very light grey.
Logged
Quote from: Rodney Ootkins
Everything is going to be alright

Ultima Ratio Regum

  • Bay Watcher
  • Games academic and "Ultima Ratio Regum" person
    • View Profile
    • Ultima Ratio Regum
Re: Ultima Ratio Regum - roguelike/Borges/Eco, v0.7 released!
« Reply #2802 on: May 08, 2016, 09:57:40 am »

Thanks! :)

Hmm: I hadn't, but I take your point (though I'm hoping players will identify the nature of doors more from the shape of the building/context of the area than the door itself). I'll play around with colours a bit and see how it looks!

--

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!
Logged

Ultima Ratio Regum

  • Bay Watcher
  • Games academic and "Ultima Ratio Regum" person
    • View Profile
    • Ultima Ratio Regum
Re: Ultima Ratio Regum - roguelike/Borges/Eco, v0.7 released!
« Reply #2803 on: May 14, 2016, 01:50:32 pm »

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.

Hopefully.

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.

Conversation Window

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.

Next Week

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…
Logged

Retropunch

  • Bay Watcher
    • View Profile
Re: Ultima Ratio Regum - roguelike/Borges/Eco, v0.7 released!
« Reply #2804 on: May 15, 2016, 01:09:13 pm »

So many fantastic things!! It all looks incredible, and I'm overly excited about all of it.

However, I'd really really encourage you to move the conversation system away from the 'option robot' approach. My issue with a lot of rpg games is that you sort of just go through a list of topics until you find the one in which they say something interesting. That's completely not how a conversation would normally work - I wouldn't just approach you and say 'Mark - clothes? Mark - monasteries?' until I got a response which I found useful. Whilst I really like the idea of a conversation meter - I feel that still just works like a more focused version of the option robot.

I'd suggest instead a sort of chat bot for the user to converse with, maybe with some option prompts as you already have. I did this for a project I was working on and, whilst the rest of the game was awful, that worked very, very well.

Chat bots normally don't work well as the user can literally ask anything and the chat bot doesn't have a built in 'personality' (in fact, one that 'passed' the Turing test did have a built in personality of sorts https://en.wikipedia.org/wiki/Eugene_Goostman) so they seem lifeless. More than that though, with a game based chat bot, you're strictly 'in universe' - you don't have to worry about the bot not knowing things, as it should only know parts that are relevant to it. If you ask it a question it doesn't like, it can get irritated that you're wasting it's time without it seeming as though it's just covering up for a lack of sophistication.

The main reason why I think it's crucial for your game however, is that it allows some really awesome interactions. Don't address the lord by his proper title? instant rejection. What if the NPC asks you about your feelings on their rivals? you'll want to know that information and say the right thing. Use the proper greeting for that particular religion? gain a bit more leeway with your questions. Whilst that can be done by picking options, parsing is really easy and I'm absolutely positive it adds a solid layer of immersion. I'd strongly, strongly recommend it if you can.
Logged
With enough work and polish, it could have been a forgettable flash game on Kongregate.
Pages: 1 ... 185 186 [187] 188 189 ... 222