Author Topic: Ultima Ratio Regum (0.8 released after five years!)  (Read 255862 times)

Krice

  • (Banned)
  • Rogueliker
  • ***
  • Posts: 2316
  • Karma: +0/-2
    • View Profile
    • Email
Re: Ultima Ratio Regum (v 0.7 released, 18th April!)
« Reply #255 on: June 27, 2017, 09:39:31 AM »
but I think this reduction, and this change, will be what I need.

We'll see it. I'm obviously more talented than anyone on this planet, but I made a mistake for not concentrating on -one- area of interest. It's enough for any individual, because we are just human, a species that has only recently left the jungle. Now it's too late for me, so I don't have to worry about it anymore. I missed my opportunity to become 100% good at something, at least in age that would have done something good for me.

UltimaRatioRegum

  • Rogueliker
  • ***
  • Posts: 318
  • Karma: +0/-0
  • Username says it all, really.
    • View Profile
    • Ultima Ratio Regum
    • Email
Re: Ultima Ratio Regum (v 0.7 released, 18th April!)
« Reply #256 on: July 03, 2017, 06:51:15 PM »
Firstly, I’d like to express my sincere and heartfelt appreciation for the outpouring of kind wishes after last week’s blog post, both here, and on Reddit, and Twitter, and by email, and elsewhere. They are deeply appreciated and deeply felt, and are a real credit to what a supportive bunch of people the roguelike community (and those who read my blog for the non-roguelike posts!) are. I don’t think there are a lot of games communities that would have responded so positively, and it really means a lot to me. I won’t disappoint you all; we’re back to coding, and 0.8 is back in development. I’m also going to get back to weekly updates, which will mostly be development logs/patch notes in style – however short they might be – with some longer pieces interspersed.

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

- The second I loaded up and tried to ‘s’peak to someone, we saw the first problem: the speaking crosshair seemed able to traverse the entire length of the screen, which was deeply puzzling. I discovered this only happened when the player was near the edge of one of the 200×200 grids the player actually walks around in, and this was because of a piece of code designed to prevent the crosshair from slipping off the screen; in this case it was registering that the player was near the edge, but thinking the player was using an infinite-length crosshair (e.g. the ‘l’ook crosshair) instead of one which is supposed to be contained to a 3×3 area. A quick fix took care of this, and told the game to handle edges differently depending on the crosshair the player is using.

- Then discovered that if the relationship between your nation and another nation was classed as “Unknown”, then one particular piece of code relating to greetings wouldn’t work, because it was looking for a friendship_value which didn’t exist. Instead, encountering an “Unknown” civilization now sets the friendship_value to a number determined by the ideologies of the nation in question, so a more outward-facing nation will be more friendly to total unknowns than an inward-looking nation.

- Have added the start of NPCs commenting when you ask the same question twice, and also forgetting after a lengthy period when you last asked something. In the first case, NPCs will give a new response if you ask or say the same thing a second time, and a third time, and then a final response at the end when you’ve asked over twice. The final response will be more or less exasperated depending on the mood of the NPC. Also, asking the same question over and over again will cause the mood variable of the NPC to drop. In some sensitive topics – e.g. talking to an inquisitor about a heresy – will cause mood to drop extremely quickly, and they might even get suspicious about why you keep asking…

- In the second case, all NPCs now have a hidden “forgetfulness” trait, which is influenced by a small number of other factors and determines how quickly/slowly they forget when you last asked them a specific conversation. In all cases, though, it’ll take at least days, and potentially weeks. As noted in a previous entry, there also needs to be some kind of “geographical memory” function to prevent you just asking Person 1 Question 1, then asking Person 2 Question 1, and going on and on in that manner. Instead, people will know when you’ve asked many others the same questions – they “heard on the grapevine” or whatever – and will refuse to answer. This is an important element to prevent tedious grindy gameplay, and I’ll implement this a bit later.

- Fixed some issues with asking people about their parents, grandparents, children, siblings, etc, which sometimes led to crashes when the game couldn’t construct a sentence properly. Will need to also come back to this later when special NPCs have relationships to other special NPCs.

