Jump to content

Unique character


elchapetas

Recommended Posts

Posted

Is there a way to make body and armor replacers unique to the PC?

 

Thaumx of BnB managed to exclude old females from using the BnB armors. I know unique races will make your main body unique to the PC or any NPC, but how did Thaumx managed to do this with the armors?

Posted

He gave versions of the armor referencing the original meshes to the older NPCs. It's technically possible to do PC-only replacer, but unless there's an NVSE function I don't know about (which is entirely possible and I'm sure someone will correct me if there is) it would be a very invasive process that would require attaching an OnEquip script to every single armor in the game.

Posted

You would have to go into every armor in the game, and create a script for each one, and in each script have an OnEquip event to tell the game to silently unequip the armor, add a different armor, and equip that one, depending on whether or not the armor was equipped by the player.

Posted

In scripts you have the OnEquip block. But you can create a single script event that will be called whenever any actor Equip anything.

 

Check the "tutorial & gides" section here for DoctaSax tutorial on events (its part 5).

 

Posted

I'd try this:

 

- Install NVSE 4.6+ and Lutana plugin (for FileExists).

- Put the 'replacer' armors in a subfolder within meshes called "MyPlayer/", so they don't replace, otherwise keep their folder structure the same.

- Create an OnActorEquip event for the player, with a script something like (check DoctaSax tutorial):

ref Equipper (filtered for PlayerREF only)
ref EquippedArmor
 
string_var model_path
string_var full_path
ref TempArmor
 
Begin Function { Equipper,  EquippedArmor }
 
    if IsClonedForm EquippedArmor ; # see below..
         return
    endif
 
    let model_path := "MyPlayer/"
    let model_path += GetBipedModelPath 1, EquippedArmor ; # 1 = Female path
    let full_path := "Meshes/" + model_path
   
    if FileExists $full_path ; # if a player replacer exists for the equipped armor
        let MyQuest.EquippedArmor := EquippedArmor ; # Note 1
        let TempArmor := TempCloneForm EquippedArmor ; # clone it,
        SetBipedModelPathEx "%z" model_path, 1, TempArmor ; # set the player mesh path for clone
        PlayerREF.AddItem TempArmor, 1, 1
        PlayerREF.EquipItem TempArmor, 0, 1 ; # equip the clone
    endif
 
    sv_Destruct model_path, full_path
 
End

- Note 1: Temp clones disappear when you quit game, so you need to keep track of the armor some place and run a script on Game restart (GetGameRestarted or similar) to fix this.

- Apart from that, I think this is all you need to do.

Archived

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

  • Recently Browsing   0 members

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