The Bug Thread (Read before posting bugs!)
Moderators: Slitherine Core, The Lordz, Panzer Corps Moderators, Panzer Corps Design
First post has been updated. I personally checked all the bugs, and shuffled off the ones that were fixed.
However:
#9 still persists. Previously, your aircraft would not even detect the enemy aircraft and you could stack up potentially unlimited units against the same invisible 'interception'
The new system causes the enemy aircraft to appear, but if you start next to an enemy, who is cloaked as invisible at the start of a bad weather turn, you will still have a single stack problem on the initial revealing. I have a save file where I stacked two 109s if you want to see.
Possible Hot fix: If you start your turn adjacent to an enemy air unit(which happens often) and the turn has bad weather, any air units immediately adjacent to your air unit should be revealed.
Personally though, I think the entire behavior of air units in bad weather might be worth re-examining from the ground up. If people agree, we can open up a dialogue and start brainstorming.
#13 isn't a bug per-say, more like an absent feature. That is still absent.
#17 is a pretty serious problem, because recreating it is difficult, so I bolded this one. Rudankort, try this: If you can't reproduce the bug,
1. Get a new computer/laptop that has zero PzC content installed on it.
2. Download and install the latest beta on to that machine.
3. Launch game.
4. Immediately start France scenario, mouse over bridge engineer, and see if that crashes.
#'s 15, 20, 21, and 24 are not easy to reproduce so I couldn't immediately test them myself. I left them as unsolved for now, even though they could very well be solved, and I'll wait a week or so. If no one else mentions these bugs, and I don't encounter them myself anymore, I'll consider them solved.
However:
#9 still persists. Previously, your aircraft would not even detect the enemy aircraft and you could stack up potentially unlimited units against the same invisible 'interception'
The new system causes the enemy aircraft to appear, but if you start next to an enemy, who is cloaked as invisible at the start of a bad weather turn, you will still have a single stack problem on the initial revealing. I have a save file where I stacked two 109s if you want to see.
Possible Hot fix: If you start your turn adjacent to an enemy air unit(which happens often) and the turn has bad weather, any air units immediately adjacent to your air unit should be revealed.
Personally though, I think the entire behavior of air units in bad weather might be worth re-examining from the ground up. If people agree, we can open up a dialogue and start brainstorming.
#13 isn't a bug per-say, more like an absent feature. That is still absent.
#17 is a pretty serious problem, because recreating it is difficult, so I bolded this one. Rudankort, try this: If you can't reproduce the bug,
1. Get a new computer/laptop that has zero PzC content installed on it.
2. Download and install the latest beta on to that machine.
3. Launch game.
4. Immediately start France scenario, mouse over bridge engineer, and see if that crashes.
#'s 15, 20, 21, and 24 are not easy to reproduce so I couldn't immediately test them myself. I left them as unsolved for now, even though they could very well be solved, and I'll wait a week or so. If no one else mentions these bugs, and I don't encounter them myself anymore, I'll consider them solved.
I'll add that to the third post. As an additional and possibly related issue, there is currently no way to select a unit with no remaining movement or firing action. For example, you cannot select a unit to rename it, and the left click air/ground toggle fails if both ground and air units are friendly units who have expended their actions.
#30. AD units are incapable of ambushing ground units.
If you blunder into the fog against an AD unit, ambush does not trigger. I have a save file if you need it.
#30. AD units are incapable of ambushing ground units.
If you blunder into the fog against an AD unit, ambush does not trigger. I have a save file if you need it.
31. Tactical bombers, with or without fighter escort, cannot initiate an ambush.
I blundered my AUX Ju-88 into the fog, attempting to use it to bomb the VH hex. The VH hex itself contained a tactical bomber, and you can see there is also a fighter escort. However, no ambush or interception occurred, my JU-88 just stopped. (And will probably get wrecked during the AI turn, but oh well its AUX lol)

And historically speaking, tactical bombers should totally be able to ambush other air units.
http://www.youtube.com/watch?v=zEnDjwXn ... re=related
I blundered my AUX Ju-88 into the fog, attempting to use it to bomb the VH hex. The VH hex itself contained a tactical bomber, and you can see there is also a fighter escort. However, no ambush or interception occurred, my JU-88 just stopped. (And will probably get wrecked during the AI turn, but oh well its AUX lol)

