06-07-2021, 02:51 AM,
|
|
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.
|
|
06-07-2021, 04:16 AM,
|
|
Warhorse
Moderator
|
Posts: 2,332
Joined: Jun 2001
|
|
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.
|
|
06-07-2021, 04:29 AM,
|
|
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.
|
|
06-07-2021, 05:08 AM,
|
|
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.
|
|
06-07-2021, 05:43 AM,
|
|
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.
|
|
06-07-2021, 06:19 AM,
(This post was last modified: 06-07-2021, 06:20 AM by LordDeadwood.)
|
|
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.
|
|
06-07-2021, 11:59 AM,
|
|
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'
]
|
|
|