1. The Hand of Merlin
  2. News

The Hand of Merlin News

Dev blog 48 - AI AI AI AI AI

Hey folks!

The past two weeks I spent working on the AI with Mat. We weren’t very happy with how the AI made decisions for tactical movement. They didn’t look very smart by moving 1 tile over, or not attacking a unit they could clearly hit or moving away from units just to move back toward them.

Our game uses a utility AI approach. Every unit scores each tile they can possibly use their abilities on, and the best tile wins. Each tile is scored based on the configuration done for that specific ability.
Since most of our attack abilities were fine for the most part, we focused on remaking some of the movement considerations for it. We added a couple of new ones, offense and defense rating, which we calculate as “how many units can I hit, and in what way (full hit, hit behind cover, can't hit)”, and “how many units can hit me, and in what way”. Coupled with a small fix for AI where we allow it to consider the tile he’s standing on, and a lot of work done by Mat and me for a few whole days in screen share and talking and thinking about it, we now have AI that moves a bit smarter. We made sure they can think when far away from enemies in order to approach them, and close to enemies to flank them.



As I mentioned in blog post 26, our AI is data-driven. This means that once we made one consideration that we felt works well, we could save it to disk and reuse it in another place. We made 3 different tiers of resource files: brains, decision-makers, and considerations. A brain has a list of ability configurations - instructions for the unit with this brain about how to use a specific ability. Every ability config has a decision-maker, which is a list of considerations. Currently, we have 41 decision-makers using 59 considerations, and all of these would be available for modding once we release the editor post-launch. A single consideration can be reused in different behaviors, and different behaviors can be applied to different abilities. Creating these is also fairly straightforward.



Configuring a new AI unit can be done within a matter of minutes if you know what you need and all of the pieces are already available. For example, once Mat and I made the Ruffian bandit, we could create another melee bandit pretty much for free: just browse the existing presets to him, change the ability being used and we're done. Once we finished the bandits, I left Mat to his own devices and he created the AI for the rest of the abomination units, with the occasional bug fix on my end.



It's a bit hard recording and making GIFs for the AI behavior because I'd have to record an entire gameplay session to showcase how they move now. It's not easy just showing a single instance of "see, he moved to a really good position" because I have no idea when he'd do so in order to line up a screen good capture. Suffice it to say that in our internal playtests the AI did move better with less weird movements. I might coerce somebody on the team to record a play session in a few maps to showcase it, then upload it to Youtube or something, but seeing we're hella busy these days, I can't make a hard promise.
Thanks for watching! Join our Discord server so we can chat about the game, life, universe, and everything!
P.S. The title is a pun for "AI pain".

MarkoP

https://store.steampowered.com/app/600610/The_Hand_of_Merlin/

Dev blog 47 - Spelling fights

Yo peeps!

Christmas break is looming ahead. We’re busy adding all the things to the game. Encounters for Marca Hispanica (zone 2) are being added at a break-neck speed, enemy AI is being worked on to make them move around in a smarter looking fashion, we’re getting new music and sfx, most enemies have their skills made and ready for use, levels are being produced like maaaad, and the topic of today: moar spells.

We’ve expanded the set of spells to tier 2, meaning there should now be 6 spells available in any future build of the game. Some spells were reshuffled in tiers, and 3 more spells are added. Mat is taking his sweet time with adding spells because they have to fulfill a specific role in the game, making some of the harder fights possible instead of easier.

I’m not sure if everyone who played the game found how to unlock spells, so here’s the rundown. Every time you reach a node, we pick a random encounter from a pool for that specific node. Arcane nodes, and by extension, arcane encounters, have a chance to feature another guardian character, the same race as Merlin. Each time you meet one, he provides one core essence, which is a currency item used to unlock spells in the guardian core you currently have active. Once you unlock at least one tier 1 spell, tier 2 spells become available. We have plans for the third tier as well, but those will come at a later point.



One of the spells Mat made is Warp. It applies a ground-based aura that affects all units, but in different ways. It applies Positive Warp to all allies and Negative Warp to all enemies. The effects of both buffs are similar but opposite: allies get +4 movement and enemies -4 movement. For some of the slower units, this effectively means they cannot move at all if they got caught in the area. Any enemy units that end their movement in the area will become afflicted as well. (note that everything is subject to balance changes)
It also looks pretty nice, so here’s a visual of it.



One of the spells we’ve had for a while now is Thunderbolt. It deals a lot of damage to one unit, and I’ve somehow managed to talk people into making it look like a laser. In one of our Steam discussion threads, I said I would try sneaking one in the game, so here it is.



Thanks for reading! If you want sneak peeks into the development process, join our Discord server and ask questions, we’ll be happy to answer each and every one of them.

MarkoP

https://store.steampowered.com/app/600610/The_Hand_of_Merlin/

Dev blog 46 - Waves of enemies

Hi!

Some time ago, our designer boi Mat asked me if we can do something different for a couple of skirmish maps regarding how the fights progress. He wanted to have enemies spawn during fights and have it controlled externally through some sort of wave spawning system. While we can spawn new units during fights through abilities, I didn’t want to hack this functionality using invisible units that use hidden abilities to spawn new units.

We’re making the game in Serious Engine which has support for spawners, but a lot of our code is not really compatible with that method. We have custom needs for spawning units anyway, so we had to approach it differently. Luckily, the scripting side of the engine is flexible enough and made this possible with relative ease. A bit of tech background:
When any skirmish fight starts, there is a single script in that world that spawns the starting enemies. The script takes into account any decisions made during the encounter that lead to the fight in order to spawn units and players at different locations and configurations. Until now, this script was only ever executed once.
To make the spawn system, we needed to make this script wait for specific events from our game code in order to do more things. Currently, we have a “round started” event that gets picked up by the script, and spawns new units based on any internal decision making, like whether the enemy warband has less than 2 units, and whether all reinforcement units have already spawned. For now, this is the only event we need.



The biggest difference between the wave spawning and initial unit spawning is in tile occupancy and spawning animation.
When we spawn units for the start of the fight, we don’t have to check for multiple units occupying the same tile. This is very obvious to the designer when making the initial spawn setup, and is very easy to test if it all works. We also don’t have to play special animations on those units, because we’re assuming they were already there when the player characters arrive there. So they all just appear in their Idle animation.
When spawning units for the wave system, this happens in the middle of a fight. Units have likely already moved around and might be occupying tiles where we wanted to spawn wave units. Thus, we have to find an unoccupied spawn point within a named group to use for the new unit position, and we have to play an animation on that unit unless we want it to look pretty horrible.



The plan is to use this system primarily for boss fight maps (especially the final boss of the game), but it’s not a stretch it will be used in regular fights as well. This mostly means we’ll have to add a new animation to some, if not all, abomination units so we can use them for this system. Human enemies will likely not be dynamically spawned, because we can’t make them unburrow like the Mandrake above (tho that would be funny as hell), but we might find a way to let them walk in from off-screen or something. This does have some unrelated issues, but if we manage to sort them out, we might use it.
Personally, I can't wait to see how the rest of the abominations look like when they spawn through this.

Thanks for reading about some of the stuff we’re working on. If you’d like to say hi to us, ask questions, or tell us how much our game sucks, come join our Discord server, all the devs are there and are very friendly and receptive to all feedback.

MarkoP

https://store.steampowered.com/app/600610/The_Hand_of_Merlin/

Dev blog 45 - A note on music

Heya folks!

In the last few weeks, we started looking into getting some music specifically made for the game. Robert did some research and found a music genre called Dungeon Synth. In particular, he found a musician/band called Old Sorcery. At some point, we contacted them and asked if they’d like to compose music for the game, and they agreed! So now we’re getting some cool music right from the source. For this post, I decided to ask him a few questions.

Q: Hi, could you introduce yourself?
A: I am a musician from Lahti, Finland. I dabble in various genres.

Q: When did you start composing dungeon synth, and what got you into it?
A: Hmm, it was in 2015-2016 when I thought that I can do this kind of stuff by myself. I have always listened to Mortiis and Burzum and the pioneers of electronic music like Tangerine Dream, Klaus Schulze and Goblin. I thought that the world lacked a symbiosis of medieval soundscapes and analog synthesizers.

Q: What was your impression of The Hand of Merlin?
A: I am a lifelong fan of isometric RPGs. Baldur’s Gate I and II still are easily the best games in the whole universe. I was positively surprised by all the aspects of The Hand of Merlin; the amount of reading one has to do, the difficulty of the battles, the general lore of the game. Not only that it mixes the Arthurian times with this alien stuff, it had this Lovecraftian element to it, which really got me interested.

Q: How do you make music that fits a particular theme or scene?
A: I don’t really know how to answer this. I spend hours of thinking of what I shall do next, and my whole life is centered around music. After a few days of pondering this story, this Realm, I really got into the proper mindset and started dabbling with some actual musical themes.

Q: Do you find any challenges composing music for a game?
A: I have done this earlier, but all of those former games have been amateurish shit, which never got published. With this project, EVERYTHING is a challenge for me. Honestly, I have never done anything this satisfactory. And I do love every minute of it. I feel like I have found my true calling. Not only that I was chosen to do this game, I was chosen to do a RPG involving magic and medieval battles. What could be more exciting? Old Sorcery is based on this kind of world.

Q: What things do you do when not composing music?
A: Watch movies, play video games, read books. Not much else, really.

Thanks for reading! If you've got any questions for our composer, join our Discord server and ask!

MarkoP

https://store.steampowered.com/app/600610/The_Hand_of_Merlin/

Dev blog 44 - Gear upgrades redesign

Oh, hi there!

Last week the team got into a discussion about the ways character progression works. There are 4 main ways characters become more powerful:
  • Acquire new Skills
  • Equip relics
  • Buy gear upgrades
  • Acquire new Spells


It was determined that the gear upgrades in the blacksmith shop weren't interesting enough and didn't present any choices. If you were presented a gear upgrade in encounters as a reward, it was a no brainer to take it, and the blacksmith came down to just choosing which class of units should be upgraded.

So Mat was tasked with creating a new proposal for how they might work. He came up with the idea of branching gear trees. After a few days of discussions and deliberations, we chose an approach, and set out to make it. Today i'd like to present how the system works, and show a screen of it.



We have defined that all upgrades will be separated into Styles. Each style would define the upgrades for every class (Fighter, Ranger and Mystic) and type (Weapon and Armor). Each one of these has a number of tiers defined that each provide the benefits of the upgrade.

We have also extended the capabilities the upgrades may provide, so now they are capable of giving direct damage modifiers, like you would see on some abilities (for instance, extra damage to unarmored, or less damage taken from large units). Mat has a large table of possible values, ranging from +1 to +9 Power for Rangers, and up to +30 Armor for Fighters.

One idea floating in his mind (and spreadsheets) is to name one of the Styles "Heavy". A Heavy Fighter armor would also inflict a penalty to Movement (to match the fantasy of wearing heavy armor). Currently he's done so for both Heavy Armor and Heavy Weapon for the Fighter, which can mean the Fighter that decides to grab both upgrades would have very low Movement.

Each time you get to a blacksmith shop, that blacksmith will only carry 2 possible Styles, per upgrade type. He might have Heavy and Light Weapons, but Balanced and Light Armor. It then becomes a choice for you which one you'd like to grab for your units.

Another big change is that all gear upgrades are now per character. Previously they were global per class, and you could buy upgrades for a class you didn't have. This is no longer the case. Each character now has their own upgrade values. The blacksmith will always offer you upgrades only for the characters you have in your party. You can then choose which character to upgrade, and whether you want to upgrade him with the same Style, or swap to a different Style.

Finally, we have discussed what happens if one of your heroes that you've upgraded dies. On the surface, it would seem that all the gold you've spent on his upgrades is now lost. We balance this by making new heroes you find automatically boosted to the same power level as your lost heroes. This guarantees that your power level doesn't end up in a negative feedback loop (new heroes having no upgrades, making them weaker by default, and meaning all your spent gold is truly lost). It also guarantees no positive feedback loops of exploits (as far as i an see): your new heroes aren't any stronger than your deceased heroes.

Since there is a UI redesign coming up, i haven't bothered to make the blacksmith screen look any prettier than it was before, but it does showcase the new layout and framing for that screen. All names are also probably going to be changed: treat this blog post as a preview of the system instead of the final product.

Thanks for reading! If you have any concerns or positive/negative feedback about this change, we'd be happy to hear it. Leave your comments on the Steam forums, under this blog post or join our Discord server to talk to us directly. We're there all the time during work hours, and i'm there always. Unless sleeping.

MarkoP

https://store.steampowered.com/app/600610/The_Hand_of_Merlin/