And historically speaking, tactical bombers should totally be able to ambush other air units.
http://www.youtube.com/watch?v=zEnDjwXn ... re=related
32. Units with less than 30 fuel cannot utilize full train movement. (unsolved)
Rail transport does not use fuel, but units with limited fuel totals suffer from movement restrictions.
http://img638.imageshack.us/img638/1720/trainki.jpg
33. Some Soviet aircraft are not properly aligned when stacked with ground units. (unsolved)
On larger units like tanks, these soviet aircraft are invisible.

Rail transport does not use fuel, but units with limited fuel totals suffer from movement restrictions.
http://img638.imageshack.us/img638/1720/trainki.jpg
33. Some Soviet aircraft are not properly aligned when stacked with ground units. (unsolved)
On larger units like tanks, these soviet aircraft are invisible.

Indeed, the game does not trigger ambush if defending unit cannot attack our unit in the first place. This allows many weaker units (with zero or very small attack ratings) to void combat. Otherwise, ambushes could be exploited to have 2 attacks per turn: you do a normal attack, then move to a hex where enemy unit supposedly is. If enemy unit is weak enough, the second combat would still be in your favor, even with some ambush penalties in place.Kerensky wrote:31. Tactical bombers, with or without fighter escort, cannot initiate an ambush.
I blundered my AUX Ju-88 into the fog, attempting to use it to bomb the VH hex. The VH hex itself contained a tactical bomber, and you can see there is also a fighter escort. However, no ambush or interception occurred, my JU-88 just stopped. (And will probably get wrecked during the AI turn, but oh well its AUX lol)
Um, no?Rudankort wrote:Indeed, the game does not trigger ambush if defending unit cannot attack our unit in the first place. This allows many weaker units (with zero or very small attack ratings) to void combat. Otherwise, ambushes could be exploited to have 2 attacks per turn: you do a normal attack, then move to a hex where enemy unit supposedly is. If enemy unit is weak enough, the second combat would still be in your favor, even with some ambush penalties in place.
Step 1. Download save file.
http://www.theonslaught.org/forums/atta ... 1300775224
Step 2. Load Save file.
Step 3. Grab Light Cruiser at 1,17.
Step 4. Fire at destroyer at 4,16.
Step 5. Move Light Cruiser to 4,14.
Step 6. ???
Step 7. Profit!
Upon further re-reading of what you wrote, I think I understand. In that save file, if you take away that submarine, and blunder the cruiser into that transport, no combat occurs, as a measure of protection for the transport which will get stomped even if it 'ambushed' a light cruiser. I'm not quite sure if I agree with this way of thinking, even though I see the logic behind it. I'll make a thread, since it's gone past bug reporting.
The 0 unit strength bug is still present. I have a save file for immediately after, so you can see the 0 str artillery unit.- Every time a game is finished, its log is saved to %My documents%My GamesPanzer CorpsReplay. If needed, these logs can be sent to me for investigation
Do u want that and/or the log?

