Talk:The difference between Skyrim and Skyrim SE plugins

From Nexus Mods Wiki
Jump to: navigation, search

DO NOT EDIT THIS SECTION

Any editing of this page will cause content loss due to wiki formatting errors.



[xEdit - wbDefinitionsTES5.pas]

TOOL
xEdit - wbDefinitionsTES5.pas - by Elminster


Description: Record definition code blocks flagged by "isSSE"

[--Operational Functions--]

--Operational Functions--


Description:
function IsSSE: Boolean; inline; overload;
begin
  Result := wbGameMode in [gmSSE, gmTES5VR];
end;


function IsSSE(const aDef1, aDef2: String): String; inline; overload;
begin
  if IsSSE then
    Result := aDef1
  else
    Result := aDef2;
end;


function IsSSE(const aDef1, aDef2: IwbSubRecordDef): IwbSubRecordDef; inline; overload;
begin
  if IsSSE then
    Result := aDef1
  else
    Result := aDef2;
end;


[procedure DefineTES5]

procedure DefineTES5


Description:
begin
	...
	LENS : TwbSignature = 'LENS'; { New to SSE }
	LFSD : TwbSignature = 'LFSD'; { New to SSE }
	LFSP : TwbSignature = 'LFSP'; { New to SSE }
	...
	VOLI : TwbSignature = 'VOLI'; { New To SSE }
end;


[procedure DefineTES5q]

procedure DefineTES5q


Description:
begin
	...
	if IsSSE then wbAddGroupOrder(VOLI); {New to SSE}
	...
	if IsSSE then wbAddGroupOrder(LENS); {New to SSE}
end;


[procedure wbWRLDAfterLoad]

procedure wbWRLDAfterLoad


Description:
procedure wbWRLDAfterLoad(const aElement: IwbElement);
  function OutOfRange(aValue: Integer; aRange: Integer = 256): Boolean;
  begin
    Result := (aValue < -aRange) or (aValue > aRange);
  end;
var
  MainRecord: IwbMainRecord;
  Container: IwbContainer;
begin
  wbRemoveOFST(aElement);

  if wbBeginInternalEdit then try

    if not Supports(aElement, IwbMainRecord, MainRecord) then
      Exit;

    // not used in Skyrim
    if MainRecord.ElementExists['Unused RNAM'] then
      MainRecord.RemoveElement('Unused RNAM');

    // used in SSE but remove from the game master to speed up worldspace browsing since it is huge
    // and the game master is never saved anyway
    if IsSSE and (MainRecord._File.LoadOrder = 0) then
      MainRecord.RemoveElement('Large References');

    // large values in object bounds cause stutter and performance issues in game (reported by Arthmoor)
    // CK can occasionally set them wrong, so make a warning
    if Supports(MainRecord.ElementByName['Object Bounds'], IwbContainer, Container) then
      if OutOfRange(StrToIntDef(Container.ElementEditValues['NAM0\X'], 0)) or
         OutOfRange(StrToIntDef(Container.ElementEditValues['NAM0\Y'], 0)) or
         OutOfRange(StrToIntDef(Container.ElementEditValues['NAM9\X'], 0)) or
         OutOfRange(StrToIntDef(Container.ElementEditValues['NAM9\Y'], 0))
      then
        wbProgressCallback('<Warning: Object Bounds in ' + MainRecord.Name + ' are abnormally large and can cause performance issues in game>');
  finally
    wbEndInternalEdit;
  end;
end;


[wbRecord(TES4) (Main File Header)]

wbRecord(TES4) (Main File Header)


Description:
wbRecord(TES4, 'Main File Header',
	wbFlags(wbRecordFlagsFlags, wbFlagsList([
      {0x00000001}  0, 'ESM',
      {0x00000080}  7, 'Localized',
      {0x00000200}  9, IsSSE('ESL', '')
    ], False), True), [
    wbStruct(HEDR, 'Header', [
      wbFloat('Version'),
      wbInteger('Number of Records', itU32),
      wbInteger('Next Object ID', itU32, wbNextObjectIDToString, wbNextObjectIDToInt)
    ], cpNormal, True),
    wbByteArray(OFST, 'Unknown', 0, cpIgnore),
    wbByteArray(DELE, 'Unknown', 0, cpIgnore),
    wbString(CNAM, 'Author', 0, cpTranslate, True),
    wbString(SNAM, 'Description', 0, cpTranslate),
    wbRArray('Master Files', wbRStruct('Master File', [
      wbStringForward(MAST, 'FileName', 0, cpNormal, True),
      wbByteArray(DATA, 'Unknown', 8, cpIgnore, True)
    ], [ONAM])).IncludeFlag(dfInternalEditOnly, not wbAllowMasterFilesEdit),
    wbArray(ONAM, 'Overridden Forms',
      wbFormIDCk('Form', [ACHR, LAND, NAVM, REFR, PGRE, PHZD, PMIS, PARW, PBAR, PBEA, PCON, PFLA]),
      0, nil, nil, cpNormal, False{, wbTES4ONAMDontShow}),
    wbByteArray(SCRN, 'Screenshot'),
    wbUnknown(INTV),
    wbUnknown(INCC)
], True, nil, cpNormal, True, wbRemoveOFST);


[wbRecord(AMMO)]

wbRecord(AMMO)


