• Blitz Shadow Player
  • Caius
  • redboot
  • Rules
  • Chain of Command
  • Members
  • Supported Ladders & Games
  • Downloads


Data Files Help
06-07-2021, 02:51 AM,
#1
Data Files Help
I'm looking for help understanding an aspect of the PzC data files.

Between a .btl file, .scn file and the .oob file, how does the engine tell which formation/unit belongs to which side in a scenario? For example, when it's player 1's turn, where does it find the data to only show the player 1 units. I see where the current active side is stored in the .btl, but I don't see where this is correlated with the unit data. Unit data in the .btl appears to be stored in order by x,y coords. So each side's units are jumbled in the data.

OOB files are stored in a homegrown nested format. Top-level formations have additional "nation" data. However, the OOB file can have multiple nations. For example, the N44 oob has a top-level formation for Germans, Americans and British. 

In other words, when the engine takes a unit from the .btl file and looks it up in the .oob, how does it know which side to allocate it to? I was expecting to see a 0 or 1 somewhere and I don't. That said, there are still quite a few lines in the .btl file I don't understand. It might be hard-coded in the engine.

Thanks in advance and if this topic has been covered before, let me know. Didn't find it in a search.
Quote this message in a reply
06-07-2021, 04:16 AM,
#2
RE: Data Files Help
(06-07-2021, 02:51 AM)zaxhutchinson Wrote: I'm looking for help understanding an aspect of the PzC data files.

Between a .btl file, .scn file and the .oob file, how does the engine tell which formation/unit belongs to which side in a scenario? For example, when it's player 1's turn, where does it find the data to only show the player 1 units. I see where the current active side is stored in the .btl, but I don't see where this is correlated with the unit data. Unit data in the .btl appears to be stored in order by x,y coords. So each side's units are jumbled in the data.

OOB files are stored in a homegrown nested format. Top-level formations have additional "nation" data. However, the OOB file can have multiple nations. For example, the N44 oob has a top-level formation for Germans, Americans and British. 

In other words, when the engine takes a unit from the .btl file and looks it up in the .oob, how does it know which side to allocate it to? I was expecting to see a 0 or 1 somewhere and I don't. That said, there are still quite a few lines in the .btl file I don't understand. It might be hard-coded in the engine.

Thanks in advance and if this topic has been covered before, let me know. Didn't find it in a search.
It uses the unit ID number of the unit, such as 1 2 22 60655 16 16 9 0 0 64 0 in the Krasny Liman scn. This is a German ATG it's unit ID is 60655 which places it in the GERMAN B 60654 0 PanzerJäger.Abt.209 if you open the oob for any given scenario, then look for that number.
Meine Ehre heisst Treue



http://www.cslegion.com/
Quote this message in a reply
06-07-2021, 04:29 AM,
#3
RE: Data Files Help
Thanks Warhorse. That connection I understand between .btl and .oob. I'm trying to connect nations to sides in a scenario. Let me rephrase the question:

Let's say I'm playing as the Axis in a title/scenario with Italian, German and Soviet units. How does the engine determine I should see Italian and German units, but not Soviet units? Do the data files contain a list of nations that belong to the Axis (or a particular side)? Or is this hard-coded into the engine?

Playing around with the oobeditor, my guess is that it's hard-coded (or at least hard-coded in the oobeditor). This is based on the fact that you can't, say, add a historically Allied nation to an Axis formation (and vice versa). Which means that each PzC title has its own list of nations for each side.
Quote this message in a reply
06-07-2021, 05:08 AM,
#4
RE: Data Files Help
(06-07-2021, 02:51 AM)zaxhutchinson Wrote: I'm looking for help understanding an aspect of the PzC data files.

Between a .btl file, .scn file and the .oob file, how does the engine tell which formation/unit belongs to which side in a scenario? For example, when it's player 1's turn, where does it find the data to only show the player 1 units. I see where the current active side is stored in the .btl, but I don't see where this is correlated with the unit data. Unit data in the .btl appears to be stored in order by x,y coords. So each side's units are jumbled in the data.

OOB files are stored in a homegrown nested format. Top-level formations have additional "nation" data. However, the OOB file can have multiple nations. For example, the N44 oob has a top-level formation for Germans, Americans and British. 

In other words, when the engine takes a unit from the .btl file and looks it up in the .oob, how does it know which side to allocate it to? I was expecting to see a 0 or 1 somewhere and I don't. That said, there are still quite a few lines in the .btl file I don't understand. It might be hard-coded in the engine.

