» Fri May 27, 2011 11:26 pm
Yes this is possible and it's not particularly hard. (I have pretty much done this before, in FO3Phalanx' dealing with Butch and his personalized Super Sledges.)
In this case it would require the player to make a point to have only ONE of that particular weapon in inventory - like, if he wants to unmod a laser rifle he's got to not have a buncha extra laser rifles in the inventory.
When above is the case: you have the player equip the weapon, and have that equippage be in the context that the player expressly wants the weapon unmodded. Then, you use GetWeaponHealthPerc http://geck.gamesas.com/index.php/GetWeaponHealthPerc to pull the weap's condition, then you make the player unequip the weapon, then you remove the weapon, then you give him a fresh one with that same health value. Additemhealthpercent would make the replacement item show up unmodded, I would expect. http://geck.gamesas.com/index.php/AddItemHealthPercent
If you wanted example code, well, you could go look in Butch's object script in FO3Phalanx, I think that is where my code for that is.