- I’ve also done a lot of fixing of grammatical and spelling errors, which are (as expected) significant in number given the complexity of the conversation system. I had it print out every possible sentence stored for every civilization in a particular world generation – well over one thousand – then went through them all, found every typo, found where in the sentence generation that typo had arisen, fixed it, and moved onto the next. I must have fixed at least a hundred possible errors. I think I’ll do this again, to get another set of sentences, and go through those, and I’ll do this once or twice more before 0.8’s release. Should get the number of errors down to a tiny number by the end.

- I also discovered that fifteen of the “negative replies” – e.g. when you ask “Do you have X” and they say “I do not have X”, or whatever – were returning “This is a placeholder” instead of an appropriate hand-crafted response. This took a little bit of hunting down, but in the end I discovered this all just came down to fifteen typos in the thousands of words/phrases the game now stores! Things like “unimportant” being accidentally written down in another location as “unimpotant”, and things like that.

- Also made a list of questions which need special replies if you appear to be of the same nation/religion as the person you’re talking to (“Why are you asking me that?”, “Shouldn’t you know that”?, “The same as you, surely?”) or a particularly hated nation (“Why do you want to know that?!”, “There’s no way I can tell you that!”, etc). This will connect to the function that allows NPCs to estimate what nation/religion you’re from, which I’ll be working on soon.

- Added a ton (100 or so?) of new words that can be varied across nations, allowing nations to say even more things in a greater variety of ways than they could before. I also found a few cases where a culture would choose a way of saying X1 (e.g. “interested”) but wouldn’t always transfer that to ways of saying X2 and X3 (“interest” and “interesting”), so you would wind up with a culture whose people said “interested”, “intrigue” and “fascinating”, instead of “interested”, “interest” and “interesting”, the latter of which is far more logical and consistent for a single given dialect. I think I’ve now fixed all the cases where this could happen, and the differences in dialects should now consequently be just that little bit sharper.

- Started to think about how to implement what I’ve taken to calling the “metaquestions” that player can ask, e.g. “What do you think about [artwork]” where [artwork] can be replaced by the title of any artwork. I’ve put in general responses for NPCs on these questions now, i.e. I don’t know what this is, I have no opinion, I’ve already told you about this, etc, with more detail to come soon.

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


Avagart

  • 7DRL Reviewer
  • Rogueliker
  • *
  • Posts: 567
  • Karma: +0/-0
    • View Profile
Re: Ultima Ratio Regum (v 0.7 released, 18th April!)
« Reply #257 on: July 03, 2017, 11:11:18 PM »
It's nice to see you back into URR development :) Good luck!

UltimaRatioRegum

  • Rogueliker
  • ***
  • Posts: 318
  • Karma: +0/-0
  • Username says it all, really.
    • View Profile
    • Ultima Ratio Regum
    • Email
Re: Ultima Ratio Regum (v 0.7 released, 18th April!)
« Reply #258 on: July 04, 2017, 03:16:52 AM »
It's nice to see you back into URR development :) Good luck!

Thanks my friend - it feels damned good to be back!

UltimaRatioRegum

  • Rogueliker
  • ***
  • Posts: 318
  • Karma: +0/-0
  • Username says it all, really.
    • View Profile
    • Ultima Ratio Regum
    • Email
Re: Ultima Ratio Regum (v 0.7 released, 18th April!)
« Reply #259 on: July 10, 2017, 07:46:09 PM »
Lots more progress this week! Still feels so great to be back into coding, and make solid and rapid progress on the conversation systems too; it’s striking how much can be done in a day when one really focuses. In keeping with our new method of rapid blog-entry-writing which is something akin to a changelog, here we go:

- Finished off all the possible “annoyed responses”, which fall into four categories, which I’m calling “general responses”, “class responses”, “default responses” and “special responses”. When you ask someone the same thing twice or thrice, they give increasingly annoyed or puzzled responses; then, when you ask again, one of these comes into play. 50% of the time when you ask someone the same question over and over, they’ll give a response similar to the responses they gave when you’d asked the same question twice or thrice, i.e. “why are you still asking me this?”, which will sound more or less annoyed depending on their mood (“general”).

