Major Mid-September Update

This week’s blog entry is a big update on what I’ve been working on this week in the game, which is a combination of graphics, inventory systems, limbs and player health, and allowing for lightning (e.g. torches) external to the player. Firstly, I’ve been implementing graphics for various items. One of these is bottles – whilst the game does not contain “potions”, it’s going to be important to be able to transport various liquids. I currently plan for this to be possible via glass bottles, and waterskins, with each balanced a little differently – glass bottles can hold anything, but might be smashed in combat, whilst waterskins can only hold one substance (as it soaks into the material – so you cannot use it for poison, then water), but cannot be destroyed in combat. Although not a key component of 0.4, I decided a day or two ago to work on the bottle graphics, since I was taken by some of the ideas I had, and here’s what I came up with. Firstly, below, are four examples of possible substances in four different types of bottle. The top-left is water, the top-right is oil (notice the subtle sheen?), the bottom-left is blood (the most stylized of the bunch), and the bottom-right is poison.


There are currently five different shapes of bottle (all shown below, though I might add a sixth too) – these shapes have no gameplay effect, but are just for variation. Each has five different levels for the substance inside – full, three-quarters full, half full, one-quarter full, and empty. Once empty you will be able to refill them from an appropriate source (like blood from a corpse, water from a river, poison from a deactivated poison trap, etc). There are, as above, currently only four substances, though I can imagine several others that might be useful in the future. There are therefore at the moment exactly a hundred different permutations of glass bottles (5 designs, 5 levels, 4 substances). Thus far this is the highest number of permutations to date, I think, for any particular graphic, and will only continue to grow as I add another type of bottle and various other substances.


I’ve also remade the inventory (for the final time). The inventory in 0.3 is effectively a “fake” inventory – youInventory can only pick up the three key segments, and you cannot drop them, and only one aspect of the inventory can be accessed. Additionally the system for picking up wasn’t “real”, in the sense that the items were implemented in a way which couldn’t really support anything other than the three key segments. This entire debacle system has now been changed in several ways. Firstly, when you try to pick up an item on a tile with more than one item, it produces a list of possible items (shown on the left). You can then highlight the ones you want by pressing the appropriate letter, and press Enter to confirm your selections. Those are all then added to the appropriate inventory sections. The inventory itself, mInventoryeanwhile, can now handle, sort and allow you to select arbitrary items from any category. When you open your inventory categories with > 0 items in will appear white rather than grey. Also, opening your inventory for different purposes – looking, dropping, using, etc – will obviously have a different label. You then select the appropriate inventory subgroup and do whatever it is you opened the inventory for. Esc or any movement key will get you out of this screen.

When you select an inventory sub-group, it then brings up a list of everything in that subgroup. I debated just having one large inventory for all items, but I decided against that for various reasons. Firstly, because some inventory classes have limitations – for instance, you will only be able to carry one long weapon with you – and I felt this needed to be clear. Secondly, some inventory categories might have large numbers of similar items, for example lots of branches for making torches, and I didn’t want that to “clog up” other inventories. Thirdly I suppose it also serves a small gameplay effect for showing you what category certain items fall into, and fourthly, I just felt having a “main” inventory menu looked aesthetically nicer. I did a lot of practice with it and much like one becomes used to doing several-stage macros in Nethack or Crawl, so to does one quickly become used to clicking the shortcut to the right inventory area. One of the items I’ve now implemented graphics for is the torch, which looks like this:

TorchesTorches have five different images which reflect how burnt down they are (0-20%, 20-40%, and so on), and there is also a different colour of wood for each type of branch (the above being olive, and 20-40% burnt), resulting in something like eighty different torch images or so. I am currently in the process of adapting and balancing the extent to which I want torches to boost your vision, and also to allow the player to make torches via the new ‘m’ake command. “Crafting” will not be a large part of the game, but there will be a few situations where you will be able to combine items to others. I’ll have more on this screen and this mechanic once I’ve worked on it a bit more, but you’ll soon be able to use flint, stone and a tree branch to create a torch (i.e. creating a spark with which to light the branch). Over the next week or two I’ll be looking to implement the difference in torch radius when you wield a torch, and allow you to wield and un-wield them. You can also now drop items, either singly or in large numbers, much like the pick-up-multiple-items menu; you are given a list, you highlight the ones you want, then press enter.

