By Lasse Jensen - Version 1.01a. Last Updated 02 February 2002 * - with thanks to Erik Tan, Graeme Carter and Luis Guzmán for additional information and/or corrections.

Scenario (SCN) Campaign Savegame (CSV) Single Savegame (SAV) PBEM (EML)
Name Start Size Name Start Size Name Start Size Name Start Size
Scenario data 00000h 22 Header 00000h 264 Header 00000h 264 Header 00000h 264
Player data 00016h 288 Game stat data 00108h 28 Game stat data 00108h 28 Game stat data 00108h 28
Hex Map data 0019Ah 10800 Scenario data 00124h 22 Scenario data 00124h 22 Scenario data 00124h 22
General Map data 02BCAh 140 Player data 0013Ah 288 Player data 0013Ah 288 Player data 0013Ah 288
Unit data 02C56h size Hex MAP data 002BEh 10800 Hex MAP data 002BEh 10800 Hex MAP data 002BEh 10800
General Map data 02CEEh 140 General Map data 02CEEh 140 General Map data 02CEEh 140
Setup data 02D74h 42 Setup data 02D74h 42 Setup data 02D74h 42
Blow bridge index 02DA4h 44 Blow bridge index 02DA4h 44 Blow bridge index 02DA4h 44
Leader data 02DD0h 720 Leader data 02DD0h 720 Leader data 02DD0h 720
Player dossier 030A0h 856 Player dossier 030A0h 856 Player dossier 030A0h 856
  HQ status 033F8h 1 HQ status 033F8h 1 HQ status 033F8h 1
Unknown (fill) 033F9h 9999 Unknown (fill) 033F9h 9999 Unknown (fill) 033F9h 9999
Name table 1 05B08h size Name table 1 05B08h size Name table 1 05B08h size
Name table 2 not fixed size Name table 2 not fixed size Name table 2 not fixed size
Unit data not fixed size Unit data not fixed size Unit data not fixed size
Campaign header not fixed 649 Section 2 header not fixed 17 Password not fixed 85
Campaign data not fixed 10000 Section 2 header not fixed 17
Campaign Unknown not fixed 500 Replay not fixed size      
Section 2 header not fixed 17 Replay not fixed size
           
  Replay not fixed size    

Back to top


There is a actually a 4th savegame format, the Network/multiplayer savegame, called *.MSV. Unfortunately PGII does not recognize this format anymore, but it is defined in the execute file. Probably the 10000 byte 'unknown' section found in all savegames, which is currently just fill with garbage, is reserved for this purpose.


The Scenario (SCN) file

Unlike the savegame formats, this just contains the needed game data to start a game. This also results in that you don't have the same options as in savegames. Even in the 5 data sections far from everything is workable as in the same section in a savegame. Many bit & bytes are taken directly from other external files, like equipment, regardless of what you enter in the bytes, in order to create the savegame file when you save the game.

Even thug it is a lot more difficult to make really wrong settings, do to much of the data is taken externally, you can still do! You can actually create settings that work in one savegame but not in others, like single vs. PBEM games.

 

The Campaign Savegame (CSV) file

The format show above is a bit misleading. A savegame consisted of two Parts, everything you see above is repeated two times, but not all data section are repeated in both! Confused?

Well a complete savegame consist of the current stats, that is the first part, - always on top of the file. The second part is the stat before the current turn. If you look at the data section for a campaign savegame, you will see the two last data sections named 'section 2 header' and 'replay'. The 'section 2 header' is ONLY found in the first part of the savegame NOT the second part, understandable enough since this section describes the 2nd part of the savegame! The 'replay' section is found at the bottom of Part 2 of the savegame, and thus is NOT included in any of the two parts, but is a independent section, that actually describes the different between the two parts of the savegame. Part two + the 'replay' should be the Part one stats.

Now just to confuse you a bit more. This two parts + the replay, is repeated again again for every turn played in the current scenario. This is why campaign savegames can be quite large at times, in the Mb of data. Its just turns store on top of each other. The newest turn always being on top.

Every time you start a new scenario in the campaign all the turns from the previous scenario are discarded. So a campaign savegame only contains turns from the current scenario that is being played.

The replay data can no more be accessed from inside the game, this is for the VCR function that was disabled in last minute.

 

The Single Savegame (SAV) file

The format show above is a bit misleading. A savegame consisted of two Parts, everything you see above is repeated two times, but not all data section are repeated in both! Confused?

Well a complete savegame consist of the current stats, that is the first part, - always on top of the file. The second part is the stat before the current turn. If you look at the data section for a single savegame, you will see the two last data sections named 'section 2 header' and 'replay'. The 'section 2 header' is ONLY found in the first part of the savegame NOT the second part, understandable enough since this section describes the 2nd part of the savegame! The 'replay' section is found at the bottom of Part 2 of the savegame, and thus is NOT included in any of the two parts, but is a independent section, that actually describes the different between the two parts of the savegame. Part two + the 'replay' should be the Part one stats.

Now just to confuse you a bit more. This two parts + the replay, is repeated again again for every turn played in the current scenario. This is why single savegames can be quite large at times, in the Mb of data. Its just turns store on top of each other. The newest turn always being on top.

The replay data can no more be accessed from inside the game, this is for the VCR function that was disabled in last minute.

 

The Play By EMail (EML) file

This savegame is particle sensitive to wrong setting from the original scenario its created from. Some settings in scenario can crash the PBEM savegame during replay, where in other savegames such setting will go unnoticed.

The format show above is a bit misleading. A savegame consisted of two Parts, everything you see above is repeated two times, but not all data section are repeated in both! Confused?

Well a complete savegame consist of the current stats, that is the first part, - always on top of the file. The second part is the stat before the current turn. If you look at the data section for a PBEM savegame, you will see the two last data sections named 'section 2 header' and 'replay'. The 'section 2 header' is ONLY found in the first part of the savegame NOT the second part, understandable enough since this section describes the 2nd part of the savegame! The 'replay' section is found at the bottom of Part 2 of the savegame, and thus is NOT included in any of the two parts, but is a independent section, that actually describes the different between the two parts of the savegame. Part two + the 'replay' should be the Part one stats.