- However, sometimes instead of a general response they will give a “class” response, which is a response tailored to their class. For instance, a ruler will specifically scold you for wasting their time; a torturer or a gladiator might make veiled threats about wasting their time; monks will express anxiety about the fact they aren’t getting on with their studies; and so forth. These give a nice little bit of flavour; roughly half of all the NPC classes have “class responses” of this sort when you get on their nerves, but they don’t always come into play. These will also later on appear when you ask irrelevant questions, as well repeated questions.

- Then, the other 50% of the time (when general/class responses are not triggered) the game will look to see if there is a special response for being annoyed about that particular topic, which might be annoyed after giving a positive response (the NPC answered you, yet you keep asking) or a negative response (the NPC didn’t answer you, yet you keep asking). Some questions have special responses for positive/negative original answers, others just for one. If one exists, it then picks one; for instance, if you asked an inquisitor about heresy, and they didn’t answer, and you repeatedly ask, they might say “At this point, I begin to find your fascination with heresy concerning…”, or if you asked them about nearby volcanoes, and they answered, and you keep asking, they might give a snide response like “I’ve said all I can – these things are hard to miss”. If a special response exists, it is chosen 75% of the time.

- Then, if there is no special response coded for the question and the specific positive/negative modifier in question, the game then goes for a “default response”. If they responded positively, they might say something like “I’ve told you everything I know about [topic]”, or if negatively, something like “I will not speak about [topic], can we move on?”. The [topic] in this case will be drawn from a large library of phrases, like “buildings”, “my health”, “my homeland”, “weapons”, “fighting”, “these tombs”, “noble houses”, or whatever makes sense for the topic.

- These also vary according to mood, so an NPC who still likes you after your constant questioning might say “What interests you so much about X” or “I’ve already told you about X”, whereas an NPC annoyed with you will give sharper “Why do you persist in asking about X” or “I have got nothing more to say to you about X”.

- What all of this means is that the responses of NPCs when you get on their nerves is tremendously varied according to their mood, their background, their NPC class, their origins, what you’re asking about, how many times you’ve asked them, a wide range of other factors. It would take a tremendously long time for anyone to come close to seeing all the possible annoyed responses in the general/ class/ default/ special response categories.

- Some questions being asked repeatedly cause a bigger mood drop than others. For example, if you ask about sensitive topics, they get miffed much faster; if you ask about particularly mild topics, there is now a small chance they will not lose 1 mood; in general, though, asking a question twice will, 90% of the time, cause mood to drop by 1 (for those who don’t recall, “mood” is on a nine-point scale, and if it drops to 2, there is a 33% chance they end the conversation; at 1 there is a 66% chance they end it; if it’s at 1 and should drop again, they will always end the conversation).

- Also, asking people from more hostile or more closed nations the same question over and over comes with a die-roll for an extra mood drop alongside the default “1”.

- What all of these points mean is that (in the extreme cases) asking someone from a friendly nation about a neutral topic will take a while to annoy them if you repeat the same query; asking someone from a much more hostile nation about their work as an inquisitor is going to tire them out extremely quickly; and all other interactions fall somewhere in the middle of that spectrum.

- Lastly, some NPC classes will always have their mood drop faster if you annoy them: this means rulers of various sorts, top-tier military officers, inquisitors, archivists… basically any high-rank NPC will get annoyed with you far more rapidly.

- I’ve also coded in what NPCs say when they want to leave a conversation with you; for now, this only happens if you ignore them. There are a wide range of default goodbyes that any class can potentially use, and some classes can only use because they don’t have special goodbyes. Other classes do have special goodbyes, where they will explain that they need to go and do X, or talk to Y, or handle Z, or otherwise that your inane blather is generally less important to them than whatever else they might be doing. They then conclude with a “goodbye”, “farewell”, or similar.

- Note that these are very different from the goodbyes you get from NPCs if you say goodbye first and they echo the goodbye; they will give you at least a reasonably nice response back, even if their mood value is getting quite low. These goodbyes only happen if the NPC decides on their own account to end the conversation because whatever the player is saying is too annoying/irrelevant/distracting to continue the conversation.

- On some goodbyes where appropriate, NPCs might mention the time, e.g. “Good day to you” or “I bid you good night”, etc, and the word used will be appropriate to the time of day, i.e. morning/day/evening/night.