Next up I’ve been working on the health and limb system, which has undergone a not insignificant number of changes over the lifetime of the game thus far. I’m implementing this now because traps need to be able to hurt you (funnily enough) which means that acid burns, fire burns, physical limb damage and all the rest of it need implementing. The first part of this is ensuring that limbs all display correctly when you look the player (and later at other foes). This can either be done by ‘l’ooking at yourself, or pressing the ‘@’ button. Here’s a quick preview of how the three screens currently look (they can be tabbed between):


The second and third screen are largely placeholders at the moment, since you cannot change your clothes/weapons nor gain or lose any allegiances aside from the civilization and religion you start off belonging to. The first screen, however, now displays whatever dreadful ailments have befallen your character, as in the example below:

InventoryAnd also, as we can see, whatever healing items have been applied. I’ll do a full blog entry later on how health and healing are going to work since this entry is getting long enough already, but items like bandages, sutures and splints are going to be important to healing various parts of the player’s anatomy. Also, you really don’t want the rotting status.

Lastly I’ve also worked on external lighting sources, though they are still very much a work in progress. When you drop a lit torch, it currently lights up an area around the player (the radius is not yet fixed or decided; this is just a proof-of-concept example). If you can see the external light source, you will be able to see everything in it, as in the left picture. In the right version, there is a tree trunk  between you and the light source; you can therefore see parts of it, but not all of it. You will not be able to see creatures or items between you and an external light source if there is a gap between the two – whilst obviously in the real world you would see a silhouette, I think it would make for more interesting gameplay if you could only see foes when they’re in lit areas, thereby perhaps allowing you to place and move light sources strategically to keep track of enemies.


What I’m not yet sure about though is the relationship between external light sources and undiscovered terrain. In this example, although you haven’t explored the middle you can still see through it to some of the light source, but since parts of it are blocked, you can reasonably deduce there is probably a tree or two in the shroud you cannot yet see. This model treats undiscovered areas the same as areas you’ve discovered but cannot currently see – you can see through them, but you cannot see into them.


Whilst I think the first two implementations both make sense, I’m really not sure about this one, so leave thoughts on whether you think this makes sense, or whether undiscovered terrain should totally block your line or sight. I can see arguments for both versions. That’s quite enough for this week – next week I’ll probably be moving onto discussing either traps, limb damage, or both, in more detail, but as ever let me know what you think of these latest steps towards 0.4! As a whole, things are well on track for a winter release, and now that I actually have a working microphone again, I’ll be looking to stream more coding sessions and Q&As and the like in the near future – stayed tuned to Twitter & Facebook for details…

Building a Creature, Part 3

This is the next part of a series dealing with the new abilities, stats and other things creatures have (read back for parts 1 & 2). So, without further ado:


This matters in three ways. Firstly, some creatures have blood, and therefore can bleed out. Secondly, creatures have varying amounts of blood depending on their size, physiology, and a few other factors. Thirdly, the blood of certain creatures behaves in certain ways and has other roles to play.

Bleeding out: any external injury to a creature can cause bleeding. Internal injures are handled differently. For instance, if a creature is hit in the chest with a blunt object, it may cause an internal injury but there is unlikely to be any blood from it. By contrast, a sword slash might cause no lasting internal damage but unleash a fountain of blood. When a creature has been cut, it will lose a set value of blood each turn, until either a) it dies, b) the wound clots, or c) the wound is tended to. Creatures can therefore die from being wholly exsanguinated; they would need a significant number of injuries to do so, but it can happen. This could be in the middle of a battle, or after the battle if they don’t get sufficient care. Creatures will sometimes pass out from blood loss before death.

Wounds clot after a length of time, which is again dependent on the species in question. Some creatures have impressive regenerative abilities, while the three main humanoid races, sadly, do not. Though I have not yet finalised how the system will work, wounds can also be tended to, which will both stop/staunch the blood loss, and aid recovery. Bleeding out is also particularly important when on your own – for instance, attack a creature at distance and wait for it to die – or when far from home and far from any kind of medical supplies.

Blood amount: some creatures do not have blood. The undead obviously lack any veins for the blood to go through anyway, and various constructs are blood-less (though they may  have an equivalent; more on this when I’ve pondered it further). Obviously, larger creatures have more blood, and are therefore trickier to kill by bleeding to death; a Titan has enough blood to keep it going until the next ice age (sometimes literally), while a wolf isn’t going to last very long with a major cut.

