[TOT] &ToTPP with Lua : EpicWWiiEurope

Strictly speaking, this phenomenon can theoretically occur in any regions of the planet where a similar set of causes is possible. I suspect that this was the reason why the Roman Empire abandoned the conquest of Germany when the legions were bogged down in the bad roads of the barbarian regions, like Guderian's tanks in '41.

There is one more important reason, which I forgot to mention, that distinguishes the East European Plain from other regions of the planet with a similar climate (for example, Canada or Scandinavia). In Russia, there has traditionally been no private ownership of land (except for a very short period). Which entails a slightly different attitude towards land use, and also affects the quality of roads.

Considering your knowledge then, shall we only restrict the use of eastern road (get them out and stored elswhere until it ends) to slow down units, or shall we also turn some lands temporary into swamps to stall units, particulary motorized ones, like I envisionned until now ?
 
I do not think that the main highways linking large cities (for example, Warsaw-Minsk-Moscow, or Kyiv-Moscow) are fundamentally different from the roads of Europe. Maybe they are a little bit worse quality than autobahns, but not much. In general, these are quite acceptable roads. The main difference between Russia (the East European Plain in the context of WWII) and Europe is the lack of freedom of maneuver. 1 meter to the right or left of a good main road is already impassable terrain (swamps, forests, and dry steppe).

Thus, the main difference between the theater of military operations in Russia is the extreme costs of carrying out military operations on flank strikes. The blocking of a single main road (for example, Brest-Minsk) leads to the impossibility of getting out of the encirclement. The colossal losses of the Soviet Union in the initial period of the war are the result of the well-thought-out plans of the German General Staff, which provided for the peculiarities of the road surface of Eastern Europe. However, the Germans themselves faced the same thing, already near Stalingrad. Good roads are sometimes found even in rural areas. Usually, they are tied to regions with a high (by our standards) population density. It is for this reason that the results of the battles in Western Ukraine (one of the most densely populated regions of the Soviet Union) are highly appreciated in our country, where, in conditions of good roads, the Soviet army managed to avoid encirclement. And, of course, the Battle of Moscow. Despite the most developed road network, as well as the already ended period of rasputica, the Germans were unable to carry out the operation to encircle Moscow.

In Civ2, when simulating Barbarossa, I would make "impassable terrain" the main reason this theater of war differs from the rest. You could also introduce certain units (duplicating the main infantry and motorized units, however with higher production costs) that could navigate this impenetrable terrain. "Rasputica" is a very common myth in the West, I know about it. However, it seems to us to be greatly exaggerated.
 
I do not think that the main highways linking large cities (for example, Warsaw-Minsk-Moscow, or Kyiv-Moscow) are fundamentally different from the roads of Europe. Maybe they are a little bit worse quality than autobahns, but not much. In general, these are quite acceptable roads. The main difference between Russia (the East European Plain in the context of WWII) and Europe is the lack of freedom of maneuver. 1 meter to the right or left of a good main road is already impassable terrain (swamps, forests, and dry steppe).

Thus, the main difference between the theater of military operations in Russia is the extreme costs of carrying out military operations on flank strikes. The blocking of a single main road (for example, Brest-Minsk) leads to the impossibility of getting out of the encirclement. The colossal losses of the Soviet Union in the initial period of the war are the result of the well-thought-out plans of the German General Staff, which provided for the peculiarities of the road surface of Eastern Europe. However, the Germans themselves faced the same thing, already near Stalingrad. Good roads are sometimes found even in rural areas. Usually, they are tied to regions with a high (by our standards) population density. It is for this reason that the results of the battles in Western Ukraine (one of the most densely populated regions of the Soviet Union) are highly appreciated in our country, where, in conditions of good roads, the Soviet army managed to avoid encirclement. And, of course, the Battle of Moscow. Despite the most developed road network, as well as the already ended period of rasputica, the Germans were unable to carry out the operation to encircle Moscow.

In Civ2, when simulating Barbarossa, I would make "impassable terrain" the main reason this theater of war differs from the rest. You could also introduce certain units (duplicating the main infantry and motorized units, however with higher production costs) that could navigate this impenetrable terrain. "Rasputica" is a very common myth in the West, I know about it. However, it seems to us to be greatly exaggerated.