Thanks in advance and if this topic has been covered before, let me know. Didn't find it in a search.
I've been doing some work with the OOB files lately. Your question about how does the engine know what nationality a unit belongs to is a little tricky. When reading the OOB file, the very first record has a nationality assigned to it. Every unit after that has the same nationality as its parent UNTIL a new nationality is read. At that point the new nationality becomes the "default", being applied to all subordinate units. When the OOB is finished with that level, the nationality defaults back to the last parent nationality. For example, an abbreviated OOB file from France '40:

German AG 133324 0 Wehrmacht
  Begin
  C. 141434 HQ MOT 90 3 0 0 0 0 50 0 2 0 0 12 0 10 0 OKW, Hitler
  AG 49801 0 Heer
    Begin
    C. 154166 HQ MOT 90 4 0 0 0 0 50 0 2 0 0 12 0 10 0 OKH, von Brauchitsch
    AG 49802 0 Heeresgruppe B
      ...
      ...
      ...
          German-SS R 114257 0 Leibstandarte SS Adolf Hitler

            Begin

            C. 114276 HQ MOT 100 3 6 0 0 0 8 0 4 1 0 18 2 15 0 Stab der LSSAH, Dietrich
            B 114258 0 I./LSSAH
            ...
            ...
            ...
          German-SS R 114212 0 SS-Standarte Der Führer
            Begin
            C. 114185 HQ MOT 100 5 6 0 0 0 8 0 4 1 0 18 2 15 0 Stab der SS-St.F, Keppler
            B 114213 0 I./SS-St.F
            ...
            ...
            ...
          D 114078 0 X. AK. Korpstruppen
            Begin
            C. 146539 ARM RL 7 4 1 12 0 5 12 0 3 0 0 2 6 6 4097 ...
            C. 146540 ARM RL 7 4 1 12 0 5 12 0 3 0 0 2 6 6 4097 ...
            C. 146541 ARM RL 7 4 1 12 0 5 12 0 3 0 0 2 6 6 4097 ...
            Luftwaffe B 114085 0 II./Flak-Regiment 241
              Begin

All the records after the first are German until the German-SS is read. All of the records after the LSSAH record default to German-SS. The SS-St.F record has to be declared German-SS again because if it wasn't, it would default back to its parent which is German. When the OOB reaches the X. AK. Korpstruppen, they don't need a declaration because their parent is German. Then the flak regiment is declared Luftwaffe, etc.

Exactly what the process is when the engine reads a .btl or .scn file, I don't know. I don't know if it reads the entire .oob file or if it just looks up the ID and figures out the parent, etc. But there's no way to determine a unit's parent by just reading a single record in the .oob file. Since the .blt or .scn file is only read once when starting a turn, I'm guessing it goes through the entire .oob file. Hope that helps.
Quote this message in a reply
06-07-2021, 05:43 AM,
#5
RE: Data Files Help
Thanks for the reply! That's helpful and cleared up a potential bug in my code.

Yeah, I'm assuming there's a hardcoded link between nationality and side which differs per PzC title. Although it really isn't nationality. It's more like army command structure (e.g. SS being separate from Wehrmacht)

I would be surprised if the engine walks through the oob every time it needs a parent name. It's probably stored with the data during runtime. Seems a coding decision to avoid having to put in the parent for each record.
Quote this message in a reply
06-07-2021, 06:19 AM, (This post was last modified: 06-07-2021, 06:20 AM by LordDeadwood.)
#6
RE: Data Files Help
(06-07-2021, 05:43 AM)zaxhutchinson Wrote: Thanks for the reply! That's helpful and cleared up a potential bug in my code.

Yeah, I'm assuming there's a hardcoded link between nationality and side which differs per PzC title. Although it really isn't nationality. It's more like army command structure (e.g. SS being separate from Wehrmacht)

I would be surprised if the engine walks through the oob every time it needs a parent name. It's probably stored with the data during runtime. Seems a coding decision to avoid having to put in the parent for each record.

The term "nationality" in PzC is a little unusual. I do know there is a hardcoded "set" of nationalities in the PzC (and maybe Modern Campaigns?) series. That's why some games use strange nationality designations. Like in France '40, the handful of Luxembourg units are designated as West-German in the .oob and the Units folder. Non-fragile French troops are "South-Korean". Even though German-SS and Luftwaffe are not "nationalities" per se, I think they have to be designated that way to allow for having the different style counters. Same with the non-fragile morale French units; although there's no visible difference between the counters, fragile morale is an attribute assigned to a "nationality". So the term "nationality" encompasses a number of different characteristics.
Quote this message in a reply
06-07-2021, 09:50 AM,
#7
RE: Data Files Help
I see what you meant, some are axis, some allied, follows through with all JT titles pretty much. This from my SBWW2 Mod for Squad Battles Advance of the Reich, list of nations.

