Hey everyone,
As I keep pushing forward on my fork, I'm invariably going to be touching powerful pieces of functionality. Rather than build entirely in isolation, I want to provide a spot for people to give initial reactions so I can course-correct a bit if need be.
This thread is pretty simple. I will be providing a rundown of the upcoming feature, complete with my design and proving process, and then I will be largely shutting up and letting everyone else give feedback, reactions, and concerns.
I am forbidding myself from engaging if I am not asked a question. Even then, I will try to narrowly answer the question, rather than say a bunch of extra stuff. The reason behind this is pretty simple. As the fork maintainer, me saying something can kill conversation as people wonder what else there is to say. So, me doing a Long Listen will hopefully address that.
Now then, to the main event.
The flagship update for the 0.4.0 release will be an overhaul of SecExp's tension system. Currently, it is largely a no-op where you pay a toll of money to set tensions to mostly nonexistent, and ignore it from there. As part of this overhaul, I have to look at the consequences of tension. That means I looked at the combat system in the game - the one where you send your soldiers and drones against external and internal threats.
This system has a reputation for being very swingy and all or nothing. As I dug into it, it became obvious why. The system, at its core, is an I-go-you-go turn based engine that attempts to simulate large scale conflicts. This is a fundamentally flawed approach for a bunch of reasons that I won't lecture everyone with, but it seems like the programmers of it were even aware of how flawed it was, because I found a couple of situations where the game actually cheated for the enemy. I never knew that because it is so trivially easy to just wipe out the enemy forces, until one day, they trivially wiped you out. There's a very, very narrow band between 'trivial' and 'impossible'.
I realized I had to make an entirely new system if I wanted to get what I needed. Ultimately, what I needed was a system that could simulate many different kinds of opposing forces, with different goals, different victory conditions, and different consequences for losing. The last part is also quite integral, because losing in the base game is pretty brutal most of the time. I need a combat tool where you can lose a conflict and have very targeted consequences, only a couple of which will be so horrible that you consider reloading rather than taking the L. I consider that a failure state in either my design, or my communication.
The first thing I did was absorb what kind of scale I was working with. The game considers an army of a few thousand to be a 'huge' army, so I could safely ignore anything bigger than that. But early game also wants some quite small engagements, and the strategy level already does a pretty good job of modeling a lot of that. Individual elements made up of X number of bodies, with individual unit statuses. That part is OK, as is the general division of play - we're here to play a management game, not a tactics game. The autobattle nature of things is correct.
I like to start using other games as instructive guides, and finish with real-life equivalents. If my design confirms a lot of real-life equivalents, it's probably pretty solid.
My mind immediately went to the ____ General games (Fantasy General, Panzer General, etc), and in the process of tinkering with the lessons that those hex-based games taught me, I ended up referring to MENACE.
In MENACE, I found a solid basis in terms of how to configure and treat the elements we already have in the game such that they would make sense in the simulation we're trying to create. Starting from there, I got some basic soldier types that Free Cities already has you fighting, and added in weapon classes they would reasonably use. MENACE bootstrapped me up with some other basic concepts like cover, weapon range, and morale cascades.
I replaced the battle map with a basic frontage to borrow the concept of combat width. This is the first fundamental thing that separates the new combat engine from the old. With frontages, I can now simulate corridor fights and rugged terrain.
This combines with the other major change. With individual elements now expressible, we go from a strict I-go-you-go turn based setup to an interleaved turn setup. This gives the slack for complex and closely matched fights to turn out differently, rather than everything being decided by alpha strikes.
I then went about testing the hell out of this and tuning numbers. I spent days on making sure that truly even fights boiled back to even, that disciplined troops could hold against substantially more undisciplined bodies in the correct circumstances. Disciplined, higher-tier troops win when outnumbered between 2-3x in the open field, but when outnumbered 4:1, they will start to crack. However, in a tight corridor, even 4x won't do the job. Terrain and cover matter now.
Then, very slowly, I went about adding special weapons to provide counters to various units and setups. I added an Autocannon specifically to destroy cover, while also putting in Deployable Cover so defensively minded units could dig in. I put in a gas launcher to counter massive swarms of bodies, while also putting in a DMR to crush the discipline of professional units. All of these were simmed out in thousands upon thousands of trials, conclusively proving out that the sweet spot of "interesting fight" was actually something I could configure toward.
Once I had that, I was able to configure for different OPFORs, made by different conditions, coordinated over different individual theaters that make up an entire conflict, articulating different consequences if they win. A slave rebellion consists mostly of desperate slave regiments with SMGs, but their only real goal is to punch through a specific route to the exterior of the arcology, liberating as many menials as they can along the way. A middle-class citizen rebellion instead will use a mixture of mobs and professional operators to damage key infrastructure, hoping to loosen your grip on their strata by humiliating you and destroying your automation potential. Your upper class citizens, meanwhile, will fund a bunch of very slick operators (potentially in clown masks) to blow open your vaults and take every dime.
The next question was about furnishing commanders, which the game already supports, but the current system turns into almost a no-op. The prose surrounding it aside, the math made your choice of commander basically meaningless. Since I was still committed to sticking to the duality of 'user furnishes, battle resolves itself', I decided to stick the commander in as the needed middle manager for deployment. An unskilled commander deploys the soldiers you've furnished them randomly, a somewhat skilled commander has type matchups that they will prefer, but a truly skilled commander is allowed to run the matchups through the combat simulator that acted as the proving grounds. The commander is allowed to sim out the theater based on a few seeds, and will choose the battle plan that sims the best. This actually has an enormous impact. In the same theater setup, a low-skill commander loses 78% of the time in the simulator, over 3000 trials. A high-skill commander only loses 38% of the time.
All of this leaves one last, burning question: How on earth will a player ever understand all of the detail behind what I've done here, or grasp how to be a good general?
Well, fortunately, I still have the combat sim. And I see no reason why a player that's studied warfare shouldn't have access to it.
While I still have a lot of fit and finish to do, I am delighted to show off the wargame simulator, working and in game:
https://i.imgur.com/scfggCz.png
Everything in that image works, though the UI is behind cheat mode and in the main branch, unreleased, until the aforementioned fit-and-finish is done. Still, it is entirely reasonable for you to just say "show me how the citizens 1st, 2nd, and 3rd platoons perform against this enemy preset, and give me the results aggregated over 100 engagements". You can get a grasp of how your army - not some theoretical army, the one you have in this game - performs against real threats pretty quickly. And you can see how your AI commanders make their decisions so you can have a general idea of how they will accomplish tasks. You can also experiment with giving them different special weapons and see how that does, or doesn't move the needle.
Thanks to HandHandler, a wonderful contributor on the repository, the building blocks for a mobile-reactive environment are also working. The new UI takes advantage of those blocks by adding the appropriate phone-width boards.
https://i.imgur.com/itAe7lm.png
There's an entire album I've put up over on Imgur that everyone can browse at their leisure: https://imgur.com/a/VnmBD3S