Jump to content

Fo4edit script to change DR and ER values of armors


Arael54

Recommended Posts

Hello everyone,

 

I'm looking for a fo4edit script which could modify damage resist and energy resist for all armors from my load order (by applying a simple formula, like multiply vanilla values).

Is there a script that can do something like this ?

If not, could someone help creating it ?

 

Thank you.

Link to comment
Share on other sites

I made it work for Energy resist by modifying a script made to change NPCs health with trials and errors. But I can't make it work for damage resist.

I don't know much about scripting, so I'm just trying to understand how it works the best I can.

Here is the part of the script I don't know how to modify to make it work for DR:

 

function GetER(e: IInterface): integer;
var
dtEnergy: String;
Resistances, Resistance: IInterface;
dr, v, k, i: integer;
begin
Result := -9999;
Resistances := ElementBySignature(e, 'DAMA');
for i := 0 to Pred(ElementCount(Resistances)) do begin
Resistance := ElementByIndex(Resistances, i);
if GetElementNativeValues(Resistance, 'Damage Type') = $00060A81 then begin
Result := GetElementNativeValues(Resistance, 'Value');
Exit;
end;
end;
end;

 

I used FO4Edit to try to find the elements I could change, again, to make it work for DR.

My problem is: When I look with FO4Edit, DR is determined by "Armor Rating" in the "FNAM" section.

With Energy resist it was easier, because it was determined by the variable "dtEnergy" with a specific value.

So I could use "dtEnergy" as a variable (see the example).

But there is no variable like this for "Armor Rating". So I don't know how to formulate the script for it to work.

 

Could someone point me in the right direction ?

thanks.

 

Edit: Figured it out.

Edited by Arael54
Link to comment
Share on other sites

  • Recently Browsing   0 members

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