Germany Enemy
Italy Enemy
Rumania Enemy
Hungary Enemy
Finland Enemy
Russia Ally
Poland Ally
Norway Ally
Britain Ally
France Ally
Netherlands Ally
Belgium Ally
FrenchVichy Enemy
Greece Ally
Yugoslavia Ally
US Ally
ItalyAllied Ally
RumaniaAllied Ally
FrenchFree Ally
GermanySS Enemy
RussianGuards Ally
USAB Ally
BritainAB Ally
Canada Ally
USMarine (Brazilian) Ally
NVA(Axis Russian Guards) Enemy
VC (Axis Russia) Enemy
ARVN(Ethiopia) Ally
Australia Ally
SouthKorea (Allied Slovakia) Ally
GermanAB Enemy
Japanese Enemy
NorthKorea (Axis Slovakia) Enemy
Chinese Ally
VietMinh (Axis Chinese) Enemy
Mujahideen (Allied Bulgaria) Ally
Nationalist (Blue Division) Enemy
Republican (Indian Army) Ally
Argentinean (Axis Bulgarian) Enemy
Iraqi Coalition (New Zealand) Ally
South African Ally

Germany = 0 E
Italy = 1 E
Rumania = 2 E
Hungary = 3 E
Finland = 4 E
Russia = 5 A
Poland = 6 A
Norway = 7 A
Britain = 8 A
France = 9 A
Netherlands = 10 A
Belgium = 11 A
FrenchVichy = 12 E
Greece = 13 A
Yugoslavia = 14 A
US = 15 A
ItalyAllied = 16 A
RumaniaAllied = 17 A
FrenchFree = 18 A
GermanySS = 19 E
RussianGuards = 20 A
USAB = 21 A
BritainAB = 22 A
Canada = 23 A
USMarine = 24 A
NVA = 25 E
VC = 26 E
ARVN = 27 A
Australia = 28 A
SouthKorea = 29 A
GermanAB = 30 E
Somalia = 31 E
Afghan = 32 E
Japanese = 33 E
Turkish = 34 E
AustroHungarian = 35 E
NorthKorea = 36 E
Chinese = 37 A
VietMinh = 38 E
Mujahideen = 39 A
Nationalist = 40 E
Republican = 41 A
Iraqi = 42 E
Cuban = 43 E
Panamanian = 44 E
Taliban = 45 E
Argentinean = 46 E
Iraqi Insurgents = 47 E
Iraqi Coalition = 48 A (New Zealand)
South African = 49 A
Grenadian = 50 E (Thailand)
Meine Ehre heisst Treue



http://www.cslegion.com/
Quote this message in a reply
06-07-2021, 11:59 AM,
#8
RE: Data Files Help
I compiled the following list by goofing around with the PzC oob editor shipped with Sealion. Not sure if it differs in other versions. The terms AXIS and ALLIES are arbitrary and just indicate the mutually exclusive sets of nationalities.



Code:
AXIS = [
    'Austro-Hungarian',
    'Chinese',
    'East-German',
    'Egyptian',
    'Finnish',
    'French-Vichy',
    'German',
    'German-SS',
    'Hungarian',
    'Iranian',
    'Iranian-Guards',
    'Iraqi',
    'Italian',
    'Japanese',
    'Jordanian',
    'Luftwaffe',
    'North-Korean',
    'North-Vietnamese',
    'Republican-Guard',
    'Rumanian',
    'Slovakian',
    'Warsaw-Pact'
]
ALLIES = [
    'American',
    'American-AB',
    'American-Marine',
    'Austria',
    'Belgian',
    'British',
    'British-AB',
    'Canadian',
    'Commonwealth',
    'Czechoslovakia',
    'Denmark',
    'Free-French',
    'French',
    'Greecian',
    'Italian-Allied',
    'Kuwaiti',
    'NATO',
    'Netherland',
    'NKVD',
    'Norwegian',
    'Polish',
    'Rumanian-Allied',
    'Russian-Guards',
    'South-Korean',
    'South-Vietnamese',
    'Syrian',
    'Taiwan',
    'Vietnam-Marines',
    'West-German',
    'Yugoslavian'
]
Quote this message in a reply


Forum Jump:


Users browsing this thread: 1 Guest(s)