From game guide

In fact, at least 70% of one’s army will be available on defense, but sometimes a little more. The more castles one has, the less men he will have to protect his castles.

After code review I found this wasn't implemented yet, and of course all the battle reports support that idea. Hence, I've added it. I don't think we need to publish the exact stats since there should be a layer of mystery, but it is between 70-80%, and it does seem to be working perfect according to my tests.

At the bare minimum, this will also prevent your armies from getting fully zeroed out on defense lol

The battle calc getting better and better 🙂

Nice! Big fan of this.

I send around 15k army, 1k die and 14k returning home, and I lose this battle. Here is the report, any make sance?

My Lord, our troops fought with all versus Trogdor at Tuth-4 , but we were unable to invade. We had bloody falls in battle and we were unable to stand firm in battle, we were obligated to retire from the field.

We managed to kill : 11 Knight 0 Infantry 52 Pikeman 0 Heavy Infantry 114 Archer 1 Mounted Archers

But we lost : 80 Knight 354 Infantry 227 Pikeman 67 Heavy Infantry 295 Archer 83 Mounted Archers

    • Edited

    RobinHood

    @Lord Thane Could it be related to a quick retreat or other strat. adjustment bug?

    According to Truesight the above battle report doesn't seem right.

    Your wizards successfully cast the Truesight spell, revealing info about Trogdor.

    Army: Knight: 422, Infantry: 901, Pikeman: 559, Heavy Infantry: 210, Archer: 645, Mounted Archers: 248 and Wizard: 1137
    Buildings: Advanced Training Center: 192, Castle: 6, Farm: 0, Forge: 90, Guard House: 188, Guard Tower: 30, House: 137, Market: 0, Medical Center: 0, Mill: 0, Mine: 0, School: 52 and Training Center: 308
    Resources: Gold: 877445736, Iron: 114504542, Wood: 80851011 and Food: 84347837
    Upgrade your New Spells technology to reveal more information.

      Leo I'm sifting through the battle logs and running some scenarios, trying to figure it out. It really doesn't look right at all, hugely lopsided battle should have been an easy win for RobinHood. So I think there's a bug in something somewhere, some weird combo of spell or building or strat. I ruled out a few possibles like BAS, still poking at some other things.

        Lord Thane I'll add this to the bug list, If you figure it out, easy enough to remove.

        I think I figured it out. It's interesting too.

        There was a bug that was counting casualties as survivors. So in RobinHood's case if he kill 90% of enemy troops the bug made it so actually 90% of troops survived, so RobinHood didn't reach requirements to win the battle.

        Fix is in place, tests show good results. I guess we'll see how people battles go from here 🙂

        This bug might have been causing many many player reported attack bugs too, in nonsensical reports - maybe you actually did kill 90% of the enemy, but the bug made it so there was 90% survivors.

        I spent too much time finding and fixing this bug to do anymore investigating about when/where it came from. Just crossing my fingers this fixes a lot of issues.

        I do like not losing the whole army when the other player is 2x your size. my concern is it seems like you might not be able to defend your kingdom even if you have a very superior army and troops home. depends on how it is coded.

          I think it is worth exploring and testing though.

          bierlym well you can't anymore now that the castle rule is in place. At least you can't lose 100% as a defender anymore at least.

          An interesting side note about this bug, it wouldn't affect battles where you zeroed out the defender. Which is how the bug stayed pretty well hidden, because so many people were getting zeroed out.

          I couldn't have tracked it down without super detailed battle reports too, which has the raw attack stats. TheKeeper just made a tool for us that is recording everyone's battles with the raw data, and that was just done like yesterday, so before that wouldn't have been able to dig in to such detail.

          It took like 4 hours to figure out. The only really sucky part was I fed the massive raw data dump to AI hoping it could parse the important parts for me, but it failed massively. Once I finally (desperately) hand-sorted through the data dump the issue became apparent real quick. It was literally something like defender started with 1000 of unit1, casualties of 850 on unit1, survivors of 850 on unit1.

          In close battles where attack/defense losses were pretty equal, the bug wouldn't really matter = defender has 500 units, 250 die, 250 survive (but the 250 that survived are actually the dead ones lol). In battles where you should have won by a fair margin would likely be the worst result, where the defender starts with 1000 units, 900 units die, 900 units survive, defender wins.

          The other interesting aspect of this bug is that it also affected the final battle summary for the attacker as well. Meaning if you had sent 100 units and 90 died, the summary would report that 90 survived the battle. Conversely, if you sent 100 units and only 10 died, the summary would report that you had 10 survivors.

          This is likely why we saw many battles where people got clapped with really low survivors. Instead of only having 10% of your force survive, you probably should have had 90% survive, but you got the bug.

          I think this bug is the cause of 90% of battle problems we've had so far. It's crazy... I was in a rush making the fix, so I'm only 99% sure it's good - which is fine, because now that we know that bug exists we can easily look for it and adjust my fix as needed, if needed.

            With a few player reports of the bug still being around, did some more checking into it. There were multiple instances in the calc using the bug as it turns out, I only added my fix to one of those, so in certain types of battle the bug still existed. Battle calc updated to account for that, should take care of that.

            Another update on this bug. It has yet another relic that needs fixing in the attack controller. As it stands, battle reports are displaying the correct losses, but the controller appears to be setting an incorrect actual loss (seen in my details data view - returning generals).

            This should be easily fixable tomorrow.

            The exciting thing about this is, I think it's going to solve all our "zeroed out" battles once and for all. In my testing I sent a force of 3k units against a force of 500k units and only sustained around 2500 casualties - while inflicting around 1.5k of defender losses.

            That's pretty exciting, it seems the casualty/survivor bug fix seems to also fix the common zero out conditions.

            Sooooo, tomorrow I'll hit up the attack controller bug, and run some more lopsided battle tests to see if this really fixed it. If it does, then we get the unit weighted damage allocation in place, and boom we're gonna be all set for a smooth new test round next week with awesome balanced battles 💪

              Lord Thane changed the title to Castle Based Defense Scaling + BATTLE BUG tracking! .

              Thanks for all your hard work on the bugs and improving the game!

              Lord Thane

              Could we get a locked dev post for what the changes are going to be/have been going into the new round? If a good thread pops up discussing a change, put a link to it in the dev post.

              Or throw a clear marker in the change log of this is everything that happened in beta 1