Description:
wbRecord(AMMO, 'Ammunition',
	wbFlags(wbRecordFlagsFlags, wbFlagsList([
	{0x00000004}  2, 'Non-Playable'
	])), [
	wbEDID,
	wbOBNDReq,
	wbFULL,
	wbMODL,
	wbICON,
	wbDEST,
	wbYNAM,
	wbZNAM,
	wbDESC,
	wbKSIZ,
	wbKWDAs,
	IsSSE(
		wbStruct(DATA, 'Data', [
			wbFormIDCk('Projectile', [PROJ, NULL]),
			wbInteger('Flags', itU32, wbFlags([
			'Ignores Normal Weapon Resistance',
			'Non-Playable',
			'Non-Bolt'
			])),
			wbFloat('Damage'),
			wbInteger('Value', itU32),
			wbFloat('Weight')
		], cpNormal, True, nil, 4),
		wbStruct(DATA, 'Data', [
			wbFormIDCk('Projectile', [PROJ, NULL]),
			wbInteger('Flags', itU32, wbFlags([
			'Ignores Normal Weapon Resistance',
			'Non-Playable',
			'Non-Bolt'
			])),
			wbFloat('Damage'),
			wbInteger('Value', itU32)
		], cpNormal, True)
	),
	wbString(ONAM, 'Short Name')
], False, nil, cpNormal, False, wbRemoveEmptyKWDA, wbKeywordsAfterSet);


[wbRecord(LENS)]

wbRecord(LENS)


Description:
if IsSSE then begin
	wbRecord(LENS, 'Lens Flare', [
		wbEDID,
		wbFloat(CNAM, 'Color Influence'),
		wbFloat(DNAM, 'Fade Distance Radius Scale'),
		wbInteger(LFSP, 'Count', itU32, nil, cpBenign),
		wbRArray('Lens Flare Sprites',
		wbRStruct('Flare', [
			wbString(DNAM, 'Lens Flare Sprite ID'),
			wbString(FNAM, 'Texture'),
			wbStruct(LFSD, 'Lens Flare Data', [
			wbFloatColors('Tint'),
			wbFloat('Width'),
			wbFloat('Height'),
			wbFloat('Position'),
			wbFloat('Angular Fade'),
			wbFloat('Opacity'),
			wbInteger('Flags', itU32, wbFlags([
				{0x01} 'Rotates',
				{0x02} 'Shrinks When Occluded'
			]))
			])
		], []),
		cpNormal, False, nil, wbLENSAfterSet
		)
	]);
end


[wbRecord(LTEX)]

wbRecord(LTEX)


Description:
wbRecord(LTEX, 'Landscape Texture', [
    wbEDID,
    wbFormIDCk(TNAM, 'Texture Set', [TXST], False, cpNormal, False),
    wbFormIDCk(MNAM, 'Material Type', [MATT, NULL], False, cpNormal, True),
    wbStruct(HNAM, 'Havok Data', [
      wbInteger('Friction', itU8),
      wbInteger('Restitution', itU8)
    ], cpNormal, True),
    wbInteger(SNAM, 'Texture Specular Exponent', itU8, nil, cpNormal, True),
    wbRArrayS('Grasses', wbFormIDCk(GNAM, 'Grass', [GRAS])),
    // SSE
    wbInteger(INAM, IsSSE('Flags', 'Unused'), itU32, wbFlags([
      {0x01} 'Is Snow'
    ]))
]);


[wbRecord(MATO)]

wbRecord(MATO)


Description:
wbRecord(MATO, 'Material Object', [
	wbEDID,
	wbMODL,
	wbRArray('Property Data',
		wbByteArray(DNAM, 'Data', 0, cpIgnore, False, False, wbNeverShow)
	),
	IsSSE(
		wbStruct(DATA, 'Directional Material Data', [
		wbFloat('Falloff Scale'),
		wbFloat('Falloff Bias'),
		wbFloat('Noise UV Scale'),
		wbFloat('Material UV Scale'),
		wbStruct('Projection Vector', [
			wbFloat('X'),
			wbFloat('Y'),
			wbFloat('Z')
		]),
		wbFloat('Normal Dampener'),
		wbFloatColors('Single Pass Color'),
		wbInteger('Flags', itU32, wbFlags(['Single Pass'])),
		// SSE
		wbInteger('Flags', itU8, wbFlags([
			{0x01} 'Snow'
		])),
		wbByteArray('Unused', 3, cpIgnore)
		], cpNormal, True, nil, 5),
		wbStruct(DATA, 'Directional Material Data', [
		wbFloat('Falloff Scale'),
		wbFloat('Falloff Bias'),
		wbFloat('Noise UV Scale'),
		wbFloat('Material UV Scale'),
		wbStruct('Projection Vector', [
			wbFloat('X'),
			wbFloat('Y'),
			wbFloat('Z')
		]),
		wbFloat('Normal Dampener'),
		wbFloatColors('Single Pass Color'),
		wbInteger('Flags', itU32, wbFlags(['Single Pass']))
		], cpNormal, True, nil, 5)
	)
]);


[wbRecord(MUSC)]

wbRecord(MUSC)


Description:
wbRecord(MUSC, 'Music Type', [
    wbEDID,
    wbInteger(FNAM, 'Flags', itU32, wbFlags([
      {0x01} 'Plays One Selection',
      {0x02} 'Abrupt Transition',
      {0x04} 'Cycle Tracks',
      {0x08} 'Maintain Track Order',
      {0x10} 'Unknown 4',
      {0x20} 'Ducks Current Track',
      {0x40} IsSSE('Doesn''t Queue', 'Unknown 6')
    ]), cpNormal, True),
    wbStruct(PNAM, 'Data', [
      wbInteger('Priority', itU16),
      wbInteger('Ducking (dB)', itU16, wbDiv(100))
    ]),
    wbFloat(WNAM, 'Fade Duration'),
    wbArray(TNAM, 'Music Tracks', wbFormIDCk('Track', [MUST, NULL]))
]);