Normally PBEM savegame consist ONLY of these two section. Different turns are NOT stored on top of each other. ONLY the current and the last turn is stored. However there is a bug in PBEM, where the file suddenly begins to grow turn for turn. this is caused by the fact that different version CANNOT play against each other. IF two different versions play against each other, like v1.00 vs. v1.02 each version will include its own two Parts, just putting them on top of each other. This also results in the 'replay of your own previous turn', where, if you replay the turn, see you own previous turn replay, instead of the correct current turn of the enemy. The correct replay IS in the savegame, but because each version reads from its own stored Parts, it replays your own replay.

NEVER play against each other with different version, not only is there rule changes from version to version, but also this weird replay thing will happen. If a PBEM savegame grows over 100K you got such a case.

Also unlike the other savegame the replay section is viewable from in-game, by using the replay bottom.

 

Scenario Data
Number of bytes Read as Useable values Explanation
1 Byte 0h=Show
1h=Don't Show
2h-FFh=Show 
Scenario Selection. This byte determinate if a single scenario shows up in the scenario select list in the game. This is basically for hiding campaign scenarios, that are not meant to be played as single scenario. A scenario with this set is fully workable in a campaign, but does not show up as a single scenario.
1 Byte ? Unknown
1 Byte ? Unknown
1 Byte ? Unknown
2 Word Entry number Scenario name in game. This ref. to the *.TXT file with the same name as the *.SCN file.
Its the entry number in this text file to display on the "turn panel" as scenario name. This does NOT change the name of the scenario in the scenario select list, as its always the first name in the same text file that is used.
1 Byte 0h=fair
1h=overcast
2h=rain
3h=snow
Atmospheric conditions. This is only a guideline on how the weather conditions is going to be. Ex 3h (snow) will mean that it is more likely to snow them the others. Some latitudes does not allow all kind of weather. Ex it is pointless to set snow in Africa, as the game will not do it.
1 Byte 0h=Africa
1h=S-europa
2h=N-europa
3h=E-europa
Atmospheric latitude. SSI themselves used South-Europe for USA scenarios, however if you make a Alaska scenario, its probably better to use North-Europe.
2 Word 1h-31h Date day. If outside range, the date will not be displayed.
2 Word 1h-12h Date month. If outside range, the date will not be displayed.
2 Word Any value Date year. 1900+ number entered. In order to get per-1900 years you will have to let the counter "rollover", which it will do when 1900+number is over 65535 (the max a word can hold). It rollover to zero if the value is F894h or higher. But the game will not display years from 0-1600, however years 1601-65535 will be displayed just fine.
1 Byte Any value Turns for brilliant victory. Note in case of more than 40 turns weird and unintended prestige allocation will happen. Read allocation of turn prestige in Player data.
1 Byte Any value Turns for victory. Note in case of more than 40 turns weird and unintended prestige allocation will happen. Read allocation of turn prestige in Player data.
1 Byte Any value Turns for tactical victory. Note in case of more than 40 turns weird and unintended prestige allocation will happen. Read allocation of turn prestige in Player data.
1 Byte ? Brilliant hex turns (possible obsolete)
1 Byte ? Victory hex turns (possible obsolete)
1 Byte ? Tactical hex turns (possible obsolete)
1 Byte Any value Turns per Day. Number of turns to proceed before the date changes one day.
1 Byte 0h=dry
1h=frozen
Ground conditions. Has influence on units capability to move is different terrains.

Back to top


 

Player Data
This data is repeated 4 times, for the 4 players in the game.
Number of bytes Read as Useable values Explanation
1 Byte 00h-1Fh Main Country. This is the main country of the player. This is also the byte that decide how many players is in the game at start of a scenario. If this value is zero the player is not in the game. See appendix for country listing.
1 Byte 00h-1Fh Minor Country 1. See appendix for country listing.
1 Byte 00h-1Fh Minor Country 2. See appendix for country listing.
1 Byte 00h-1Fh Minor Country 3. See appendix for country listing.
1 Byte 00h-1Fh Minor Country 4. See appendix for country listing.
1 Byte 0h=defensive
1h=aggressive
Attack Stance. This is for the AI. Note a bug is present here. If all 4 minor countries is used, the "Attack Stance" byte will be interpreted as 5th minor country and at the same time work as normal "Attack stance", resulting in the "Austria" will be a 5th country, as "Austria" has the country code 1h.
1 Byte Any Air transporter available. Number of transporter available on Airfields hexes.
1 Byte Any Ship transporter available. Number of transporters available on port hexes.
2 Word Max 64h (100) Number of units. This value should not be messed with, unless you know exactly what you are doing. This is the number of current units for this player.
2 Word Max 64h (100) Number of units. This value should not be messed with, unless you know exactly what you are doing. This is the number of additional units placed on the map when using the PGII editor. Any additional editing will add this number to the one on top and a new number of additional units will be added here. The two number of units can combined not exceed 100 for one Player. Note in v1.00 of Panzer General II  this number is only 75.
2 Word ? AI Arrival (possible obsolete)
2 Word ? AI Bucket (possible obsolete)
1 Byte 0h=side 1 (Axis)
1h=side 2 (Allied)
Side. The side of this player.
30 Word Any value Turn Prestige
10 Word Any value Turn prestige. In the retail version (all versions) these 10 byte also work as turn prestige. If a scenario is more than 40 turns long any following data in the file will be interpreted as prestige allocation, which they are not meant too, resulting is weird prestige allocations. Further more these 10 byte is in the precode version NOT assigned as turn prestige, but different things, like experience level of replacement etc... Things that are sadly no more found in the retail version.

Back to top


 

Hex Map Data
The hex map is 45x40 in size, thug the playing size may be much smaller. The upper left corner is (0,0) and the lower right is (44,39) 
The largest map supply by SSI is 44x39 (0,0)(43,38). The MAP is divided into rows and columns. Each row is 45x6 byte big, 45 hexes each 6 byte big. The are 40 columns. If a MAP is smaller the the 45 row (All SSI maps are) the rest bytes is left unused.
Number of bytes Read as Useable values Explanation
1 Bit selecting Byte
Bit1-5
See appendix for countries

