0 of 0

File information

Last updated

Original upload

Created by

Carlos Leyva

Uploaded by

Papitas

Virus scan

Safe to use

Tags for this mod

59 comments

  1. Papitas
    Papitas
    • premium
    • 142 kudos
    Locked
    Sticky
    Need to change your armor rating as well? Use this script and find eternal happiness
  2. inthetardis
    inthetardis
    • member
    • 1 kudos
    Thank you so so so much
  3. megnoeu
    megnoeu
    • premium
    • 43 kudos
    Hey!

    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.
    1. megnoeu
      megnoeu
      • premium
      • 43 kudos
      Blimey! I think I figured out how to do it! Here's the new script if anyone needs, I painted red the lines I added:
      Spoiler:  
      Show
      unit DM_ConvertToArmorType;
      {
          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.

    2. Papitas
      Papitas
      • premium
      • 142 kudos
      Yep. That's how you would do it.

      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).
    3. Papitas
      Papitas
      • premium
      • 142 kudos
      I can't believe you wrote this almost one year ago!
      I've just updated the script.

      ... better late than never
    4. megnoeu
      megnoeu
      • premium
      • 43 kudos
      Haha, know what they say, time flies.

      Take care friend, this made my day.
  4. Jyzzrly
    Jyzzrly
    • supporter
    • 13 kudos
    I mean, yeah, the outfit is now light armor, but it's still armor: 0, so, what's the point??
    1. Papitas
      Papitas
      • premium
      • 142 kudos
      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

      I'll do it some time in the future, though.
    2. mvanl123
      mvanl123
      • supporter
      • 0 kudos
      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.
    3. Papitas
      Papitas
      • premium
      • 142 kudos
      I've finally worked on that script. *cough*
    4. Papitas
      Papitas
      • premium
      • 142 kudos
      I've finally worked on that script. *cough* :P

      Meh... double posting (slow internet connection).
  5. dwsarge
    dwsarge
    • supporter
    • 0 kudos
    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?
    1. Papitas
      Papitas
      • premium
      • 142 kudos
      Yes, I have one.

      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.
    2. Papitas
      Papitas
      • premium
      • 142 kudos
      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.
  6. Ectoplas
    Ectoplas
    • member
    • 2 kudos
    May be a strange question but could I use this to convert the robes from necromantic grimoire into light armor?
    1. Papitas
      Papitas
      • premium
      • 142 kudos
      Yes. It should work for any armor.
  7. BaldWizardMan
    BaldWizardMan
    • premium
    • 30 kudos
    I feel like I have been looking for something like this for years, I do not know how I missed this!

    Thank you, this is a great script!
  8. Gman7890
    Gman7890
    • member
    • 0 kudos
    Divines bless your Kind heart!
    1. megnoeu
      megnoeu
      • premium
      • 43 kudos
      I was here just about to type the exact same words. A lifesaver.
  9. LurkaInDaHouse
    LurkaInDaHouse
    • member
    • 2 kudos
    Nice and simple. Endorsed.
  10. bakura133
    bakura133
    • member
    • 0 kudos
    Worked like a charm. Thx!
  11. Lindblum7
    Lindblum7
    • supporter
    • 4 kudos
    Absolute legend. Endorsed