[wbRecord(STAT)]

wbRecord(STAT)


Description:
wbRecord(STAT, 'Static',
	wbFlags(wbRecordFlagsFlags, [
	{0x00000001} { 0} '',
	{0x00000002} { 1} '',
	{0x00000004} { 2} 'Never Fades',
	{0x00000008} { 3} '',
	{0x00000010} { 4} '',
	{0x00000020} { 5} 'Deleted',
	{0x00000040} { 6} 'Has Tree LOD',
	{0x00000080} { 7} 'Add-On LOD Object',
	{0x00000100} { 8} '',
	{0x00000200} { 9} 'Hidden From Local Map',
	{0x00000400} {10} '',
	{0x00000800} {11} 'Unknown 11', // present in Skyrim.esm but can't be set
	{0x00001000} {12} '',
	{0x00002000} {13} '',
	{0x00004000} {14} '',
	{0x00008000} {15} 'Has Distant LOD',
	{0x00010000} {16} 'Unknown 16', // present in Skyrim.esm but can't be set
	{0x00020000} {17} 'Uses HD LOD Texture',
	{0x00040000} {18} '',
	{0x00080000} {19} 'Has Currents',
	{0x00100000} {20} '',
	{0x00200000} {21} '',
	{0x00400000} {22} '',
	{0x00800000} {23} 'Is Marker',
	{0x01000000} {24} '',
	{0x02000000} {25} 'Obstacle',
	{0x04000000} {26} 'NavMesh Generation - Filter',
	{0x08000000} {27} 'NavMesh Generation - Bounding Box',
	{0x10000000} {28} 'Show In World Map',
	{0x20000000} {29} '',
	{0x40000000} {30} 'NavMesh Generation - Ground',
	{0x80000000} {31} ''
	], [11, 16]), [
	wbEDID,
	wbOBNDReq,
	wbMODL,
	IsSSE(
		wbStruct(DNAM, 'Direction Material', [
			wbFloat('Max Angle (30-120)'),
			wbFormIDCk('Material', [MATO, NULL]),
			// SSE
			wbInteger('Flags', itU8, wbFlags([
			{0x01} 'Considered Snow'
			])),
			wbByteArray('Unused', 3, cpIgnore)
		], cpNormal, True, nil, 2),
		wbStruct(DNAM, 'Direction Material', [
			wbFloat('Max Angle (30-120)'),
			wbFormIDCk('Material', [MATO, NULL])
		], cpNormal, True)
	),
	wbArray(MNAM, 'Distant LOD',
	wbStruct('LOD', [
		{>>> Contains null-terminated mesh FileName followed by random data up to 260 bytes <<<}
		wbString(True, 'Mesh', 260)
		//wbByteArray('Mesh', 260, cpIgnore)
	]), [
		'Level 0',
		'Level 1',
		'Level 2',
		'Level 3'
	],
	cpNormal, False
	)
]);


[wbRecord(VOLI)]

wbRecord(VOLI)


Description:
if IsSSE then begin
	wbRecord(VOLI, 'Volumetric Lighting', [
		wbEDID,
		wbFloat(CNAM, 'Intensity'),
		wbFloat(DNAM, 'Custom Color - Contribution'),
		wbFloat(ENAM, 'Red', cpNormal, False, 255, 0),
		wbFloat(FNAM, 'Green', cpNormal, False, 255, 0),
		wbFloat(GNAM, 'Blue', cpNormal, False, 255, 0),
		wbFloat(HNAM, 'Density - Contribution'),
		wbFloat(INAM, 'Density - Size'),
		wbFloat(JNAM, 'Density - Wind Speed'),
		wbFloat(KNAM, 'Density - Falling Speed'),
		wbFloat(LNAM, 'Phase Function - Contribution'),
		wbFloat(MNAM, 'Phase Function - Scattering'),
		wbFloat(NNAM, 'Sampling Repartition - Range Factor') { max 1.0 }
	]);
end


[wbRecord(WATR)]

wbRecord(WATR)


