Jump to content

Using papyrus or f4se to edit NPC records


VIitS

Recommended Posts

Does anyone know if it is possible (with papyrus) or currently possible (with f4se) to edit specified fields in NPC records using in-game scripts? I'm trying to figure out how to get a rough method of changing body texture in-game by adding/replacing ARMO records into the "Skin" (WNAM) field. It's nowhere near as flexible as what was done with RaceMenu (and likely planned for LooksMenu) where you could apply tattoos as an overlay, but I don't know how long it'll take expired to figure out how to do that with the changes made to the Creation Engine between Skyrim and FO4 so I figured I'd try to figure out a workaround.

 

I tried getting it to work with presets*, but it ignores anything in the Race or Skin field of the preset, so you can't use presets to change body texture (or race). To get it to change for your character, you have to edit the base player record (00000007), which is why I am turning to scripts. I only have very basic coding experience, but it's enough that I can probably learn, so I'm mainly checking if it is even possible right now (and if so, what the function/event I need is). I'd hate to spend the time to learn**, only to eventually realize that it's not possible.

 

*which is currently the only way to change the back of the head, though if that's all you want to change you can use LooksMenu's presets to make a preset of your current character, then edit the json file to remove the vanilla headpart ("Fallout4.esm|04D0E9") and replace it with a new one

 

**especially since (for f4se at least, which I figure is what I am most likely going to need) my normal method of "look at other mods and see how they do something similar" wouldn't work because no one is has released their source code for their f4se mods, despite the bit on the f4se page that says "Note that plugins must have their source code publicly available."

Edit: I found a SetRace function on the CK, which I guess I could use if I had to, but I would much prefer being able to edit the Skin field directly. Having to make separate races for each texture would greatly increase the size of the mod, and would make it not play well with mods that edit the race record.
Alternatively, if there was a way to remove/add ARMA records to an "armor", that would work too, as I could just make separate armor addon records for each texture, then use a script (and probably a holotape terminal interface) to control what ARMA records are attached to it.
Link to comment
Share on other sites

I tried to figure something like this out myself awhile back. Had no good luck. Although your alternative approach has some potential. If I recall that's sort of what I ended up doing on a mod I helped with.

 

Are you modifying vanilla Armor records or would they be your own added by your mod?

 

If your own, you could just make them all, put them all in the armor record as different indexes and then use script/holotape/whatever to switch the index. For example you could look at vanilla objects like the light/medium/heavy combat armor. The base for torso chest Armor_Combat_Torso "Combat Armor Chest Piece" [ARMO:0011D3C3] has 3 indexes. Then a armor mod is what selects the index. Being that all of the "size" mods use the same keyword (think of it like a slot) equipping one forces the other off. So only one will be on at a time.

 

If trying to modify vanilla, or other mod's added records then that becomes complicated. More like impossible unless you want to go editing all the armor records in the esp plugin yourself.

Link to comment
Share on other sites

  • Recently Browsing   0 members

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