- Also, of course, made sure illogical goodbyes cannot be said – for example, a prisoner will not say “I must attend to other matters now!” and then just go back to walking around their cell; whereas free NPCs might say that, a prisoner might instead say “This conversation has become too trying”, or “Your tedious questions have become too much”, or whatever.

- Added another 100 words/phrases that can be unpacked and spoken differently in each nation, and made sure they can conjugate all the other versions of the phrase sensibly; so “say” can be “say”, “utter” or “speak”, then “said” could be “said”, “uttered”, “spoke”, and “saying” can be “saying”, “uttering” or “speaking”, and so on and so forth. Also added new conjugations of existing phrases or words which hadn’t previously been put into the database.

Next week? I’ll be playtesting all of this stuff, and once that’s all working fine, working on some other aspect of conversations. As mentioned before, I am actually not trying to do everything needed for conversations per se for 0.8 – the “metaquestions” (“What do you think of [artwork]”, etc) are being omitted until 0.9 at least, for example – but just enough to get the release off the ground and let people explore the central elements of the conversation system. As well as playtesting these elements, I want to start going through all the questions you can ask people, and check those work – I’m sure there are some bugs or typos in there I haven’t spotted yet. I’m confident by the end of next week I can have all that done, after which I’ll start working on having things like “[god]” or “[nation]” or “[house]” or “[officertitle]” or whatever correctly appear in speech. Those are a complex set of variables which will have to draw on a lot of different parts of the game, and I don’t want to tackle that until everything here, and the standard Q&A, are all implemented. See you all next week!

Some of the new word variables/extensions, where the comments remind me which other conjugations also need to be covered:



The general words people will use when they ask things like “why are you still asking me about X”:



As you can tell, a large part of this week has been writing massive lists! At least next week it’ll be back to playing the game itself and seeing how things play, so hopefully some in-game screenshots will come your way next time…

Avagart

  • 7DRL Reviewer
  • Rogueliker
  • *
  • Posts: 567
  • Karma: +0/-0
    • View Profile
Re: Ultima Ratio Regum (v 0.7 released, 18th April!)
« Reply #260 on: July 10, 2017, 10:11:17 PM »
Quote
writing massive lists

...and dictionaries? Didn't you fall into *massive* performance problems? Python is just fine for roguelike development, but lists and, especially, dictionaries are really slow and eats memory like a monster.

UltimaRatioRegum

  • Rogueliker
  • ***
  • Posts: 318
  • Karma: +0/-0
  • Username says it all, really.
    • View Profile
    • Ultima Ratio Regum
    • Email
Re: Ultima Ratio Regum (v 0.7 released, 18th April!)
« Reply #261 on: July 11, 2017, 12:36:39 AM »
Hmm, nope, never had any problem with them! I know people say Python has issues for this kind of thing, but personally, I've never had any issues whatsoever :)

Krice

  • (Banned)
  • Rogueliker
  • ***
  • Posts: 2316
  • Karma: +0/-2
    • View Profile
    • Email
Re: Ultima Ratio Regum (v 0.7 released, 18th April!)
« Reply #262 on: July 11, 2017, 09:15:14 AM »
Do you still have only 1 source file? I had problems with my Level class file which had I think nearly 6000 lines. Splitting it has been a good decision, now each class is about 1K lines which is much more manageable. And not only that, they are arranged to logical parts from simple to complex. Managing 6000 lines of code in one file is hard if you have different tasks in that class. But then again your decision to keep everything in one file must come from some kind of stubborn decision some smart people often seem to do.

Musaab

  • Guest
Re: Ultima Ratio Regum (v 0.7 released, 18th April!)
« Reply #263 on: July 12, 2017, 07:01:39 AM »
Is there combat in URR?

Avagart

  • 7DRL Reviewer
  • Rogueliker
  • *
  • Posts: 567
  • Karma: +0/-0
    • View Profile
Re: Ultima Ratio Regum (v 0.7 released, 18th April!)
« Reply #264 on: July 12, 2017, 08:07:16 AM »
A bit offtopic, but @Krice I always wonder why most people say that managing 1 big single file is hard (and bad practice), but managing hundreds-to-thousands small files is the only good approach, because it's simple and easy to manage...
« Last Edit: July 12, 2017, 08:19:06 AM by Avagart »