Description:
wbRecord(WATR, 'Water', [
    wbEDID,
    wbFULL,
    wbRArray('Unused', wbString(NNAM, 'Noise Map', 0, cpIgnore, False)), // leftover
    wbInteger(ANAM, 'Opacity', itU8, nil, cpNormal, True),
    wbInteger(FNAM, 'Flags', itU8, wbFlags([
      {0x01} 'Causes Damage',
      {0x02} 'Unknown 1',
      {0x04} 'Unknown 2',
      {0x08} IsSSE('Enable Flowmap', 'Unknown 3'),
      {0x10} IsSSE('Blend Normals', 'Unknown 4'),
      {0x20} 'Unknown 5',
      {0x40} 'Unknown 6',
      {0x80} 'Unknown 7'
    ]), cpNormal, True),
    wbByteArray(MNAM, 'Unused', 0, cpIgnore, False),  // leftover
    wbFormIDCk(TNAM, 'Material', [MATT]),
    wbFormIDCk(SNAM, 'Open Sound', [SNDR, NULL]),
    wbFormIDCk(XNAM, 'Spell', [SPEL]),
    wbFormIDCk(INAM, 'Image Space', [IMGS]),
    IsSSE(
      wbInteger(DATA, 'Unused', itU16, nil, cpIgnore, True, True),
      wbInteger(DATA, 'Damage Per Second', itU16, nil, cpNormal, True, True)
    ),
    IsSSE(
		wbStruct(DNAM, 'Visual Data', [
			wbFloat('Unknown'),
			wbFloat('Unknown'),
			wbFloat('Unknown'),
			wbFloat('Unknown'),
			wbFloat('Specular Properties - Sun Specular Power'),
			wbFloat('Water Properties - Reflectivity Amount'),
			wbFloat('Water Properties - Fresnel Amount'),
			wbByteArray('Unknown', 4),
			wbFloat('Fog Properties - Above Water - Fog Distance - Near Plane'),
			wbFloat('Fog Properties - Above Water - Fog Distance - Far Plane'),
			wbByteColors('Shallow Color'),
			wbByteColors('Deep Color'),
			wbByteColors('Reflection Color'),
			wbByteArray('Unknown', 4),
			wbFloat('Unknown'),
			wbFloat('Unknown'),
			wbFloat('Unknown'),
			wbFloat('Unknown'),
			wbFloat('Displacement Simulator - Starting Size'),
			wbFloat('Displacement Simulator - Force'),
			wbFloat('Displacement Simulator - Velocity'),
			wbFloat('Displacement Simulator - Falloff'),
			wbFloat('Displacement Simulator - Dampner'),
			wbFloat('Unknown'),
			wbFloat('Noise Properties - Noise Falloff'),
			wbFloat('Noise Properties - Layer One - Wind Direction'),
			wbFloat('Noise Properties - Layer Two - Wind Direction'),
			wbFloat('Noise Properties - Layer Three - Wind Direction'),
			wbFloat('Noise Properties - Layer One - Wind Speed'),
			wbFloat('Noise Properties - Layer Two - Wind Speed'),
			wbFloat('Noise Properties - Layer Three - Wind Speed'),
			wbFloat('Unknown'),
			wbFloat('Unknown'),
			wbFloat('Fog Properties - Above Water - Fog Amount'),
			wbFloat('Unknown'),
			wbFloat('Fog Properties - Under Water - Fog Amount'),
			wbFloat('Fog Properties - Under Water - Fog Distance - Near Plane'),
			wbFloat('Fog Properties - Under Water - Fog Distance - Far Plane'),
			wbFloat('Water Properties - Refraction Magnitude'),
			wbFloat('Specular Properties - Specular Power'),
			wbFloat('Unknown'),
			wbFloat('Specular Properties - Specular Radius'),
			wbFloat('Specular Properties - Specular Brightness'),
			wbFloat('Noise Properties - Layer One - UV Scale'),
			wbFloat('Noise Properties - Layer Two - UV Scale'),
			wbFloat('Noise Properties - Layer Three - UV Scale'),
			wbFloat('Noise Properties - Layer One - Amplitude Scale'),
			wbFloat('Noise Properties - Layer Two - Amplitude Scale'),
			wbFloat('Noise Properties - Layer Three - Amplitude Scale'),
			wbFloat('Water Properties - Reflection Magnitude'),
			wbFloat('Specular Properties - Sun Sparkle Magnitude'),
			wbFloat('Specular Properties - Sun Specular Magnitude'),
			wbFloat('Depth Properties - Reflections'),
			wbFloat('Depth Properties - Refraction'),
			wbFloat('Depth Properties - Normals'),
			wbFloat('Depth Properties - Specular Lighting'),
			wbFloat('Specular Properties - Sun Sparkle Power'),
			// SSE
			wbFloat('Noise Properties - Flowmap Scale')
		], cpNormal, True, nil, 57),
		wbStruct(DNAM, 'Visual Data', [
			wbFloat('Unknown'),
			wbFloat('Unknown'),
			wbFloat('Unknown'),
			wbFloat('Unknown'),
			wbFloat('Specular Properties - Sun Specular Power'),
			wbFloat('Water Properties - Reflectivity Amount'),
			wbFloat('Water Properties - Fresnel Amount'),
			wbByteArray('Unknown', 4),
			wbFloat('Fog Properties - Above Water - Fog Distance - Near Plane'),
			wbFloat('Fog Properties - Above Water - Fog Distance - Far Plane'),
			wbByteColors('Shallow Color'),
			wbByteColors('Deep Color'),
			wbByteColors('Reflection Color'),
			wbByteArray('Unknown', 4),
			wbFloat('Unknown'),
			wbFloat('Unknown'),
			wbFloat('Unknown'),
			wbFloat('Unknown'),
			wbFloat('Displacement Simulator - Starting Size'),
			wbFloat('Displacement Simulator - Force'),
			wbFloat('Displacement Simulator - Velocity'),
			wbFloat('Displacement Simulator - Falloff'),
			wbFloat('Displacement Simulator - Dampner'),
			wbFloat('Unknown'),
			wbFloat('Noise Properties - Noise Falloff'),
			wbFloat('Noise Properties - Layer One - Wind Direction'),
			wbFloat('Noise Properties - Layer Two - Wind Direction'),
			wbFloat('Noise Properties - Layer Three - Wind Direction'),
			wbFloat('Noise Properties - Layer One - Wind Speed'),
			wbFloat('Noise Properties - Layer Two - Wind Speed'),
			wbFloat('Noise Properties - Layer Three - Wind Speed'),
			wbFloat('Unknown'),
			wbFloat('Unknown'),
			wbFloat('Fog Properties - Above Water - Fog Amount'),
			wbFloat('Unknown'),
			wbFloat('Fog Properties - Under Water - Fog Amount'),
			wbFloat('Fog Properties - Under Water - Fog Distance - Near Plane'),
			wbFloat('Fog Properties - Under Water - Fog Distance - Far Plane'),
			wbFloat('Water Properties - Refraction Magnitude'),
			wbFloat('Specular Properties - Specular Power'),
			wbFloat('Unknown'),
			wbFloat('Specular Properties - Specular Radius'),
			wbFloat('Specular Properties - Specular Brightness'),
			wbFloat('Noise Properties - Layer One - UV Scale'),
			wbFloat('Noise Properties - Layer Two - UV Scale'),
			wbFloat('Noise Properties - Layer Three - UV Scale'),
			wbFloat('Noise Properties - Layer One - Amplitude Scale'),
			wbFloat('Noise Properties - Layer Two - Amplitude Scale'),
			wbFloat('Noise Properties - Layer Three - Amplitude Scale'),
			wbFloat('Water Properties - Reflection Magnitude'),
			wbFloat('Specular Properties - Sun Sparkle Magnitude'),
			wbFloat('Specular Properties - Sun Specular Magnitude'),
			wbFloat('Depth Properties - Reflections'),
			wbFloat('Depth Properties - Refraction'),
			wbFloat('Depth Properties - Normals'),
			wbFloat('Depth Properties - Specular Lighting'),
			wbFloat('Specular Properties - Sun Sparkle Power')
		])
    ),
    wbByteArray(GNAM, 'Unused', 0, cpNormal, True),  // leftover
    wbStruct(NAM0, 'Linear Velocity', [
      wbFloat('X'),
      wbFloat('Y'),
      wbFloat('Z')
    ], cpNormal, False),
    wbStruct(NAM1, 'Angular Velocity', [
      wbFloat('X'),
      wbFloat('Y'),
      wbFloat('Z')
    ], cpNormal, False),
    wbString(NAM2, 'Noise Layer One - Noise Texture', 0, cpNormal, False),
    wbString(NAM3, 'Noise Layer Two - Noise Texture', 0, cpNormal, False),
    wbString(NAM4, 'Noise Layer Three - Noise Texture', 0, cpNormal, False),
    // SSE
    wbString(NAM5, 'Flow Normals - Noise Texture', 0, cpNormal, False)
], False, nil, cpNormal, False);


