Jump to content

Help changing an NPC's race via FNVEdit script


asdasfa

Recommended Posts

A noobish question about FNVEdit scripting, obviously I have no experience in creating XEdit scripts and documentations about it isn't that abundant.

So, how would you set a character or an NPC's race to another race(perhaps a custom one) using FNVEdit script and save those changes to a new .esp?

I could iterate and evaluate each NPC's race just fine but I have no idea how to modify one.

 

What function should I use and what parameters should I supply it? Snippets would be great.

 

Anyone care to give me a boost and save me from going through a bunch of Edit scripts just to figure it out?

 

 

Thanks!

Link to comment

Compare the records of a Caucasian NPC and an NPC of another race. Look for the element (anything on the panel to the right) that looks similar to "CaucasianFemaleRace:(00xxxxxx)".

 

Once you've got the differing values, use the following functions for comparing, and then setting, the race values.

if GetEditValue(ElementByPath(e, 'Path To\The Race\Element')) = 'Whatever The Race You Want To Change" then
SetEditValue(ElementByPath(e, 'Path To\The Race\Element'), 'Whatever The Race You Want To Change The NPC To');

Just so you know, the variable 'e' is the current record being processed.

Link to comment

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

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

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more information, see our Privacy Policy & Terms of Use