Bit6-8=Player
00h =non
01h =Player1
02h = Player2
03h = Player3
04h = Player4
05h = Player5 (not used)
06h = Player6 (not used)
07h = Player7 (not used)
Ownership of Hex. What Player and what flag is displayed on this hex. Note the flag does not have to be one of the country assigned to the player.
1 Bit selecting Byte No bit set=non
bit1=player1
bit2=player2
bit3=player3
bit4=player4
bit5-8=Unit supply zone.
Supply hex. Unit Supply zone is something unused, it is just a value the SSI editor set on that hex if a unit is close to the hex or on the hex. Possible some leftover from some advanced supply rules or Zone of Control, that is no more used. Bit5 is set on every hex within a unit sight range. Bit6-7-8 seams to be random set.
1 Bit selecting Byte No bit set=no
bit1=no effect
bit2=Axis Brilliant victory
bit3=Axis Victory
bit4=Axis Tactical victory
bit5=Allied Brilliant victory
bit6=Allied Victory
bit7=Allied Tactical victory
bit8=no effect
Victory hex. Again here is leftover from some advanced victory system. There is no more different in victory types on hexes. Possible used in conjunction with the hex victory found in Scenario data. SSI uses in there scenarios 2h:Axis Brilliant victory (2) and 0Fh:Allied Brilliant victory(16). The SSI Editor used default OEh:All Axis victory (14) and 70h:All Allied victory (112). 

It is required that a victory hex is placed on a hex own by a player of the other side. If no such hexes exist, a side will win by taking ANY kind of hex from the other side.

1 Bit selecting Byte No bit set=no
bit1=Hex Prestige.
bit2=no effect
bit3=Player1
bit4=Player2
bit5=Player3
bit6=Player4
bit7=no effect
bit8=no effect
Deployment hex. The "hex prestige" is if the hex gives prestige. This bit is set if the hex is taken by the other side, indicating that the hex has now give prestige and cant do it again. If you set this upfront, the hex will not give prestige at all.

If a unit stands, at start, on a hex with the deployment flag set it becomes a core unit. This is only true if the scenario is played thug a campaign, not if its played as a single scenario. And again this is only true if the scenario is the first in the campaign. All units standing on deployment hex in ALL other scenarios in the campaign, are ignored. The are not displayed and the do NOT become part of the game.

2 Word Entry number Name. Link to the Text describing the hex. This ref to a *.TXT file with the same name as the *.SCN file.
Entry number in the text file.

Back to top


 

General Map Data
Number of bytes Read as Useable values Explanation
20 Null terminated string Char Map name. This is the name of the map file used for this scenario
20 Null terminated string Char Scenario intro TXT filename. This is the name of the text file for the scenario carrying the text you read when you press on a scenario in the game.
1 Byte 0h=SSI (gray)
1h=user (Blue)
Scenario type. Blue scenario used *.ply for text file with the intro text. Gray uses *.txt files.
99 Byte ? Unused.

Back to top


 

Unit Data
In all savegame types the Unit data is started of by 2 byte (read as a word), which is the number of units in unit data. These two bytes are NOT found in a scenario. The following breakdown is continued for every unit in the game. Even thug the SSI editor allows a max of 332 units to be placed on the map, it should be counted on as many as 400 units, as the max per player is 100 and 4 players.
Number of bytes Read as Useable values Explanation
1 Bit selecting byte Bit1 : ?
Bit2 : ?
Bit3 : Is an Auxiliary unit
Bit4 : ? (for most units)
Bit5 : Used "re-supply" action
Bit6 : Used "move" action
Bit7 : Used "fire" action
Bit8 : Used "support fire" action
Unit Status 1.  

All units is default core units. Its only when bit3 is set it becomes a aux unit. So you don't set core units, you set aux units! In campaign scenarios any unit standing on deployment hexes in the first scenario get this bit removed, and thus is a core unit. In single scenarios and PBEM all unit get the bit3 set, and thus are all auxiliary units. 

Bit4 (8) is normal, if not always, set on all core units in a campaign,- that goes for start core, bought units during the campaign as well as prototypes. But it seams not to be needed as, as said units are default core unit, and setting zero bits also produces a core unit. Auxiliary units normal have this set also and bit3. I don't currently know the point of bit4

Bit5 (16) is set on a unit at various times. A unit with this set is automatically unable to move any further, but can still attack. This is why when you take re-supply or reinforcements both bit5 and bit7 get set or else you would still be able to shoot. If a unit uses both its 'move' and 'fire' action, this also automatically gets set. If any of bit5-6-7 gets set you can no more take re-supply nor reinforcements.

Bit8 (128) is for units that can support fire, like fighters. If this is set a fighter has done its support fire and can no more do it. If a fighter gets the 'Skilled Interceptor' leader this never get set, thus it can do any number of support actions. The 'overwatch' leader also used this bit.

1 Bit selecting Byte Bit1 : ?
Bit2 : Name source 2
Bit3 : Name source 1
Bit4 : Count against prestige
Bit5 : Not count against prestige
Bit6 : All units
Bit7 : All units
Bit8 : ?
Unit status 2. 

Bit2 (2) this bit indicate if the name has been changed during a turn. If bit2 gets set at the same time as bit3 (which it should not), it will 'win' the battle. The bit ref. to the internal Name table 2 -  Note if no internal Name table 2 exist, such as in a scenario file, the game will write (null) on the unit. If such a unit get its name changed in the game, ALL units with bit2 set, get changed to the new name. This is also the case if Unit name entry ref. to an entry that is not in the Name table 2

Bit3 (4) is handled a bit different depending if its a scenario or a savegame. In case of a scenario this bit selects the name for the unit to come from  the text file going with the scenario. In case of a savegame the external text file with the same name as the scenario has been converted into Name table 1, and thereby it now ref to the internal Name table 1 and not the external text file anymore - which contains the same names.

If neither bit2 nor bit3 is set the Unit name entry is also set out of function and the name is set according to the Unit appearance code, not Unit code.

Bit4 (8) is set on Core units you buy during a campaign and indicates that the unit DO count against the victory prestige allocation for the scenario.

Bit5 (16) is set on Core unit you have from the start ONLY in a campaign (that is the very first scenario) and indicates that the unit DO NOT count against the victory prestige allocation for the scenario.

Neither bit4 nor bit5 is set on auxiliary unit. If both are set, which is the case for prototype units, bit5 'wins' the battle. Bit4-5  is an easy way of finding which units are Normal core (buy), start core and prototype unit.

Bit6-7. Not sure what this means, but all units have these two set, and they should be set. The game can actually crash or lockup if you view a unit that does not have both set. Occasional only one of them are set?

A slight bug or maybe done intentional, as SSI may have thought that they get there name changed anyway. Core units, a player has from the start,  that is costumer named from the start - is set as name changed units. They should in theory be set with bit3-5-6-7, but they are set with bit2-5-6-7 and the name is included in Name table 2,- as well as Name table 1

