Game events and popular revolts

The work on the battle system is pretty much done, as you could see in the 2 previous video news. However, although the system is complete, its still full of bugs and issues because of the large amount of possible battle situation: every region being different and all. So every time i test a different kind of battle , new bugs and issues arise. During these past months i’ve spent quite some time fixing bugs and problems regarding the battles, and it will probably be a never ending task.

I also played a first Ymir ‘alpha2’ game with 2 friends for about 40h in ‘realtime’ mode. That helped me find lots of bugs but also to diagnose the priority of the different gameplay issues.
We developed 3 kingdoms next to each other in peace, until Krusar made the mistake to move his armies to have a look at the capital of Pokie, probably expecting to impress him by the number of his troops. What he didnt expect is that the treacherous Pokie was rising an army twice this size in secret, planning to attack us both. As the secret was out, he instantly declared war and marched on the capital of Krusar, before the armies of Krusar could go back to defend it properly. The defense being disorganized, the city fell.
As for me, I had pretty much no army to fight back and the capital of Pokie was well defended with a huge garrison.
The game was stopped after that battle because key gameplay factors needed to be implemented to fix balance issues.
The main issue is that porcos in armies are ‘out’ of the demographic system. They become immortals that never grow old, so you can store them indefinitely and create giant armies from small cities. I’m currently implementing a city-support system where armies belong to cities and impact their demography to renew their troops as they grow old, which will fix this exploit.

The worldmap after the fall of Krusar, largest city in the game but smaller kingdom with only 3 regions. I was in the middle with Carcassonnerie beeing my main city.

I’ve implemented events.
Current events inform you of battles happening right now, or stats being dangerously slow.
Events can also inform you of past events, especially required for “persistant” game modes where you need to see what happened as you were offline, obviously.
The event system also includes missions: you can get missions with conditions to fullfill to unlock rewards. Small missions guide you through the first steps of the game when you start : establishing a first city, exploiting and stocking food etc…
The event system also includes choice events, where you can choose between different options with different effects.
The main events UI looks a bit like an email inbox where they’re organized into categories. They also popup in the game UI as little flags in the fashion of Europa Universalis.
This is also where diplomatic messages and treaties will arrive when players message each other.

Event flags also popup directly over the game UI

I’ve also started connecting stats and implementing process in order to make players lose the game.
The first major one is Region loyalty, which is now fully connected to other stats and effective: regions with low loyalty now trigger popular uprisings. Depending on the loyalty ratio, a portion of your population will rise as rebels, and a portion of your local garrison will defect to their side. They deploy randomly from any housing buildings and try to take over the city, which if they succeed becomes an “anarchic region” that you lose control of.

Testing the rebellion system based on the test game save file : because of the size of their kingdom, many of the cities of Pokie are now rebelling. Here rebels are fighting off loyalists.

Loyalty of regions is connected to State power and state Legitimacy. State power is affected by the number of cities you own or the debt you have. That means that now, expanding too much and having a debt can make you unstable and you can lose the game by having all your regions rebel against you.
Through an event you can decide to cancel your debt, but it triggers even stronger rebellions by greatly lowering the loyalty of all regions, although temporarily. That gives you a chance to survive if you manage to overcome the crisis.

I’ve also improved a bit the clarity of the State power and State legitimacy UIs.

The Battle of Krabolniet

Here it is finally: the attack of the city fortified in the previous video.
It took slightly longer as expected to show a proper battle as there was a huge amount of bugs to fix to make it functional enough for a first release.
All the terrains beeing procedural combined with the fact players can build their fortifications in any way they want makes it quite challenging because the amount of different ‘cases’ to deal with in battles is huge.
There is still obviously a lot of things to improve (both visually and in battle code), but at this point i need to move on to the next tasks as i’m running out of time !
For now the barbarian “AI” is really basic and all units are individually attacking without any global strategy.
One idea i have would be to keep this basic behavior for primitive armies, and that more advanced strategies would be unlocked by technologies or maybe the presence of commanders in armies.

For now, battles themselves are entirely automatic ( that is because in a multiplayer context, ‘online’ players must have no advantages over ‘offline’ players ). It means players do not actually control the units in battle.
Players affect the battles outcome before the battles actually happen : the defenders through organizing the defenses as shown in the previous news, and the attacker through orders and mission settings setup before launching the attack.
Attacking units can automatically pass walls and cliffs with ladders, breach gates with siege rams and embark in rafts to cross rivers when there’s really no other choices.
When launching an attack, you’ll be able to choose a privileged technique of assault.

Spawn location

Today, besides the ongoing work on the battle code and battle ‘AI’ , i’m adding a little feature i’m always annoyed no to find in games : spawning near a friend.
Now, when you create a character, additionally to the options where you can filter the types of starts you want, you can now select a character to spawn close to.
When doing this , you will be assigned the nearest starting location matching your other settings ( climate types etc.. ).
This way, you’ll be able to easily play in coop with friends, starting near them without having this annoying struggle of finding each other or having to respawn until you’re not so far!


These last weeks i’ve been focusing on technical things, so sadly there’s nothing fun to show, but so you dont get the impression i’m doing nothing, i’ll try to summarize what i’ve been up to.

Basically, after beeing done creating the tools and display to terraform and build fortifications, i’ve been busy implementing the ‘logic’ of all these features, so that they are actually “seen” and understood by the porcos and the game, and not just a display thing.
I’ve patched pathfinding to be modified in realtime as you build things. I’ve optimized memory usage of the pathfinding and especially how its gradually loaded on the server depending whats needed, so more regions can be handled.
I’ve divided pathfinding  grids size by 9 and also created a new way of storing them in the memory so they’d use less RAM. Instead of having 9 logical tiles per terrain tile to handle “walls” on the edge between tiles, i’ve properly implemented a system of “edge blocking”. So now one tile of logic can be the same as one tile of terrain.
Also, pathfinding now looks for a path starting from both the starting point and the destination point at the same time, until they reach a meeting point ( doing this makes finding paths faster in some specific cases compared to looking only from the starting point until it reaches the destination).
Porcos now “see ” walls. They can pass beneath bridge platforms,  and basically find their path to their destination correctly without moving through things they shouldnt be able to.

I’ve added a new infrastructure, stairs, to allow porcos to move from a height to another.
Their primary use is to control how porcos can move on the walls, but they can also be used on terrain against cliffs.
I still have to add “gates” though, but its at this point a pretty straightforward task.

Pathfinding updated to support all the new fortification features : porcos now use stairs to access walls, and can now pass below “bridge” platforms (here used to create the city gate).

Now, the point of all this is that i’m finally restoring and updating the last remaining feature of the prototype : battles.
It’s a big chunk of work, especially that it was just ‘prototyped’ and now i need to properly do it, and there will be more to see in the next updates.
The basic battle algorithm on the server side is now functionnal and i’m working on the battle display on the client side.
These last days i’ve worked on sounds and the transition to battles. It’s pretty cool, and to give you an idea, it includes city alarm horns and citizens panicking and taking shelter into their homes!