So I did a lot today in terms of adding to the program (I think we can safely say we're in v0.3 of the alpha), specifically in terms of adding a "biased attacker" subroutine and tweaking some of the balance after running extensive tests. Other stuff too. Keep reading.
This paragraph is about the code. That was my topic sentence, this is my segue. In an attempt to imitate Daft's
invisible hand in choosing targets every time a unit shot at another unit, I assigned priority matrices to every unit type. Basically, they roll a 1d100 for every single unit type, ignoring unit types that aren't in the defending army, and then apply a modifier between 0.1 and 2.0 to each of the rolled values. Whichever unit gets the highest modified roll is the unit that is selected to target. This allows for certain unit types to have biases when selecting the unit they want to be shooting at - so militia don't try to take down landships and helicopters don't waste their time shooting heavy bombers. Oh, there were two new unit types in that last sentence! Cool. Anyway, this also lets me make certain units "harder" to target than other units. Most air units fall under this category when it comes to units with no AA, but almost all units have a 0.5 modifier when it comes to targeting artillery-type units. This is to ensure artillery units can survive longer into the battle, given their zero evasion and the general nature of indirect-fire artillery on the battlefield.
This paragraph is about balance. I had the opportunity to run a
lot of simulations today, like over a hundred, so I made some changes based off of my impressions there. So it turns out $1 infantry are overpowered. Like, insanely overpowered. They just zerg-rush everything. So they're $2 again. And stormtroopers sucked, so I gave them a 20% chance to resist damage when they get hit. And they still sucked, so I upped it to 30%. And they were will sort of cost-ineffective compared to armored cars, which were amazing. Light tanks and landships weren't performing to-cost against infantry masses, so I nerfed AP a bit. Full changelog below, but that's the scoop.
Oh yeah. Here are the 9 new units:
I haven't had the opportunity to aggressively try to balance these new units, but here are their preliminary stats and, of course, unit cards. Keep in mind some will require certain techs to unlock. Anyway, I've still got a few more units that I'm considering adding, in some capacity or another, but we're up to 19 now which is moreorless enough to *start* the NES with, so we're in a good place numbers-wise. This isn't even counting the naval units that still have yet to be fully incorporated and balanced.
However, the biased attacker algorithm has done a lot in ensuring that future balance endeavors will not be a complete waste of time, and getting it done is like knocking down the dam of future progress. The next thing I want to focus on is the bonuses algorithm (in case, for whatever reason, your infantry have +1 attack) and making double attacks actually "work" rather than just a sort of in-theory thing. In time.
So, thoughts on the new units and balance changes?