So, to follow your explanations,
exemple.png

With mountains and swamps currently being impassables,

I shall keep railroads and their tiles still for soviet to use,
replace railroads by roads and tiles still for axis to use,
and for other plains and grasslands tiles remove roads and change it into the impassable swamp ?

This, with some infantry units gifted the power to go through impassable ?
 
I would add forests to impassable terrain (if you still have a separate slot in Terrian), as well as "dry steppe". You can look at the soil map of Eastern Europe to determine the border where they (dry steppes) are located (approximately south of Chisinau-Vinnitsa, Drepropetrovsk-Kharkov-Veshenskaya, Tambov-Samara). For example, the encirclement near Uman, as well as Kharkov in the 41st, occurred precisely in these conditions.

Most of the territories above the Warsaw-Moscow highway are swamps. We must pay tribute to the skill of the German troops, who were able to carry out complex encirclement operations in these extreme conditions. You should also remember the operations to de-blockade Leningrad (both sides suffered enormous losses), as well as the battle near Rzhev (an analogue of the Verdun meat grinder). All these operations took place in extremely difficult natural conditions.

Probably, I would not introduce a special type of units that can overcome impassable terrain. The most logical thing would be to link this to veteran status. I don't know if you are planning to introduce barracks or San Tzsu as an available building. I think it would be optimal if Veteran status was available to a very small number of units (much less than in the original Civ2 rules). It is these units that could enter the impenetrable terrain and carry out complex encirclement operations. This would explain the initial successes of the German army (having received significant real combat experience in 39-41), and the defeat of the Soviet army, which consisted of 95% of freshly mobilized recruits.
 
Probably, I would not introduce a special type of units that can overcome impassable terrain. The most logical thing would be to link this to veteran status. I don't know if you are planning to introduce barracks or San Tzsu as an available building. I think it would be optimal if Veteran status was available to a very small number of units (much less than in the original Civ2 rules). It is these units that could enter the impenetrable terrain and carry out complex encirclement operations.
At the moment,
inherited from the previous casual bases, I have the training grounds (which would have been more costly, and needed for some units to build) for a barrack and "Wehrmacht Discipline" for the sun tzu wonder.
I don't know if I can make veteran units only able to cross impassable through. Would have to look into it.

I would add forests to impassable terrain (if you still have a separate slot in Terrian), as well as "dry steppe".

Sadly, I doubled most of the terrain types, bringing in dynamic winters invading lands then falling back, which made me think of using swamps as "mudlands".
 
I don't know if I can make veteran units only able to cross impassable through. Would have to look into it.
This (untested) code should do that for you. If you're not using my template, then you'll have to put the code within the 'discrete event' in your onUnitActivate code.
Code:
-- vetCrossImpassable[unitType.id] = true
--      these units can cross impassable terrain if they are veteran

function discreteEvents.onActivateUnit(unit,source,repeatMove)
    if vetCrossImpassable[unit.type.id] then
        if unit.veteran then
            gen.giveCanCrossImpassableTerrain(unit.type)
        else
            gen.removeCanCrossImpassableTerrain(unit.type)
        end
    end

end
I think the general library can still be used outside of my template. In any case, give/removeCanCrossImpassableTerrain has been in it for quite some time, so you can use an older version. If you need help using the general library, let me know.
 
"Dynamic winters" is a perfectly acceptable solution. For example, I found this phenomenon quite satisfactory in the scenario "Napoleon". By "winter" I would also include "rasputitca". I don't think this natural phenomenon is much different from the extreme winter in Eastern Europe in terms of its effect on combat. The main myth that is widespread in the West is that allegedly only the troops of Napoleon or Hitler suffered from it. It is obvious that the "rasputitca" or "severe winter" had absolutely the same effect on both sides.For example, in some regions in winter, snow cover can reach 1-2 meters, especially in the bare steppe. The encirclement near Stalingrad seems incredible to me, since the tanks had to overcome an incredibly high snow cover. This applies to the tanks of both sides: both Eremenko, Vatutin and Rokossovsky, and the tanks of Manstein, who carried out the operation to unblock Paulus.

