I know this is a long shot but, would you consider adding lines to swap "VendorItemArmor [KYWD:0008F959]" with "VendorItemClothing [KYWD:0008F95B]" and vice versa? In vanilla game, heavy and light are tagged with the first, and clothing the latter. It would be awesome if you could.
Usually, things that totally look like clothes are marked by their authors as light armor (or even heavy) and that's how I usually use this.
It's a rare occurrence that I change clothes to light armor, but think about this: how is this script supposed to know what the armor rating for your piece should be?
I made another script that lets me deal with that by letting me set an armor rating to a whole set based on vanilla ratings (some modded armors have ludicrous AR values), but I haven't felt like polishing it so it can be usable by anyone
Would love to see that script, there's tons of light armor that i want to wear, but I'd like to balance it by setting all the values to 0 for certain perks like the unarmored modded skill tree.
Hello, attempted to change the Dragonscale armor. Changed it on Skyrim.esm but it stated there was nothing to save. Noticed that there was also an Update.esm column so changed it there and was allowed to save. In the game however only the guantlets are now light, the boots, helm and armor are heavy. Returned to SSedit and the Skyrim.esm still has the peices listed as Heavy while the Update.esm lists them as light. Any ideas?
It seems you can't directly modify any base game file, that's why nothing has changed.
To change vanilla records, select those things you want to change, right click on them (as if you wanted to use this script) and select an option called Copy as override into... (must be way down below in the menu) and xEdit will let you select any existing esp file or lets you create a new one. I suggest you to copy them to a new file if you have never done this.
Once you have created those new overrides, go to the file where they were created and apply this script on those overriden records.
Oh, I also noticed something just right now. Are you loading all your mods in SSEdit?
It may be happening that some other mod is modifying your other pieces of armor aside from Update.esm, but you didn't notice that because you only loaded the vanilla game.
You can check that in the other columns where you noticed your records were changed by Update.esm.
59 comments
I know this is a long shot but, would you consider adding lines to swap "VendorItemArmor [KYWD:0008F959]" with "VendorItemClothing [KYWD:0008F95B]" and vice versa? In vanilla game, heavy and light are tagged with the first, and clothing the latter. It would be awesome if you could.
{
Hotkey: Ctrl+Shift+A
Converts selected armors to Clothing/Light/Heavy.
}
uses xEditApi;
var
arType: integer;
const
arTypeCloth = 0;
arTypeLight = 1;
arTypeHeavy = 2;
ArmorClothing = 'ArmorClothing';
ArmorLight = 'ArmorLight';
ArmorHeavy = 'ArmorHeavy';
function KeywordIndex(e: IInterface; edid: string): Integer;
var
kwda: IInterface;
n: integer;
begin
Result := -1;
kwda := ElementByPath(e, 'KWDA');
for n := 0 to ElementCount(kwda) - 1 do
if GetElementEditValues(LinksTo(ElementByIndex(kwda, n)), 'EDID') = edid then begin
Result := n;
Exit;
end;
end;
procedure SwapKeyword(e: IInterface; fromKey, toKey: string);
var
idx: Integer;
key: IInterface;
begin
idx := KeywordIndex(e, fromKey);
if idx <> -1 then begin
key := ElementByIndex(ElementByPath(e, 'KWDA'), idx);
SetEditValue(key, toKey);
end;
end;
procedure ConvertToArmorType(e: IInterface; aType: string);
begin
SetElementEditValues(e, 'BOD2\Armor Type', aType);
end;
procedure ConvertToArmorClothes(e: IInterface);
const
ArmorClothingL = 'ArmorClothing [KYWD:0006BBE8]';
begin
SwapKeyword(e, ArmorHeavy, ArmorClothingL);
SwapKeyword(e, ArmorLight, ArmorClothingL);
SwapKeyword(e, 'ArmorCuirass', 'ClothingBody [KYWD:000A8657]');
SwapKeyword(e, 'ArmorGauntlets', 'ClothingHands [KYWD:0010CD13]');
SwapKeyword(e, 'ArmorHelmet ', 'ClothingHead [KYWD:0010CD11]');
SwapKeyword(e, 'ArmorBoots', 'ClothingFeet [KYWD:0010CD12]');
SwapKeyword(e, 'VendorItemArmor', 'VendorItemClothing [KYWD:0008F95B]');
ConvertToArmorType(e, 'Clothing');
end;
procedure SwapToArmored(e: IInterface);
begin
SwapKeyword(e, 'ClothingBody', 'ArmorCuirass [KYWD:0006C0EC]');
SwapKeyword(e, 'ClothingHands', 'ArmorGauntlets [KYWD:0006C0EF]');
SwapKeyword(e, 'ClothingHead', 'ArmorHelmet [KYWD:0006C0EE]');
SwapKeyword(e, 'ClothingFeet', 'ArmorBoots [KYWD:0006C0ED]');
SwapKeyword(e, 'VendorItemClothing', 'VendorItemArmor [KYWD:0008F959]');
end;
procedure ConvertToArmorHeavy(e: IInterface);
const
ArmorHeavyL = 'ArmorHeavy [KYWD:0006BBD2]';
begin
SwapKeyword(e, ArmorClothing, ArmorHeavyL);
SwapKeyword(e, ArmorLight, ArmorHeavyL);
SwapToArmored(e);
ConvertToArmorType(e, 'Heavy Armor');
end;
procedure ConvertToArmorLight(e: IInterface);
const
ArmorLightL = 'ArmorLight [KYWD:0006BBD3]';
begin
SwapKeyword(e, ArmorClothing, ArmorLightL);
SwapKeyword(e, ArmorHeavy, ArmorLightL);
SwapToArmored(e);
ConvertToArmorType(e, 'Light Armor');
end;
function Process(e: IInterface): Integer;
begin
if not (Signature(e) = 'ARMO') then Exit;
case arType of
arTypeCloth: ConvertToArmorClothes(e);
arTypeLight: ConvertToArmorLight(e);
arTypeHeavy: ConvertToArmorHeavy(e);
end;
end;
function CreateButton(AParent: TControl): TButton;
begin
Result := TButton.Create(AParent);
Result.Parent := AParent;
Result.Left := 0;
Result.Top := 0;
Result.Width := 180;
Result.Height := 32;
end;
function ShowForm: Integer;
var
frm: TForm;
btnExit, btnOk: TButton;
rgpOptions: TRadioGroup;
const
x = 120;
y = 30;
dy = 40;
begin
frm := TForm.Create(nil);
Result := 0;
try
frm.Caption := 'Convert to armor type';
frm.Position := poScreenCenter;
frm.BorderStyle := bsDialog;
frm.Height := 290;
frm.Width := 440;
rgpOptions := TRadioGroup.Create(frm);
rgpOptions.Parent := frm;
rgpOptions.Left := x;
rgpOptions.Top := y;
rgpOptions.Caption := 'New type';
rgpOptions.Items.Add('&Clothing');
rgpOptions.Items.Add('&Light');
rgpOptions.Items.Add('&Heavy');
rgpOptions.ItemIndex := 0;
btnExit := CreateButton(frm);
btnExit.Caption := '&Cancel';
btnExit.Cancel := true;
btnExit.ModalResult := mrCancel;
btnExit.Left := x - 85;
btnExit.Top := y + (4 * dy);
btnOk := CreateButton(frm);
btnOk.Caption := '&Ok';
btnOk.Default := true;
btnOk.ModalResult := mrOk;
btnOk.Left := btnExit.Left + btnExit.Width + 10;
btnOk.Top := btnExit.Top;
if frm.ShowModal <> mrOk then begin
Result := 1;
end
else begin
arType := rgpOptions.ItemIndex;
end;
finally
frm.Release;
end;
end;
function Initialize: Integer;
begin
Result := ShowForm;
if Result <> 0 then Exit;
end;
end.
Thanks for doing so!
I'll update this when I can (sorry for my way too late answer. Didn't got a notification on your comment).
I've just updated the script.
... better late than never
Take care friend, this made my day.
It's a rare occurrence that I change clothes to light armor, but think about this: how is this script supposed to know what the armor rating for your piece should be?
I made another script that lets me deal with that by letting me set an armor rating to a whole set based on vanilla ratings (some modded armors have ludicrous AR values), but I haven't felt like polishing it so it can be usable by anyone
I'll do it some time in the future, though.
Meh... double posting (slow internet connection).
It seems you can't directly modify any base game file, that's why nothing has changed.
To change vanilla records, select those things you want to change, right click on them (as if you wanted to use this script) and select an option called Copy as override into... (must be way down below in the menu) and xEdit will let you select any existing esp file or lets you create a new one.
I suggest you to copy them to a new file if you have never done this.
Once you have created those new overrides, go to the file where they were created and apply this script on those overriden records.
That should do the trick.
Are you loading all your mods in SSEdit?
It may be happening that some other mod is modifying your other pieces of armor aside from Update.esm, but you didn't notice that because you only loaded the vanilla game.
You can check that in the other columns where you noticed your records were changed by Update.esm.
Thank you, this is a great script!