Yes, please send both to me. You can send them to me directly, rudankort@rsdn.ruKerensky wrote: The 0 unit strength bug is still present. I have a save file for immediately after, so you can see the 0 str artillery unit.
Do u want that and/or the log?
Thx!
15. Enemy units morph into other units upon retreat, also skewering previous battle prediction numbers. (Unsolved)
Saw this bug again, don't have a save file though. It was the opening shot of the round, so I tried loading the autosave file to go back and see if it would glitch out again, but autosave did not work, it sent me back to a different scenario.
Does autosave not work for individual scenarios, is it only for campaign mode?
Saw this bug again, don't have a save file though. It was the opening shot of the round, so I tried loading the autosave file to go back and see if it would glitch out again, but autosave did not work, it sent me back to a different scenario.
Does autosave not work for individual scenarios, is it only for campaign mode?
Performed a test and got victory after capturing all objectives. Do note that you need to hold objectives during opponents turn to get victory.37 Pegged with a loss after taking last city on last turn.
This is by design. Number of core slots in this scenario (and in Kiev) is lower than in other previous scenarios. You should not place all your core in those scenarios and that is a bug.36 Could not replace core units after being KIA (Lost about 3)
I could embark Bulgarian artillery in rail transport and disembark it.35 Entrained a Bulgar Arty. It liked it so much it refused to detrain in Salonika or even back at its starting point city.
Good news: bug #17 should be fixed.
Bad news: cannot trap zero-strength bug. I was able to replay the game of Kerensky up to the point when that soviet gun was destroyed, and sure enough, it was removed from the map. :-/ In the save I see that the state of the game is clearly wrong (0-strength unit is in unit list and on the map while it should have been removed as soon as it dropped to zero), but I don't see under what condition my code can behave like that.
Bad news: cannot trap zero-strength bug. I was able to replay the game of Kerensky up to the point when that soviet gun was destroyed, and sure enough, it was removed from the map. :-/ In the save I see that the state of the game is clearly wrong (0-strength unit is in unit list and on the map while it should have been removed as soon as it dropped to zero), but I don't see under what condition my code can behave like that.
Shuffled off the Greece 'bugs'.
I'll look forward to #17 going away in the next beta, that'll be easy to test.
As for #24 0 strength bug, I have some observations to help you out.
It only ever happens when the unit I 'kill' is also forced to retreat. It never happens to a unit attacked by artillery or air units, this bug only happens after a direct engagement where the defender is forced back.
I wish I had the combat log, but I do remember what it said. PZ IVJ Kills X, Suppresses Y Artillery units. Where X > Current Artillery unit strength, but Y > X. I believe the numbers were 3, 6, 2 (X, Y, Strength).
Why is this bug so rare? Because

Kill is at 76%. Suppress is at 19%. This is fairly typical as the odds that 'suppress' will outnumber 'kill' is very, very rare, wouldn't you agree?
So try this.
1. Design a ground unit that is normal in every way, but artificially increase the 'suppress' % to a really high amount, say 80-100.
If that doesn't work, it may have to do with the order of the operation.
2.
For example, in that picture, there are a string of kills in front of the single suppress. What if the amount of suppress exceeded the defending unit strength appeared before enough 'kills' were rolled to equal the unit strength? Perhaps the game is being told to 'retreat Unit U because Suppression Y > Unit U Strength' and then receives the information to 'remove Z from Unit U Strength', thus resulting in the forced moving of a unit, even if it is 0 strength.
I image the order of operation would look something like:
Unit U attacked.
Unit U receives Y Suppression, and will be forced to retreat. (Save Unit U to 'forced to retreat' field)
Unit U receives X Kills, and is removed from play.
Unit U variable has been saved to a 'forced to retreat' field, which the game finally invokes after combat has been completed.
Unit U is retrieved from 'forced to retreat' field, given a negative or 0 strength value, and is now forced to retreat.
I don't know exactly what your code looks like or does, but this is what I suspect is happening from how I understand about how computers 'think'.
Try those 2 hypotheticals out, and lemme know what happens. If neither reveal the bug... well. I dunno, but I'm almost certain that they will.
Let me know about your progress with this bug, I'm curious if my theories were correct or way off.
I'll look forward to #17 going away in the next beta, that'll be easy to test.
As for #24 0 strength bug, I have some observations to help you out.
It only ever happens when the unit I 'kill' is also forced to retreat. It never happens to a unit attacked by artillery or air units, this bug only happens after a direct engagement where the defender is forced back.
I wish I had the combat log, but I do remember what it said. PZ IVJ Kills X, Suppresses Y Artillery units. Where X > Current Artillery unit strength, but Y > X. I believe the numbers were 3, 6, 2 (X, Y, Strength).
Why is this bug so rare? Because

