
EFSH/DATA:

224 bytes

tail --bytes +595342 multi.esp | head --bytes 224 | hexdump -f ../hexdumpformat

17  % 4 bytes
5
1
3
4868682  % 4 bytes
% fill/texture effect section has 9 floats
0.20000000298023223876953125000000000000000000000000000000
0.40000000596046447753906250000000000000000000000000000000
0.50000000000000000000000000000000000000000000000000000000
0.20000000298023223876953125000000000000000000000000000000
1.00000000000000000000000000000000000000000000000000000000
1.00000000000000000000000000000000000000000000000000000000
-0.30000001192092895507812500000000000000000000000000000000
0.20000000298023223876953125000000000000000000000000000000
1.00000000000000000000000000000000000000000000000000000000
746484  % 4 bytes
% edge effect has 8 floats
0.20000000298023223876953125000000000000000000000000000000
0.80000001192092895507812500000000000000000000000000000000
0.50000000000000000000000000000000000000000000000000000000
0.50000000000000000000000000000000000000000000000000000000
1.00000000000000000000000000000000000000000000000000000000
1.00000000000000000000000000000000000000000000000000000000
0.50000000000000000000000000000000000000000000000000000000
0.75000000000000000000000000000000000000000000000000000000
6
5
1
4
2
0
0.60000002384185791015625000000000000000000000000000000000
0.10000000149011611938476562500000000000000000000000000000
0.50000000000000000000000000000000000000000000000000000000
0.30000001192092895507812500000000000000000000000000000000
0.50000000000000000000000000000000000000000000000000000000
10.00000000000000000000000000000000000000000000000000000000
30.00000000000000000000000000000000000000000000000000000000
0 % float
0
0
10.00000000000000000000000000000000000000000000000000000000
0
0
0 % float
30.00000000000000000000000000000000000000000000000000000000
36.00000000000000000000000000000000000000000000000000000000
0.10000000149011611938476562500000000000000000000000000000
0.75000000000000000000000000000000000000000000000000000000
16777215  % 4 bytes
16777215  % 4 bytes
9413805  % 4 bytes
1.00000000000000000000000000000000000000000000000000000000
1.00000000000000000000000000000000000000000000000000000000
0.69999998807907104492187500000000000000000000000000000000
1.00000000000000000000000000000000000000000000000000000000
3.00000000000000000000000000000000000000000000000000000000
8.00000000000000000000000000000000000000000000000000000000

 ---*---

MODT:

How two models are attached together?
Does MODT contain some kind of touch points on the objects?
Touch points of the constraint objects?
Touch points of the wearables?

Why would they be separately described if they can be
obtained from the NIF files?


tail --bytes +376639 multi.esp | head --bytes 24 | ints
1661791461
-142133519
1661758565
-142133514
1948022117
1146902957

tail --bytes +376639 multi.esp | head --bytes 24 | floats
2599614220281954959360.00000000000000000000000000000000000000000000000000000000
-5484956406312225451248985938329600.00000000000000000000000000000000000000000000000000000000
2590354819448081219584.00000000000000000000000000000000000000000000000000000000
-5484959501162323664699673186140160.00000000000000000000000000000000000000000000000000000000
49583700799528460460721203838976.00000000000000000000000000000000000000000000000000000000
881.40118408203125000000000000000000000000000000000000000000


 ---*---

Polish the parsebuffer_ routines so that common code is
written only once.

Write parsebuffer_ routines so that they parse to structures
and print at the same time.

 ---*---

In GMST record, is there other way to recognize the type of the
data than the first char of the EDID string? Something in the
record header?

 ---*---

Later?
The parser could first parse to database with help of
XML format description (like in Niftools).
Then the structures could be filled with
 recordpath = "/TREE/CNAM/shadown_radius";
 tree->shadow_radius = lookup(recordpath);

 ---*---

file.esp
file/0001_   % top level records and groups
file/0002_
etc.