Unusual blood: some creatures don’t have ordinary blood. This is not to include constructs that may have something instead of blood, since I haven’t decided on that yet, but rather creatures with blood that’s just a little unusual. Some kinds of blood may burn on contact; some might have healing properties; some might have poisonous, disease-giving or hallucinogenic effect; and some might do other things I haven’t even thought of yet (do please suggest any you think of, readers). A few species that might be in the very first alpha have specific, planned, blood properties. Anyway, if you manage to acquire blood (I’ll leave the method up to your imagination) you can dip arrows or other weapons in it, or use it just like any other liquid.

Lastly, a question. Are people interested in more code-related blog entries? I’ve had a few people say they’d like to see, if not actual copy/pastes of code, but description of the details of some of the game mechanics in coding terms. Let me know if you’d like to see these, and I’ll try to include them in the future.

Scaring an Orc to death, part 1

Click to see full size. Bloody squares are clear; red ‘^’ symbols denote body parts.

“The Titan picks up the Orc Chieftain and hurls him through the air!”

“The Orc Chieftain hits the wall, and is eviscerated by the impact!”

“The Orc skirmisher screams in horror.”

How did things get to this delicious stage? Let’s take a few steps back, and start a hefty series about MORALE – which is to say, what will encourage your allies to fight to the death for you; your foes to sacrifice themselves defending their cities; creatures to decide, whether to throw their lot in with you, ignore the idiotic adventurer trying to recruit them, or join up and then turn on you when you fail them in battle; and and observers of eviscerated friends to lose their minds in the horrors of war. Oh, the horror.

In Ultima Ratio Regum, the morale system is based firstly upon the kind of brain – if any – each creature has. Creatures are divided into three broad categories based on their intellect, and assigned different behaviors, and interactions with morale, accordingly. The three categories are “brainless“, “animal“, and “intelligent“, in terms of the complexity of the morale functions assigned to them. This first entry will explain a bit about what is meant by each, and the morale understanding each has, before next time moving onto more flowcharts, and a discussion of both the positive and negative modifiers to any creature’s morale.

Brainless – these creatures either have no brain, or their brain is sufficiently primitive that they can think of nothing beyond attacking. Creatures in this category are the rarest, and include zombies, Shoggoths, various creatures in the ‘inhuman’ category, the eusocial creatures in the ‘giant insect’ category, some spirits, some other undead, and a few other things. These creatures will attack their foes unrelentingly no matter how dire the damage to them, and no matter how many limbs they have lost in the process. If you sever both a zombie’s legs or destroy a Shoggoth’s locomotor membrane, it will crawl/slither towards you across the ground; by contrast, any animal or intelligent creature having taken such damage will have given up the fight by then.

Importantly, brainless creatures can still be recruited to your cause by a variety of means, though interacting with them and gaining their favour is obviously not an option.

Animal – animals can respond to half of the morale modifiers in the game: the negative half. Which is to say, they respond just like any intelligent creature when they are injured, or lose a limb, or whatever, and will be slightly damaged by seeing their friends hurt, but their morale is not increased by witnessing the martial triumphs of their allies. Therefore, each individual in a pack of wolves, for example, will fight until it is too badly injured to go on – they may attack as one, but ultimately they care only about their own survival, and will likely fight on if they remain unharmed but their allies are killed.

Animals cannot be ‘recruited’, as such, as but it is possible to tame them. More on precisely how this is done in a later entry – both because it’s fairly complex, and because I haven’t completely worked it out yet.

Intelligent – these creatures have brains, albeit of varying quality, and the capacity to recognize what’s going on in the battle around them. Intelligent creatures respond to both positive and negative morale modifiers – they will be bolstered by seeing their allies succeed, and weakened by seeing their allies hurt. These foes are least likely to fight to the death – though they often will – but will be the most willing to back off, take stock, rally their team-mates and await a better chance to attack you and your allies.

They can be recruited by any number of means, but generally if the faction and species both like you a lot – or you have an organizational/hierarchical position of power – you might be able to get them to follow you.

For the demo/alpha, there will be hopefully a few creatures from each category wandering around the increasingly-large overworld, and any number of the dungeons beneath. If you have any thoughts on the ‘brain’ categories, and if there’s anything that strikes you as particularly stupid/clever about the differences, post below!

Coming Monday: Detail of the morale system, or: how to terrify an Orc into insanity (Part 2).

Coming Friday: Detail of the morale system, or: how to terrify an Orc into insanity (Part 3).