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


Data Files Help
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


Messages In This Thread
Data Files Help - by zaxhutchinson - 06-07-2021, 02:51 AM
RE: Data Files Help - by Warhorse - 06-07-2021, 04:16 AM
RE: Data Files Help - by zaxhutchinson - 06-07-2021, 04:29 AM
RE: Data Files Help - by LordDeadwood - 06-07-2021, 05:08 AM
RE: Data Files Help - by zaxhutchinson - 06-07-2021, 05:43 AM
RE: Data Files Help - by LordDeadwood - 06-07-2021, 06:19 AM
RE: Data Files Help - by Warhorse - 06-07-2021, 09:50 AM
RE: Data Files Help - by zaxhutchinson - 06-07-2021, 11:59 AM

Forum Jump:


Users browsing this thread: 1 Guest(s)