[wbRecord(WEAP)]

wbRecord(WEAP)


Description:
wbRecord(WEAP, 'Weapon',
	wbFlags(wbRecordFlagsFlags, wbFlagsList([
	{0x00000004}  2, 'Non-Playable'
	])), [
	wbEDID,
	wbVMAD,
	wbOBNDReq,
	wbFULL,
	wbMODL,
	wbICON,
	wbEITM,
	wbInteger(EAMT, 'Enchantment Amount', itU16),
	wbDEST,
	wbETYP,
	wbFormIDCk(BIDS, 'Block Bash Impact Data Set', [IPDS, NULL]),
	wbFormIDCk(BAMT, 'Alternate Block Material', [MATT, NULL]),
	wbYNAM,
	wbZNAM,
	wbKSIZ,
	wbKWDAs,
	wbDESC,
	wbRStruct('Has Scope', [
	wbString(MOD3, 'Model FileName'),
	wbByteArray(MO3T, 'Texture Files Hashes', 0, cpIgnore, false, false, wbNeverShow),
	wbMO3S
	], []),
	wbByteArray(NNAM, 'Unused', 0, cpIgnore, False), // leftover
	wbFormIDCk(INAM, 'Impact Data Set', [IPDS, NULL]),
	wbFormIDCk(WNAM, '1st Person Model Object', [STAT, NULL]),
	wbFormIDCk(SNAM, 'Attack Sound', [SNDR]),
	wbFormIDCk(XNAM, 'Attack Sound 2D', [SNDR]),
	wbFormIDCk(NAM7, 'Attack Loop Sound', [SNDR]),
	wbFormIDCk(TNAM, 'Attack Fail Sound', [SNDR]),
	wbFormIDCk(UNAM, 'Idle Sound', [SNDR]),
	wbFormIDCk(NAM9, 'Equip Sound', [SNDR]),
	wbFormIDCk(NAM8, 'Unequip Sound', [SNDR]),
	wbStruct(DATA, 'Game Data', [
	wbInteger('Value', itU32),
	wbFloat('Weight'),
	wbInteger('Damage', itU16)
	]),
	wbStruct(DNAM, 'Data', [
	wbInteger('Animation Type', itU8, wbWeaponAnimTypeEnum),
	wbByteArray('Unused', 3, cpIgnore),
	wbFloat('Speed'),
	wbFloat('Reach'),
	wbInteger('Flags', itU16, wbFlags([
		{0x0001}'Ignores Normal Weapon Resistance',
		{0x0002}'Automatic (unused)',
		{0x0004}'Has Scope (unused)',
		{0x0008}'Can''t Drop',
		{0x0010}'Hide Backpack (unused)',
		{0x0020}'Embedded Weapon (unused)',
		{0x0040}'Don''t Use 1st Person IS Anim (unused)',
		{0x0080}'Non-playable'
	], [1, 2, 4, 5, 6])),
	wbByteArray('Unused', 2, cpIgnore),
	wbFloat('Sight FOV'),
	wbByteArray('Unknown', 4),
	wbInteger('Base VATS To-Hit Chance', itU8),
	wbInteger('Attack Animation', itU8, wbAttackAnimationEnum),
	wbInteger('# Projectiles', itU8),
	wbInteger('Embedded Weapon AV (unused)', itU8),
	wbFloat('Range Min'),
	wbFloat('Range Max'),
	wbInteger('On Hit', itU32, wbEnum([
		'No formula behaviour',
		'Dismember only',
		'Explode only',
		'No dismember/explode'
	])),
	wbInteger('Flags2', itU32, wbFlags([
		{0x00000001} 'Player Only',
		{0x00000002} 'NPCs Use Ammo',
		{0x00000004} 'No Jam After Reload (unused)',
		{0x00000008} 'Unknown 4',
		{0x00000010} 'Minor Crime',
		{0x00000020} 'Range Fixed',
		{0x00000040} 'Not Used in Normal Combat',
		{0x00000080} 'Unknown 8',
		{0x00000100} 'Don''t Use 3rd Person IS Anim (unused)',
		{0x00000200} 'Burst Shot',
		{0x00000400} 'Rumble - Alternate',
		{0x00000800} 'Long Bursts',
		{0x00001000} 'Non-hostile',
		{0x00002000} 'Bound Weapon'
	], [2, 8])),
	wbFloat('Animation Attack Mult'),
	wbFloat('Unknown'),
	wbFloat('Rumble - Left Motor Strength'),
	wbFloat('Rumble - Right Motor Strength'),
	wbFloat('Rumble - Duration'),
	wbByteArray('Unknown', 12),
	wbInteger('Skill', itS32, wbSkillEnum),
	wbByteArray('Unknown', 8),
	wbInteger('Resist', itS32, wbActorValueEnum),
	wbByteArray('Unknown', 4),
	wbFloat('Stagger')
	]),
	IsSSE(
		wbStruct(CRDT, 'Critical Data', [
			wbInteger('Damage', itU16),
			wbByteArray('Unused', 2, cpIgnore),
			wbFloat('% Mult'),
			wbInteger('Flags', itU8, wbFlags([
			'On Death'
			])),
			wbByteArray('Unused', 7, cpIgnore),
			wbFormIDCk('Effect', [SPEL, NULL]),
			wbByteArray('Unused', 4, cpIgnore)
		]),
		wbStruct(CRDT, 'Critical Data', [
			wbInteger('Damage', itU16),
			wbByteArray('Unused', 2, cpIgnore),
			wbFloat('% Mult'),
			wbInteger('Flags', itU8, wbFlags([
			'On Death'
			])),
			wbByteArray('Unused', 3, cpIgnore),
			wbFormIDCk('Effect', [SPEL, NULL])
		])
	),
	wbInteger(VNAM, 'Detection Sound Level', itU32, wbSoundlevelEnum),
	wbFormIDCk(CNAM, 'Template', [WEAP])
], False, nil, cpNormal, False, wbWEAPAfterLoad, wbKeywordsAfterSet);


