SGTbayk47 Posted February 12, 2021 Share Posted February 12, 2021 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 More sharing options...
ashtonlp101 Posted February 12, 2021 Share Posted February 12, 2021 How about SwapTextureOnRef ? If you're wanting to replace a specific part of the model, you can cite the nif block with this command. I remember Seddon saying he had trouble with this command. So if you use it, let me know if you can get it to work. Link to comment Share on other sites More sharing options...
SGTbayk47 Posted February 12, 2021 Author Share Posted February 12, 2021 I've had a go using SwapTextureOnRef and SwapTextureEx but neither are working when called via my event script, although they both work when typed into the console. Link to comment Share on other sites More sharing options...
ashtonlp101 Posted February 12, 2021 Share Posted February 12, 2021 I have a feeling the command may only work on textures within a BSA and not loose files. Iâll play with it when I get home and see. Link to comment Share on other sites More sharing options...
SGTbayk47 Posted February 12, 2021 Author Share Posted February 12, 2021 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 More sharing options...
dubiousintent Posted February 14, 2021 Share Posted February 14, 2021 Thanks. Added as "TIP Alternate Textures" to the "Custom items" section of the wiki "Getting started creating mods using GECK" article. -Dubious- Link to comment Share on other sites More sharing options...
SGTbayk47 Posted February 14, 2021 Author Share Posted February 14, 2021 (edited) 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 February 14, 2021 by SGTbayk47 Link to comment Share on other sites More sharing options...
dubiousintent Posted February 14, 2021 Share Posted February 14, 2021 Appreciate the followup. Updated "TIP Alternate Textures". -Dubious- Link to comment Share on other sites More sharing options...
Recommended Posts