Jump to content

Remove alternate model texture functions?


SGTbayk47

Recommended Posts

Are there any functions available for removing the alternate textures on a model? I am trying to swap models with 'setbipedmodelpathalt' but the alternate textures that are set up already remain and retexture wrong parts of the new models.

Link to comment
Share on other sites

Update!

 

Initially I was using the SwapTextureEx command inside an OnActorEquip event. Calling the function from this event did not work when I added an apparel to an NPC that was already loaded, via AddItem in the console.

 

However during testing I decided to give Sunny Smiles the armor in her base inventory, via BaseAddItem in my mods startup script. This caused the SwapTextureEx functions within my event to fire successfully when Sunny loaded in, but when I used AddItem to give the armor to a different loaded NPC, the functions did not work again.

 

Knowing now that the functions do in fact work, I changed methods again. Now I am only using the equip event to set a variable in my mods main script, which now contains the SwapTextureEx functions inside a GameMode block. This method is now working exactly as intended, the NPC equips the armor, sets the variable in the main mod script, and then this changes the offending textures to the correct ones!

Link to comment
Share on other sites

Another note you might want to add, I have so far been unable to get the swaptexture functions to work on the player.

 

Edit: I have just discovered that a mod I am using is causing the swaptexture functions not to work. I've just tested using Euclid's C Finder, a base game weapon that uses swaptexture, and it doesn't play its sequence in my modded setup but does if I launch the game with no mods. I'll have to go through my load order to figure out the cause.

 

Edit 2: Another discovery. Euclid sequence is a separate issue, swaptexture functions do work on the player. The game considers the players 1st and 3rd person models separately. My script runs on game load, and until just now I had been loading saves made in 1st person, and hadn't noticed the textures were fixed on my 1st person hand, but still broken when I switched to 3rd person. When I load a save made in 3rd person, the textures are fixed on load and therefore the hand now has the wrong texture when switching POV.

 

So when calling this function on the player, it should be called in both 1st and 3rd person when needed to affect both player models.

Edited by SGTbayk47
Link to comment
Share on other sites

  • Recently Browsing   0 members

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