filenames:
<number>_<record name>.raw  % original data, could be ref to file.esp
<number>_<record name>.uncomp  % uncompressed raw data
<number>_<record name>/        % subrecords or group content

Raw and uncompressed files may be too big for the group and other
container records.

 ---*---

Later?
Write program to generate parsebuffer_ files.
Generate the structs for each chunk as well.

 ---*---

Reference: cswiki/TREE

% SpeedTree Seed numbers
TREE/SNAM 4
TREE/SNAM 16
TREE/SNAM 20

% what is the correct order?
TREE/CNAM 32
% Shadow Radius
% Leaf Curvature
% Branch Dimming Value
% Leaf Dimming Value
% Minimum Leaf Angle
% Maximum Leaf Angle
% Rock Speed
% Rustle Speed

% Example values:
2.500000
5.000000
85.000000
0.500000
0.700000
0.000000
1.000000
1.200000

% Billboard dimensions
TREE/BNAM 8

 ---*---

Undocumented and not in multi.esp
CLMT
ROAD
SBSP

Not in multi.esp
ANIO
LVSP
SKIL


 ---*---

check if all EFIT records are the same
 --> all EFIT records are 24 bytes

check if EFID are all string4
 --> all EFID records are 4 bytes

spel/ench/alch/ingr:
SCIT fixed to 16 bytes even 4 bytes and 12 bytes have been observed
 --> multi.esp has only SCIT records with 16 bytes

 ---*---

continue 20070422
parsebuffer_acti.c is incomplete
parsebuffer_armo.c is incomplete, new info on DATA
parsebuffer_door.c is incomplete
parsebuffer_lvlc.c is incomplete
parsebuffer_lvli.c is incomplete, DATA not implemented
parsebuffer_pack.c is incomplete, CTDA not implemented
parsebuffer_scpt.c is incomplete, SLSD SCVR SCRO SCRV not implemented
parsebuffer_weap.c

 ---*---

parsebuffer_refr.c is incomplete
parsebuffer_achr.c is incomplete
parsebuffer_cell.c is incomplete

ACHR/XRGD at uespwiki is not documented
ACHR/XLOD at uespwiki is not documented
ACHR/XESP at uespwiki is documented wrong 
CREA/MODT unknown
ACTI has the same fields as NPC, compare their and others infos
SCPT/SCHR [8] == length of SCDA block?
REFR/XHLT at uespwiki is not documented
ACRE/XESP wrong in docs (int vs 2*int)
AMMO/MODT uespwiki doc has a typo MOBD --> MODB
CLOT at uespwiki misses ANAM
GMST/DATA at uespwiki is documented wrong
INFO/TCLF at uespwiki is not documented
MISC/DATA at uespwiki has incorrect length (4 vs 8) but shows correct fields
SGST/DATA at uespwiki has incorrect length (4) in first occurence
QUST/CNAM at uespwiki is not documented
WRLD/MNAM at ueswiki is not documented
WRLD/NAM0 <float> <float> min coords of the WRLD?
WRLD/NAM9 <float> <float> max coords of the WRLD?

 ---*---

xulStendarrValley.esp has the following undocumented records:

PGRD
TREE ok

multi.esp has the following undocumented records:
CSTY
EFSH
GRAS
LSCR
PGRD
RACE
WATR
WTHR

multi2.esp has the following undocumented records:
CSTY
EFSH
GRAS
IDLE
LTEX
PGRD
RACE
REGN

 ---*---

LAND/VHGT subrecord:

Given a height map, output the VHGT subrecord.

h[][] height map

Reference levels of all cells should be quantized to 8 game units.

LAND/VHGT entry at Tes4Mod:Mod_File_Format/LAND may
be unclear. Does the text mean that the nearby cells does
copy the height values at the edges, not the gradient values?

Is the first gradient value always 0?

h[0][0] = offset + gradient[0][0];

for (i = 1; i < 33; i++) {
  h[0][i] = h[0][i-1] + gradient[0][i];
}

