• If you have a mod, tool or prefab, please use the Resources section. Click Mods at the top of the forums.

blocks.nim format?

zztong

Hunter
Does anyone had a detailed description of the blocks.nim file associated with POIs?

I gather from various discussions and web pages that it relates block IDs found in the TTS file to block names. I've not detected the exact pattern poking around with hexdump. The ASCII text is readable enough. I've not been able to isolate the block ID.

 
I think I've got it.

The first four bytes are an integer with an unknown purpose. Perhaps a version number?

The second four bytes are an integer containing the number of blocks being described by the file.

At this point, each block is described one after the other...

There's are four bytes describing the Block ID. Info about Block IDs found in descriptions of TTS files suggest this number has to be masked so that you only look at some number of the bits. Masking off 11 bits (decimal value 2047) seems to give a correct Block ID.

The next byte contains the number of characters that represent the Block Name, so it is the Block Name Length.

The Block Name follows for however many bytes indicated by the Block Name Length. This is not stored as a terminated string.

 
Back
Top