I am not able to mod myself but there might be somebody out there who is interested in this idea. It has two basic components . . .
i) units can only push back enemy units two times in any continuous melee
ii) "steady" units may not be pushed back if they are in a completely straight formation with "steady" units (not to include skirmishers of any description) either side of them.
The point of these changes would be to try and make battles a little less chaotic then they can sometimes be in FOG2, particularly when enemy battle lines pass through each other and then have to turn round and come back the other way to continue the melee. The second part of the idea is intended to make the centre of battle lines a bit more resilient. Units on the end of a battle line will always be open to being pushed back because they will have an empty square (or skirmishers) next to them.
Thanks.
Last edited by stockwellpete on Fri Apr 13, 2018 9:44 am, edited 1 time in total.
I just had a look at this, largely just to see how easy it would be to do. I think the answer is "hard" and "outside of my current skill-level" (it looks like it would require writing some new functions to check for adjacent friendly units, which my rudimentary coding skills don't allow for).
I'm wondering about a much simpler solution which has a similar effect though: removing, or severely limiting, follow-ups to pushbacks. Consequences:
1) Follow-ups are implicitly placed in the hands of the players. There's some randomness, based on who's turn the pushback occurs on, but the winning player has the chance to follow up on their own turn if they want; while the losing player can hold, return to their position, fall back, or deploy a reserve unit as they prefer (maintaining the integrity of the line).
2) You therefore lose situations where individual units pursue deep into the enemy formation (unless the player is that reckless), which I assume is one of the things you would like to remove through the original proposal (I see merit in this, as I feel it's a bit too easy to "snipe" enemy command units by just allowing them to push through into a position where they are flanked).
3) You also get more use out of reserves, since the "losing" player can deploy them to fill holes left by pushbacks more reliably, rather than simply throwing reserve units at the pushing unit (which seems to me typically futile, as it is usually strong units breaking through), or (more likely) sniping them with flank attacks. (The winning player can also make more use of reserves, since it provides the scope to withdraw/rotate now free units with fresh undamaged ones).
4) All this should result in generally more static lines, except in places where there are few/no reserves when the winning player can capitalise on their advantage through follow-up charges.
5) You do, however, lose the ability to pull enemy units out of formation, or into unfavourable terrain (although units will already refuse to follow up into severely disordering terrain). One compromise could be to allow automatic follow-ups for raw/warband troops (a la pursuit rules), reflecting the discipline of regular/experienced troops. And all this said, I don't feel like that adds a great deal - I don't think the game rules really facilitate e.g. a Cannae-style tactic anyway as it's rare to push back multiple units at the same time and, in fact, in those instances there would be little advantage since you're not exposing any units that way anyway.
6) It also implicitly buffs units with high Impact POA since breaking off the combat entirely allows for more charges/impact rounds.
All of that seems to do kind of what you're looking for, with (I'd argue) the advantage of making reserves a bit more meaningful by facilitating some degree of unit rotation. Given this is would be a trivial change (it's literally one line of code, a bit more if you want raw/warband troops to follow up as normal), I'd be happy to send you a modded file if you wanted to try it out.
EDIT: I'd also suggest, for consistency's sake, either having horse automatically follow up foot units, or allowing foot to withdraw from horse units. The logic for foot not being able to withdraw from horse would seem to be that the latter can catch the former easily. But in so far as that is true, I would argue it makes more sense for foot to be able to withdraw, with horse either keeping pace with them automatically (as per pursuit) or withdraw but open themselves to a follow-up attack as per the changes outlined above.
Kabill's Great Generals Mod for FoG2: http://www.slitherine.com/forum/viewtopic.php?f=492&t=84915
Adding a counter probably wouldn't be particularly hard to script. The main challenge would be that without proper code flowcharts (or other documentation) it would first require reverse engineering a lot of script to figure out how and where the related variables would have to be stored/created and to make sure that the push-back method(s?) is/are stopped/altered in the right place where it won't break anything else. I think there's some existing script for checking neighboring friendly units for use in morale checks but again, utilizing it as a part of push-back check would require a lot of exploration of the game code just to get to a starting point.
So the coding itself wouldn't be too hard but figuring out how the related game stuff actually works is the major obstacle. You could compare it to building a jigsaw puzzle without knowing what it's going to look like with a couple handfuls of unrelated puzzle pieces thrown into the mix (there's a lot of unused legacy code from battle academy and the P&S/SJ games).
Making the game ask whether the player wants to follow up would almost certainly be much harder to do than adding the two simple automatic checks. It would be especially very hard to make it work with AI-player, unlike the automatic solution.
Kabill, thanks for spending some time looking at this.
I am not actually opposed to pushbacks completely as in some battles I think they are portraying what may have happened (there is a Macedonian example, I believe, Pydna perhaps?) but it is when you get a unit pushing back the same enemy 4 or 5 times that I find it a bit ridiculous. So that is why I am saying two pushbacks should be allowed.
My second idea is that "steady" units with other "steady" units exactly aligned with them on either side can never be "pushed back". This idea stands alone from my first idea and it would certainly add some stability to the centre of battle-lines. of course, in some games, a unit may get "disrupted" very quickly so "pushbacks" may happen just as quickly as they do now, but the general idea is to reward players who organise their forces accurately. The other implication of this idea is that it might make skirmishers a bit more powerful inasmuch as they can often disrupt enemy battle lines once they have achieved local superiority.
So really I would not want a version where no pushbacks occurred automatically, which you are suggesting would be quite easy to do. But I am wondering though about this second suggestion and how difficult that would be to mod separately as a stand alone idea.
I've accidentally found myself looking at this more (even though I have loads of work to do...). I think I have found some functions I can copy and adapt to try and make this work. However, there's two issues:
- Diagonals seems to make everything more complex - you need to be able to account for L-shape formations (which should give the same stability bonus as lines from an diagonal attack) while also allowing lines to protect against diagonal attacks (potentially both horizontally and vertically).
- Facing is also an issue (i.e. it makes sense only for units that have similar facing have an effect; units in a column shouldn't be able to resist pushbacks from a flank attack, for example).
The best way I can think of doing it would be to require only one rather than two adjacent units, which could be coded easily by checking if the fighting unit has reciprocal line of sight with another hostile unit beyond the one it is fighting. However, that makes the condition easier to achieve and makes flanks less vulnerable (they are still more vulnerable than the centre, but only if you come at them diagonally from outside the opponents main line; you also only need to disrupt one unit rather than two to be able to start pushing the flank; but it's still more resilient). More problematically, it makes attacking on the diagonal stronger than attacking straight-on, as a diagonal attacker is only "pinned" by one rather than two other units in that scenario. I guess that provides an incentive to keep a clean forward-facing line, so your opponent cannot attack on the diagonal due to ZoC. But I suspect it would have scope for exploitation by canny players, and I also wonder whether it would be easily exploited when playing against the AI.
On a technical level, then, I think it is doable, but I'm not sure there is a good way to implement it that isn't exploitable.
(One final thought though - what if you didn't restrict pushbacks for having adjacent friendly units, but restricted follow-ups for having adjacent hostile units. I.e. in a straight line, a unit could push another one back a single tile and follow up. It could then push the unit back again, but not follow up while there are are steady enemy units to its flanks, allowing the opponent potentially to reoccupy the vacant space or deploy reserves. This kind of represents a "bend" in the line (the first pushback) but inability to break through while the line holds steady. That would be mush easier to check for, as I don't think diagonals would matter here, while producing similar effects to the ones you're after as it would naturally limit pushbacks to a maximum of 1 where the relevant conditions hold, except where there is a "wholesale" pushback of the opposing line).
Kabill's Great Generals Mod for FoG2: http://www.slitherine.com/forum/viewtopic.php?f=492&t=84915
Kabill wrote:I've accidentally found myself looking at this more (even though I have loads of work to do...). I think I have found some functions I can copy and adapt to try and make this work. However, there's two issues:
- Diagonals seems to make everything more complex - you need to be able to account for L-shape formations (which should give the same stability bonus as lines from an diagonal attack) while also allowing lines to protect against diagonal attacks (potentially both horizontally and vertically).
Yes, diagonals are a difficult issue because units aligned diagonally are not actually physically in touch with each other and enemy units can move between them. So, I would say that they should be excluded from the mod altogether.
- Facing is also an issue (i.e. it makes sense only for units that have similar facing have an effect; units in a column shouldn't be able to resist pushbacks from a flank attack, for example).
Agreed.
The best way I can think of doing it would be to require only one rather than two adjacent units, which could be coded easily by checking if the fighting unit has reciprocal line of sight with another hostile unit beyond the one it is fighting. However, that makes the condition easier to achieve and makes flanks less vulnerable (they are still more vulnerable than the centre, but only if you come at them diagonally from outside the opponents main line; you also only need to disrupt one unit rather than two to be able to start pushing the flank; but it's still more resilient). More problematically, it makes attacking on the diagonal stronger than attacking straight-on, as a diagonal attacker is only "pinned" by one rather than two other units in that scenario. I guess that provides an incentive to keep a clean forward-facing line, so your opponent cannot attack on the diagonal due to ZoC. But I suspect it would have scope for exploitation by canny players, and I also wonder whether it would be easily exploited when playing against the AI.
Sorry, I cannot follow this at all.
(One final thought though - what if you didn't restrict pushbacks for having adjacent friendly units, but restricted follow-ups for having adjacent hostile units. I.e. in a straight line, a unit could push another one back a single tile and follow up. It could then push the unit back again, but not follow up while there are are steady enemy units to its flanks, allowing the opponent potentially to reoccupy the vacant space or deploy reserves. This kind of represents a "bend" in the line (the first pushback) but inability to break through while the line holds steady. That would be mush easier to check for, as I don't think diagonals would matter here, while producing similar effects to the ones you're after as it would naturally limit pushbacks to a maximum of 1 where the relevant conditions hold, except where there is a "wholesale" pushback of the opposing line).
But this would undermine the main purpose of my idea which is to make the centre of lines more resilient. If you said in the example above that a unit could only be pushed back once if the enemy unit then had steady units on its flanks then that would be much better.
stockwellpete wrote:But this would undermine the main purpose of my idea which is to make the centre of lines more resilient. If you said in the example above that a unit could only be pushed back once if the enemy unit then had steady units on its flanks then that would be much better.
I wrote a long reply explaining all the previous issues in more detail but, having done all of that, I actually think the idea you're replying to here is the best possible implementation.
Where I had been coming from with the suggestion of limiting the follow-up rather than push-back is that the continual pushback problem largely stems from the follow-up, whereas if you force units to break off more then it removes that problem and provides space for intervention by the "losing" player. However, since a unit with enemies to it's flanks is not ZoC'd, it would be possible for it to just charge on its next turn so you're right, it wouldn't solve the problem very well. So I agree that stopping the second pushback instead would be better.
So, implementation suggestion:
- A steady infantry unit cannot be pushed back by an enemy unit which is flanked by two, steady friendly infantry units.
- Light units and horse do not gain or provide the bonus.
I suspect this should be fairly easy to code: if you check the pushed-back unit's line of sight for adjacent steady friendly units then that should cover it. Now I think about it, diagonal pushbacks might be an issue but this should be simple enough to do that it would be worth trying and then doing some experimentation to try and see if it breaks.
Kabill's Great Generals Mod for FoG2: http://www.slitherine.com/forum/viewtopic.php?f=492&t=84915
Kabill wrote:
So, implementation suggestion:
- A steady infantry unit cannot be pushed back by an enemy unit which is flanked by two, steady friendly infantry units.
- Light units and horse do not gain or provide the bonus.
I suspect this should be fairly easy to code: if you check the pushed-back unit's line of sight for adjacent steady friendly units then that should cover it. Now I think about it, diagonal pushbacks might be an issue but this should be simple enough to do that it would be worth trying and then doing some experimentation to try and see if it breaks.
OK then. I shall be interested to see how you get on with this idea.
I haven't forgotten about this. I have in fact written something, but then it didn't work. And then I rewrote it and tried it again, and it still didn't work. I'll have another look at some point.
Ironically, in the current version, I'm actually back to the very starting idea (i.e. resisting pushback with flanked by allies), disregarding diagonals (i.e. only checking for allies in cardinal directions) and ignoring unit facing (because there's too many possible permutations and subtle ways you can try and undermine it). The alternative I suggested proved too situational: it was really hard to test because pushing a unit back such that the winning unit is flanked by enemies and then trying to push them back again, without either time disrupting them, is quite rare (and that's when I was deliberately not attacking with everything to set it up). Further, my alternative turned out to still have issues with diagonals, such that the original idea was looking simpler and better overall.
Just need to actually get it to work now...
Kabill's Great Generals Mod for FoG2: http://www.slitherine.com/forum/viewtopic.php?f=492&t=84915