1 Byte ? Unknown.
1 Byte ? Unknown.
1 Byte ? Unknown.
1 Byte ? Unknown.
2 Word ? Unknown.
2 Word Any value Unit name entry. This is the entry number in the table from where the unit names comes. Please read Unit status 2 for further details.
2 Word 00h-2Ch X coordinates. Hex row. This number should not be higher than 44, as this is the max number of rows in the game. The game will play find with higher values, but will crash instant if you try to go to the unit.
2 Word 00h-27h Y coordinates. Hex column. This number should not be higher than 39, as this is the max number of column in the game. The game will play find with higher values, but will crash instant if you try to go to the unit.
2 Word Max 331 Total unit number count. Yes this is weird number. This is the maximum number allowed to place on the map by the SSI editor. Even thug the max number of units per player is 100, and thereby the overall max should be 400, never the less it is 332. Note in v1.00 the max number per player is 75, and thereby the max overall number 300. Anyway this number should match all players Number of units put together. Starting from 0 to max 331.
2 Word Max 99 Player unit count. This number should be the same as Number of units found in Player data. Max 100 per player. Starting from zero to max 99.
2 Word Value from Efile Unit code. This is the  unit. If the value is not found in the equipment file, PGII shows the bridging icon.
2 Word Value from Efile Transport type. The equipment code of the assigned transporter, if any, which appearance a unit will change to if the transporter is capable of moving longer then the unit. Please note air- and sea transporters is NOT assigned transporters, but simply stat and look changes of a unit. Look "unit appearance" just below.
2 Word Value from Efile Unit appearance. This is how the unit appear on the map, and which stats it has. Normal this should be zero for any unit or you will/can end up with some weird cases. This is meant for units in sea- and air- transporters. The value will then be the air- or sea- transport code, that way the unit will appear as a transporter with the stats of a transport, but ones unloaded it uses the stat and appearance of the normal unit code. This is because air- and sea- transp. is not a assigned transporter like a normal land transporter, but rather a different appearance of the unit.
2 Word ? Unknown
2 Word Any value Experience level. This does nothing other than hold current running experience total. Will run over to zero at 65535.
2 Word Value from Efile Unit mount code. Unit mount code should almost always be the same as the unit code. This is the code a unit un-mount to by the beginning of a new turn. This is in order to find "its way back" from transporter mode, which the unit will change to if the assigned "transport type" is capable to move longer. In case of Air- and sea-transporters this code should be the same as the unit appearance code or the you will have weird mount/un-mount as the unit moves.
1 Byte 00h-0Fh Leader index. This is the link to the leaders for this unit, store in the "Leader data" in a savegame. As there can only be 15 leader per player (there is only room for 15), setting a number higher than 15 will not do you any good.
1 Byte Any value Leader chance. Every time the experience bar is increased (up to 5 ) there is a random chance of getting a leader. The odds for this start at 10%. This is because the routine generates a random number between 0 and 100 and compares it with [10+ leader chance']. If the random number is less, then you get a leader. When you first start, leader chance' is zero, and so the chance is 10%. However if you DON'T get a leader this time, the routine generates another random number between 0 and 10, ADDS it to the old value in "leader chance" and puts this new value in "leader chance"! So the next time you try for a leader, the odds have increased a bit in your favor. This means that if you DEFINITELY want a unit to have a leader on the next experience bar increase, put a 90 into "leader chance". This makes the odds 90 + 10 = 100%!!!! Could be useful for those scenario/campaign designers who place units with 199 experience as a trap for the unwary player. Any value over 90 will also generate a leader ever time.
1 Byte 00h-FFh Experience level indicator(bars). A number higher then 5 will not show more then 5 blocks (there is no more graphic for this), but is will work as a higher experience. A 255 bar unit is virtual indestructible. Automatically this will not go higher then 5 by the game, but manual you can set it higher.
1 Byte 00h=Unit not in game
01h=not deployed
02h=deployed
Unit deployment. This is the status of the unit, in terms of deployment. The "Unit not in game" is set in campaign games. A scenario, in a campaign, that has units standing on deployment hexes at start of the scenario (except the very first scenario in the campaign), the units gets a zero set, and vanish from the game. This is how you can use scenarios as single and in campaigns where some units are in the single version and not when play thug the campaign. "Deployed" and "not deployed" is just if the unit is on the map or in the deployment zone (the pull up bar)
1 Byte 00h=player1
01h=player2
02h=player3
03h=player4
Player. The Player this unit belongs too. Should not be changes as a lot of other values need to be correct too, in order to shift player.
1 Byte 0h=Axis
1h=Allies
Side. The side this unit belongs too.
1 Byte Set countries in Efile. Country. Country displayed on the unit. Can only be changes within the boundaries of owner countries in the Equipment file.
1 Byte Any value Lasting Suppression. This is the Current number of strength point that is suppressed as LASTING suppression.
1 Byte Max 14h Current strength. This is the current strength of a unit, can be over (over strength) or under (casualties) the original strength. Thug you can set this value as high 255 in some cases, it depend very much on what unit it is (core or aux)  and what side it is from. The problem is the graphic used to display the strength point. When PGII runs out of graphic to display it will crash the game. Each side and type has its own graphic, with 1-15 is numbers and additional 5 icons for 16-20 in strength. If you go higher it will run into graphic used by other units and high enough run completely out of graphic, which crashes the game.
1 Byte Any value Remaining Movement range. Current remaining movement points for this turn. Will be reset to the set movement range for this unit type in the equipment file,  by the end of every turn.
1 Byte Any value Remaining Fuel. Current remaining fuel points. Ones this number goes under the value set for this unit type in the equipment file, the re-supply bottom will light up. A unit can max re-supply to the value from the Equipment file. 
1 Byte Any value Doublet ammunition count. Remaining ammunition in double the amount. The reason for this is the ”Fire Discipline” leader. Thug the readme says is uses ammo at half rate, it actually uses it at a 1:1 rate, its all the other units that uses it a double rate, thus the double ammunition count. This can result in the last desperate shoot from artillery (but not only artillery), because when the ammunition counter in the game says the unit has 0 it can in fact have both 0 and 1. It’s often seen in the desert, because it has harsh re-supply rules, resulting in un-even re-supply. More than one unit beside a re-supplying unit also results in un-even re-supply, so it can happen in every map.
1 Byte Any value Entrenchment. The entrenchment value of a unit.
1 Byte Unit Class value Entrenchment ticks/counts. Number of counts for next Entrenchment increase. The is actually duel functioning. When a certain number of counts has been reached, corresponding to the number of turns a units has stood still on a hex,- which are different from class to class and terrain in question, this increases the entrenchment of the unit. This is the byte found just about. The count is in two's, like 2-4-6...... If you increase this number really high, so it contains several count circles it will increase the entrenchment of the unit by the more then a one increase.
1 Byte ? Unknown
2 Word ? Unknown
2 Word ? Unknown
1 Byte Any value Hits. Number of hits this unit has sustained by enemy units. For every hit 2 point is taken of the units defensive values. Defensive values cannot go into negative, so after this number have taken away all the units defensive values, increasing it further will not do any good.
2 Word 00h=6 a clock
04h=3 a clock
08h=12 a clock
0Ch=9 a clock
Unit direction. 0h-0Fh counter clockwise. Please note the game WILL crash if you enter a value higher the 0Fh here. Only 4 positions are show here, but you can use all values between 00h and 0Fh.
1 Byte 0h=on map
1h-FFh=turns to arrival
Arrive as reinforcement. They arrive at the XY set above. "On Map" can both mean the unit is on the nap or in the deployment zone, e.g. not yet deployed.
1 Byte Max 14h Original strength. This is the max strength you can reinforce to if you have prestige and current strength is under original strength. Read Current strength for details. WILL crash the game is set too high!
1 Byte Any value Air defense destroyed. Number destroyed.
1 Byte Any value Anti Tanks destroyed. Number destroyed.
1 Byte Any value Artillery destroyed. Number destroyed.
1 Byte Any value Infantry destroyed. Number destroyed.
1 Byte Any value Recon destroyed. Number destroyed.
1 Byte Any value Tanks destroyed. Number destroyed.
1 Byte Any value Fighter destroyed. Number destroyed.
1 Byte Any value Bomber destroyed. Number destroyed.
1 Byte ? Unknown
1 Byte ? Unknown
1 Byte ? Unknown

Back to top


 

Name Table 1
This contents everything from the TXT file, with the same name as the used scenario file. Everything from this file is included, regardless of any hex or unit actually uses the name. There is no fixed size for every entry, but every entry has a sort of header.
Number of bytes Read as Useable values Explanation
2 Word Any value Number of entries. This is the number of name entries in this table. Do to not know how many entries are in the table, everything after the black line is repeated for every name.
       
2 Word Any value Entry number.
2 Word Max 20 Length of entry. The game allows no more than 20 char for the name thus lenght can max be 20.
xx Array char Name.

Back to top


 

Name Table 2
This contents names of unit that get changed during a game. There is no fixed size for every entry, but every entry has a sort of header.
Number of bytes Read as Useable values Explanation
2 Word Any value Number of entries. This is the number of name entries in this table. Do to not know how many entries are in the table, everything after the black line is repeated for every name.
       
2 Word Any value Entry number.
2 Word Max 20 Length of entry. The game allows no more than 20 char for the name thus lenght can max be 20.
xx Array char Name.

Back to top


 

Leader Data
There is room for max 15 per player, making a total of 60 leader in one game where all 4 players are in. The data for player one is first than player two........
Number of bytes Read as Useable values Explanation
1 Byte 00h=Slot not used
01h=Slot used
Leader slot status. The slot can/will still be used even if its set to zero, as long as Leader index links to it.
1 Byte ? Unknown
1 Byte ? Unknown
1 Byte ? Unknown
1 Byte ? Unknown
1 Byte ? Unknown
1 Byte ? Unknown
1 Byte ? Unknown
2 Word Any value Name entry. This ref. to an entry in the external file  'names.txt'
1 Byte 01h-22h Random leader attribute. This value should really only be in the range 08h-22h, as the ones before are they class leaders. But they do work here also. See Leader appendix for the different leaders
1 Byte 01h-22h Class leader attribute. This value should really only be in the range 01h-08h, as the range after are they random leaders. But they do work here also. See Leader appendix for the different leaders

Back to top


 

Setup Data
From here is the current basic setup data read at the start of each turn.
Number of bytes Read as Useable values Explanation
1 Byte ? Unknown
1 Byte ? Unknown
1 Byte ? Unknown
1 Byte ? Unknown
1 Byte ? Unknown
1 Byte 00h=Play
01h=Don't play.
Replay Status. Since replay is only available in PBEM games it apply only to the *.EMLfile. If you put a 01h here the replay will not play at all, even thug it is available.
2 Word Any value Current turn. This is the number of turns that has passed.
2 Word 00h=fair
01h=overcast
02h=rain
03h=snow
Atmospheric conditions. It is from here the current weather is taken, as it can change every turn. The Atmospheric conditions found in scenario data is only the guideline for the very first turn.
2 Word ? Unknown
2 Word ? Unknown
2 Word ? Unknown
2 Word ? Unknown
2 Word Any value Current prestige for player 1. This is the currently available prestige to spend for player one.
2 Word Any value Current prestige for player 2. This is the currently available prestige to spend for player two.
2 Word Any value Current prestige for player 3. This is the currently available prestige to spend for player three.
2 Word Any value Current prestige for player 4. This is the currently available prestige to spend for player four.
2 Word Any value Prestige modifier setting for player 1. General note for all players modifier. Even thug you can set the prestige modifier to anything you want, it should be noted that current prestige can hold a max of 65535 point and will then rollover to zero. So if you set the modifier really high, like 50000, current prestige may rollover all the time, thus it really don't help you much. Keep it under 1000 and it should work fine.
2 Word ? Unknown
2 Word Any value Prestige modifier setting for player 2.
2 Word ? Unknown
2 Word Any value Prestige modifier setting for player 3.
2 Word ? Unknown
2 Word Any value Prestige modifier setting for player 4.
2 Word ? Unknown

Back to top


 

Header Data
Number of bytes Read as Useable values Explanation
12 Array of Char Char ID string. You can write anything here, as the game does not actually use it. The last version used on the savegame will with its ID. The ID string ref. to a ' report.txt' created by SSI, which traces are internal in the execute file.

Current versions of Panzer General II will write;
v1.00 will write "Tue Sep 30 1" (Tue Sep 30 14:12:24 1997) UK+US+German (there is no official French v1.00)
v1.01 will write "Thu Oct 9 1" (Thu Oct 9 16:42:14 1997) French
v1.01 will write "Tue Oct 21 1" (Tue Oct 21 11:13:10 1997) UK+US+German
v1.02 will write "Fri Jan 9 1" (Fri Jan 9 13:41:06 1998) UK+US+German+French

1 Byte ? Unknown. Always 0
1 Byte ? Unknown. Always 1
200 Array of Char Char The describing text you can write at the end of turn.
50 Array of Char Char More describing text. The more describing text is the same as the 200 byte above, but you are not allowed to use them. The savegame text box  only allows you to enter 200 byte of text, but there is room for 250 byte. It will however read and show all 250.

Back to top


 

Game stat Data
Number of bytes Read as Useable values Explanation
1 Byte ? Unknown.
1 Byte ? Unknown.
2 Byte Unit number Unit Selected. This is the current unit of the current player that is selected.

This next section is repeated 4 time, for the 4 players

1 Byte 00h=no
01h=yes
Player is in game. This decides - alongside the main country - if this player is in the game.
1 Byte 00h=no
01h=yes
Player has played his turn. Every time a player has played his turn a 01h is set here. An exception to this is the last player, that would be player 2 in a 2 player game, player 3 in a 3 player game ...etc. The last player never get it set, as the whole thing resets to zero when the last player has played, indicationg that its the first player turn again.
1 Byte 00h=Human
01h=AI
Who is this player. This is initial read of the setting you make in the scenario select list. For PBEM player 2 automatically becomes human. In campaign Player 2 automatically becomes the AI.
1 Byte 00h=Aggressive
01h=defensive
Players attitude. Initial this is read of the Attack Stance setting. 
1 Byte 00h=Axis
01h=Allied
Players side. Initial this is read of the Side setting. 
1 Byte ? Player Unknown.

Back to top


 

Player Dossier
Number of bytes Read as Useable values Explanation
50 Array of Char Char Player name. Original random selected from 'names.txt', but you can change it during the game. 

Here is the deal; In the game you are only allowed to write a name of max 20 char, but the game actually saves back as a 50 char name. It just fills the remaining with 00h. It will display all 50 char as the name if they are filled.

42 Array of Char Char Presumably this is more name text!. The game does not write back to these bytes, but it does read them, but its a bit kinky and I cannot be sure its really meant to be more text, cause the game engine will continue to display text as long as it does not encounter 00h. Even displaying the remaining bytes, that's the following bytes, as name text if it does not encounter a 00h. Maybe it was meant for some other purpose that was never implanted (or disabled)
4 Double word max 2 Billion AD Lost. Number of lost AD units, including Core as well as Auxiliary.
4 Double word max 2 Billion AT Lost. Number of lost AT units, including Core as well as Auxiliary.
4 Double word max 2 Billion ART Lost. Number of lost ART units, including Core as well as Auxiliary.
4 Double word max 2 Billion INF Lost. Number of lost INF units, including Core as well as Auxiliary.
4 Double word max 2 Billion REC Lost. Number of lost REC units, including Core as well as Auxiliary.
4 Double word max 2 Billion TK Lost. Number of lost TK units, including Core as well as Auxiliary.
4 Double word max 2 Billion FTR Lost. Number of lost FTR units, including Core as well as Auxiliary.
4 Double word max 2 Billion TAC Lost. Number of lost TAC units, including Core as well as Auxiliary.
4 Double word max 2 Billion AD Killed. Number of killed AD units. 
4 Double word max 2 Billion AT Killed. Number of killed AT units.
4 Double word max 2 Billion ART Killed. Number of killed ART units.
4 Double word max 2 Billion INF Killed. Number of killed INF units.
4 Double word max 2 Billion REC Killed. Number of killed REC units.
4 Double word max 2 Billion TK Killed. Number of killed TK units.
4 Double word max 2 Billion FTR Killed. Number of killed FTR units.
4 Double word max 2 Billion TAC Killed. Number of killed TAC units.
2 Integer Max 32767 Number of Brilliant Victories.
2 Integer Max 32767 Number of Normal Victories.
2 Integer Max 32767 Number of Tactical Victories.
2 Integer Max 32767 Number of Loses.

The next part needs a little explanation. It is 50 byte representing the max 50 scenarios in a campaign. It is used to display the medal on the dossier screen, and at the same time you can see in which scenarios  the player got which win (or lose)  condition. As the player jumps to different path in a campaign, as do the settings. So its not necessary in a row the victory conditions are set, it depends on the path in the campaign. The dossier will display the first 18 non-03h byte it finds. Unfortunately it cant display more than that, even thug a campaign can hold as many as 50 scenarios.

50 Byte 00h=Brilliant
01h=Normal
02h=Tactical
03h=Lose
Medal's display. All 50 byte is default filled with 03h (lose). This is fully independent of the Number of different victory conditions set in the above 4 set of integer.

Back to top


 

Password
Well the passwords is in clear text, so much for the secret of it!
Number of bytes Read as Useable values Explanation
21 Null Terminated String Char Password for Player 1
21 Null Terminated String Char Password for Player 2
21 Null Terminated String Char Password for Player 3
21 Null Terminated String Char Password for Player 4

Back to top


 

Section 2
Well this has to do with the 2nd section in PBEM game.
Number of bytes Read as Useable values Explanation
2 Word Any value Size of section 2. This is the size of the 2nd section in a savegame.
2 Word ? Unknown
2 Word ? Unknown
2 Word ? Unknown
2 Word ? Unknown
2 Word ? Unknown
1 Byte ? Unknown
1 Byte ? Unknown
1 Byte ? Unknown
1 Byte ? Unknown
1 Byte ? Unknown

Back to top


 

Campaign Header
Number of bytes Read as Useable values Explanation
2 Word 00h-31h Current scenario. This number is the  current scenario in the campaign being played.
21 Null terminated String Char Campaign file name. The filename of the campaign being played.
2 Word ? Unknown
2 Word ? Unknown
50 Byte 00h=Not played
01h=Played
Played scenarios. This represent the 50 possible scenario in a campaign, if they have been played or not. Used for the 2nd goto option in a *.cam file.
50 Byte 00h=Brilliant
01h=Normal
02h=Tactical
03h=Lose
Victory condition. All 50 byte is default filled with 00h (BV). This represent the 50 possible scenario in a campaign.
20 Byte ? Unknown
2 Word Any value Prototype chance. Current chance directly in % for a prototype + 20%. The chance start out by 20%, so even if the number is zero you have a minimum of 20% chance of getting the prototype. Every time you get a BV and do NOT get the prototype this number increases by 20%. When you do get the prototype this number goes back to zero, and thus the default 20%. 

However it’s not enough that the chance says you have to have a prototype, there must also be something available for you to get. A prototype is assigned from equipment 11 month past the start date of the next scenario after the one you got the prototype in. Sounds weird? Ok if you first scenario in the campaign starts say Aug41, you get the BV, and next scenario you get to because of the BV start say Dec41, you will get a prototype units that has an available date ranging from Jan42 to Nov42. You don’t get prototype units that become available in the same month as the scenario starts. If no such equipment is available you will get no prototype even if the counter says 100%. The counter will however stay a 100%, so as soon as you get another BV and equipment is available you will get a prototype unit.

The next 500 byte is for battle Honors of core units. Only core units have battle honors. This represent max 100 core unit of 5 byte each, ranging from unit number 0 to 99. That is the Player unit count number given to a unit. Max 5 battle honors can be given to each unit.

1 Byte 01h-32h Battle honor 1. The number represent the scenario it was given in. The game will only display as many of them as the unit has experience bars, so it does not help to set all 5 of them if the unit does not have the bars, they will not be displayed. If more BH carry the same scenario number they will be displayed on the same line. Note scenario numbers are normally counted in 0-49, while battle honors number are counted in 1-50. 
1 Byte 01h-32h Battle honor 2. The number represent the scenario it was given in. 
1 Byte 01h-32h Battle honor 3. The number represent the scenario it was given in. 
1 Byte 01h-32h Battle honor 4. The number represent the scenario it was given in. 
1 Byte 01h-32h Battle honor 5. The number represent the scenario it was given in. 

Back to top


 

Campaign data
This represent the 50 scenarios possible in a campaign. The room is reserved regardless of how many scenario actually is in the campaign. 50 scenario of 200 byte each, is 10000 bytes. Like the medals, they jump as the player jump in the campaign path.
Number of bytes Read as Useable values Explanation
200 Array Char Name of scenario. This is not the filename, but the in-game name of the scenario. Can be up to 200 char long. Will be truncate at 200 char.

Back to top


 

Blown Bridge Index
The ref. to the graphic displayed when a bridge is blown.  This is the BR_xx.shp found in the Panzer2.dat. This is not an overview of the map, but represent the bytes for the internal Bridge table in the execute file. The max number of bridges on any of the original SSI maps is indeed 44, this is why this section is 44 bytes big. Thats map 18. The numbers is simply representation of the way the graphic is lined up in BR_xx.shp, which again link directly to the order of X,Y in the execute file bridge table.
Number of bytes Read as Useable values Explanation
44 Byte 00h=Ok
01h=Blown
Blown Bridge.

Back to top


 

HQ status
Number of bytes Read as Useable values Explanation
1 Byte 00h=In Scenario
01h=In HQ
HQ Status. This ref. to where you currently are. HQ is where you can over strength and upgrade. ONLY core units can be upgraded or over strength here. Works in all savegame types.

Back to top


 

Replay
This is a very complex section to explain. The section is a series of action code, near everyone is different in length (byte) Every action of your unit is recorded. The byte in (xx) is the total length of that action, including the action code it self. As one can see this section is a LONG way from complete explored. It's going to take some time before I am finished with this.

It should be noted that I have found one bug in this section. If you attack a unit in a transport, where the units cannot un-mount before the attack, there will be recorded a mount in the replay as being your unit. Thug I have found that the game does not crash from this, it seam to be wrong to me.

Number of bytes Read as Useable values Explanation
2 Word 00h = *Start. (?? byte)
01h = Move. (21 byte)
02h = *End of turn. (?? byte)
03h = Attack. (27 byte)
04h = *Set Seed. (?? byte)
05h = Mount. (19 byte)
06h = Disembark. (20 byte)
07h = Embark. (16 byte)
08h = *Supply. (?? byte)
09h = Purchase. (20 byte)
0Ah = Place. (21 byte)
0Bh = *Pickup. (?? byte)
0Ch = Replacements. (19 byte)
0Dh = *Destroyed. (?? byte)
0Eh = Select. (16 byte)
0Fh = Cancel move. (55 byte)
10h = *Player. (?? byte)
11h = *Scenario. (?? byte)
12h = *Chat. (?? byte)
13h = *Inc counter. (?? byte)
14h = *Resend message. (?? byte)
15h = Sell. (18 byte)
16h = *Swap players. (?? byte)
17h = *Prestige modified. (?? byte)
18h = *Player quit. (?? byte)
19h = *Time limite. (?? byte)
1Ah = *Receipt. (?? byte)
Action code. This is the primary action code. If example the first word is 01 (move) than the following 21 byte is the data for the move action, described below including action code 2).   