Krice

  • (Banned)
  • Rogueliker
  • ***
  • Posts: 2316
  • Karma: +0/-2
    • View Profile
    • Email
Re: Ultima Ratio Regum (v 0.7 released, 18th April!)
« Reply #265 on: July 12, 2017, 08:41:39 AM »
wonder why most people say that managing 1 big single file is hard (and bad practice), but managing hundreds-to-thousands small files is the only good approach, because it's simple and easy to manage...

Try it sometimes yourself. Of course if you have modular source code then it's even better to put them to their own files, because you can work from low level routines to high level (in best case scenario anyways). In a single file it's simply harder to find stuff, no matter how you look at it. And finding stuff in large projects is actually quite important. Not to mention keeping track of everything, I don't even know how people remember what they already have programmed if there is only one file.

Avagart

  • 7DRL Reviewer
  • Rogueliker
  • *
  • Posts: 567
  • Karma: +0/-0
    • View Profile
Re: Ultima Ratio Regum (v 0.7 released, 18th April!)
« Reply #266 on: July 12, 2017, 09:00:34 AM »
In my personal projects, I'm working with one main (bigger) file and bunch of auxiliary files usually. But
Quote
Try it sometimes yourself.
I worked in such a projects, and it's why I asked about that. For me, it's much harder to find specific stuff withing ~1200 files (every class had own file), especially when simple feature needs tinkering with about a dozen files. Don't know, maybe it's matter of taste, but I had problems to work with that kind of codebase.

Krice

  • (Banned)
  • Rogueliker
  • ***
  • Posts: 2316
  • Karma: +0/-2
    • View Profile
    • Email
Re: Ultima Ratio Regum (v 0.7 released, 18th April!)
« Reply #267 on: July 12, 2017, 07:05:58 PM »
For me, it's much harder to find specific stuff withing ~1200 files (every class had own file)

It depends on stuff. Classes don't need to have their own file, but it's a good rule. Sometimes you can group classes that are in the same category etc. I'm using IDE to arrange files/classes to virtual groups with proper titles so it's easy to find stuff no matter how many files there are. However Kaduria (my biggest project) has "only" 364 files which in C++ is divided by 2, because each class has a header and source file. So it's not that many files and I'm estimating there could be something like 400 files in the final version.

AgingMinotaur

  • Rogueliker
  • ***
  • Posts: 805
  • Karma: +2/-0
  • Original Discriminating Buffalo Man
    • View Profile
    • Land of Strangers
Re: Ultima Ratio Regum (v 0.7 released, 18th April!)
« Reply #268 on: July 12, 2017, 07:17:58 PM »
For me, it's much harder to find specific stuff withing ~1200 files (every class had own file)
Perhaps there is a golden middle. In LoSt, I have 20-odd script files (ai, name generation, event handling, graphics, etc.) For me, at least, that makes things more orderly.

As always,
Minotauros
This matir, as laborintus, Dedalus hous, hath many halkes and hurnes ... wyndynges and wrynkelynges.

UltimaRatioRegum

  • Rogueliker
  • ***
  • Posts: 318
  • Karma: +0/-0
  • Username says it all, really.
    • View Profile
    • Ultima Ratio Regum
    • Email
Re: Ultima Ratio Regum (v 0.7 released, 18th April!)
« Reply #269 on: July 16, 2017, 06:03:04 PM »
Do you still have only 1 source file? I had problems with my Level class file which had I think nearly 6000 lines. Splitting it has been a good decision, now each class is about 1K lines which is much more manageable. And not only that, they are arranged to logical parts from simple to complex. Managing 6000 lines of code in one file is hard if you have different tasks in that class. But then again your decision to keep everything in one file must come from some kind of stubborn decision some smart people often seem to do.

Haha, I do, yeah. Wasn't intentional; it just kind of... happened. And now I'm disinclined to change things; it hasn't caused major issues. If it does start to cause problems, then of course I will, but until that time I'm not planning on making any changes.

Is there combat in URR?

Not yet; and once there is, it won't be the "primary" play method. You know how lots of games have combat as the "intended" play style, but you can also play with stealth, or with conversations, or with other stuff? Flip that on its head, where talking and exploring are the intended play method and combat is the harder more obscure alternative, and you'll have a good idea of what I'm going after!