Skyrim Mod talk:Mod File Format/CELL

The UESPWiki – Your source for The Elder Scrolls since 1995
Jump to: navigation, search

XCGD[edit]

|| XCGD || struct || Only found in Xbox360 and PS3 official DLC, not supported by CK 1.8.151.0.

A recent edit removed the information about that field. I for one think that information about console file format belongs here. Then again, I can't find the field in the Dragonborn.esm file for Xbox. I currently don't have access to other console files. Where exactly does this field appear? --Alfwyn (talk) 23:12, 5 December 2013 (GMT)

I don't have the file anymore. I got it from Jak, so I'll see if he can send it to me again. Robin Hood  (talk) 07:08, 6 December 2013 (GMT)
Got it. There are just over 800 CELL records with that field—noticeably, all of them are compressed. Just a few at random are: xx0142EC, xx00EEF7, and xx00F3C0. Robin Hood  (talk) 08:32, 6 December 2013 (GMT)
Thanks, yes you are right, I was confused yesterday. I was just looking in the CELL group (no XCGD fields there), but there are more than enough of them in the CELL records of the WRLD group in the Xbox Dragonborn.esm . --Alfwyn (talk) 13:43, 6 December 2013 (GMT)
Ah, that would explain it! Because I was looking at a closer-to-raw table rather than the processed data, it wasn't immediately obvious to me that they were all world children when I pulled the list or I would've mentioned it. Robin Hood  (talk) 21:28, 6 December 2013 (GMT)

XCLW[edit]

The water height doesn't seem to do anything in interiors. — Unsigned comment by 182.189.226.219 (talk) at 12:59 on 14 December 2014

It doesn't seem to do anything in the CK, either. You can set it, but the setting gets lost and put back to zero as soon as you close and re-open the cell editing form. I haven't played with interior design enough to know if there's more to it than that, though. Robin Hood  (talk) 15:33, 14 December 2014 (GMT)

XCLC[edit]

I just came across a file in the wild that appears to only have 8 bytes in the XCLC data section. It looks like it only specifies the X and Y and is missing the flags. This file has a HEDR version 0.94 so is older and the cell is in a new worldspace created by the mod. See "Enngarde.esp" in https://www.nexusmods.com/skyrimspecialedition/mods/25673?tab=files.

Can see in this hex dump that the size in the XCLC header is 8 and there's only 8 bytes following before the next record: screenshot of hex dump. The file loads fine in TES5Edit so I assume this is valid. Maybe the XCLC section of the article needs something explaining that the flags might be missing in older (version 0.94) files? I'm not sure if this is the case for all CELL records in older files. – Thallada (talk) 04:31, 27 August 2021 (UTC)

I could swear that this was documented somewhere at some point, but I can't find any trace of it, so maybe I'm thinking of something else. In any event, XCLC was 8 bytes back in Oblivion, so it would make sense. Some of the loading code checks the structure size and handles 12-byte as one thing and non-12-byte as another, so clearly, this was something that was expected. There isn't anything that explicitly checks the version fields, at least not that I noticed, but that's not unusual for the Skyrim code—they often use different types of checks for things like that, sometimes for very good reasons, but I suspect sometimes just based on who programmed that section of the code. Robin Hood(talk) 05:21, 27 August 2021 (UTC)

Trailing or missing null bytes at end of decompressed CELL data[edit]

I'm noticing after decompressing some Skyrim plugins' interior CELL data, there's sometimes padding of 8-9 null bytes on the end of the decompressed data. Not 100% sure if this is just a bug in how I'm decompressing the data or if there's really those nulls. Thought it was worth mentioning though. TES5Edit is able to parse these plugins fine, so I assume they are still valid plugins.

The plugins for these mod all have the trialing null bytes in their interior cell data:

Separately, there's another issue where the decompressed bytes can also be short a byte or two (or more?) and the parser is supposed to assume the missing bytes are zero.

For example this plugin: https://www.nexusmods.com/skyrim/mods/30286?tab=files has a cell (000165A8) with data with a compressed size of 181 bytes. Uncompressed, zlib gives me 234 bytes which is also what the first four bytes of the data ("Size of decompressed data") (https://en.uesp.net/wiki/Skyrim_Mod:Mod_File_Format#Records) also says: 234 bytes. However, if you count up all of the field sizes in the data plus 6 bytes in the header you get 235 bytes. The decompressed data is short one byte. The last field is a XCIM field, if you substitute a zero byte in for the last byte in the form id you get 00036ED2, which is also what TES5Edit displays for that field, so they must have also dealt with that issue by substituting a zero byte at the end.

Other files with this issue

Thallada (talk) 22:23, 1 October 2022 (UTC)