Actions codes mark with * is not used in PBEM. These are almost for sure for Network play. Some of them are probably also used in campaign, but I have not yet work on the campaign replay

2 Word 03h = Select & Embark
05h = Sell
06h = Mount
07h = Disembark & Purchase
08h = Move & Place
0Eh = Attack
2nd Action code

The bytes under each action

Action code 01h (Move)

1 Byte ? Unknown
1 Byte ? Unknown
1 Byte ? Unknown
1 Byte ? Unknown
1 Byte ? Unknown
1 Byte ? Unknown
1 Byte ? Unknown
1 Byte ? Unknown
1 Byte ? Unknown
1 Byte ? Unknown
1 Byte ? Unknown
2 Word 0000h-03E7h Unit Number. The unit number as found in the equipment file.
2 Word 00h-2Ch New X hex position
2 Word 00h-27h New Y hex position

Action code 03h (Attack)

1 Byte ? Unknown
1 Byte ? Unknown
1 Byte ? Unknown
1 Byte ? Unknown
1 Byte ? Unknown
1 Byte ? Unknown
1 Byte ? Unknown
1 Byte ? Unknown
1 Byte ? Unknown
1 Byte ? Unknown
2 Word 0000h-03E7h Unit Number. The unit number as found in the equipment file.
1 Byte ? Unknown
2 Word 0000h-03E7h Enemy unit number. The Enemy unit number as found in the equipment file, the action involves.
1 Byte ? Unknown
1 Byte ? Unknown
1 Byte ? Unknown
1 Byte ? Result?
1 Byte ? Result?
1 Byte ? Result?
1 Byte ? Result?
1 Byte ? Unknown

