The mechanics of battle plans broadly fall into four phases, the first and last of which apply to all kinds of plans and the middle two only to attacks:
Just to briefly mention it, de-virtualization is a step you probably didn't really think about consciously but is needed for the following steps. If you draw an order like this:
You'll see a single arrow pointing from it while drawing. This is the virtual order you create. But the attack line intersects non-enemy territory. So once you finish drawing, the game creates two actual orders:
For the following phases only these actual orders count, as if you had drawn them individually like that. The same thing happens if you draw over sea tiles for instance. And it of course not only happens when you draw the order but during the plan's entire existence because provinces may change control, requiring the plan to subdivide itself or merge back together.
These two steps should be very familiar to players but when it comes to understanding of battle plans, it probably starts to go downhill after that.
Now on to the main topic. Many of you might have already seen front interpolation in the game, though it is not explicitly named there. When the tutorial asked you to draw an offensive line in Ethiopia it looked like this:
For brevity, in the following I will name the front line in the north From, the arrow pointing south Via, and the offensive line in the south To. In case you hovered over Via, you'll have seen this:
and thought "Wow, this looks really profound. I'll get back to this when I have a handle on the basics." And here we are.
What is shown is a visualization of the interpolated front steps. As the name implies, the interpolated front creates intermediate areas with the purpose of connecting From with To while using Via as a guide. For non-spearhead fronts, this is constantly being done when the front line changes shapes. The second, more important property of the interpolated front is not shown though: the province weights.
While the steps are nice to look at, they are actually not very useful by themselves and importantly do not mandate that the unit controller will attack these areas sequentially one after the other. They are used to scale a weight for each province. The unscaled weight is calculated like this:
100%, remaining unchanged 6 as the interpolation has this number of steps. The desert province in the north east appears in the third of fivesix steps, scaling it to 60%by 4. The provinces in the last step would be scaled to 20% in this example.remain unscaled.
"Why did you write 'would'? And what is the base weight?" I hear you not asking. The base weight is zero and hence the weight of almost all provinces in plans you draw is zero. For those keeping track, the weights of the three northern Ethiopian provinces are15, 45, and 990, 270, 60 (from west to east).
Finally those non-zero weights are rescaled to the range 0...255 with a floor of 1, making them 36, 255, and 1 in the example. These numbers are the only pieces of information derived from the drawn arrow to be used in the next step, the unit controller which will be featured in a later post. But if you are impatient and want to have your hopes crushed early that these are used in a very clever way, take a look at this thread from two years ago and/or this wiki page.
Okay, so controlling which provinces appear in the interpolation and in which phase seems to be how we can (indirectly) influence province weights. So how are these steps generated based on the From, Via, and To lines we have drawn?
As the geometry involved deals with larger shapes, there is a short-cut for cases where both From and To are just one province respectively. In this case the interpolated front just follows Via. But keep in mind that once the front line moves, it will extend and not be in this special case anymore... Sad @TheMeInTeam face.
For the generic case, the game generates a bunch of threshold lines that use Via as a back bone. Let's assume your From is S-shaped (green) and To is U-shaped (blue). Now imagine Via (red) gets straightened onto an axis and From and To are oriented in the angle they are connected to Via with. It might look like this:
At the half-way point of Via, a straight line gets generated as the 50% intermediate step. This is why the interpolation always straightens out in the middle, no matter how oddly shaped your From an To are. The length of this center line is the average length of From and To, making it span wider in most cases. To add insult to injury, when From covers the whole front line (as the AI usually does it) the length of this center line is doubled. This is why it is almost impossible to make a focused attack with battle plans, as they massively bulge outwards. The space inbetween get filled with linear interpolations between this center line and From or To respectively, indicated by the more lightly colored shapes. There are as many shapes as provinces in Via.
This sequence of lines gets then grafted back onto the actual shape of Via. The developers helpfull designed a nice visualization and then blocked it off behind the
You can see quite easily the straight, ultra-wide center line reaching far into the ocean and Sudan. If the same thing was happening on a wider land area, the interpolation would include a lot of additional provinces there. You'll also note that all the lines look much smoother than the provinces they are based on. That's because they are smoothed
The From and To lines also get extended outwards by one province-length at each end. Can't make the fronts too wide, right? Oh, one can? Nevermind then.
Armed with these lines, it now also becomes clear how the area is filled: starting at From, neighboring provinces are filled in until the next line is reached. This can mean that some lines generate multiple interpolation steps (because they are several provinces away from the previous line) or none. If any parts of To lie beyond the final line, they are filled in as the last step.
- Drawing the plan
- De-virtualizing the plan
- Interpolating the front
- Unit controller issuing orders accordingly
Just to briefly mention it, de-virtualization is a step you probably didn't really think about consciously but is needed for the following steps. If you draw an order like this:
You'll see a single arrow pointing from it while drawing. This is the virtual order you create. But the attack line intersects non-enemy territory. So once you finish drawing, the game creates two actual orders:
For the following phases only these actual orders count, as if you had drawn them individually like that. The same thing happens if you draw over sea tiles for instance. And it of course not only happens when you draw the order but during the plan's entire existence because provinces may change control, requiring the plan to subdivide itself or merge back together.
These two steps should be very familiar to players but when it comes to understanding of battle plans, it probably starts to go downhill after that.
Now on to the main topic. Many of you might have already seen front interpolation in the game, though it is not explicitly named there. When the tutorial asked you to draw an offensive line in Ethiopia it looked like this:
For brevity, in the following I will name the front line in the north From, the arrow pointing south Via, and the offensive line in the south To. In case you hovered over Via, you'll have seen this:
and thought "Wow, this looks really profound. I'll get back to this when I have a handle on the basics." And here we are.
What is shown is a visualization of the interpolated front steps. As the name implies, the interpolated front creates intermediate areas with the purpose of connecting From with To while using Via as a guide. For non-spearhead fronts, this is constantly being done when the front line changes shapes. The second, more important property of the interpolated front is not shown though: the province weights.
While the steps are nice to look at, they are actually not very useful by themselves and importantly do not mandate that the unit controller will attack these areas sequentially one after the other. They are used to scale a weight for each province. The unscaled weight is calculated like this:
- +5 for each neighboring friendly province
- +10 for each neighboring From province
- +10 for each neighboring sea province
"Why did you write 'would'? And what is the base weight?" I hear you not asking. The base weight is zero and hence the weight of almost all provinces in plans you draw is zero. For those keeping track, the weights of the three northern Ethiopian provinces are
Finally those non-zero weights are rescaled to the range 0...255 with a floor of 1, making them 36, 255, and 1 in the example. These numbers are the only pieces of information derived from the drawn arrow to be used in the next step, the unit controller which will be featured in a later post. But if you are impatient and want to have your hopes crushed early that these are used in a very clever way, take a look at this thread from two years ago and/or this wiki page.
Okay, so controlling which provinces appear in the interpolation and in which phase seems to be how we can (indirectly) influence province weights. So how are these steps generated based on the From, Via, and To lines we have drawn?
As the geometry involved deals with larger shapes, there is a short-cut for cases where both From and To are just one province respectively. In this case the interpolated front just follows Via. But keep in mind that once the front line moves, it will extend and not be in this special case anymore... Sad @TheMeInTeam face.
For the generic case, the game generates a bunch of threshold lines that use Via as a back bone. Let's assume your From is S-shaped (green) and To is U-shaped (blue). Now imagine Via (red) gets straightened onto an axis and From and To are oriented in the angle they are connected to Via with. It might look like this:
At the half-way point of Via, a straight line gets generated as the 50% intermediate step. This is why the interpolation always straightens out in the middle, no matter how oddly shaped your From an To are. The length of this center line is the average length of From and To, making it span wider in most cases. To add insult to injury, when From covers the whole front line (as the AI usually does it) the length of this center line is doubled. This is why it is almost impossible to make a focused attack with battle plans, as they massively bulge outwards. The space inbetween get filled with linear interpolations between this center line and From or To respectively, indicated by the more lightly colored shapes. There are as many shapes as provinces in Via.
This sequence of lines gets then grafted back onto the actual shape of Via. The developers helpfull designed a nice visualization and then blocked it off behind the
debug_fronts console command. For the Ethiopia example it looks like this:
You can see quite easily the straight, ultra-wide center line reaching far into the ocean and Sudan. If the same thing was happening on a wider land area, the interpolation would include a lot of additional provinces there. You'll also note that all the lines look much smoother than the provinces they are based on. That's because they are smoothed
Armed with these lines, it now also becomes clear how the area is filled: starting at From, neighboring provinces are filled in until the next line is reached. This can mean that some lines generate multiple interpolation steps (because they are several provinces away from the previous line) or none. If any parts of To lie beyond the final line, they are filled in as the last step.
Last edited:
- 25
- 8
- 1