Jump to content

Looking for a script or a way to change armor rating of every armors in the game


arael53

Recommended Posts

Hello,

 

is there a tesedit script or any other way to change the armor rating of all armors at once (that could check armor added by mods too) ? I'd like to reduce their AR value (between 30 or 40% of their vanilla value), but I'd rather not edit every armor one by one in the CK if a quick way exist.

 

Thanks !

Link to comment
Share on other sites

I'm not 100% sure, but I don't think it's possible. The armor value is a fixed numerical amount for each individual item, so there's no global value or modifier to change. I've seen a couple of mods over the years that do this sort of thing, but in those cases the author had to modify each piece of armor separately in the CK. The closest thing I can think of is a perk (i.e. - Light Armor), but that's not across the board, either - it only occurs if the player has that particular rank of a given perk.

Link to comment
Share on other sites

If it is an editable record entry, it is possible for a TES5Edit script to make the changes across multiple records.

 

True, but a script would still have to edit each individual item's value, rather than some sort of global 30% reduction to all armor values. And you'd still have to enter the record/item names by hand when writing the script. At that point it would probably be easier to just edit values in the CK the old-fashioned way.

 

I'd have to do some digging around in the CK, but it may be possible to create a perk that reduces the player's effective armor rating by a percentage - the player would have to manually force the reduction by putting a point into that perk, but it's the only way I can think of where a global armor modifier might work.

Link to comment
Share on other sites

When I had help writing the one TES5Edit script for one of my mods, I did not need to list out everything. It just does a scan of every record looking for specific types so that it can then do what I wanted to be done. Thus I'm fairly certain that all armors can have an adjustment made without having to explicitly name each one.

 

This is the relevant portion from that script which scans all armor records. How to adapt it into something that fits the OP's purpose? No idea.

 

 

function Initialize: integer;
var
  i, j: integer;
  f, g, r: IInterface;
begin

  // processing all files in load order
  for i := 0 to Pred(FileCount) do begin
    f := FileByIndex(i);
    AddMessage('Processing ' + GetFileName(f) + '...');

    // ARMO records
    g := GroupBySignature(f, 'ARMO');
    If Assigned(g) then
	for j := 0 to Pred(ElementCount(g)) do begin
        r := ElementByIndex(g, j);
        if IsMaster(r) then
          ProcessItems(WinningOverride(r));
      end;
  end;

end;

The ProcessItems function was what was used to do my work. That would probably be the place to insert whatever work the OP would need done. Again, how to actually write such a script, I have no idea.

 

Once again, it is just a snippet of code and will in no way actually run or perform anything.

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...