Action code 05h (Mount)

1 Byte ? Unknown
1 Byte ? Unknown
1 Byte ? Unknown
1 Byte ? Unknown
1 Byte ? Unknown
1 Byte ? Unknown
1 Byte ? Unknown
1 Byte ? Unknown
1 Byte ? Unknown
1 Byte ? Unknown
2 Word 0000h-03E7h Unit Number. The unit number as found in the equipment file.
1 Byte ? Unknown
1 Byte ? Unknown
1 Byte ? Unknown

Action code 06h (Disembark)

1 Byte ? Unknown
1 Byte ? Unknown
1 Byte ? Unknown
1 Byte ? Unknown
1 Byte ? Unknown
1 Byte ? Unknown
1 Byte ? Unknown
1 Byte ? Unknown
1 Byte ? Unknown
1 Byte ? Unknown
2 Word 0000h-03E7h Unit Number. The unit number as found in the equipment file.
2 Word 00h-2Ch New X
2 Word 00h-27h New Y

Action code 07h (Embark)

1 Byte ? Unknown
1 Byte ? Unknown
1 Byte ? Unknown
1 Byte ? Unknown
1 Byte ? Unknown
1 Byte ? Unknown
1 Byte ? Unknown
1 Byte ? Unknown
1 Byte ? Unknown
1 Byte ? Unknown
2 Word 0000h-03E7h Unit Number. The unit number as found in the equipment file.