[wbRecord(WRLD)]

wbRecord(WRLD)


Description:
wbRecord(WRLD, 'Worldspace',
	wbFlags(wbRecordFlagsFlags, wbFlagsList([
	{0x00080000} 19, 'Can''t Wait'
	])), [
	wbEDID,
	wbRArray(IsSSE('Large References', 'Unused RNAM'),
	wbStruct(RNAM, 'Grid', [
		wbInteger('Y', itS16, nil, cpIgnore),
		wbInteger('X', itS16, nil, cpIgnore),
		wbArray('References', wbStruct('Reference', [
		wbFormIDCk('Ref', [REFR], False, cpIgnore),
		wbInteger('Y', itS16, nil, cpIgnore),
		wbInteger('X', itS16, nil, cpIgnore)
		]), -1).IncludeFlag(dfNotAlignable)
	]),
	cpIgnore, False, nil, nil, wbNeverShow
	).IncludeFlag(dfNotAlignable),
	wbMaxHeightDataWRLD,
	wbFULL,
	wbStruct(WCTR, 'Fixed Dimensions Center Cell', [
	wbInteger('X', itS16),
	wbInteger('Y', itS16)
	]),
	wbFormIDCk(LTMP, 'Interior Lighting', [LGTM]),
	wbFormIDCk(XEZN, 'Encounter Zone', [ECZN, NULL]),
	wbFormIDCk(XLCN, 'Location', [LCTN, NULL]),
	wbRStruct('Parent', [
	wbFormIDCk(WNAM, 'Worldspace', [WRLD]),
	wbStruct(PNAM, '', [
		wbInteger('Flags', itU8, wbFlags([
		{0x0001}'Use Land Data',
		{0x0002}'Use LOD Data',
		{0x0004}'Use Map Data',
		{0x0008}'Use Water Data',
		{0x0010}'Use Climate Data',
		{0x0020}'Use Image Space Data (unused)',
		{0x0040}'Use Sky Cell'
		], [5])),
		wbByteArray('Unknown', 1)
	], cpNormal, True)
	], []),
	wbFormIDCk(CNAM, 'Climate', [CLMT]),
	wbFormIDCk(NAM2, 'Water', [WATR]),
	wbFormIDCk(NAM3, 'LOD Water Type', [WATR]),
	wbFloat(NAM4, 'LOD Water Height'),
	wbStruct(DNAM, 'Land Data', [
	wbFloat('Default Land Height'),
	wbFloat('Default Water Height')
	]),
	wbString(ICON, 'Map Image'),
	wbRStruct('Cloud Model', [wbMODL], []),
	wbStruct(MNAM, 'Map Data', [
	wbStruct('Usable Dimensions', [
		wbInteger('X', itS32),
		wbInteger('Y', itS32)
	]),
	wbStruct('Cell Coordinates', [
		wbStruct('NW Cell', [
		wbInteger('X', itS16),
		wbInteger('Y', itS16)
		]),
		wbStruct('SE Cell', [
		wbInteger('X', itS16),
		wbInteger('Y', itS16)
		])
	]),
	wbStruct('Camera Data', [
		wbFloat('Min Height'),
		wbFloat('Max Height'),
		wbFloat('Initial Pitch')
	])
	], cpNormal, False, nil, 2),
	wbStruct(ONAM, 'World Map Offset Data', [
	wbFloat('World Map Scale'),
	wbFloat('Cell X Offset'),
	wbFloat('Cell Y Offset'),
	wbFloat('Cell Z Offset')
	], cpNormal, True),
	wbFloat(NAMA, 'Distant LOD Multiplier'),
	wbInteger(DATA, 'Flags', itU8, wbFlags([
	{0x01} 'Small World',
	{0x02} 'Can''t Fast Travel',
	{0x04} 'Unknown 3',
	{0x08} 'No LOD Water',
	{0x10} 'No Landscape',
	{0x20} 'No Sky',
	{0x40} 'Fixed Dimensions',
	{0x80} 'No Grass'
	]), cpNormal, True),
	{>>> Object Bounds doesn't show up in CK <<<}
	wbRStruct('Object Bounds', [
	wbStruct(NAM0, 'Min', [
		wbFloat('X', cpNormal, False, 1/4096),
		wbFloat('Y', cpNormal, False, 1/4096)
	], cpIgnore, True),
	wbStruct(NAM9, 'Max', [
		wbFloat('X', cpNormal, False, 1/4096),
		wbFloat('Y', cpNormal, False, 1/4096)
	], cpIgnore, True)
	], []),
	wbFormIDCk(ZNAM, 'Music', [MUSC]),
	wbString(NNAM, 'Canopy Shadow (unused)', 0, cpIgnore),
	wbString(XNAM, 'Water Noise Texture'),
	wbString(TNAM, 'HD LOD Diffuse Texture'),
	wbString(UNAM, 'HD LOD Normal Texture'),
	wbString(XWEM, 'Water Environment Map (unused)', 0, cpIgnore),
	wbOFST
], False, nil, cpNormal, False, wbWRLDAfterLoad);


[wbRecord(WTHR)]

wbRecord(WTHR)


Description:
wbRecord(WTHR, 'Weather', [
    wbEDID,
    wbString(_00_0TX, 'Cloud Texture Layer #0'),
    wbString(_10_0TX, 'Cloud Texture Layer #1'),
    wbString(_20_0TX, 'Cloud Texture Layer #2'),
    wbString(_30_0TX, 'Cloud Texture Layer #3'),
    wbString(_40_0TX, 'Cloud Texture Layer #4'),
    wbString(_50_0TX, 'Cloud Texture Layer #5'),
    wbString(_60_0TX, 'Cloud Texture Layer #6'),
    wbString(_70_0TX, 'Cloud Texture Layer #7'),
    wbString(_80_0TX, 'Cloud Texture Layer #8'),
    wbString(_90_0TX, 'Cloud Texture Layer #9'),
    wbString(_3A_0TX, 'Cloud Texture Layer #10'),
    wbString(_3B_0TX, 'Cloud Texture Layer #11'),
    wbString(_3C_0TX, 'Cloud Texture Layer #12'),
    wbString(_3D_0TX, 'Cloud Texture Layer #13'),
    wbString(_3E_0TX, 'Cloud Texture Layer #14'),
    wbString(_3F_0TX, 'Cloud Texture Layer #15'),
    wbString(_40h_0TX, 'Cloud Texture Layer #16'),
    wbString(A0TX, 'Cloud Texture Layer #17'),
    wbString(B0TX, 'Cloud Texture Layer #18'),
    wbString(C0TX, 'Cloud Texture Layer #19'),
    wbString(D0TX, 'Cloud Texture Layer #20'),
    wbString(E0TX, 'Cloud Texture Layer #21'),
    wbString(F0TX, 'Cloud Texture Layer #22'),
    wbString(G0TX, 'Cloud Texture Layer #23'),
    wbString(H0TX, 'Cloud Texture Layer #24'),
    wbString(I0TX, 'Cloud Texture Layer #25'),
    wbString(J0TX, 'Cloud Texture Layer #26'),
    wbString(K0TX, 'Cloud Texture Layer #27'),
    wbString(L0TX, 'Cloud Texture Layer #28'),
    wbByteArray(DNAM, 'Unused', 0, cpIgnore),
    wbByteArray(CNAM, 'Unused', 0, cpIgnore),
    wbByteArray(ANAM, 'Unused', 0, cpIgnore),
    wbByteArray(BNAM, 'Unused', 0, cpIgnore),
    wbUnknown(LNAM),
    wbFormIDCK(MNAM, 'Precipitation Type', [SPGD, NULL]),
    wbFormIDCK(NNAM, 'Visual Effect', [RFCT, NULL], False, cpNormal, True),
    wbByteArray(ONAM, 'Unused', 0, cpIgnore),
    wbRStruct('Cloud Speed', [
      wbArray(RNAM, 'Y Speed', wbInteger('Layer', itU8, wbCloudSpeedToStr, wbCloudSpeedToInt)).IncludeFlag(dfNotAlignable),
      wbArray(QNAM, 'X Speed', wbInteger('Layer', itU8, wbCloudSpeedToStr, wbCloudSpeedToInt)).IncludeFlag(dfNotAlignable)
    ], []),
    wbArray(PNAM, 'Cloud Colors', wbWeatherColors('Layer')).IncludeFlag(dfNotAlignable),
    wbArray(JNAM, 'Cloud Alphas', wbStruct('Layer', [
      wbFloat('Sunrise'),
      wbFloat('Day'),
      wbFloat('Sunset'),
      wbFloat('Night')
    ])).IncludeFlag(dfNotAlignable),
    {>>> not as an array since last entries are omitted in skyrim.esm <<<}
    wbStruct(NAM0, 'Weather Colors', [
      wbWeatherColors('Sky-Upper'),
      wbWeatherColors('Fog Near'),
      wbWeatherColors('Unknown'),
      wbWeatherColors('Ambient'),
      wbWeatherColors('Sunlight'),
      wbWeatherColors('Sun'),
      wbWeatherColors('Stars'),
      wbWeatherColors('Sky-Lower'),
      wbWeatherColors('Horizon'),
      wbWeatherColors('Effect Lighting'),
      wbWeatherColors('Cloud LOD Diffuse'),
      wbWeatherColors('Cloud LOD Ambient'),
      wbWeatherColors('Fog Far'),
      wbWeatherColors('Sky Statics'),
      wbWeatherColors('Water Multiplier'),
      wbWeatherColors('Sun Glare'),
      wbWeatherColors('Moon Glare')
    ], cpNormal, True, nil, 13),
    wbStruct(FNAM, 'Fog Distance', [
      wbFloat('Day - Near'),
      wbFloat('Day - Far'),
      wbFloat('Night - Near'),
      wbFloat('Night - Far'),
      wbFloat('Day - Power'),
      wbFloat('Night - Power'),
      wbFloat('Day - Max'),
      wbFloat('Night - Max')
    ], cpNormal, True),
    wbStruct(DATA, 'Data', [
      wbInteger('Wind Speed', itU8), // scaled 0..1
      wbByteArray('Unknown', 2),
      wbInteger('Trans Delta', itU8), // scaled 0..0,25
      wbInteger('Sun Glare', itU8), // scaled 0..1
      wbInteger('Sun Damage', itU8), // scaled 0..1
      wbInteger('Precipitation - Begin Fade In', itU8), // scaled 0..1
      wbInteger('Precipitation - End Fade Out', itU8), // scaled 0..1
      wbInteger('Thunder/Lightning - Begin Fade In', itU8),
      wbInteger('Thunder/Lightning - End Fade Out', itU8),
      wbInteger('Thunder/Lightning - Frequency', itU8),
      wbInteger('Flags', itU8, wbFlags([
        {0x01} 'Weather - Pleasant',
        {0x02} 'Weather - Cloudy',
        {0x04} 'Weather - Rainy',
        {0x08} 'Weather - Snow',
        {0x10} 'Sky Statics - Always Visible',
        {0x20} 'Sky Statics - Follows Sun Position'
      ])),
      wbStruct('Lightning Color', [
        wbInteger('Red', itU8),
        wbInteger('Green', itU8),
        wbInteger('Blue', itU8)
      ]),
      wbInteger('Visual Effect - Begin', itU8), // scaled 0..1
      wbInteger('Visual Effect - End', itU8), // scaled 0..1
      wbInteger('Wind Direction', itU8), // scaled 0..360
      wbInteger('Wind Direction Range', itU8) // scaled 0..180
    ], cpNormal, True),
    wbInteger(NAM1, 'Disabled Cloud Layers', itU32, wbFlags(['0','1','2','3','4','5','6','7','8','9','10','11','12','13','14','15','16','17','18','19','20','21','22','23','24','25','26','27','28','29','30','31'])),
    wbRArray('Sounds',
      wbStruct(SNAM, 'Sound', [
        wbFormIDCK('Sound', [SNDR, SOUN, NULL]),
        wbInteger('Type', itU32, wbEnum([
          {0x01} 'Default',
          {0x02} 'Precipitation',
          {0x04} 'Wind',
          {0x08} 'Thunder'
        ]))
      ])
    ),
    wbRArrayS('Sky Statics', wbFormIDCk(TNAM, 'Static', [STAT, NULL])),
    wbStruct(IMSP, 'Image Spaces', [
      wbFormIDCK('Sunrise', [IMGS, NULL]),
      wbFormIDCK('Day', [IMGS, NULL]),
      wbFormIDCK('Sunset', [IMGS, NULL]),
      wbFormIDCK('Night', [IMGS, NULL])
    ]),
    // SSE
    wbStruct(HNAM, 'Volumetric Lighting', [
      wbFormIDCK('Sunrise', [VOLI, NULL]),
      wbFormIDCK('Day', [VOLI, NULL]),
      wbFormIDCK('Sunset', [VOLI, NULL]),
      wbFormIDCK('Night', [VOLI, NULL])
    ]),
    wbRStruct('Directional Ambient Lighting Colors', [
      wbAmbientColors(DALC, 'Sunrise'),
      wbAmbientColors(DALC, 'Day'),
      wbAmbientColors(DALC, 'Sunset'),
      wbAmbientColors(DALC, 'Night')
    ], [], cpNormal, True),
    wbByteArray(NAM2, 'Unused', 0, cpIgnore),
    wbByteArray(NAM3, 'Unused', 0, cpIgnore),
    wbRStruct('Aurora', [wbMODL], []),
    wbFormIDCk(GNAM, 'Sun Glare Lens Flare', [LENS])
]);



Note: despite the page category warning, the syntax highlighting blocks should be correct by documentation. The issue is within the extension code for the wiki.


The above should consist of the SSE-related record definitions found within xEdit, which is a good source for building the list of record changes.

Please note that, as the warning says, at this time the wiki seems to mutilate the code blocks resulting in data loss. Please DO NOT edit this page at any point. Instead, use the + icon located to the right of edit. Multiple posts are expected.

Ebtg4fL.png

--Archivist Feleesi (talk) 02:05, 8 August 2019 (BST)