Kill is at 76%. Suppress is at 19%. This is fairly typical as the odds that 'suppress' will outnumber 'kill' is very, very rare, wouldn't you agree?
So try this.
1. Design a ground unit that is normal in every way, but artificially increase the 'suppress' % to a really high amount, say 80-100.
If that doesn't work, it may have to do with the order of the operation.
2.
For example, in that picture, there are a string of kills in front of the single suppress. What if the amount of suppress exceeded the defending unit strength appeared before enough 'kills' were rolled to equal the unit strength? Perhaps the game is being told to 'retreat Unit U because Suppression Y > Unit U Strength' and then receives the information to 'remove Z from Unit U Strength', thus resulting in the forced moving of a unit, even if it is 0 strength.
I image the order of operation would look something like:
Unit U attacked.
Unit U receives Y Suppression, and will be forced to retreat. (Save Unit U to 'forced to retreat' field)
Unit U receives X Kills, and is removed from play.
Unit U variable has been saved to a 'forced to retreat' field, which the game finally invokes after combat has been completed.
Unit U is retrieved from 'forced to retreat' field, given a negative or 0 strength value, and is now forced to retreat.
I don't know exactly what your code looks like or does, but this is what I suspect is happening from how I understand about how computers 'think'.
Try those 2 hypotheticals out, and lemme know what happens. If neither reveal the bug... well. I dunno, but I'm almost certain that they will.
Let me know about your progress with this bug, I'm curious if my theories were correct or way off.
Thanks for sharing your thoughts, I checked them, and they also inspired me to check a few other things, but to no result: the code works as it should.Kerensky wrote: As for #24 0 strength bug, I have some observations to help you out.
...
Let me know about your progress with this bug, I'm curious if my theories were correct or way off.
The most amazing thing about this bug is that I could not repro it by replaying the log you have sent to me. The log contains all orders which you (and AI) give to the units, and so by executing the orders one by one I can see exactly how the game progressed. My code ensures that random numbers generated in replay are the same as they were in your original game, which means I get all the same combat results etc. in the process. So, before the final attack on the soviet artillery happens, the game on my PC is in exactly the same state as it was on your PC. If there were something wrong with the combat formulas, I would observe the same issue you observed. But I did not.
Is it possible that the log file you sent is actually from a different game? Perhaps you played this mission a few times?
Update: I watched the replay more carefully again. It should be the right one, same game from where the saved file also comes.
An important difference though: in saved game PzIVJ is at 14 strength and soviet 152mm gun is at 0. In the replay PzIVJ is at 13 strength while the 152mm gun retreats with 1 point of strength still left. All dice rolls are the same (I doublechecked this!) but combat results are different.
Here is the combat log I've got (alas, I cannot compare it with yours):

Another interesting observation: in saved game the tank has 4 ammo and the gun has 1. In my replay tank has 3 and gun 0. So in your game ammo was not spent in the combat which, incidentally, also generated a 0-str unit. Something clearly went wrong on your PC when the issue happened.
I still don't know what's going on here, but now we know a little bit more about this bug. If you encounter this issue again, please try to collect the following information:
- Saved game after attack
- Game log
- Combat log screenshot
- Autosave at the beginning of the turn when the issue happens
- Error log (%My Documents%/My Ganes/Panzer Corps/Log/log.txt)
An important difference though: in saved game PzIVJ is at 14 strength and soviet 152mm gun is at 0. In the replay PzIVJ is at 13 strength while the 152mm gun retreats with 1 point of strength still left. All dice rolls are the same (I doublechecked this!) but combat results are different.

Another interesting observation: in saved game the tank has 4 ammo and the gun has 1. In my replay tank has 3 and gun 0. So in your game ammo was not spent in the combat which, incidentally, also generated a 0-str unit. Something clearly went wrong on your PC when the issue happened.
I still don't know what's going on here, but now we know a little bit more about this bug. If you encounter this issue again, please try to collect the following information:
- Saved game after attack
- Game log
- Combat log screenshot
- Autosave at the beginning of the turn when the issue happens
- Error log (%My Documents%/My Ganes/Panzer Corps/Log/log.txt)
Update 2: I tried to modify your save to bring it to the state in which it must have been before attack. Gave PzIVJ one more attack action, moved soviet gun back to its original place (33,11), set its strength back to 6, set the correct random seed. Then I loaded the file and repeated the attack. It yielded the same result as in the log I posted above. I wonder if you will get a different result on your PC...
Modified save:
http://www.rudankort.me/gdfhfgjhgj/0strbug-2.pzsav
Modified save:
http://www.rudankort.me/gdfhfgjhgj/0strbug-2.pzsav