Action code 09h (Purchase)

1 Byte ? Unknown
1 Byte ? Unknown
1 Byte ? Unknown
1 Byte ? Unknown
1 Byte ? Unknown
1 Byte ? Unknown
1 Byte ? Unknown
1 Byte ? Unknown
1 Byte ? Unknown
2 Word 0000h-03E7h Unit Number. The unit number as found in the equipment file.
1 Byte ? Unknown
1 Byte ? Unknown
1 Byte ? Unknown
1 Byte ? Unknown
1 Byte ? Unknown

Action code 0Ah (Place)

1 Byte ? Unknown
1 Byte ? Unknown
1 Byte ? Unknown
1 Byte ? Unknown
1 Byte ? Unknown
1 Byte ? Unknown
1 Byte ? Unknown
1 Byte ? Unknown
1 Byte ? Unknown
2 Word 00h-2Ch New X hex position
2 Word 00h-27h New X hex position
1 Byte ? Unknown
2 Word 0000h-03E7h Unit Number. The unit number as found in the equipment file.
1 Byte ? Unknown

Action code 0Ch (Replacement)

1 Byte ? Unknown
1 Byte ? Unknown
1 Byte ? Unknown
1 Byte ? Unknown
1 Byte ? Unknown
1 Byte ? Unknown
1 Byte ? Unknown
1 Byte ? Unknown
1 Byte ? Unknown
1 Byte ? Unknown
1 Byte ? Unknown
2 Word 0000h-03E7h Unit Number. The unit number as found in the equipment file.
1 Byte ? Unknown
1 Byte ? Unknown

