Page 1 of 1

Is the Battle Engine "Scripted" at some level??

Posted: Sun Feb 23, 2025 1:59 am
by Von Manstein777
I have loved this game for years (WITE and WITE2). In fact, I was one of the first purchasers of WITE when it first came out and have bought every add-on and the hardbound Manual in the years since. Played a lot of smaller AI games over the years but raising a family, etc. didn't allow me but one large campaign against a human opponent.
Recently, I started playing my second Campaign Game against a human opponent (as the Germans in 1941GC No Early End) and sadly found the 1941 Winter Rules and the Soviet's ahistorical Logistical capability to be so bad as to be "buggy" (we're playing the 1.04 Beta). This led me to go back to the basics to see what was under the hood of the game's battle engine and what I found also gives me pause and makes me wonder if the whole thing is a mess. When I load up the Veliki Luki Introductory Scenario as the Germans against the Soviet AI, under Normal balance conditions. the Soviets take the town of Veliki Luki EVERY SINGLE TIME with their first battle, its always the same attack and, effectively, the SAME OUTCOME. I've done this 7 times now and recorded the last three which I am posting here:
Veliki Luki Sov Game1.png
Veliki Luki Sov Game1.png (1.47 MiB) Viewed 567 times
Veliki Luki Sov Game2.png
Veliki Luki Sov Game2.png (1.28 MiB) Viewed 567 times
Veliki Luki Sov Game3.png
Veliki Luki Sov Game3.png (1.24 MiB) Viewed 567 times
Note the Soviet Attacker score is Jacked WAY UP for reasons that don't accrue to me when I switch sides and play as the Soviets against the German AI. ALSO, every time the result is the same: the 1/83 Retreats and the 3/83 Surrenders. When I switch sides and try THIS SAME ATTACK all my results are similar to the following:
Veliki Luki Ger Game1.png
Veliki Luki Ger Game1.png (1.2 MiB) Viewed 567 times
These results (when I am Soviet) actually make SENSE, so my question is what is happening when the Soviet is AI - is it SCRIPTED or goosed in some way to always get that outcome?

Re: Is the Battle Engine "Scripted" at some level??

Posted: Sun Feb 23, 2025 2:37 pm
by tyronec
There are 'scripts' for the opening moves by the AI.
These are in a fixed sequence, so generally they are written for the early attacks to be at good odds so that any follow up moves will proceed as the script is expecting. If a critical battle early on went the wrong way then the whole script could be compromised as unlike a human player it cannot react and play the opening a different way.
I didn't know there were any results that were fixed 'against the odds' as you describe, that was not done in any of the scripts I was involved in but maybe it is possible.

Re: Is the Battle Engine "Scripted" at some level??

Posted: Sun Feb 23, 2025 5:55 pm
by Von Manstein777
Thanks Tyronec, I could see a scripted AI move sequence due to the rationale you described for the AI. Here, however, the very outcome of a battle itself is rigged, with the Soviets clearly "overcooked", in such a way that the Soviet CV is Jacked WAY up. Furthermore, the combat results outcome is somehow preordained; same unit ALWAYS Retreats while the other unit ALWAYS Surrenders. I would like to understand more of what's going on here as this is the Intro scenario so its the place players would go to to understand how the game engine works and right off the bat there is something odd clearly at work behind the scenes. The overcooked Soviet CV's remind me of what I just witnessed during the 1941 Winter turns as the German player so I'm wondering if there is something that is triggering this effect there; ie. Base CV's of 12 being pumped to like 500+?

Re: Is the Battle Engine "Scripted" at some level??

Posted: Sun Feb 23, 2025 6:24 pm
by Joel Billings
Your results are very odd. The script doesn't call for the town to be attacked on turn 1. I just ran 1.04.00 (but with latest data files), and 1.04.05 and the AI didn't attack VL in either case. If it were to attack VL, then yes, it would be guaranteed a win. That's because as Tyrone stated, the AI has a pre-determined move path for all units, and pre-determined deliberate attacks in the "script". These attacker were all made with high expectations of victory. In the game, when the attack is conducted, everything is resolved normally until the final odds are calculated. At this point, if the odds aren't at least 2 to 1, then attacker CV is boosted to reach 2 to 1. So you can usually tell which attacks are getting boosted because the odds come out at 2 to 1 exactly. The goal in making the scripts was not to set up any attacks that had much chance of failing. In most scenarios, the first turn is critical to overall success. That's because the scenarios usually start with the opening of a major offensive. The only attacks that can happen that aren't pre-determined are hasty attacks as moving units try to move into hexes occupied by a unit that just retreated. In making the scripts, we tried to avoid situations where this uncertainty would come into play. So for a little bit of "cheating", we greatly increased the AI's first turn. We felt it was the right tradeoff, especially since in making the scripts we tried to be conservative and avoid taking advantage of this auto 2 to 1 situation. As for your game, I don't understand why VL is being attacked, as it's not in the script. I'd suggest updating to 1.04.05, but aside from that, if I can't produce the results, not sure there's anything we can do about it. Is anyone else seeing this when you run VL Soviet AI at normal difficulty?

Re: Is the Battle Engine "Scripted" at some level??

Posted: Mon Feb 24, 2025 3:01 am
by Von Manstein777
Thanks Joel for your quick reply!! Not sure why it would be in my version and not duplicated elsewhere (I am not a programmer and haven't tinkered with anything). Have to think about what you said a bit as there is a lot to take in there. I do know that in my case, in none of the 7 times I ran the game using Soviet AI were the odds exactly 2:1 - they were all located somewhere between 2 and 3 to 1. Also, trying to understand the depth of the scripted battle engine - particularly why all the outcomes have the identical effects to the two units in VL; the same one always retreated and the other one always surrendered? I understood from tyronec that the scripts were for the opening MOVES, but my understanding from your reply is that the Battle/Battle Engine itself is also affected according to the way you describe. Now, I'm trying to learn how having results that range between 2 and 3 to 1 still translates into the one unit always retreating and the other unit always surrendering. Best - Jim

Re: Is the Battle Engine "Scripted" at some level??

Posted: Mon Feb 24, 2025 4:19 am
by 56ajax
Just ran the scenario and got the same result as VM777. Soviet AI attacked VL on T1 with end result of 2.4 to 1. 1 German Reg retreated and the other surrendered.

Current release 1.04.05

Re: Is the Battle Engine "Scripted" at some level??

Posted: Mon Feb 24, 2025 4:48 pm
by Joel Billings
Thanks 56ajax for running that test. I can't explain why I'm not getting the attack on VL and you are. I've attached a renamed version of the scenario file I'm using. Can you please try this out. I assume you are setting this as Human Axis and Soviet AI, and using all default game options, right? By running this save we might get more insight on what is different between my run of the scenario and yours. Just unzip the attached scenario file in your /dat/scen folder and let me know if it still attacks VL. Thanks.