Recommendations for the settings of your castle walls/gate:
- Under level 30 is 50-0-50 with a mix of ranged and melee tools (Stone throwing, Flaming Arrows)
- Above Level 30 is 100-0-0 OR 0-0-100, and the Ranged/Melee ratio should be set to 50%-50%. Until you see an incoming army where you will adjust so that your ranged defenders are vs his range attackers and your melee defenders are vs his melee attackers. This is because your Ranged defenders are strong vs range attackers and weaker vs melee attackers, and Vice Versa for your Melee Defenders.
It's important for you to realize that these settings are for when you go offline. There is no fixed setup that gives guaranteed wins against an incoming attack.
Defense is a broad topic that cannot be fully addressed as there are possibly and infinite amount of possible attack setups. First I would like to talk about an attack with no tools. I have been playing for a long time and I have seen some amateurs attack like this. Since mantlets and wood bundles take longer to travel on the map, making the attack slower, they prefer to send only soldiers. However, this is so much easier to defend than an attack with good tools to lower the defense's bonuses (wall, moat, gate, ranged soldiers defense). You can use 33-34-33 setup with 100% melee and 0% ranged soldier ratio on both flanks and middle with wall tools (stones or ruby). However, I prefer a 33-34-33 setup with ranged tools (arrows or ruby) with 100% ranged and 0% melee ratio on both flanks and middle. I have less losses that way.
Secondly, I would like to talk about the attack that most of us have seen and is the most common. An all ranged soldier attack with loads of mantlets. Opinions vary on this one. Personally, i prefer a 0-50-50 defense setup. with 80% melee and 20% ranged soldier ratio on middle and flank you are fighting with wall tools and gate and moat tools. Thirdly, I will highlight an attack with melee and ranged soldiers. In my opinion, these are the more dangerous type. There are lots of different discussions on this and no good setup has been prioritized on this particular type of attack. I would prefer 100-0-0 setup with 70% melee and 30% ranged soldiers ratio on the flank with wall tools, just to play it safe. Lastly, I would like to ask you all to take a moment to notice that I have not used any names in game. Like wall tools instead of the name of the specific tool. Whether you should use ruby or wooden of that particular type. Always use ruby tools if the attack has ruby and wooden tools if the attack has wooden tools, etc.