for (j = 1; j < 33; j++) {
  h[j][0] = h[j-1][0] + gradient[j][0];
  for (i = 1; i < 33; i++) {
    h[j][i] = h[j][i-1] + gradient[j][i];
  }
}

 ---*---

PGRD:

DATA short % tells how many path grid points


Sizes:
DATA 2    % = 102
PGRP 1632
PGAG 13
PGRR 712  % shorts
PGRI 816

DATA PGRP PGAG PGRR PGRI
 102 1632   13  712  816
  91 1456   12  820  848
 130 2080   17 1078 1136
  73 1168   10  778  688

PGRP = 16*DATA

 ---*---

GRUP groupsize
TES4 size

formid = int32
size = int32 "chunk_size" // get_int("chunk_size") is used for skipping chunks
CELL size 12*byte {
FULL size string "Cell Name" // spaces allowed?
XCWT size formid "Water"

Quote marks " are necessary as not all data need to be named:
CHNK size int int float "Radius" int int

Data is references as shown:
  waterid = cell->get_int("Water");

 ---*---

mw_07LTB.jpg
Morrowind's Construction Set?

Object window:
Door
Ingredient
Light
Lockpick
Misc Item
Probe
Repair Item
Spellmaking
Enchanting
Alchemy
Leveled Item
Activator
Apparatus
Armor
Body Part
Book
Clothing
Container
Static
Weapon
NPC
Creature
Leveled Creature

 ---*---

GMST/DATA

000192   28  0  0 47 4d 53 54 25  0  0  0  0   (..GMST%....
000204    0  0  0 d9 11  0  1  0  0  0  0 45   ...........E
000216   44 49 44 15  0 66 41 49 44 65 66 61   DID..fAIDefa
000228   75 6c 74 53 70 65 65 63 68 4d 75 6c   ultSpeechMul
000240   74  0 44 41 54 41  4  0  0  0 20 41   t.DATA.... A
000252   47 52 55 50 7d  7  0  0 53 43 50 54   GRUP}...SCPT

182880   6f 64 79 2e 4e 49 46  0 47 4d 53 54   ody.NIF.GMST
182892   4b  0  0  0  0  0  0  0 b8 16  0  1   K...........
182904    0  0  0  0 45 44 49 44 1a  0 73 52   ....EDID..sR
182916   61 63 65 46 65 6d 61 6c 65 4c 6f 77   aceFemaleLow
182928   65 72 42 6f 64 79 4d 6f 64 65 6c  0   erBodyModel.
182940   44 41 54 41 25  0 43 68 61 72 61 63   DATA%.Charac
182952   74 65 72 73 5c 5f 4d 61 6c 65 5c 46   ters\_Male\F
182964   65 6d 61 6c 65 4c 6f 77 65 72 42 6f   emaleLowerBo
182976   64 79 2e 4e 49 46  0 47 4d 53 54 41   dy.NIF.GMSTA

600108   50 7c  1  0  0 47 4d 53 54  0  0  0   P|...GMST...
600120    0  f 2a  0  0 47 4d 53 54 4b  0  0   ..*..GMSTK..
600132    0  0  0  0  0 b7 16  0  1  0  0  0   ............
600144    0 45 44 49 44 1a  0 73 52 61 63 65   .EDID..sRace
600156   46 65 6d 61 6c 65 55 70 70 65 72 42   FemaleUpperB
600168   6f 64 79 4d 6f 64 65 6c  0 44 41 54   odyModel.DAT
600180   41 25  0 43 68 61 72 61 63 74 65 72   A%.Character
600192   73 5c 5f 4d 61 6c 65 5c 46 65 6d 61   s\_Male\Fema
600204   6c 65 55 70 70 65 72 42 6f 64 79 2e   leUpperBody.
600216   4e 49 46  0 47 4d 53 54 4b  0  0  0   NIF.GMSTK...

 ---*---

grep strcmp parsebuffer_*.c > zsubrecords

 ---*---
 ---*---
 ---*---
 ---*---
