I've done some experiments with three rank fire. The standard musket weapon can be set to not fire through friendlies (after copying changes in the weapon.script and misc.script pioneered by Cavalli). If a friend is "on line", the musket will not fire. This means that of 2 or more ranks in formation only the front rank will fire. A simple change in the unit.script in the function _unit_TryAttack can make three ranks of infantry fire but not more than three ranks. Here is the changed line; FriendOnLine := _misc_IsBuildingInRay(goHnd, px, py+0.92, pz, tx, ty+0.5, tz); The original py value is py+0.5. Lifting it to py+0.92 is the right amount to get infantry (tested on State vs. Country fusiliers on flat ground) to three-rank fire for the most part. Sometimes a few, mostly in the third rank, will fail to fire. Sometimes the odd musket in a 4th rank will fire, especially if on the edge of the formation and thus having a clear shot. These results are dependent on other factors. I am using State vs. Country as the basis for testing and the range of muskets has been doubled, reload times are four times longer and head-shots percent has been raised much higher (about 40%). Lifting the "py" to py+0.92 lifts the FriendOnLine check start point to just above the musketeers head (I guess). Then on flat ground the shot angles down to ty_0.5. This angle is just right, on flat ground, for the shots of the 2nd and 3rd ranks to "clear the heads", as it were, of the units in front. Because of the long weapon range, the formation can get another volley in before infantry pikes close on them. However, this second volley is front rank only (1 rank) due to the angle of aim declination dropping as the enemy troops come closer. Clearly, on a forward slope more ranks should fire. On a reverse slope I am guessing only the front rank would fire. The change is not so effective for arquebusiers. It seems to allow about two ranks to fire on flat ground. This change does not work at all for dragoons. They must have a higher unit box, I guess.
Is it possible to somehow "cycle" through the ranks? As in, first rank fires, then second one while the first one is reloading, then the 3rd one while the other 2 are reloading, or the first one is done reloading and is ready to fire. Because right now an easier fix for your idea is to just have 3 line formations and be done with it, instead of having several line formations and only "forcing" the first 3 to fire, which would also waste the formation's potential if you ask me. Just my thoughts.
The real benefit for this is that multiple formations can’t fire over one another - it forces you to adopt linear tactics if you want to maximise firepower. Otherwise yes 3 rank formations would be the easiest solution.
We must remember that there are no reloading graphics and no graphics to support the front line kneeling (standard position for three rank volley fire). The 3-rank volley fire is okay but cycling through ranks would be nice for staged retreats or rolling offensives I guess. I am not an expert on the tactics of the time. It is clear that ranks are defined because the makers of State vs Country not only create formations with half pikes and half muskets but also provide a command button to switch them around so that pikes or muskets can be in the front. So clearly there should be a way to mod to rotate ranks in a 3 rank formation. As Francesco_Cavalli said, it forces you to adopt linear tactics and it is best to create all 3-rank line formations, at least for the 18th C. But don't forget there are (and should be) columns and squares. These look more realistic when only the outside ranks are firing. Incidentally, some of my tests have indicated that column assaults with bayonet-only can work on thin lines. This is with my other settings of long reloads etc. The center of a line-formations set-up might need reserve lines, so if you try to flank too much with line infantry only, then you might leave your center too weak. Of course, cavalry adds another level of complication to this. There are still many problems with my attempts. When I play as client to another person as host, I get a lot of lag in big battles. My units appear to keep walking forward when they should be shooting. The battle looks more normal on the host's screen I believe . When all the units die the battle outcome is about right, so clearly what I see on my screen are "ghost units" walking forward to places they never really get to on the host's more accurate screen rendition of the battle. Part of the problem is my high ping and poor internet (I live in Australia). I also suspect another part of the problem is the long reload times I code in the parameters without any changes to graphics progress files (I guess). If units don't fire rapidly and die rapidly it seems to cause that "ghost units" problem. It's either an engine fault or a modding fault, I don't really know which.
Huh, I guess I haven't played this game in a long time then because I didn't know about the breakthrough with the mixed formations. I'm not sure how they're made exactly but I had an idea of "designating" the ranks in a line somehow to make a cycle of fire. For instance you have a *, + and - rank in a 3 rank line. Rank * would need to fire first and then reload, while that is happening rank + waits a set amount of time unless someone can make it so they detect when the first rank is done firing after which they fire. The 3rd rank being - waits for the 2 others and so forth. Again, I'm not sure if this could be implemented, I'm just throwing it out there. By the way, is it possible to make a unit unable to shoot if there is another in front of it except if it's reloading? As in, the 2 other ranks hold their fire until the first 1 does, when the first rank is starting to reload that's the window of opportunity for the rank behind them to fire, but I don't know what to do for the 3rd rank, there would need to be a smaller detection radius for friendly fire to incorporate the wait for the 2nd rank to fire so they both don't fire immediately after the first rank starts to reload. This is of course all 3 rank formations in my head. Sorry if it's a bit complicated, I hope if you can understand me, if not I can a small graphic. Hope it helps.
C2 had a system something like that. Someone like Daddio could comment on how C2 worked. I seem to recall that formations could volley fire (all ranks) or the front rank could fire alone to be followed up by 2 rank fire (2nd and 3rd ranks) if need be. The player had to micro this.
Yeah, I'm just wondering if it's possible to change a unit's "friendly fire status" so to speak depending on said unit's current action. So normally the unit would not allow friendly units to shoot if it is between another unit and an enemy, but would allow it if it's reloading. And of course, I'm talking about a small radius to detect "friendly fire" so the 3rd rank fires when the 2nd rank reloads, and not the 1st one.