If you have already done significant work in your script, then of course, you should not refuse it. These are small improvements that you could make. For example, change the map, adding significantly more impassable terrain than it is now. It seems to be much easier to introduce enough new units in TOTPP18 than to redo the "veteran status".
 
Much thanks @Prof. Garfield ! That could proove useful !


If you have already done significant work in your script, then of course, you should not refuse it. These are small improvements that you could make. For example, change the map, adding significantly more impassable terrain than it is now. It seems to be much easier to introduce enough new units in TOTPP18 than to redo the "veteran status".

Well, the winter tile change is already set up. Yet there's room for a "raspoutitsa feature" in autumn and spring which would change a handfull of tiles into impassable swamps for few weeks.

Altering veteran status can easily be done too, and bring an interesting depth. Why not, per exemple, turning it into a "strong leadership" status and be associated with particular commandants ?

Considering your explanations, could we also assume a "scouting" power could provide the ability to pass through thesehard lands, per exemple, figuring the ability to find good rural roads ?
 
Arf... testing rounds are going.

Have you already met performance issues with your Lua code @Prof. Garfield , @JPetroski ?

Maybe is my map too big, maybe are those too many provinces despite its definition being (I'm guessing) lighter ? Maybe both ?

I'm not sure whether it takes a long time or if it freezes the game yet :( .

Edith : it's long. Let's see how much !
It works alone 14mn for the climatic update ...
 
Last edited:
Have you already met performance issues with your Lua code @Prof. Garfield , @JPetroski ?

Maybe is my map too big, maybe are those too many provinces despite its definition being (I'm guessing) lighter ? Maybe both ?

I'm not sure whether it takes a long time or if it freezes the game yet :( .

Edith : it's long. Let's see how much !
It works alone 14mn for the climatic update ...
If you send me your current scenario, I can look at your climate update code and see if there is a way to optimise it. I once had to optimize my onCanBuild code, since it has to be quite snappy when it is checked ~255 times in an instant.
 
If you send me your current scenario, I can look at your climate update code and see if there is a way to optimise it. I once had to optimize my onCanBuild code, since it has to be quite snappy when it is checked ~255 times in an instant.
I may explain the first issue :
Each tile with its current location tested once.

That's 249x263 tiles I guess ?
Ocean tiles location are rather simply tested.
On the other side, for each land tile, I'm browsing a static table of provinces (I guess around two or three hundreds of them ?) first checking terrain type* then checking x,y being in a square.

*I may win some time there, checking terrain.type for a stored integer instead of baseTerrain.name for a stored string currently used ?

*I may also win time browsing once the provinces table and browse each square's tiles then too, only checking terrain.type then ?
 
Last edited:
Each tile with its current location tested once.

That's 249x263 tiles I guess ?
Ocean tiles location are rather simply tested.
On the other side, for each land tile, I'm browsing a static table of provinces (I guess around two or three hundreds of them ?) first checking terrain type* then checking x,y being in a square.

Going over every tile on a giga map causes a noticeable pause, but not one so large that it is a problem if done once per turn (it certainly won't take 14 minutes). It is also probably unavoidable, given what you want to do. You have to focus on not traversing a 300 item list for many/most tiles.

*I may win some time there, checking terrain.type for a stored integer instead of baseTerrain.name for a stored string currently used ?
It couldn't hurt, but I doubt this is your major time sink. I could be wrong, but I think testing string equality is very quick in Lua, due to the way it stores strings.

*I may also win time browsing once the provinces table and browse each square's tiles then too, only checking terrain.type then ?
If I understand what you are suggesting, then that probably would bring your time down to a manageable level.

My offer to look at your code still stands, but I don't want to try to diagnose the performance problem of code that I've never seen.
 
Considering your explanations, could we also assume a "scouting" power could provide the ability to pass through thesehard lands, per exemple, figuring the ability to find good rural roads ?

It seems to me that air reconnaissance coped well with the task of reconnaissance of good roads. German aviation in the 41st had absolute air supremacy, this was quite enough for them.

Altering veteran status can easily be done too, and bring an interesting depth. Why not, per exemple, turning it into a "strong leadership" status and be associated with particular commandants ?

A distinctive feature of the German army was the initiative and creativity of the middle and junior officers. This explains the overall tactical superiority of the Germans in almost all campaigns and operations. The status of a veteran is quite consistent with this.
 
It's just incredible what lua can do this for this game. This looks amazing!
 
I'm taking quite some time to define the units I'm gonna use in this scenario.

After taking time to look back other previous scenarii and various strategic wargames around ww2, considering the scale and the kind of fight (with fronts) i wanna provide,
I think I'll be going with an altered unit-system :

On the ground,
We should have few special units (per exemple order forces, little 1/1/1/1 basic defensive units for rear cities not to be opened, which may not fight facing war units)
For war, I had to make a choice between the battalion level or the division level (I consider the brigade level adds the issues of both) :
-The battalion level brings more unit types (thus is reducing neutral's specificities) and more direct relations between them (per exemple an anti-tank unit against a tank one). On the other side, this would mean having too many units on the map in the end, and I'm afraid about the AI not handling some unit types properly.
-The division level is reducing a lot unit types (allows for more neutral specificities, and summer/winter variations), yet reduces direct relations between them. This would reduce the amount of units on the map. Howether, one shouldn't use then the classic unit system of civ2 for fights and various situations encountered by units.
This means thinking a system about divisions for personnalisation and relations.
1 behind a division should we have "hidden" battalions, one could look for and alter in a menu (or by scouting ennemies divisions) with a proper picture figuring said division. Something like that. HP would then be related to these battalions HP and their evolution, not to civ2 base gestion anymore (meaning 10 divisions max with 10HP each) :
exemple.png

2 bring a menu (option to prevent it, leaving choices to situation and alea like for AI) before any fight, proposing fighting options limited by division compositions and its battalions's state (worn-out battalions shouldn't be able to carry offensives per exemple, scouting the opposite party needs a scouting battalion, bombarding needs artilleries, penetrate ennemy defences is very risky without tanks, flanking needs mobility, etc).
Indeed, the Pincer bonus or the fleeing ability are things I wanna keep and probably develop there.

In the air, the Idea is to have Air divisions (or carriers) launching planes squadrons (interceptors, heavy fighters, middle bombers, diving bombers, strategic bombers, sea interceptors, sea bombers, ...) for missions thus determining targets.
These bases shall hold differents planes (somehow like ground battalions), so should launched planes have the same personalisation as ground divisions (planes type, etc).

At sea, the Idea is to have fleets on ports, that could be assigned missions like planes (patrolling, escorting, hunting, striking ...) thus create fleet units.

Here's the rought plan at the moment.
What are your thoughts about it ?
 
Last edited:
Current Plan is to limit air units using slots to these ones (or similar "neutered" planes).
Similar to ground units, these unit group shall have their personalisations avaible on a menu, displaying squadrons of more specific units thus making an extended use of Fairline's art.
exemple3.png
 
Units are chosen and defined in rules.txt.
Bombardment targets shall have a new design :
exemple.png
 
Unit.bmp and rules.txt saw an important alteration.
Spoiler Latest Unit files :
exemple.png

The goal is to bring a first simplified version of a deeper futur envisionned ww2 scenario.

With times for thoughts :
-on the diplomatic side,
no more minor axis or allies. We shall have only "allies", "axis", "soviet", "neutrals", and 3 more slots used for 2 diplomatic options per player turn towards specific neutrals and either a third option or a minor country for a human player to choose.

-on features side, have industries for supply, planes, tanks, vehicules, fuel resources which, with a manpower resource, having incidence on the ability to heal and to move (eg leaving fuel using ground units with 1/2 movepoint, allowing for railroad travel* yet settinga handicap otherwise)
*possible in controlled lands only.

Pseudo-dynamic Meteo and Climatic system is set

Combat system shall see small adaptations
earning from the experience with the recent mod released.

-on units side, we shall have division level ground units as main forces, fleet level sea units, and few battalion level forces.

The ultimate goal is to display with lua the divisions, fleets, air forces compositions, with their specific core battalions and their specific supply regiments giving power and abilities to units.
The issue is (shame on me), I both lack knowledge about european theatre armies and graphical resources (despite huge great collections from Fairline and Tanelorn). I believe this can't be achieved by me alone.

Thus, aim is to have complex accurates units personnalized. First release doable alone shall see the simplified version of these only,consumming 50 more slots.
 
Last edited:
Top Bottom