Action code 0Eh (Select)

1 Byte ? Unknown
1 Byte ? Unknown
1 Byte ? Unknown
1 Byte ? Unknown
1 Byte ? Unknown
1 Byte ? Unknown
1 Byte ? Unknown
1 Byte ? Unknown
1 Byte ? Unknown
1 Byte ? Unknown
2 Word 0000h-03E7h Unit Number. The unit number as found in the equipment file.

Action code 0Fh (Cancel move)

1 Byte ? Unknown
1 Byte ? Unknown
1 Byte ? Unknown
1 Byte ? Unknown
1 Byte ? Unknown
1 Byte ? Unknown
1 Byte ? Unknown
1 Byte ? Unknown
1 Byte ? Unknown
1 Byte ? Unknown
2 Word 0000h-03E7h Unit Number. The unit number as found in the equipment file.
1 Byte ? Unknown

Action code 15h (Sell)

1 Byte ? Unknown
1 Byte ? Unknown
1 Byte ? Unknown
1 Byte ? Unknown
1 Byte ? Unknown
1 Byte ? Unknown
1 Byte ? Unknown
1 Byte ? Unknown
1 Byte ? Unknown
1 Byte ? Unknown
2 Word 0000h-03E7h Unit Number. The unit number as found in the equipment file.
2 Word 00h-0BF4h Prestige for unit. The Prestige you get for the unit.

Back to top


 

Appendix

Countries

Country 00h =Non
01h =Austria
02h =Belgium
03h =Bulgaria
04h =Czechoslovakia
05h =Denmark
06h =Finland
07h =France
08h =Germany
09h =Greece
0Ah 0=USA
0Bh =Hungary
0Ch =Turkey
0Dh =Italy
0Eh =Netherlands
0Fh =Norway
10h =Poland
11h =Portugal
12h =Romania
13h =Spain
14h =Russia
15h =Sweden
16h =Switzerland
17h =United Kingdom
18h =Yugoslavia
19h =Nationalist
1Ah =Republican
1Bh =Unused 
1Ch =Unused 
1Dh =Unused 
1Eh =Unused 
1Fh =Unused

Leaders

Leaders 01h =Tenacious Defense -Infantry
02h =Aggressive Maneuver -Tank
03h =Elite Recon Veteran  -Recon
04h =Tank Killer -AntiTank
05h =Marksman -Artillery
06h =Mechanized Veteran -AD
07h =Skilled Interceptor -Fighter
08h =Skilled Assault -Bomber
09h =Aggressive Attack
0Ah =Determined Defense
0Bh =Battlefield Intelligence
0Ch =First Strike
0Dh =Resilience
0Eh =Influence
0Fh =Fire Discipline
10h =Liberator
11h =Alpine Training
12h =All Weather Combat
13h =Forest Camouflage
14h =Combat Support
15h =Infiltration Tactics
16h =Aggressive Maneuver
17h =Skilled Reconnaissance
18h =Reconnaissance Movement
19h =Skilled Ground Attack
1Ah =Street Fighter
1Bh =Overwhelming Attack
1Ch =Superior Maneuver
1Dh =Extended Front
1Eh =Ferocious Defender
1Fh =Overwatch
20h =Devastating Fire
21h =Bridging
22h =Shock Tactics

Back to top