CyborgArmGun

Skyrim - KL Swap Headparts

Sep 10th, 2020
1,311
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. {
  2.   High Poly Head utility script by KouLeifoh.
  3.   Swap vanilla head parts for their high poly versions.
  4.   Requires High Poly Head v1.4+
  5.  
  6.   High Poly Head.esm must be in the load order of xEdit.
  7. }
  8. unit UserScript;
  9.  
  10. const
  11. //***************************************************************************************//
  12.   UseDawnguard = true;   // enable Snow Elf race and vampire heads
  13. //***************************************************************************************//
  14.   EnableLog = false;
  15.   NumRaces   = 26;
  16.   NumBrowsM  = 18;
  17.   NumBrowsF  = 12;
  18.   NumBrowsAM = 2;
  19.   NumBrowsAF = 2;
  20.   NumScarsHM = 17;
  21.   NumScarsHF = 15;
  22.   NumScarsAM = 10;
  23.   NumScarsAF = 10;
  24.   NumScarsKM = 12;
  25.   NumScarsKF = 13;
  26.   NumBeardsM = 45;
  27.   SNone = 'none';
  28. var
  29.   kwda: IInterface;
  30.   LoadOrder: string;
  31.   HasMaster: boolean;
  32.   FoundMaster: boolean;
  33.  
  34.   Races: Array[1..26] of string;
  35.  
  36.   HeadsM1: Array[1..26] of string;
  37.   HeadsM2: Array[1..26] of string;
  38.  
  39.   HeadsF1: Array[1..26] of string;
  40.   HeadsF2: Array[1..26] of string;
  41.  
  42.   BrowsMR: Array[1..26] of string;
  43.   BrowsFR: Array[1..26] of string;
  44.  
  45.   BrowsM1: Array[1..18] of string;
  46.   BrowsM2: Array[1..18] of string;
  47.  
  48.   BrowsF1: Array[1..12] of string;
  49.   BrowsF2: Array[1..12] of string;
  50.  
  51.   BrowsAM1: Array[1..12] of string;
  52.   BrowsAM2: Array[1..12] of string;
  53.  
  54.   BrowsAF1: Array[1..12] of string;
  55.   BrowsAF2: Array[1..12] of string;
  56.  
  57.   ScarsHM1: Array[1..17] of string;
  58.   ScarsHM2: Array[1..17] of string;
  59.  
  60.   ScarsHF1: Array[1..15] of string;
  61.   ScarsHF2: Array[1..15] of string;
  62.  
  63.   ScarsAM1: Array[1..10] of string;
  64.   ScarsAM2: Array[1..10] of string;
  65.  
  66.   ScarsAF1: Array[1..10] of string;
  67.   ScarsAF2: Array[1..10] of string;
  68.  
  69.   ScarsKM1: Array[1..12] of string;
  70.   ScarsKM2: Array[1..12] of string;
  71.  
  72.   ScarsKF1: Array[1..13] of string;
  73.   ScarsKF2: Array[1..13] of string;
  74.  
  75.   BeardsM1: Array[1..45] of string;
  76.   BeardsM2: Array[1..45] of string;
  77.  
  78. function buildList(): Boolean;
  79. var
  80.   i: integer;
  81. begin
  82.   i := 1;
  83.   Races[i] := 'BretonRace "Breton" [RACE:00013741]'; i := i + 1;
  84.   Races[i] := 'DarkElfRace "Dark Elf" [RACE:00013742]'; i := i + 1;
  85.   Races[i] := 'HighElfRace "High Elf" [RACE:00013743]'; i := i + 1;
  86.   Races[i] := 'ImperialRace "Imperial" [RACE:00013744]'; i := i + 1;
  87.   Races[i] := 'NordRace "Nord" [RACE:00013746]'; i := i + 1;
  88.   Races[i] := 'OrcRace "Orc" [RACE:00013747]'; i := i + 1;
  89.   Races[i] := 'RedguardRace "Redguard" [RACE:00013748]'; i := i + 1;
  90.   Races[i] := 'WoodElfRace "Wood Elf" [RACE:00013749]'; i := i + 1;
  91.   Races[i] := 'ArgonianRace "Argonian" [RACE:00013740]'; i := i + 1;
  92.   Races[i] := 'KhajiitRace "Khajiit" [RACE:00013745]'; i := i + 1;
  93.   Races[i] := 'DA13AfflictedRace "Breton" [RACE:00097A3D]'; i := i + 1;
  94.   Races[i] := 'DremoraRace "Dremora" [RACE:000131F0]'; i := i + 1;
  95.   Races[i] := 'ElderRace "Old People Race" [RACE:00067CD8]'; i := i + 1;
  96.   Races[i] := 'ElderRaceVampire "Old People Race" [RACE:000A82BA]'; i := i + 1;
  97.   Races[i] := 'NordRaceAstrid "Nord" [RACE:0007EAF3]'; i := i + 1;
  98.   Races[i] := 'BretonRaceVampire "Breton" [RACE:0008883C]'; i := i + 1;
  99.   Races[i] := 'DarkElfRaceVampire "Dark Elf" [RACE:0008883D]'; i := i + 1;
  100.   Races[i] := 'HighElfRaceVampire "High Elf" [RACE:00088840]'; i := i + 1;
  101.   Races[i] := 'ImperialRaceVampire "Imperial" [RACE:00088844]'; i := i + 1;
  102.   Races[i] := 'NordRaceVampire "Nord" [RACE:00088794]'; i := i + 1;
  103.   Races[i] := 'OrcRaceVampire "Orc" [RACE:000A82B9]'; i := i + 1;
  104.   Races[i] := 'RedguardRaceVampire "Redguard" [RACE:00088846]'; i := i + 1;
  105.   Races[i] := 'WoodElfRaceVampire "Wood Elf" [RACE:00088884]'; i := i + 1;
  106.   Races[i] := 'ArgonianRaceVampire "Argonian" [RACE:0008883A]'; i := i + 1;
  107.   Races[i] := 'KhajiitRaceVampire "Khajiit" [RACE:00088845]'; i := i + 1;
  108.   if UseDawnguard then
  109.     Races[i] := 'SnowElfRace "High Elf" [RACE:0200377D]'
  110.   else
  111.     Races[i] := 'HighElfRace "High Elf" [RACE:00013743]';
  112.  
  113.   i := 1;
  114.   HeadsM1[i] := 'MaleHeadBreton "MaleHeadBreton" [HDPT:00051633]'; i := i + 1;
  115.   HeadsM1[i] := 'MaleHeadDarkElf "MaleHeadDarkElf" [HDPT:0005162C]'; i := i + 1;
  116.   HeadsM1[i] := 'MaleHeadHighElf "MaleHeadHighElf" [HDPT:0005162D]'; i := i + 1;
  117.   HeadsM1[i] := 'MaleHeadImperial "MaleHeadImperial" [HDPT:00051630]'; i := i + 1;
  118.   HeadsM1[i] := 'MaleHeadNord "MaleHeadNord" [HDPT:0005162F]'; i := i + 1;
  119.   HeadsM1[i] := 'MaleHeadOrc "MaleHeadOrc" [HDPT:0005162A]'; i := i + 1;
  120.   HeadsM1[i] := 'MaleHeadRedguard "MaleHeadRedguard" [HDPT:0005162E]'; i := i + 1;
  121.   HeadsM1[i] := 'MaleHeadWoodElf "MaleHeadWoodElf" [HDPT:0005162B]'; i := i + 1;
  122.   HeadsM1[i] := 'MaleHeadArgonian "MaleHeadArgonian" [HDPT:00051614]'; i := i + 1;
  123.   HeadsM1[i] := 'MaleHeadKhajiit "MaleHeadKhajiit" [HDPT:00051616]'; i := i + 1;
  124.   HeadsM1[i] := 'MaleHeadBretonAfflicted "MaleHeadBretonAfflicted" [HDPT:00097A42]'; i := i + 1;
  125.   HeadsM1[i] := 'MaleHeadDremora "MaleHeadDremora" [HDPT:00051611]'; i := i + 1;
  126.   HeadsM1[i] := 'MaleHeadElder "MaleHeadElder" [HDPT:00051629]'; i := i + 1;
  127.   HeadsM1[i] := 'MaleHeadElder "MaleHeadElder" [HDPT:00051629]'; i := i + 1;
  128.   HeadsM1[i] := SNone; i := i + 1;
  129.   if UseDawnguard then begin
  130.     HeadsM1[i] := 'MaleHeadBretonVampire "MaleHeadBretonVampire" [HDPT:02006F8D]'; i := i + 1;
  131.     HeadsM1[i] := 'MaleHeadDarkElfVampire "MaleHeadDarkElfVampire" [HDPT:02006F84]'; i := i + 1;
  132.     HeadsM1[i] := 'MaleHeadHighElfVampire "MaleHeadHighElfVampire" [HDPT:02006F8C]'; i := i + 1;
  133.     HeadsM1[i] := 'MaleHeadImperialVampire "MaleHeadImperialVampire" [HDPT:02006F8B]'; i := i + 1;
  134.     HeadsM1[i] := 'MaleHeadNordVampire "MaleHeadNordVampire" [HDPT:02006F8A]'; i := i + 1;
  135.     HeadsM1[i] := 'MaleHeadOrcVampire "MaleHeadOrcVampire" [HDPT:02006F9A]'; i := i + 1;
  136.     HeadsM1[i] := 'MaleHeadRedguardVampire "MaleHeadRedguardVampire" [HDPT:02006F8E]'; i := i + 1;
  137.     HeadsM1[i] := 'MaleHeadWoodElfVampire "MaleHeadWoodElfVampire" [HDPT:02006F8F]'; i := i + 1;
  138.     HeadsM1[i] := 'MaleHeadArgonian "MaleHeadArgonian" [HDPT:00051614]'; i := i + 1;
  139.     HeadsM1[i] := 'MaleHeadKhajiit "MaleHeadKhajiit" [HDPT:00051616]'; i := i + 1;
  140.     HeadsM1[i] := 'MaleHeadHighElfSnow "MaleHeadHighElfSnow" [HDPT:02003784]';
  141.   end else begin
  142.     HeadsM1[i] := 'MaleHeadBreton "MaleHeadBreton" [HDPT:00051633]'; i := i + 1;
  143.     HeadsM1[i] := 'MaleHeadDarkElf "MaleHeadDarkElf" [HDPT:0005162C]'; i := i + 1;
  144.     HeadsM1[i] := 'MaleHeadHighElf "MaleHeadHighElf" [HDPT:0005162D]'; i := i + 1;
  145.     HeadsM1[i] := 'MaleHeadImperial "MaleHeadImperial" [HDPT:00051630]'; i := i + 1;
  146.     HeadsM1[i] := 'MaleHeadNord "MaleHeadNord" [HDPT:0005162F]'; i := i + 1;
  147.     HeadsM1[i] := 'MaleHeadOrc "MaleHeadOrc" [HDPT:0005162A]'; i := i + 1;
  148.     HeadsM1[i] := 'MaleHeadRedguard "MaleHeadRedguard" [HDPT:0005162E]'; i := i + 1;
  149.     HeadsM1[i] := 'MaleHeadWoodElf "MaleHeadWoodElf" [HDPT:0005162B]'; i := i + 1;
  150.     HeadsM1[i] := 'MaleHeadArgonian "MaleHeadArgonian" [HDPT:00051614]'; i := i + 1;
  151.     HeadsM1[i] := 'MaleHeadKhajiit "MaleHeadKhajiit" [HDPT:00051616]'; i := i + 1;
  152.     HeadsM1[i] := 'MaleHeadHighElf "MaleHeadHighElf" [HDPT:0005162D]';
  153.   end;
  154.  
  155.   i := 1;
  156.   HeadsF1[i] := 'FemaleHeadBreton "FemaleHeadBreton" [HDPT:00051621]'; i := i + 1;
  157.   HeadsF1[i] := 'FemaleHeadDarkElf "FemaleHeadDarkElf" [HDPT:0005161C]'; i := i + 1;
  158.   HeadsF1[i] := 'FemaleHeadHighElf "FemaleHeadHighElf" [HDPT:0005161E]'; i := i + 1;
  159.   HeadsF1[i] := 'FemaleHeadImperial "FemaleHeadImperial" [HDPT:0005161D]'; i := i + 1;
  160.   HeadsF1[i] := 'FemaleHeadNord "FemaleHeadNord" [HDPT:00051623]'; i := i + 1;
  161.   HeadsF1[i] := 'FemaleHeadOrc "FemaleHeadOrc" [HDPT:0005161B]'; i := i + 1;
  162.   HeadsF1[i] := 'FemaleHeadRedguard "FemaleHeadRedguard" [HDPT:00051622]'; i := i + 1;
  163.   HeadsF1[i] := 'FemaleHeadWoodElf "FemaleHeadWoodElf" [HDPT:0005161F]'; i := i + 1;
  164.   HeadsF1[i] := 'FemaleHeadArgonian "FemaleHeadArgonian" [HDPT:00051613]'; i := i + 1;
  165.   HeadsF1[i] := 'FemaleHeadKhajiit "FemaleHeadKhajiit" [HDPT:00051612]'; i := i + 1;
  166.   HeadsF1[i] := 'FemaleHeadBretonAfflicted "FemaleHeadNordAstrid" [HDPT:00097A41]'; i := i + 1;
  167.   HeadsF1[i] := 'FemaleHeadDremora "FemaleHeadDremora" [HDPT:0005160F]'; i := i + 1;
  168.   HeadsF1[i] := 'FemaleHeadElder "FemaleHeadElder" [HDPT:00051620]'; i := i + 1;
  169.   HeadsF1[i] := 'FemaleHeadElder "FemaleHeadElder" [HDPT:00051620]'; i := i + 1;
  170.   HeadsF1[i] := 'FemaleHeadNordAstrid "FemaleHeadNordAstrid" [HDPT:0007EAF2]'; i := i + 1;
  171.   if UseDawnguard then begin
  172.     HeadsF1[i] := 'FemaleHeadBretonVampire "FemaleHeadBretonVampire" [HDPT:02006F93]'; i := i + 1;
  173.     HeadsF1[i] := 'FemaleHeadDarkElfVampire "FemaleHeadDarkElfVampire" [HDPT:02006F92]'; i := i + 1;
  174.     HeadsF1[i] := 'FemaleHeadHighElfVampire "FemaleHeadHighElfVampire" [HDPT:02006F95]'; i := i + 1;
  175.     HeadsF1[i] := 'FemaleHeadImperialVampire "FemaleHeadImperialVampire" [HDPT:02006F96]'; i := i + 1;
  176.     HeadsF1[i] := 'FemaleHeadNordVampire "FemaleHeadNordVampire" [HDPT:02006F97]'; i := i + 1;
  177.     HeadsF1[i] := 'FemaleHeadOrcVampire "FemaleHeadOrcVampire" [HDPT:02006F9B]'; i := i + 1;
  178.     HeadsF1[i] := 'FemaleHeadRedguardVampire "FemaleHeadRedguardVampire" [HDPT:02006F98]'; i := i + 1;
  179.     HeadsF1[i] := 'FemaleHeadWoodElfVampire "FemaleHeadWoodElfVampire" [HDPT:02006F99]'; i := i + 1;
  180.     HeadsF1[i] := 'FemaleHeadArgonian "FemaleHeadArgonian" [HDPT:00051613]'; i := i + 1;
  181.     HeadsF1[i] := 'FemaleHeadKhajiit "FemaleHeadKhajiit" [HDPT:00051612]'; i := i + 1;
  182.     HeadsF1[i] := SNone;
  183.   end else begin
  184.     HeadsF1[i] := 'FemaleHeadBreton "FemaleHeadBreton" [HDPT:00051621]'; i := i + 1;
  185.     HeadsF1[i] := 'FemaleHeadDarkElf "FemaleHeadDarkElf" [HDPT:0005161C]'; i := i + 1;
  186.     HeadsF1[i] := 'FemaleHeadHighElf "FemaleHeadHighElf" [HDPT:0005161E]'; i := i + 1;
  187.     HeadsF1[i] := 'FemaleHeadImperial "FemaleHeadImperial" [HDPT:0005161D]'; i := i + 1;
  188.     HeadsF1[i] := 'FemaleHeadNord "FemaleHeadNord" [HDPT:00051623]'; i := i + 1;
  189.     HeadsF1[i] := 'FemaleHeadOrc "FemaleHeadOrc" [HDPT:0005161B]'; i := i + 1;
  190.     HeadsF1[i] := 'FemaleHeadRedguard "FemaleHeadRedguard" [HDPT:00051622]'; i := i + 1;
  191.     HeadsF1[i] := 'FemaleHeadWoodElf "FemaleHeadWoodElf" [HDPT:0005161F]'; i := i + 1;
  192.     HeadsF1[i] := 'FemaleHeadArgonian "FemaleHeadArgonian" [HDPT:00051613]'; i := i + 1;
  193.     HeadsF1[i] := 'FemaleHeadKhajiit "FemaleHeadKhajiit" [HDPT:00051612]'; i := i + 1;
  194.     HeadsF1[i] := 'FemaleHeadHighElf "FemaleHeadHighElf" [HDPT:0005161E]';
  195.   end;
  196.  
  197.   i := 1;
  198.   HeadsM2[i] := '00KLH_MaleHeadBreton "MaleHeadBreton" [HDPT:' + LoadOrder + '000808]'; i := i + 1;
  199.   HeadsM2[i] := '00KLH_MaleHeadDarkElf "MaleHeadDarkElf" [HDPT:' + LoadOrder + '000803]'; i := i + 1;
  200.   HeadsM2[i] := '00KLH_MaleHeadHighElf "MaleHeadHighElf" [HDPT:' + LoadOrder + '000804]'; i := i + 1;
  201.   HeadsM2[i] := '00KLH_MaleHeadImperial "MaleHeadImperial" [HDPT:' + LoadOrder + '000807]'; i := i + 1;
  202.   HeadsM2[i] := '00KLH_MaleHeadNord "MaleHeadNord" [HDPT:' + LoadOrder + '000806]'; i := i + 1;
  203.   HeadsM2[i] := '00KLH_MaleHeadOrc "MaleHeadOrc" [HDPT:' + LoadOrder + '000801]'; i := i + 1;
  204.   HeadsM2[i] := '00KLH_MaleHeadRedguard "MaleHeadRedguard" [HDPT:' + LoadOrder + '000805]'; i := i + 1;
  205.   HeadsM2[i] := '00KLH_MaleHeadWoodElf "MaleHeadWoodElf" [HDPT:' + LoadOrder + '000802]'; i := i + 1;
  206.   HeadsM2[i] := '00KLH_MaleHeadArgonian "MaleHeadArgonian" [HDPT:' + LoadOrder + '000814]'; i := i + 1;
  207.   HeadsM2[i] := '00KLH_MaleHeadKhajiit "MaleHeadKhajiit" [HDPT:' + LoadOrder + '000815]'; i := i + 1;
  208.   HeadsM2[i] := '00KLH_MaleHeadBretonAfflicted "MaleHeadBretonAfflicted" [HDPT:' + LoadOrder + '000809]'; i := i + 1;
  209.   HeadsM2[i] := '00KLH_MaleHeadDremora "MaleHeadDremora" [HDPT:' + LoadOrder + '000813]'; i := i + 1;
  210.   HeadsM2[i] := '00KLH_MaleHeadElder "MaleHeadElder" [HDPT:' + LoadOrder + '000800]'; i := i + 1;
  211.   HeadsM2[i] := '00KLH_MaleHeadElder "MaleHeadElder" [HDPT:' + LoadOrder + '000800]'; i := i + 1;
  212.   HeadsM2[i] := SNone; i := i + 1;
  213.   if UseDawnguard then begin
  214.     HeadsM2[i] := '00KLH_MaleHeadBretonVampire "MaleHeadBretonVampire" [HDPT:' + LoadOrder + '00080F]'; i := i + 1;
  215.     HeadsM2[i] := '00KLH_MaleHeadDarkElfVampire "MaleHeadDarkElfVampire" [HDPT:' + LoadOrder + '00080B]'; i := i + 1;
  216.     HeadsM2[i] := '00KLH_MaleHeadHighElfVampire "MaleHeadHighElfVampire" [HDPT:' + LoadOrder + '00080E]'; i := i + 1;
  217.     HeadsM2[i] := '00KLH_MaleHeadImperialVampire "MaleHeadImperialVampire" [HDPT:' + LoadOrder + '00080D]'; i := i + 1;
  218.     HeadsM2[i] := '00KLH_MaleHeadNordVampire "MaleHeadNordVampire" [HDPT:' + LoadOrder + '00080C]'; i := i + 1;
  219.     HeadsM2[i] := '00KLH_MaleHeadOrcVampire "MaleHeadOrcVampire" [HDPT:' + LoadOrder + '000812]'; i := i + 1;
  220.     HeadsM2[i] := '00KLH_MaleHeadRedguardVampire "MaleHeadRedguardVampire" [HDPT:' + LoadOrder + '000810]'; i := i + 1;
  221.     HeadsM2[i] := '00KLH_MaleHeadWoodElfVampire "MaleHeadWoodElfVampire" [HDPT:' + LoadOrder + '000811]'; i := i + 1;
  222.     HeadsM2[i] := '00KLH_MaleHeadArgonian "MaleHeadArgonian" [HDPT:' + LoadOrder + '000814]'; i := i + 1;
  223.     HeadsM2[i] := '00KLH_MaleHeadKhajiit "MaleHeadKhajiit" [HDPT:' + LoadOrder + '000815]'; i := i + 1;
  224.     HeadsM2[i] := '00KLH_MaleHeadHighElfSnow "MaleHeadHighElfSnow" [HDPT:' + LoadOrder + '00080A]';
  225.   end else begin
  226.     HeadsM2[i] := '00KLH_MaleHeadBreton "MaleHeadBreton" [HDPT:' + LoadOrder + '000808]'; i := i + 1;
  227.     HeadsM2[i] := '00KLH_MaleHeadDarkElf "MaleHeadDarkElf" [HDPT:' + LoadOrder + '000803]'; i := i + 1;
  228.     HeadsM2[i] := '00KLH_MaleHeadHighElf "MaleHeadHighElf" [HDPT:' + LoadOrder + '000804]'; i := i + 1;
  229.     HeadsM2[i] := '00KLH_MaleHeadImperial "MaleHeadImperial" [HDPT:' + LoadOrder + '000807]'; i := i + 1;
  230.     HeadsM2[i] := '00KLH_MaleHeadNord "MaleHeadNord" [HDPT:' + LoadOrder + '000806]'; i := i + 1;
  231.     HeadsM2[i] := '00KLH_MaleHeadOrc "MaleHeadOrc" [HDPT:' + LoadOrder + '000801]'; i := i + 1;
  232.     HeadsM2[i] := '00KLH_MaleHeadRedguard "MaleHeadRedguard" [HDPT:' + LoadOrder + '000805]'; i := i + 1;
  233.     HeadsM2[i] := '00KLH_MaleHeadWoodElf "MaleHeadWoodElf" [HDPT:' + LoadOrder + '000802]'; i := i + 1;
  234.     HeadsM2[i] := '00KLH_MaleHeadArgonian "MaleHeadArgonian" [HDPT:' + LoadOrder + '000814]'; i := i + 1;
  235.     HeadsM2[i] := '00KLH_MaleHeadKhajiit "MaleHeadKhajiit" [HDPT:' + LoadOrder + '000815]'; i := i + 1;
  236.     HeadsM2[i] := '00KLH_MaleHeadHighElf "MaleHeadHighElf" [HDPT:' + LoadOrder + '000804]';
  237.   end;
  238.  
  239.   i := 1;
  240.   HeadsF2[i] := '00KLH_FemaleHeadBreton "FemaleHeadBreton" [HDPT:' + LoadOrder + '000A08]'; i := i + 1;
  241.   HeadsF2[i] := '00KLH_FemaleHeadDarkElf "FemaleHeadDarkElf" [HDPT:' + LoadOrder + '000A03]'; i := i + 1;
  242.   HeadsF2[i] := '00KLH_FemaleHeadHighElf "FemaleHeadHighElf" [HDPT:' + LoadOrder + '000A04]'; i := i + 1;
  243.   HeadsF2[i] := '00KLH_FemaleHeadImperial "FemaleHeadImperial" [HDPT:' + LoadOrder + '000A07]'; i := i + 1;
  244.   HeadsF2[i] := '00KLH_FemaleHeadNord "FemaleHeadNord" [HDPT:' + LoadOrder + '000A06]'; i := i + 1;
  245.   HeadsF2[i] := '00KLH_FemaleHeadOrc "FemaleHeadOrc" [HDPT:' + LoadOrder + '000A01]'; i := i + 1;
  246.   HeadsF2[i] := '00KLH_FemaleHeadRedguard "FemaleHeadRedguard" [HDPT:' + LoadOrder + '000A05]'; i := i + 1;
  247.   HeadsF2[i] := '00KLH_FemaleHeadWoodElf "FemaleHeadWoodElf" [HDPT:' + LoadOrder + '000A02]'; i := i + 1;
  248.   HeadsF2[i] := '00KLH_FemaleHeadArgonian "FemaleHeadArgonian" [HDPT:' + LoadOrder + '000A14]'; i := i + 1;
  249.   HeadsF2[i] := '00KLH_FemaleHeadKhajiit "FemaleHeadKhajiit" [HDPT:' + LoadOrder + '000A15]'; i := i + 1;
  250.   HeadsF2[i] := '00KLH_FemaleHeadBretonAfflicted "FemaleHeadNordAstrid" [HDPT:' + LoadOrder + '000A0A]'; i := i + 1;
  251.   HeadsF2[i] := '00KLH_FemaleHeadDremora "FemaleHeadDremora" [HDPT:' + LoadOrder + '000A13]'; i := i + 1;
  252.   HeadsF2[i] := '00KLH_FemaleHeadElder "FemaleHeadElder" [HDPT:' + LoadOrder + '000A00]'; i := i + 1;
  253.   HeadsF2[i] := '00KLH_FemaleHeadElder "FemaleHeadElder" [HDPT:' + LoadOrder + '000A00]'; i := i + 1;
  254.   HeadsF2[i] := '00KLH_FemaleHeadNordAstrid "FemaleHeadNordAstrid" [HDPT:' + LoadOrder + '000A09]'; i := i + 1;
  255.   if UseDawnguard then begin
  256.     HeadsF2[i] := '00KLH_FemaleHeadBretonVampire "FemaleHeadBretonVampire" [HDPT:' + LoadOrder + '000A0F]'; i := i + 1;
  257.     HeadsF2[i] := '00KLH_FemaleHeadDarkElfVampire "FemaleHeadDarkElfVampire" [HDPT:' + LoadOrder + '000A0B]'; i := i + 1;
  258.     HeadsF2[i] := '00KLH_FemaleHeadHighElfVampire "FemaleHeadHighElfVampire" [HDPT:' + LoadOrder + '000A0E]'; i := i + 1;
  259.     HeadsF2[i] := '00KLH_FemaleHeadImperialVampire "FemaleHeadImperialVampire" [HDPT:' + LoadOrder + '000A0D]'; i := i + 1;
  260.     HeadsF2[i] := '00KLH_FemaleHeadNordVampire "FemaleHeadNordVampire" [HDPT:' + LoadOrder + '000A0C]'; i := i + 1;
  261.     HeadsF2[i] := '00KLH_FemaleHeadOrcVampire "FemaleHeadOrcVampire" [HDPT:' + LoadOrder + '000A12]'; i := i + 1;
  262.     HeadsF2[i] := '00KLH_FemaleHeadRedguardVampire "FemaleHeadRedguardVampire" [HDPT:' + LoadOrder + '000A10]'; i := i + 1;
  263.     HeadsF2[i] := '00KLH_FemaleHeadWoodElfVampire "FemaleHeadWoodElfVampire" [HDPT:' + LoadOrder + '000A11]'; i := i + 1;
  264.     HeadsF2[i] := '00KLH_FemaleHeadArgonian "FemaleHeadArgonian" [HDPT:' + LoadOrder + '000A14]'; i := i + 1;
  265.     HeadsF2[i] := '00KLH_FemaleHeadKhajiit "FemaleHeadKhajiit" [HDPT:' + LoadOrder + '000A15]'; i := i + 1;
  266.     HeadsF2[i] := SNone;
  267.   end else begin
  268.     HeadsF2[i] := '00KLH_FemaleHeadBreton "FemaleHeadBreton" [HDPT:' + LoadOrder + '000A08]'; i := i + 1;
  269.     HeadsF2[i] := '00KLH_FemaleHeadDarkElf "FemaleHeadDarkElf" [HDPT:' + LoadOrder + '000A03]'; i := i + 1;
  270.     HeadsF2[i] := '00KLH_FemaleHeadHighElf "FemaleHeadHighElf" [HDPT:' + LoadOrder + '000A04]'; i := i + 1;
  271.     HeadsF2[i] := '00KLH_FemaleHeadImperial "FemaleHeadImperial" [HDPT:' + LoadOrder + '000A07]'; i := i + 1;
  272.     HeadsF2[i] := '00KLH_FemaleHeadNord "FemaleHeadNord" [HDPT:' + LoadOrder + '000A06]'; i := i + 1;
  273.     HeadsF2[i] := '00KLH_FemaleHeadOrc "FemaleHeadOrc" [HDPT:' + LoadOrder + '000A01]'; i := i + 1;
  274.     HeadsF2[i] := '00KLH_FemaleHeadRedguard "FemaleHeadRedguard" [HDPT:' + LoadOrder + '000A05]'; i := i + 1;
  275.     HeadsF2[i] := '00KLH_FemaleHeadWoodElf "FemaleHeadWoodElf" [HDPT:' + LoadOrder + '000A02]'; i := i + 1;
  276.     HeadsF2[i] := '00KLH_FemaleHeadArgonian "FemaleHeadArgonian" [HDPT:' + LoadOrder + '000A14]'; i := i + 1;
  277.     HeadsF2[i] := '00KLH_FemaleHeadKhajiit "FemaleHeadKhajiit" [HDPT:' + LoadOrder + '000A15]'; i := i + 1;
  278.     HeadsF2[i] := '00KLH_FemaleHeadHighElf "FemaleHeadHighElf" [HDPT:' + LoadOrder + '000A04]';
  279.   end;
  280.  
  281.   i := 1;
  282.   BrowsMR[i] := '00KLH_BrowsMaleHumanoid01 "BrowsMaleHumanoid01" [HDPT:' + LoadOrder + '000931]'; i := i + 1;
  283.   BrowsMR[i] := '00KLH_BrowsMaleHumanoid03 "BrowsMaleHumanoid03" [HDPT:' + LoadOrder + '000933]'; i := i + 1;
  284.   BrowsMR[i] := '00KLH_BrowsMaleHumanoid01 "BrowsMaleHumanoid01" [HDPT:' + LoadOrder + '000931]'; i := i + 1;
  285.   BrowsMR[i] := '00KLH_BrowsMaleHumanoid01 "BrowsMaleHumanoid01" [HDPT:' + LoadOrder + '000931]'; i := i + 1;
  286.   BrowsMR[i] := '00KLH_BrowsMaleHumanoid01 "BrowsMaleHumanoid01" [HDPT:' + LoadOrder + '000931]'; i := i + 1;
  287.   BrowsMR[i] := SNone; i := i + 1;
  288.   BrowsMR[i] := '00KLH_BrowsMaleHumanoid07 "BrowsMaleHumanoid07" [HDPT:' + LoadOrder + '000937]'; i := i + 1;
  289.   BrowsMR[i] := '00KLH_BrowsMaleHumanoid03 "BrowsMaleHumanoid03" [HDPT:' + LoadOrder + '000933]'; i := i + 1;
  290.   BrowsMR[i] := SNone; i := i + 1;
  291.   BrowsMR[i] := SNone; i := i + 1;
  292.   BrowsMR[i] := '00KLH_BrowsMaleHumanoid01 "BrowsMaleHumanoid01" [HDPT:' + LoadOrder + '000931]'; i := i + 1;
  293.   BrowsMR[i] := SNone; i := i + 1;
  294.   BrowsMR[i] := '00KLH_BrowsMaleHumanoid02 "BrowsMaleHumanoid02" [HDPT:' + LoadOrder + '000932]'; i := i + 1;
  295.   BrowsMR[i] := SNone; i := i + 1;
  296.   BrowsMR[i] := SNone; i := i + 1;
  297.   BrowsMR[i] := SNone; i := i + 1;
  298.   BrowsMR[i] := SNone; i := i + 1;
  299.   BrowsMR[i] := SNone; i := i + 1;
  300.   BrowsMR[i] := SNone; i := i + 1;
  301.   BrowsMR[i] := SNone; i := i + 1;
  302.   BrowsMR[i] := SNone; i := i + 1;
  303.   BrowsMR[i] := SNone; i := i + 1;
  304.   BrowsMR[i] := SNone; i := i + 1;
  305.   BrowsMR[i] := SNone; i := i + 1;
  306.   BrowsMR[i] := SNone; i := i + 1;
  307.   if UseDawnguard then
  308.     BrowsMR[i] := '00KLH_BrowsMaleSnowElf "BrowsMaleSnowElf" [HDPT:' + LoadOrder + '000946]'
  309.   else
  310.     BrowsMR[i] := '00KLH_BrowsMaleHumanoid01 "BrowsMaleHumanoid01" [HDPT:' + LoadOrder + '000931]';
  311.  
  312.   i := 1;
  313.   BrowsFR[i] := '00KLH_FemaleBrowsHuman02 "FemaleBrowsHuman02" [HDPT:' + LoadOrder + '000A31]'; i := i + 1;
  314.   BrowsFR[i] := SNone; i := i + 1;
  315.   BrowsFR[i] := '00KLH_FemaleBrowsHuman01 "FemaleBrowsHuman01" [HDPT:' + LoadOrder + '000A30]'; i := i + 1;
  316.   BrowsFR[i] := '00KLH_FemaleBrowsHuman03 "FemaleBrowsHuman03" [HDPT:' + LoadOrder + '000A32]'; i := i + 1;
  317.   BrowsFR[i] := '00KLH_FemaleBrowsHuman01 "FemaleBrowsHuman01" [HDPT:' + LoadOrder + '000A30]'; i := i + 1;
  318.   BrowsFR[i] := SNone; i := i + 1;
  319.   BrowsFR[i] := '00KLH_FemaleBrowsHuman01 "FemaleBrowsHuman01" [HDPT:' + LoadOrder + '000A30]'; i := i + 1;
  320.   BrowsFR[i] := SNone; i := i + 1;
  321.   BrowsFR[i] := SNone; i := i + 1;
  322.   BrowsFR[i] := SNone; i := i + 1;
  323.   BrowsFR[i] := SNone; i := i + 1;
  324.   BrowsFR[i] := SNone; i := i + 1;
  325.   BrowsFR[i] := SNone; i := i + 1;
  326.   BrowsFR[i] := SNone; i := i + 1;
  327.   BrowsFR[i] := SNone; i := i + 1;
  328.   BrowsFR[i] := SNone; i := i + 1;
  329.   BrowsFR[i] := SNone; i := i + 1;
  330.   BrowsFR[i] := SNone; i := i + 1;
  331.   BrowsFR[i] := SNone; i := i + 1;
  332.   BrowsFR[i] := SNone; i := i + 1;
  333.   BrowsFR[i] := SNone; i := i + 1;
  334.   BrowsFR[i] := SNone; i := i + 1;
  335.   BrowsFR[i] := SNone; i := i + 1;
  336.   BrowsFR[i] := SNone; i := i + 1;
  337.   BrowsFR[i] := SNone; i := i + 1;
  338.   if UseDawnguard then
  339.     BrowsFR[i] := SNone
  340.   else
  341.     BrowsFR[i] := '00KLH_FemaleBrowsHuman01 "FemaleBrowsHuman01" [HDPT:' + LoadOrder + '000A30]';
  342.  
  343.   i := 1;
  344.   BrowsM1[i] := 'BrowsMaleHumanoid01 "BrowsMaleHumanoid01" [HDPT:00051508]'; i := i + 1;
  345.   BrowsM1[i] := 'BrowsMaleHumanoid02 "BrowsMaleHumanoid02" [HDPT:00051080]'; i := i + 1;
  346.   BrowsM1[i] := 'BrowsMaleHumanoid03 "BrowsMaleHumanoid03" [HDPT:0005107F]'; i := i + 1;
  347.   BrowsM1[i] := 'BrowsMaleHumanoid04 "BrowsMaleHumanoid04" [HDPT:000C710A]'; i := i + 1;
  348.   BrowsM1[i] := 'BrowsMaleHumanoid05 "BrowsMaleHumanoid05" [HDPT:000C7122]'; i := i + 1;
  349.   BrowsM1[i] := 'BrowsMaleHumanoid06 "BrowsMaleHumanoid06" [HDPT:000C7123]'; i := i + 1;
  350.   BrowsM1[i] := 'BrowsMaleHumanoid07 "BrowsMaleHumanoid07" [HDPT:000C716D]'; i := i + 1;
  351.   BrowsM1[i] := 'BrowsMaleHumanoid08 "BrowsMaleHumanoid08" [HDPT:000C716E]'; i := i + 1;
  352.   BrowsM1[i] := 'BrowsMaleHumanoid09 "BrowsMaleHumanoid09" [HDPT:000C716F]'; i := i + 1;
  353.   BrowsM1[i] := 'BrowsMaleHumanoid10 "BrowsMaleHumanoid10" [HDPT:000C7170]'; i := i + 1;
  354.   BrowsM1[i] := 'BrowsMaleHumanoid11 "BrowsMaleHumanoid11" [HDPT:000C7259]'; i := i + 1;
  355.   BrowsM1[i] := 'BrowsMaleHumanoid12NoBrow "BrowsMaleHumanoid12NoBrow" [HDPT:000F203C]'; i := i + 1;
  356.   BrowsM1[i] := 'BrowsMaleOrc01 "BrowsMaleOrc01" [HDPT:0010761A]'; i := i + 1;
  357.   BrowsM1[i] := 'BrowsMaleOrc02 "BrowsMaleOrc02" [HDPT:00107613]'; i := i + 1;
  358.   BrowsM1[i] := 'BrowsMaleOrc04 "BrowsMaleOrc04" [HDPT:0010761B]'; i := i + 1;
  359.   BrowsM1[i] := 'BrowsMaleOrc05 "BrowsMaleOrc05" [HDPT:00107618]'; i := i + 1;
  360.   BrowsM1[i] := 'BrowsMaleOrc08 "BrowsMaleOrc08" [HDPT:00107619]'; i := i + 1;
  361.   if UseDawnguard then
  362.     BrowsM1[i] := 'BrowsMaleSnowElf "BrowsMaleSnowElf" [HDPT:02003789]'
  363.   else
  364.     BrowsM1[i] := SNone;
  365.  
  366.   i := 1;
  367.   BrowsM2[i] := '00KLH_BrowsMaleHumanoid01 "BrowsMaleHumanoid01" [HDPT:' + LoadOrder + '000931]'; i := i + 1;
  368.   BrowsM2[i] := '00KLH_BrowsMaleHumanoid02 "BrowsMaleHumanoid02" [HDPT:' + LoadOrder + '000932]'; i := i + 1;
  369.   BrowsM2[i] := '00KLH_BrowsMaleHumanoid03 "BrowsMaleHumanoid03" [HDPT:' + LoadOrder + '000933]'; i := i + 1;
  370.   BrowsM2[i] := '00KLH_BrowsMaleHumanoid04 "BrowsMaleHumanoid04" [HDPT:' + LoadOrder + '000934]'; i := i + 1;
  371.   BrowsM2[i] := '00KLH_BrowsMaleHumanoid05 "BrowsMaleHumanoid05" [HDPT:' + LoadOrder + '000935]'; i := i + 1;
  372.   BrowsM2[i] := '00KLH_BrowsMaleHumanoid06 "BrowsMaleHumanoid06" [HDPT:' + LoadOrder + '000936]'; i := i + 1;
  373.   BrowsM2[i] := '00KLH_BrowsMaleHumanoid07 "BrowsMaleHumanoid07" [HDPT:' + LoadOrder + '000937]'; i := i + 1;
  374.   BrowsM2[i] := '00KLH_BrowsMaleHumanoid08 "BrowsMaleHumanoid08" [HDPT:' + LoadOrder + '000938]'; i := i + 1;
  375.   BrowsM2[i] := '00KLH_BrowsMaleHumanoid09 "BrowsMaleHumanoid09" [HDPT:' + LoadOrder + '000939]'; i := i + 1;
  376.   BrowsM2[i] := '00KLH_BrowsMaleHumanoid10 "BrowsMaleHumanoid10" [HDPT:' + LoadOrder + '00093A]'; i := i + 1;
  377.   BrowsM2[i] := '00KLH_BrowsMaleHumanoid11 "BrowsMaleHumanoid11" [HDPT:' + LoadOrder + '00093B]'; i := i + 1;
  378.   BrowsM2[i] := 'BrowsMaleHumanoid12NoBrow "BrowsMaleHumanoid12NoBrow" [HDPT:000F203C]'; i := i + 1;
  379.   BrowsM2[i] := '00KLH_BrowsMaleOrc01 "BrowsMaleOrc01" [HDPT:' + LoadOrder + '000941]'; i := i + 1;
  380.   BrowsM2[i] := '00KLH_BrowsMaleOrc02 "BrowsMaleOrc02" [HDPT:' + LoadOrder + '000942]'; i := i + 1;
  381.   BrowsM2[i] := '00KLH_BrowsMaleOrc04 "BrowsMaleOrc04" [HDPT:' + LoadOrder + '000943]'; i := i + 1;
  382.   BrowsM2[i] := '00KLH_BrowsMaleOrc05 "BrowsMaleOrc05" [HDPT:' + LoadOrder + '000944]'; i := i + 1;
  383.   BrowsM2[i] := '00KLH_BrowsMaleOrc08 "BrowsMaleOrc08" [HDPT:' + LoadOrder + '000945]'; i := i + 1;
  384.   if UseDawnguard then
  385.     BrowsM2[i] := '00KLH_BrowsMaleSnowElf "BrowsMaleSnowElf" [HDPT:' + LoadOrder + '000946]'
  386.   else
  387.     BrowsM2[i] := SNone;
  388.  
  389.   i := 1;
  390.   BrowsF1[i] := 'FemaleBrowsHuman01 "FemaleBrowsHuman01" [HDPT:000E4D7C]'; i := i + 1;
  391.   BrowsF1[i] := 'FemaleBrowsHuman02 "FemaleBrowsHuman02" [HDPT:000E4D88]'; i := i + 1;
  392.   BrowsF1[i] := 'FemaleBrowsHuman03 "FemaleBrowsHuman03" [HDPT:000E4D91]'; i := i + 1;
  393.   BrowsF1[i] := 'FemaleBrowsHuman04 "FemaleBrowsHuman04" [HDPT:000E4D92]'; i := i + 1;
  394.   BrowsF1[i] := 'FemaleBrowsHuman05 "FemaleBrowsHuman05" [HDPT:000E4D9F]'; i := i + 1;
  395.   BrowsF1[i] := 'FemaleBrowsHuman06 "FemaleBrowsHuman06" [HDPT:000E4DA0]'; i := i + 1;
  396.   BrowsF1[i] := 'FemaleBrowsHuman07 "FemaleBrowsHuman07" [HDPT:000E4DA1]'; i := i + 1;
  397.   BrowsF1[i] := 'FemaleBrowsHuman08 "FemaleBrowsHuman08" [HDPT:000E4DA2]'; i := i + 1;
  398.   BrowsF1[i] := 'FemaleBrowsHuman09 "FemaleBrowsHuman09" [HDPT:000E4DA4]'; i := i + 1;
  399.   BrowsF1[i] := 'FemaleBrowsHuman10 "FemaleBrowsHuman10" [HDPT:000E4DA5]'; i := i + 1;
  400.   BrowsF1[i] := 'FemaleBrowsHuman11 "FemaleBrowsHuman11" [HDPT:000E4DA8]'; i := i + 1;
  401.   BrowsF1[i] := 'FemaleBrowsHuman12NoBrow "FemaleBrowsHuman12NoBrow" [HDPT:000F203D]';
  402.  
  403.   i := 1;
  404.   BrowsF2[i] := '00KLH_FemaleBrowsHuman01 "FemaleBrowsHuman01" [HDPT:' + LoadOrder + '000A30]'; i := i + 1;
  405.   BrowsF2[i] := '00KLH_FemaleBrowsHuman02 "FemaleBrowsHuman02" [HDPT:' + LoadOrder + '000A31]'; i := i + 1;
  406.   BrowsF2[i] := '00KLH_FemaleBrowsHuman03 "FemaleBrowsHuman03" [HDPT:' + LoadOrder + '000A32]'; i := i + 1;
  407.   BrowsF2[i] := '00KLH_FemaleBrowsHuman04 "FemaleBrowsHuman04" [HDPT:' + LoadOrder + '000A33]'; i := i + 1;
  408.   BrowsF2[i] := '00KLH_FemaleBrowsHuman05 "FemaleBrowsHuman05" [HDPT:' + LoadOrder + '000A34]'; i := i + 1;
  409.   BrowsF2[i] := '00KLH_FemaleBrowsHuman06 "FemaleBrowsHuman06" [HDPT:' + LoadOrder + '000A35]'; i := i + 1;
  410.   BrowsF2[i] := '00KLH_FemaleBrowsHuman07 "FemaleBrowsHuman07" [HDPT:' + LoadOrder + '000A36]'; i := i + 1;
  411.   BrowsF2[i] := '00KLH_FemaleBrowsHuman08 "FemaleBrowsHuman08" [HDPT:' + LoadOrder + '000A37]'; i := i + 1;
  412.   BrowsF2[i] := '00KLH_FemaleBrowsHuman09 "FemaleBrowsHuman09" [HDPT:' + LoadOrder + '000A38]'; i := i + 1;
  413.   BrowsF2[i] := '00KLH_FemaleBrowsHuman10 "FemaleBrowsHuman10" [HDPT:' + LoadOrder + '000A39]'; i := i + 1;
  414.   BrowsF2[i] := '00KLH_FemaleBrowsHuman11 "FemaleBrowsHuman11" [HDPT:' + LoadOrder + '000A3A]'; i := i + 1;
  415.   BrowsF2[i] := 'FemaleBrowsHuman12NoBrow "FemaleBrowsHuman12NoBrow" [HDPT:000F203D]';
  416.  
  417.   i := 1;
  418.   BrowsAM1[i] := 'BrowsMaleArgonian01 "BrowsMaleArgonian01" [HDPT:000B2FCA]'; i := i + 1;
  419.   BrowsAM1[i] := 'BrowsMaleArgonian02 "BrowsMaleArgonian02" [HDPT:000B2FCB]';
  420.  
  421.   i := 1;
  422.   BrowsAM2[i] := '00KLH_BrowsMaleArgonian01 "BrowsMaleArgonian01" [HDPT:' + LoadOrder + '000947]'; i := i + 1;
  423.   BrowsAM2[i] := '00KLH_BrowsMaleArgonian02 "BrowsMaleArgonian02" [HDPT:' + LoadOrder + '000948]';
  424.  
  425.   i := 1;
  426.   BrowsAF1[i] := 'BrowsFemaleArgonian01 "BrowsFemaleArgonian01" [HDPT:000B2FCC]'; i := i + 1;
  427.   BrowsAF1[i] := 'BrowsFemaleArgonian02 "BrowsFemaleArgonian02" [HDPT:000B2FD1]';
  428.  
  429.   i := 1;
  430.   BrowsAF2[i] := '00KLH_BrowsFemaleArgonian01 "BrowsFemaleArgonian01" [HDPT:' + LoadOrder + '000A3B]'; i := i + 1;
  431.   BrowsAF2[i] := '00KLH_BrowsFemaleArgonian02 "BrowsFemaleArgonian02" [HDPT:' + LoadOrder + '000A3C]';
  432.  
  433.   i := 1;
  434.   ScarsHM1[i] := 'MarksMaleHumanoid01LeftGash "MarksMaleHumanoid01LeftGash" [HDPT:0009F0A1]'; i := i + 1;
  435.   ScarsHM1[i] := 'MarksMaleHumanoid02LeftGash "MarksMaleHumanoid02LeftGash" [HDPT:0009F0A2]'; i := i + 1;
  436.   ScarsHM1[i] := 'MarksMaleHumanoid03LeftGash "MarksMaleHumanoid03LeftGash" [HDPT:000E4DAA]'; i := i + 1;
  437.   ScarsHM1[i] := 'MarksMaleHumanoid04LeftGash "MarksMaleHumanoid04LeftGash" [HDPT:000E4DCA]'; i := i + 1;
  438.   ScarsHM1[i] := 'MarksMaleHumanoid05LeftGash "MarksMaleHumanoid05LeftGash" [HDPT:000E4DD3]'; i := i + 1;
  439.   ScarsHM1[i] := 'MarksMaleHumanoid06LeftGash "MarksMaleHumanoid06LeftGash" [HDPT:000E4E16]'; i := i + 1;
  440.   ScarsHM1[i] := 'MarksMaleHumanoid07RightGash "MarksMaleHumanoid07RightGash" [HDPT:000E4E17]'; i := i + 1;
  441.   ScarsHM1[i] := 'MarksMaleHumanoid08RightGash "MarksMaleHumanoid08RightGash" [HDPT:000E4E18]'; i := i + 1;
  442.   ScarsHM1[i] := 'MarksMaleHumanoid09RightGash "MarksMaleHumanoid09RightGash" [HDPT:000E4E19]'; i := i + 1;
  443.   ScarsHM1[i] := 'MarksMaleHumanoid10LeftGash "MarksMaleHumanoid10LeftGash" [HDPT:000E4E1A]'; i := i + 1;
  444.   ScarsHM1[i] := 'MarksMaleHumanoid11LeftGash "MarksMaleHumanoid11LeftGash" [HDPT:000E4E1B]'; i := i + 1;
  445.   ScarsHM1[i] := 'MarksMaleHumanoid12LeftGash "MarksMaleHumanoid12LeftGash" [HDPT:000E4E1C]'; i := i + 1;
  446.   ScarsHM1[i] := 'MarksMaleHumanoid12RightGashR "MarksMaleHumanoid12RightGashR" [HDPT:000E4E28]'; i := i + 1;
  447.   ScarsHM1[i] := 'MarksMaleHumanoid11RightGashR "MarksMaleHumanoid11RightGashR" [HDPT:000E4E29]'; i := i + 1;
  448.   ScarsHM1[i] := 'MarksMaleHumanoid10RightGashR "MarksMaleHumanoid10RightGashR" [HDPT:000E4E2A]'; i := i + 1;
  449.   ScarsHM1[i] := 'MarksMaleHumanoid06RightGashR "MarksMaleHumanoid06RightGashR" [HDPT:000E4E2B]'; i := i + 1;
  450.   ScarsHM1[i] := 'MarksMaleHumanoid04RightGashR "MarksMaleHumanoid04RightGashR" [HDPT:000E4E2C]';
  451.  
  452.   i := 1;
  453.   ScarsHM2[i] := '00KLH_MarksMaleHumanoid01LeftGash "MarksMaleHumanoid01LeftGash" [HDPT:' + LoadOrder + '000821]'; i := i + 1;
  454.   ScarsHM2[i] := '00KLH_MarksMaleHumanoid02LeftGash "MarksMaleHumanoid02LeftGash" [HDPT:' + LoadOrder + '000822]'; i := i + 1;
  455.   ScarsHM2[i] := '00KLH_MarksMaleHumanoid03LeftGash "MarksMaleHumanoid03LeftGash" [HDPT:' + LoadOrder + '000823]'; i := i + 1;
  456.   ScarsHM2[i] := '00KLH_MarksMaleHumanoid04LeftGash "MarksMaleHumanoid04LeftGash" [HDPT:' + LoadOrder + '000824]'; i := i + 1;
  457.   ScarsHM2[i] := '00KLH_MarksMaleHumanoid05LeftGash "MarksMaleHumanoid05LeftGash" [HDPT:' + LoadOrder + '000825]'; i := i + 1;
  458.   ScarsHM2[i] := '00KLH_MarksMaleHumanoid06LeftGash "MarksMaleHumanoid06LeftGash" [HDPT:' + LoadOrder + '000826]'; i := i + 1;
  459.   ScarsHM2[i] := '00KLH_MarksMaleHumanoid07RightGash "MarksMaleHumanoid07RightGash" [HDPT:' + LoadOrder + '000827]'; i := i + 1;
  460.   ScarsHM2[i] := '00KLH_MarksMaleHumanoid08RightGash "MarksMaleHumanoid08RightGash" [HDPT:' + LoadOrder + '000828]'; i := i + 1;
  461.   ScarsHM2[i] := '00KLH_MarksMaleHumanoid09RightGash "MarksMaleHumanoid09RightGash" [HDPT:' + LoadOrder + '000829]'; i := i + 1;
  462.   ScarsHM2[i] := '00KLH_MarksMaleHumanoid10LeftGash "MarksMaleHumanoid10LeftGash" [HDPT:' + LoadOrder + '00082A]'; i := i + 1;
  463.   ScarsHM2[i] := '00KLH_MarksMaleHumanoid11LeftGash "MarksMaleHumanoid11LeftGash" [HDPT:' + LoadOrder + '00082B]'; i := i + 1;
  464.   ScarsHM2[i] := '00KLH_MarksMaleHumanoid12LeftGash "MarksMaleHumanoid12LeftGash" [HDPT:' + LoadOrder + '00082C]'; i := i + 1;
  465.   ScarsHM2[i] := '00KLH_MarksMaleHumanoid12RightGashR "MarksMaleHumanoid12RightGashR" [HDPT:' + LoadOrder + '00082D]'; i := i + 1;
  466.   ScarsHM2[i] := '00KLH_MarksMaleHumanoid11RightGashR "MarksMaleHumanoid11RightGashR" [HDPT:' + LoadOrder + '00082E]'; i := i + 1;
  467.   ScarsHM2[i] := '00KLH_MarksMaleHumanoid10RightGashR "MarksMaleHumanoid10RightGashR" [HDPT:' + LoadOrder + '00082F]'; i := i + 1;
  468.   ScarsHM2[i] := '00KLH_MarksMaleHumanoid06RightGashR "MarksMaleHumanoid06RightGashR" [HDPT:' + LoadOrder + '000830]'; i := i + 1;
  469.   ScarsHM2[i] := '00KLH_MarksMaleHumanoid04RightGashR "MarksMaleHumanoid04RightGashR" [HDPT:' + LoadOrder + '000831]';
  470.  
  471.   i := 1;
  472.   ScarsHF1[i] := 'MarksFemaleHumanoid01LeftGash "MarksFemaleHumanoid01LeftGash" [HDPT:000E4E2D]'; i := i + 1;
  473.   ScarsHF1[i] := 'MarksFemaleHumanoid02LeftGash "MarksFemaleHumanoid02LeftGash" [HDPT:000E4E30]'; i := i + 1;
  474.   ScarsHF1[i] := 'MarksFemaleHumanoid03LeftGash "MarksFemaleHumanoid03LeftGash" [HDPT:000E4E38]'; i := i + 1;
  475.   ScarsHF1[i] := 'MarksFemaleHumanoid04LeftGash "MarksFemaleHumanoid04LeftGash" [HDPT:000E4E3C]'; i := i + 1;
  476.   ScarsHF1[i] := 'MarksFemaleHumanoid05LeftGash "MarksFemaleHumanoid05LeftGash" [HDPT:000E4E3E]'; i := i + 1;
  477.   ScarsHF1[i] := 'MarksFemaleHumanoid06LeftGash "MarksFemaleHumanoid06LeftGash" [HDPT:000E4E3F]'; i := i + 1;
  478.   ScarsHF1[i] := 'MarksFemaleHumanoid07RightGash "MarksFemaleHumanoid07RightGash" [HDPT:000E4E4B]'; i := i + 1;
  479.   ScarsHF1[i] := 'MarksFemaleHumanoid08RightGash "MarksFemaleHumanoid08RightGash" [HDPT:000E4E4C]'; i := i + 1;
  480.   ScarsHF1[i] := 'MarksFemaleHumanoid09RightGash "MarksFemaleHumanoid09RightGash" [HDPT:000E4E4D]'; i := i + 1;
  481.   ScarsHF1[i] := 'MarksFemaleHumanoid10LeftGash "MarksFemaleHumanoid10LeftGash" [HDPT:000E4E40]'; i := i + 1;
  482.   ScarsHF1[i] := 'MarksFemaleHumanoid11LeftGash "MarksFemaleHumanoid11LeftGash" [HDPT:000E4E41]'; i := i + 1;
  483.   ScarsHF1[i] := 'MarksFemaleHumanoid12LeftGash "MarksFemaleHumanoid12LeftGash" [HDPT:000E4E42]'; i := i + 1;
  484.   ScarsHF1[i] := 'MarksFemaleHumanoid12LeftGashR "MarksFemaleHumanoid12LeftGashR" [HDPT:000E4E51]'; i := i + 1;
  485.   ScarsHF1[i] := 'MarksFemaleHumanoid11LeftGashR "MarksFemaleHumanoid11LeftGashR" [HDPT:000E4E4F]'; i := i + 1;
  486.   ScarsHF1[i] := 'MarksFemaleHumanoid10RightGashR "MarksFemaleHumanoid10RightGashR" [HDPT:000E4E4E]';
  487.  
  488.   i := 1;
  489.   ScarsHF2[i] := '00KLH_MarksFemaleHumanoid01LeftGash "MarksFemaleHumanoid01LeftGash" [HDPT:' + LoadOrder + '000A21]'; i := i + 1;
  490.   ScarsHF2[i] := '00KLH_MarksFemaleHumanoid02LeftGash "MarksFemaleHumanoid02LeftGash" [HDPT:' + LoadOrder + '000A22]'; i := i + 1;
  491.   ScarsHF2[i] := '00KLH_MarksFemaleHumanoid03LeftGash "MarksFemaleHumanoid03LeftGash" [HDPT:' + LoadOrder + '000A23]'; i := i + 1;
  492.   ScarsHF2[i] := '00KLH_MarksFemaleHumanoid04LeftGash "MarksFemaleHumanoid04LeftGash" [HDPT:' + LoadOrder + '000A24]'; i := i + 1;
  493.   ScarsHF2[i] := '00KLH_MarksFemaleHumanoid05LeftGash "MarksFemaleHumanoid05LeftGash" [HDPT:' + LoadOrder + '000A25]'; i := i + 1;
  494.   ScarsHF2[i] := '00KLH_MarksFemaleHumanoid06LeftGash "MarksFemaleHumanoid06LeftGash" [HDPT:' + LoadOrder + '000A26]'; i := i + 1;
  495.   ScarsHF2[i] := '00KLH_MarksFemaleHumanoid07RightGash "MarksFemaleHumanoid07RightGash" [HDPT:' + LoadOrder + '000A27]'; i := i + 1;
  496.   ScarsHF2[i] := '00KLH_MarksFemaleHumanoid08RightGash "MarksFemaleHumanoid08RightGash" [HDPT:' + LoadOrder + '000A28]'; i := i + 1;
  497.   ScarsHF2[i] := '00KLH_MarksFemaleHumanoid09RightGash "MarksFemaleHumanoid09RightGash" [HDPT:' + LoadOrder + '000A29]'; i := i + 1;
  498.   ScarsHF2[i] := '00KLH_MarksFemaleHumanoid10LeftGash "MarksFemaleHumanoid10LeftGash" [HDPT:' + LoadOrder + '000A2A]'; i := i + 1;
  499.   ScarsHF2[i] := '00KLH_MarksFemaleHumanoid11LeftGash "MarksFemaleHumanoid11LeftGash" [HDPT:' + LoadOrder + '000A2B]'; i := i + 1;
  500.   ScarsHF2[i] := '00KLH_MarksFemaleHumanoid12LeftGash "MarksFemaleHumanoid12LeftGash" [HDPT:' + LoadOrder + '000A2C]'; i := i + 1;
  501.   ScarsHF2[i] := '00KLH_MarksFemaleHumanoid12LeftGashR "MarksFemaleHumanoid12LeftGashR" [HDPT:' + LoadOrder + '000A2D]'; i := i + 1;
  502.   ScarsHF2[i] := '00KLH_MarksFemaleHumanoid11LeftGashR "MarksFemaleHumanoid11LeftGashR" [HDPT:' + LoadOrder + '000A2E]'; i := i + 1;
  503.   ScarsHF2[i] := '00KLH_MarksFemaleHumanoid10RightGashR "MarksFemaleHumanoid10RightGashR" [HDPT:' + LoadOrder + '000A2F]';
  504.  
  505.   i := 1;
  506.   ScarsAM1[i] := 'MarksMaleArgonianScar01 "MarksMaleArgonianScar01" [HDPT:000B2FC5]'; i := i + 1;
  507.   ScarsAM1[i] := 'MarksMaleArgonianScar02 "MarksMaleArgonianScar02" [HDPT:000B2FC4]'; i := i + 1;
  508.   ScarsAM1[i] := 'MarksMaleArgonianScar03 "MarksMaleArgonianScar03" [HDPT:000B2FC6]'; i := i + 1;
  509.   ScarsAM1[i] := 'MarksMaleArgonianScar04 "MarksMaleArgonianScar04" [HDPT:000B2FC7]'; i := i + 1;
  510.   ScarsAM1[i] := 'MarksMaleArgonianScar05 "MarksMaleArgonianScar05" [HDPT:000B2FC9]'; i := i + 1;
  511.   ScarsAM1[i] := 'MarksMaleArgonianScars01 "MarksMaleArgonianScar01" [HDPT:000B2FDA]'; i := i + 1;
  512.   ScarsAM1[i] := 'MarksMaleArgonianScars02 "MarksMaleArgonianScars02" [HDPT:000B2FDB]'; i := i + 1;
  513.   ScarsAM1[i] := 'MarksMaleArgonianScars03 "MarksMaleArgonianScar03" [HDPT:000B2FDC]'; i := i + 1;
  514.   ScarsAM1[i] := 'MarksMaleArgonianScars04 "MarksMaleArgonianScar04" [HDPT:000B2FDD]'; i := i + 1;
  515.   ScarsAM1[i] := 'MarksMaleArgonianScars05 "MarksMaleArgonianScar05" [HDPT:000B3046]';
  516.  
  517.   i := 1;
  518.   ScarsAM2[i] := '00KLH_MarksMaleArgonianScar01 "MarksMaleArgonianScar01" [HDPT:' + LoadOrder + '000950]'; i := i + 1;
  519.   ScarsAM2[i] := '00KLH_MarksMaleArgonianScar02 "MarksMaleArgonianScar02" [HDPT:' + LoadOrder + '000951]'; i := i + 1;
  520.   ScarsAM2[i] := '00KLH_MarksMaleArgonianScar03 "MarksMaleArgonianScar03" [HDPT:' + LoadOrder + '000952]'; i := i + 1;
  521.   ScarsAM2[i] := '00KLH_MarksMaleArgonianScar04 "MarksMaleArgonianScar04" [HDPT:' + LoadOrder + '000953]'; i := i + 1;
  522.   ScarsAM2[i] := '00KLH_MarksMaleArgonianScar05 "MarksMaleArgonianScar05" [HDPT:' + LoadOrder + '000954]'; i := i + 1;
  523.   ScarsAM2[i] := '00KLH_MarksMaleArgonianScars01 "MarksMaleArgonianScar01" [HDPT:' + LoadOrder + '000955]'; i := i + 1;
  524.   ScarsAM2[i] := '00KLH_MarksMaleArgonianScars02 "MarksMaleArgonianScars02" [HDPT:' + LoadOrder + '000956]'; i := i + 1;
  525.   ScarsAM2[i] := '00KLH_MarksMaleArgonianScars03 "MarksMaleArgonianScar03" [HDPT:' + LoadOrder + '000957]'; i := i + 1;
  526.   ScarsAM2[i] := '00KLH_MarksMaleArgonianScars04 "MarksMaleArgonianScar04" [HDPT:' + LoadOrder + '000958]'; i := i + 1;
  527.   ScarsAM2[i] := '00KLH_MarksMaleArgonianScars05 "MarksMaleArgonianScar05" [HDPT:' + LoadOrder + '000959]';
  528.  
  529.   i := 1;
  530.   ScarsAF1[i] := 'MarksFemaleArgonianScar01 "MarksFemaleArgonianScar01" [HDPT:000B2FB8]'; i := i + 1;
  531.   ScarsAF1[i] := 'MarksFemaleArgonianScar02 "MarksFemaleArgonianScar02" [HDPT:000B2E18]'; i := i + 1;
  532.   ScarsAF1[i] := 'MarksFemaleArgonianScar03 "MarksFemaleArgonianScar03" [HDPT:000B2E19]'; i := i + 1;
  533.   ScarsAF1[i] := 'MarksFemaleArgonianScar04 "MarksFemaleArgonianScar04" [HDPT:000B2E1D]'; i := i + 1;
  534.   ScarsAF1[i] := 'MarksFemaleArgonianScar05 "MarksFemaleArgonianScar05" [HDPT:000B2E1E]'; i := i + 1;
  535.   ScarsAF1[i] := 'MarksFemaleArgonianScar06 "MarksFemaleArgonianScar06" [HDPT:000B2E5F]'; i := i + 1;
  536.   ScarsAF1[i] := 'MarksFemaleArgonianScars01 "MarksFemaleArgonianScar01" [HDPT:000B2EEE]'; i := i + 1;
  537.   ScarsAF1[i] := 'MarksFemaleArgonianScars02 "MarksFemaleArgonianScar02" [HDPT:000B2FB5]'; i := i + 1;
  538.   ScarsAF1[i] := 'MarksFemaleArgonianScars03 "MarksFemaleArgonianScar03" [HDPT:000B2FB6]'; i := i + 1;
  539.   ScarsAF1[i] := 'MarksFemaleArgonianScars04 "MarksFemaleArgonianScar04" [HDPT:000B2FB7]';
  540.  
  541.   i := 1;
  542.   ScarsAF2[i] := '00KLH_MarksFemaleArgonianScar01 "MarksFemaleArgonianScar01" [HDPT:' + LoadOrder + '000A40]'; i := i + 1;
  543.   ScarsAF2[i] := '00KLH_MarksFemaleArgonianScar02 "MarksFemaleArgonianScar02" [HDPT:' + LoadOrder + '000A41]'; i := i + 1;
  544.   ScarsAF2[i] := '00KLH_MarksFemaleArgonianScar03 "MarksFemaleArgonianScar03" [HDPT:' + LoadOrder + '000A42]'; i := i + 1;
  545.   ScarsAF2[i] := '00KLH_MarksFemaleArgonianScar04 "MarksFemaleArgonianScar04" [HDPT:' + LoadOrder + '000A43]'; i := i + 1;
  546.   ScarsAF2[i] := '00KLH_MarksFemaleArgonianScar05 "MarksFemaleArgonianScar05" [HDPT:' + LoadOrder + '000A44]'; i := i + 1;
  547.   ScarsAF2[i] := '00KLH_MarksFemaleArgonianScar06 "MarksFemaleArgonianScar06" [HDPT:' + LoadOrder + '000A45]'; i := i + 1;
  548.   ScarsAF2[i] := '00KLH_MarksFemaleArgonianScars01 "MarksFemaleArgonianScar01" [HDPT:' + LoadOrder + '000A46]'; i := i + 1;
  549.   ScarsAF2[i] := '00KLH_MarksFemaleArgonianScars02 "MarksFemaleArgonianScar02" [HDPT:' + LoadOrder + '000A47]'; i := i + 1;
  550.   ScarsAF2[i] := '00KLH_MarksFemaleArgonianScars03 "MarksFemaleArgonianScar03" [HDPT:' + LoadOrder + '000A48]'; i := i + 1;
  551.   ScarsAF2[i] := '00KLH_MarksFemaleArgonianScars04 "MarksFemaleArgonianScar04" [HDPT:' + LoadOrder + '000A49]';
  552.  
  553.   i := 1;
  554.   ScarsKM1[i] := 'MarksMaleKhajiitScar01 "MarksMaleKhajiitScar01" [HDPT:000EE881]'; i := i + 1;
  555.   ScarsKM1[i] := 'MarksMaleKhajiitScar02 "MarksMaleKhajiitScar02" [HDPT:000F390E]'; i := i + 1;
  556.   ScarsKM1[i] := 'MarksMaleKhajiitScar03 "MarksMaleKhajiitScar03" [HDPT:000F3910]'; i := i + 1;
  557.   ScarsKM1[i] := 'MarksMaleKhajiitScars01 "MarksMaleKhajiitScar01" [HDPT:000F390D]'; i := i + 1;
  558.   ScarsKM1[i] := 'MarksMaleKhajiitScars02 "MarksMaleKhajiitScars02" [HDPT:000F390F]'; i := i + 1;
  559.   ScarsKM1[i] := 'MarksMaleKhajiitScars03 "MarksMaleKhajiitScars03" [HDPT:000F3911]'; i := i + 1;
  560.   ScarsKM1[i] := 'MarksMaleKhajiitScars04 "MarksMaleKhajiitScars04" [HDPT:000F3919]'; i := i + 1;
  561.   ScarsKM1[i] := 'MarksMaleKhajiitScars05 "MarksMaleKhajiitScar05" [HDPT:000F391A]'; i := i + 1;
  562.   ScarsKM1[i] := 'MarksMaleKhajiitScars06 "MarksMaleKhajiitScar06" [HDPT:000F391B]'; i := i + 1;
  563.   ScarsKM1[i] := 'MarksMaleKhajiitScars07 "MarksMaleKhajiitScar07" [HDPT:000F391C]'; i := i + 1;
  564.   ScarsKM1[i] := 'MarksMaleKhajiitScars08 "MarksMaleKhajiitScar08" [HDPT:000F391D]'; i := i + 1;
  565.   ScarsKM1[i] := 'MarksMaleKhajiitScars09 "MarksMaleKhajiitScars09" [HDPT:000F391E]';
  566.  
  567.   i := 1;
  568.   ScarsKM2[i] := '00KLH_MarksMaleKhajiitScar01 "MarksMaleKhajiitScar01" [HDPT:' + LoadOrder + '000960]'; i := i + 1;
  569.   ScarsKM2[i] := '00KLH_MarksMaleKhajiitScar02 "MarksMaleKhajiitScar02" [HDPT:' + LoadOrder + '000961]'; i := i + 1;
  570.   ScarsKM2[i] := '00KLH_MarksMaleKhajiitScar03 "MarksMaleKhajiitScar03" [HDPT:' + LoadOrder + '000962]'; i := i + 1;
  571.   ScarsKM2[i] := '00KLH_MarksMaleKhajiitScars01 "MarksMaleKhajiitScar01" [HDPT:' + LoadOrder + '000963]'; i := i + 1;
  572.   ScarsKM2[i] := '00KLH_MarksMaleKhajiitScars02 "MarksMaleKhajiitScars02" [HDPT:' + LoadOrder + '000964]'; i := i + 1;
  573.   ScarsKM2[i] := '00KLH_MarksMaleKhajiitScars03 "MarksMaleKhajiitScars03" [HDPT:' + LoadOrder + '000965]'; i := i + 1;
  574.   ScarsKM2[i] := '00KLH_MarksMaleKhajiitScars04 "MarksMaleKhajiitScars04" [HDPT:' + LoadOrder + '000966]'; i := i + 1;
  575.   ScarsKM2[i] := '00KLH_MarksMaleKhajiitScars05 "MarksMaleKhajiitScar05" [HDPT:' + LoadOrder + '000967]'; i := i + 1;
  576.   ScarsKM2[i] := '00KLH_MarksMaleKhajiitScars06 "MarksMaleKhajiitScar06" [HDPT:' + LoadOrder + '000968]'; i := i + 1;
  577.   ScarsKM2[i] := '00KLH_MarksMaleKhajiitScars07 "MarksMaleKhajiitScar07" [HDPT:' + LoadOrder + '000969]'; i := i + 1;
  578.   ScarsKM2[i] := '00KLH_MarksMaleKhajiitScars08 "MarksMaleKhajiitScar08" [HDPT:' + LoadOrder + '00096A]'; i := i + 1;
  579.   ScarsKM2[i] := '00KLH_MarksMaleKhajiitScars09 "MarksMaleKhajiitScars09" [HDPT:' + LoadOrder + '00096B]';
  580.  
  581.   i := 1;
  582.   ScarsKF1[i] := 'MarksFemaleKhajiitScar01 "MarksFemaleKhajiitScar01" [HDPT:000F3907]'; i := i + 1;
  583.   ScarsKF1[i] := 'MarksFemaleKhajiitScar02 "MarksFemaleKhajiitScar02" [HDPT:000F3909]'; i := i + 1;
  584.   ScarsKF1[i] := 'MarksFemaleKhajiitScar03 "MarksFemaleKhajiitScar03" [HDPT:000F390B]'; i := i + 1;
  585.   ScarsKF1[i] := 'MarksFemaleKhajiitScar04 "MarksFemaleKhajiitScar04" [HDPT:000F3912]'; i := i + 1;
  586.   ScarsKF1[i] := 'MarksFemaleKhajiitScar05 "MarksFemaleKhajiitScar05" [HDPT:000F3913]'; i := i + 1;
  587.   ScarsKF1[i] := 'MarksFemaleKhajiitScar06 "MarksFemaleKhajiitScar06" [HDPT:000F3914]'; i := i + 1;
  588.   ScarsKF1[i] := 'MarksFemaleKhajiitScar07 "MarksFemaleKhajiitScar07" [HDPT:000F3915]'; i := i + 1;
  589.   ScarsKF1[i] := 'MarksFemaleKhajiitScar08 "MarksFemaleKhajiitScar08" [HDPT:000F3916]'; i := i + 1;
  590.   ScarsKF1[i] := 'MarksFemaleKhajiitScar09 "MarksFemaleKhajiitScar09" [HDPT:000F3917]'; i := i + 1;
  591.   ScarsKF1[i] := 'MarksFemaleKhajiitScar10 "MarksFemaleKhajiitScar10" [HDPT:000F3918]'; i := i + 1;
  592.   ScarsKF1[i] := 'MarksFemaleKhajiitScars01 "MarksFemaleKhajiitScar01" [HDPT:000F3908]'; i := i + 1;
  593.   ScarsKF1[i] := 'MarksFemaleKhajiitScars02 "MarksFemaleKhajiitScar02" [HDPT:000F390A]'; i := i + 1;
  594.   ScarsKF1[i] := 'MarksFemaleKhajiitScars03 "MarksFemaleKhajiitScar03" [HDPT:000F390C]';
  595.  
  596.   i := 1;
  597.   ScarsKF2[i] := '00KLH_MarksFemaleKhajiitScar01 "MarksFemaleKhajiitScar01" [HDPT:' + LoadOrder + '000A4A]'; i := i + 1;
  598.   ScarsKF2[i] := '00KLH_MarksFemaleKhajiitScar02 "MarksFemaleKhajiitScar02" [HDPT:' + LoadOrder + '000A4B]'; i := i + 1;
  599.   ScarsKF2[i] := '00KLH_MarksFemaleKhajiitScar03 "MarksFemaleKhajiitScar03" [HDPT:' + LoadOrder + '000A4C]'; i := i + 1;
  600.   ScarsKF2[i] := '00KLH_MarksFemaleKhajiitScar04 "MarksFemaleKhajiitScar04" [HDPT:' + LoadOrder + '000A4D]'; i := i + 1;
  601.   ScarsKF2[i] := '00KLH_MarksFemaleKhajiitScar05 "MarksFemaleKhajiitScar05" [HDPT:' + LoadOrder + '000A4E]'; i := i + 1;
  602.   ScarsKF2[i] := '00KLH_MarksFemaleKhajiitScar06 "MarksFemaleKhajiitScar06" [HDPT:' + LoadOrder + '000A4F]'; i := i + 1;
  603.   ScarsKF2[i] := '00KLH_MarksFemaleKhajiitScar07 "MarksFemaleKhajiitScar07" [HDPT:' + LoadOrder + '000A50]'; i := i + 1;
  604.   ScarsKF2[i] := '00KLH_MarksFemaleKhajiitScar08 "MarksFemaleKhajiitScar08" [HDPT:' + LoadOrder + '000A51]'; i := i + 1;
  605.   ScarsKF2[i] := '00KLH_MarksFemaleKhajiitScar09 "MarksFemaleKhajiitScar09" [HDPT:' + LoadOrder + '000A52]'; i := i + 1;
  606.   ScarsKF2[i] := '00KLH_MarksFemaleKhajiitScar10 "MarksFemaleKhajiitScar10" [HDPT:' + LoadOrder + '000A53]'; i := i + 1;
  607.   ScarsKF2[i] := '00KLH_MarksFemaleKhajiitScars01 "MarksFemaleKhajiitScar01" [HDPT:' + LoadOrder + '000A54]'; i := i + 1;
  608.   ScarsKF2[i] := '00KLH_MarksFemaleKhajiitScars02 "MarksFemaleKhajiitScar02" [HDPT:' + LoadOrder + '000A55]'; i := i + 1;
  609.   ScarsKF2[i] := '00KLH_MarksFemaleKhajiitScars03 "MarksFemaleKhajiitScar03" [HDPT:' + LoadOrder + '000A56]';
  610.  
  611.   i := 1;
  612.   BeardsM1[i] := 'HumanBeard01Shaved "HumanBeard01Shaved" [HDPT:000510B5]'; i := i + 1;
  613.   BeardsM1[i] := 'HumanBeard02 "HumanBeard02" [HDPT:000510B4]'; i := i + 1;
  614.   BeardsM1[i] := 'HumanBeard03 "HumanBeard03" [HDPT:000899B1]'; i := i + 1;
  615.   BeardsM1[i] := 'HumanBeard04 "HumanBeard04" [HDPT:00017505]'; i := i + 1;
  616.   BeardsM1[i] := 'HumanBeard05 "HumanBeard05" [HDPT:00017506]'; i := i + 1;
  617.   BeardsM1[i] := 'HumanBeard06 "HumanBeard06" [HDPT:00017508]'; i := i + 1;
  618.   BeardsM1[i] := 'HumanBeard07 "HumanBeard07" [HDPT:000C3CE0]'; i := i + 1;
  619.   BeardsM1[i] := 'HumanBeard08 "HumanBeard08" [HDPT:000C3CE2]'; i := i + 1;
  620.   BeardsM1[i] := 'HumanBeard09 "HumanBeard09" [HDPT:000C3CE4]'; i := i + 1;
  621.   BeardsM1[i] := 'HumanBeard10 "HumanBeard10" [HDPT:000C3CDE]'; i := i + 1;
  622.   BeardsM1[i] := 'HumanBeard11 "HumanBeard11" [HDPT:000C3CDC]'; i := i + 1;
  623.   BeardsM1[i] := 'HumanBeard12 "HumanBeard12" [HDPT:000C3CDA]'; i := i + 1;
  624.   BeardsM1[i] := 'HumanBeard13 "HumanBeard13" [HDPT:000C3CD4]'; i := i + 1;
  625.   BeardsM1[i] := 'HumanBeard14 "HumanBeard14" [HDPT:000C3CD6]'; i := i + 1;
  626.   BeardsM1[i] := 'HumanBeard15 "HumanBeard15" [HDPT:000C3CD8]'; i := i + 1;
  627.   BeardsM1[i] := 'HumanBeard16 "HumanBeard16" [HDPT:000C3CC6]'; i := i + 1;
  628.   BeardsM1[i] := 'HumanBeard17 "HumanBeard17" [HDPT:000C3CC8]'; i := i + 1;
  629.   BeardsM1[i] := 'HumanBeard18 "HumanBeard18" [HDPT:000C3CCA]'; i := i + 1;
  630.   BeardsM1[i] := 'HumanBeard19 "HumanBeard19" [HDPT:000C3CCE]'; i := i + 1;
  631.   BeardsM1[i] := 'HumanBeard20 "HumanBeard20" [HDPT:000C3CD0]'; i := i + 1;
  632.   BeardsM1[i] := 'HumanBeard22 "HumanBeard22" [HDPT:000D2EC0]'; i := i + 1;
  633.   BeardsM1[i] := 'HumanBeard21 "HumanBeard21" [HDPT:000C3CD2]'; i := i + 1;
  634.   BeardsM1[i] := 'HumanBeard23 "HumanBeard23" [HDPT:000D2EC2]'; i := i + 1;
  635.   BeardsM1[i] := 'HumanBeard24 "HumanBeard24" [HDPT:000C3CC0]'; i := i + 1;
  636.   BeardsM1[i] := 'HumanBeard25 "HumanBeard25" [HDPT:000C3CC2]'; i := i + 1;
  637.   BeardsM1[i] := 'HumanBeard26 "HumanBeard26" [HDPT:000C3CC4]'; i := i + 1;
  638.   BeardsM1[i] := 'HumanBeard27 "HumanBeard27" [HDPT:00023DCD]'; i := i + 1;
  639.   BeardsM1[i] := 'HumanBeard28 "HumanBeard28" [HDPT:00023DCE]'; i := i + 1;
  640.   BeardsM1[i] := 'HumanBeard29 "HumanBeard29" [HDPT:000C3CE5]'; i := i + 1;
  641.   BeardsM1[i] := 'HumanBeard30 "HumanBeard30" [HDPT:000D2EBE]'; i := i + 1;
  642.   BeardsM1[i] := 'HumanBeard31 "HumanBeard31" [HDPT:00017509]'; i := i + 1;
  643.   BeardsM1[i] := 'HumanBeard32 "HumanBeard32" [HDPT:0001750A]'; i := i + 1;
  644.   BeardsM1[i] := 'HumanBeard33 "HumanBeard33" [HDPT:0001750B]'; i := i + 1;
  645.   BeardsM1[i] := 'HumanBeard34 "HumanBeard34" [HDPT:000CDCBE]'; i := i + 1;
  646.   BeardsM1[i] := 'HumanBeard35 "HumanBeard35" [HDPT:000CDCB3]'; i := i + 1;
  647.   BeardsM1[i] := 'HumanBeard36 "HumanBeard36" [HDPT:000CDDAD]'; i := i + 1;
  648.   BeardsM1[i] := 'HumanBeard37 "HumanBeard37" [HDPT:000CDD8D]'; i := i + 1;
  649.   BeardsM1[i] := 'HumanBeard38 "HumanBeard38" [HDPT:000CDCA7]'; i := i + 1;
  650.   BeardsM1[i] := 'HumanBeard39 "HumanBeard39" [HDPT:000CDDA9]'; i := i + 1;
  651.   BeardsM1[i] := 'HumanBeard40 "HumanBeard40" [HDPT:000CDD71]'; i := i + 1;
  652.   BeardsM1[i] := 'HumanBeard41 "HumanBeard41" [HDPT:000CDB77]'; i := i + 1;
  653.   BeardsM1[i] := 'HumanBeard42 "HumanBeard42" [HDPT:000D2EA2]'; i := i + 1;
  654.   BeardsM1[i] := 'HumanBeard43 "HumanBeard43" [HDPT:000D0564]'; i := i + 1;
  655.   BeardsM1[i] := 'HumanBeard44 "HumanBeard44" [HDPT:000D2EA8]'; i := i + 1;
  656.   BeardsM1[i] := 'HumanBeard45 "HumanBeard45" [HDPT:000D2EB0]';
  657.  
  658.   i := 1;
  659.   BeardsM2[i] := '00KLH_HumanBeard01Shaved "HumanBeard01Shaved" [HDPT:' + LoadOrder + '000901]'; i := i + 1;
  660.   BeardsM2[i] := '00KLH_HumanBeard02 "HumanBeard02" [HDPT:' + LoadOrder + '000902]'; i := i + 1;
  661.   BeardsM2[i] := '00KLH_HumanBeard03 "HumanBeard03" [HDPT:' + LoadOrder + '000903]'; i := i + 1;
  662.   BeardsM2[i] := '00KLH_HumanBeard04 "HumanBeard04" [HDPT:' + LoadOrder + '000904]'; i := i + 1;
  663.   BeardsM2[i] := '00KLH_HumanBeard05 "HumanBeard05" [HDPT:' + LoadOrder + '000905]'; i := i + 1;
  664.   BeardsM2[i] := '00KLH_HumanBeard06 "HumanBeard06" [HDPT:' + LoadOrder + '000906]'; i := i + 1;
  665.   BeardsM2[i] := '00KLH_HumanBeard07 "HumanBeard07" [HDPT:' + LoadOrder + '000907]'; i := i + 1;
  666.   BeardsM2[i] := '00KLH_HumanBeard08 "HumanBeard08" [HDPT:' + LoadOrder + '000908]'; i := i + 1;
  667.   BeardsM2[i] := '00KLH_HumanBeard09 "HumanBeard09" [HDPT:' + LoadOrder + '000909]'; i := i + 1;
  668.   BeardsM2[i] := '00KLH_HumanBeard10 "HumanBeard10" [HDPT:' + LoadOrder + '00090A]'; i := i + 1;
  669.   BeardsM2[i] := '00KLH_HumanBeard11 "HumanBeard11" [HDPT:' + LoadOrder + '00090B]'; i := i + 1;
  670.   BeardsM2[i] := '00KLH_HumanBeard12 "HumanBeard12" [HDPT:' + LoadOrder + '00090C]'; i := i + 1;
  671.   BeardsM2[i] := '00KLH_HumanBeard13 "HumanBeard13" [HDPT:' + LoadOrder + '00090D]'; i := i + 1;
  672.   BeardsM2[i] := '00KLH_HumanBeard14 "HumanBeard14" [HDPT:' + LoadOrder + '00090E]'; i := i + 1;
  673.   BeardsM2[i] := '00KLH_HumanBeard15 "HumanBeard15" [HDPT:' + LoadOrder + '00090F]'; i := i + 1;
  674.   BeardsM2[i] := '00KLH_HumanBeard16 "HumanBeard16" [HDPT:' + LoadOrder + '000910]'; i := i + 1;
  675.   BeardsM2[i] := '00KLH_HumanBeard17 "HumanBeard17" [HDPT:' + LoadOrder + '000911]'; i := i + 1;
  676.   BeardsM2[i] := '00KLH_HumanBeard18 "HumanBeard18" [HDPT:' + LoadOrder + '000912]'; i := i + 1;
  677.   BeardsM2[i] := '00KLH_HumanBeard19 "HumanBeard19" [HDPT:' + LoadOrder + '000913]'; i := i + 1;
  678.   BeardsM2[i] := '00KLH_HumanBeard20 "HumanBeard20" [HDPT:' + LoadOrder + '000914]'; i := i + 1;
  679.   BeardsM2[i] := '00KLH_HumanBeard22 "HumanBeard22" [HDPT:' + LoadOrder + '000915]'; i := i + 1;
  680.   BeardsM2[i] := '00KLH_HumanBeard21 "HumanBeard21" [HDPT:' + LoadOrder + '000916]'; i := i + 1;
  681.   BeardsM2[i] := '00KLH_HumanBeard23 "HumanBeard23" [HDPT:' + LoadOrder + '000917]'; i := i + 1;
  682.   BeardsM2[i] := '00KLH_HumanBeard24 "HumanBeard24" [HDPT:' + LoadOrder + '000918]'; i := i + 1;
  683.   BeardsM2[i] := '00KLH_HumanBeard25 "HumanBeard25" [HDPT:' + LoadOrder + '000919]'; i := i + 1;
  684.   BeardsM2[i] := '00KLH_HumanBeard26 "HumanBeard26" [HDPT:' + LoadOrder + '00091A]'; i := i + 1;
  685.   BeardsM2[i] := '00KLH_HumanBeard27 "HumanBeard27" [HDPT:' + LoadOrder + '00091B]'; i := i + 1;
  686.   BeardsM2[i] := '00KLH_HumanBeard28 "HumanBeard28" [HDPT:' + LoadOrder + '00091C]'; i := i + 1;
  687.   BeardsM2[i] := '00KLH_HumanBeard29 "HumanBeard29" [HDPT:' + LoadOrder + '00091D]'; i := i + 1;
  688.   BeardsM2[i] := '00KLH_HumanBeard30 "HumanBeard30" [HDPT:' + LoadOrder + '00091E]'; i := i + 1;
  689.   BeardsM2[i] := '00KLH_HumanBeard31 "HumanBeard31" [HDPT:' + LoadOrder + '00091F]'; i := i + 1;
  690.   BeardsM2[i] := '00KLH_HumanBeard32 "HumanBeard32" [HDPT:' + LoadOrder + '000920]'; i := i + 1;
  691.   BeardsM2[i] := '00KLH_HumanBeard33 "HumanBeard33" [HDPT:' + LoadOrder + '000921]'; i := i + 1;
  692.   BeardsM2[i] := '00KLH_HumanBeard34 "HumanBeard34" [HDPT:' + LoadOrder + '000922]'; i := i + 1;
  693.   BeardsM2[i] := '00KLH_HumanBeard35 "HumanBeard35" [HDPT:' + LoadOrder + '000923]'; i := i + 1;
  694.   BeardsM2[i] := '00KLH_HumanBeard36 "HumanBeard36" [HDPT:' + LoadOrder + '000924]'; i := i + 1;
  695.   BeardsM2[i] := '00KLH_HumanBeard37 "HumanBeard37" [HDPT:' + LoadOrder + '000925]'; i := i + 1;
  696.   BeardsM2[i] := '00KLH_HumanBeard38 "HumanBeard38" [HDPT:' + LoadOrder + '000926]'; i := i + 1;
  697.   BeardsM2[i] := '00KLH_HumanBeard39 "HumanBeard39" [HDPT:' + LoadOrder + '000927]'; i := i + 1;
  698.   BeardsM2[i] := '00KLH_HumanBeard40 "HumanBeard40" [HDPT:' + LoadOrder + '000928]'; i := i + 1;
  699.   BeardsM2[i] := '00KLH_HumanBeard41 "HumanBeard41" [HDPT:' + LoadOrder + '000929]'; i := i + 1;
  700.   BeardsM2[i] := '00KLH_HumanBeard42 "HumanBeard42" [HDPT:' + LoadOrder + '00092A]'; i := i + 1;
  701.   BeardsM2[i] := '00KLH_HumanBeard43 "HumanBeard43" [HDPT:' + LoadOrder + '00092B]'; i := i + 1;
  702.   BeardsM2[i] := '00KLH_HumanBeard44 "HumanBeard44" [HDPT:' + LoadOrder + '00092C]'; i := i + 1;
  703.   BeardsM2[i] := '00KLH_HumanBeard45 "HumanBeard45" [HDPT:' + LoadOrder + '00092D]';
  704.  
  705. end;
  706.  
  707. function swapPart(hPart1: string; hPart2: string): Boolean;
  708. var
  709.   k: IInterface;
  710.   j: integer;
  711.   exists: boolean;
  712. begin
  713.     Result := false;
  714.    
  715.     if (hPart1 = SNone) OR (hPart2 = SNone) then exit;
  716.     if (hPart1 = hPart2) then exit;
  717.    
  718.     // check if hPart1 exists
  719.     exists := false;
  720.     for j := 0 to ElementCount(kwda) - 1 do
  721.         if (GetEditValue(ElementByIndex(kwda, j))= hPart1) then begin
  722.             exists := true;
  723.             RemovebyIndex(kwda, j, False);
  724.             break;
  725.         end;
  726.    
  727.     if exists then begin
  728.         // CK likes to save empty KWDA with only a single NULL form, use it if so
  729.         if (ElementCount(kwda) = 1) and (GetNativeValue(ElementByIndex(kwda, 0)) = 0) then
  730.             SetEditValue(ElementByIndex(kwda, 0), hPart2)
  731.         else begin
  732.             // add a new keyword at the end of list
  733.             // container, index, element, aOnlySK
  734.             k := ElementAssign(kwda, HighInteger, nil, False);
  735.             if not Assigned(k) then begin
  736.                 AddMessage('Can''t add keyword to ' + Name(e));
  737.                 Exit;
  738.             end;
  739.         SetEditValue(k, hPart2);
  740.         end;
  741.     Result := true;
  742.     end;
  743. end;
  744.  
  745. function addPart(hPart: string): Boolean;
  746. var
  747.   k: IInterface;
  748.   j: integer;
  749.   exists: boolean;
  750. begin
  751.     Result := false;
  752.    
  753.     if (hPart = SNone) then Exit;
  754.    
  755.     // check if our keyword already exists
  756.     exists := false;
  757.     for j := 0 to ElementCount(kwda) - 1 do
  758.         if (GetEditValue(ElementByIndex(kwda, j))= hPart) then begin
  759.             exists := true;
  760.             Break;
  761.         end;
  762.    
  763.     if Not exists then begin
  764.         // CK likes to save empty KWDA with only a single NULL form, use it if so
  765.         if (ElementCount(kwda) = 1) and (GetNativeValue(ElementByIndex(kwda, 0)) = 0) then
  766.             SetEditValue(ElementByIndex(kwda, 0), hPart)
  767.         else begin
  768.             // add a new keyword at the end of list
  769.             // container, index, element, aOnlySK
  770.             k := ElementAssign(kwda, HighInteger, nil, False);
  771.             if not Assigned(k) then begin
  772.                 AddMessage('Can''t add keyword to ' + Name(e));
  773.                 Exit;
  774.             end;
  775.         SetEditValue(k, hPart);
  776.         end;
  777.     Result := true;
  778.     end;
  779. end;
  780.  
  781.  
  782. function checkPart(hPart: string): Boolean;
  783. var
  784.   j: integer;
  785. begin
  786.     Result := false;
  787.     if (hPart = SNone) then Exit;
  788.    
  789.     // check if our keyword already exists
  790.     for j := 0 to ElementCount(kwda) - 1 do
  791.         if (GetEditValue(ElementByIndex(kwda, j))= hPart) then begin
  792.             Result := true;
  793.             Break;
  794.         end;
  795. end;
  796.  
  797. function cleanHead(): Boolean;
  798. var
  799.   j: integer;
  800. begin
  801.     // check for NULL and remove extras
  802.     for j := 0 to ElementCount(kwda) - 1 do
  803.         if (ElementCount(kwda) > 1) and (GetNativeValue(ElementByIndex(kwda, 0)) = 0) then begin
  804.             RemovebyIndex(kwda, 0, False);
  805.         end;
  806. end;
  807.  
  808. function addMaster(e: IInterface): Boolean;
  809. var
  810.   j: integer;
  811.   sFileName: string;
  812.   plugin: IInterface;
  813. begin
  814.     Result := false;
  815.     sFileName := GetFileName(GetFile(e));
  816.     for j := 0 to FileCount - 1 do begin
  817.         plugin := FileByIndex(j);
  818.         if (GetFileName(plugin) <> sFileName) then
  819.             continue;
  820.         AddMasterIfMissing(plugin, 'High Poly Head.esm');
  821.         HasMaster := true;
  822.         Result := true;
  823.         Break;
  824.     end;
  825. end;
  826.  
  827. function Initialize: integer;
  828. var
  829.   j: integer;
  830.   plugin: IInterface;
  831. begin
  832.     FoundMaster := false;
  833.  
  834.     for j := 0 to FileCount - 2 do begin
  835.         plugin := FileByIndex(j);
  836.         if (GetFileName(plugin) <> 'High Poly Head.esm') then
  837.             continue;
  838.         LoadOrder := IntToHex(j-1,2);
  839.         FoundMaster := true;
  840.         Break;
  841.     end;
  842.  
  843.     if FoundMaster then
  844.         buildList()
  845.     else
  846.         AddMessage('ERROR:  High Poly Head.esm not found in load order');
  847. end;
  848.  
  849. function Process(e: IInterface): integer;
  850. var
  851.   sRace: string;
  852.   iRacePos, j: integer;
  853.   isFemale, isDone, isDoneScar: Boolean;
  854. begin
  855.     Result := 0;
  856.    
  857.     if NOT FoundMaster then Exit;
  858.     if NOT HasMaster then addMaster(e);
  859.  
  860.     // apply only to NPC
  861.     if Signature(e) <> 'NPC_' then Exit;
  862.  
  863.     // get existing keywords list or add a new
  864.     kwda := ElementBySignature(e, 'PNAM');
  865.     if not Assigned(kwda) then
  866.         kwda := Add(e, 'PNAM', True);
  867.    
  868.     // no keywords subrecord (it must exist) - terminate script
  869.     if not Assigned(kwda) then begin
  870.         AddMessage('No head parts subrecord in ' + Name(e));
  871.         Result := 1;
  872.         Exit;
  873.     end;
  874.  
  875.     // setup
  876.  
  877.     cleanHead();
  878.     isFemale := ElementExists(e, 'ACBS - Configuration\Flags\Female');
  879.     sRace := GetElementEditValues(e, 'RNAM');
  880.    
  881.     // check for valid race
  882.     iRacePos := 0;
  883.     for j := 1 to NumRaces do
  884.         if sRace = Races[j] then begin
  885.             iRacePos := j;
  886.             Break;
  887.         end;
  888.    
  889.     // no valid race found
  890.     if (iRacePos > NumRaces) then
  891.         iRacePos := 0;
  892.    
  893.     // check for existing head and swap
  894.     isDone := false;
  895.     for j := 1 to NumRaces do begin
  896.         if isFemale then
  897.             isDone := checkPart(HeadsF2[j]) OR swapPart(HeadsF1[j], HeadsF2[j])
  898.                
  899.         else
  900.             isDone := checkPart(HeadsM2[j]) OR swapPart(HeadsM1[j], HeadsM2[j]);
  901.            
  902.         if isDone then Break;
  903.     end;
  904.  
  905.     // add head if not defined
  906.     if NOT isDone AND (iRacePos > 0) then begin
  907.         if isFemale then
  908.             isDone := addPart(HeadsF2[iRacePos])
  909.  
  910.         else
  911.             isDone := addPart(HeadsM2[iRacePos]);
  912.            
  913.         if NOT isDone AND EnableLog then
  914.             AddMessage('******** Could not add high poly head to ' + Name(e) + '. Head already exists or race not valid. ********');
  915.     end;
  916.  
  917.     // swap brows
  918.     if isFemale then begin
  919.         for j := 1 to NumBrowsF do begin
  920.             isDone := swapPart(BrowsF1[j], BrowsF2[j]);
  921.             if isDone then Break;
  922.         end;
  923.  
  924.         if NOT isDone then
  925.             for j := 1 to NumBrowsAF do begin
  926.                 isDone := swapPart(BrowsAF1[j], BrowsAF2[j]);
  927.                 if isDone then Break;
  928.             end;
  929.  
  930.         if NOT isDone AND (iRacePos > 0) then begin
  931.             for j := 1 to NumBrowsF do begin
  932.                 isDone := checkPart(BrowsF2[j]);
  933.                 if isDone then break;
  934.             end;
  935.  
  936.             if NOT isDone then
  937.                 addPart(BrowsFR[iRacePos]);
  938.         end;
  939.     end else begin
  940.         for j := 1 to NumBrowsM do begin
  941.             isDone := swapPart(BrowsM1[j], BrowsM2[j]);
  942.             if isDone then Break;
  943.         end;
  944.        
  945.         if NOT isDone then
  946.             for j := 1 to NumBrowsAM do begin
  947.                 isDone := swapPart(BrowsAM1[j], BrowsAM2[j]);
  948.                 if isDone then Break;
  949.             end;
  950.        
  951.         if NOT isDone AND (iRacePos > 0) then begin
  952.             for j := 1 to NumBrowsM do begin
  953.                 isDone := checkPart(BrowsM2[j]);
  954.                 if isDone then break;
  955.             end;
  956.  
  957.             if NOT isDone then
  958.                 addPart(BrowsMR[iRacePos]);
  959.         end;
  960.     end;
  961.  
  962.     // swap scars
  963.     isDoneScar := true;
  964.     repeat
  965.         isDone := false;
  966.         if isFemale then begin
  967.             for j := 1 to NumScarsHF do begin
  968.                 isDone := swapPart(ScarsHF1[j], ScarsHF2[j]);
  969.                 if isDone then Break;
  970.             end;
  971.  
  972.             if NOT isDone then
  973.                 for j := 1 to NumScarsAF do begin
  974.                     isDone := swapPart(ScarsAF1[j], ScarsAF2[j]);
  975.                     if isDone then Break;
  976.                 end;
  977.  
  978.             if NOT isDone then
  979.                 for j := 1 to NumScarsKF do begin
  980.                     isDone := swapPart(ScarsKF1[j], ScarsKF2[j]);
  981.                     if isDone then Break;
  982.                 end;
  983.  
  984.         end else begin
  985.             for j := 1 to NumScarsHM do begin
  986.                 isDone := swapPart(ScarsHM1[j], ScarsHM2[j]);
  987.                 if isDone then Break;
  988.             end;
  989.  
  990.             if NOT isDone then
  991.                 for j := 1 to NumScarsAM do begin
  992.                     isDone := swapPart(ScarsAM1[j], ScarsAM2[j]);
  993.                     if isDone then Break;
  994.                 end;
  995.  
  996.             if NOT isDone then
  997.                 for j := 1 to NumScarsKM do begin
  998.                     isDone := swapPart(ScarsKM1[j], ScarsKM2[j]);
  999.                     if isDone then Break;
  1000.                 end;
  1001.         end;
  1002.         isDoneScar := NOT isDone;
  1003.     until isDoneScar;
  1004.    
  1005.     // swap beards
  1006.     if NOT isFemale then
  1007.         for j := 1 to NumBeardsM do
  1008.             if (swapPart(BeardsM1[j], BeardsM2[j])) then Break;
  1009.    
  1010.     if EnableLog then
  1011.         AddMessage('Processed: ' + Name(e));
  1012. end;
  1013.  
  1014. end.
RAW Paste Data