Editing
SetModelPath - ArmorAddon
Jump to navigation
Jump to search
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
[[Category:Scripting]] [[Category:Papyrus]] [[Category:SKSE]] '''SKSE Member of:''' [[ArmorAddon Script]] Sets the file path for the nif file representing the equipped model of the armor. (This function requires SKSE) == Syntax == <syntaxhighlight lang="papyrus"> string Function SetModelPath(string path, bool firstPerson, bool female) native </syntaxhighlight> == Parameters == *path: The file path for the .nif file you want to change to. *firstPerson: Whether to set the file path of the biped armor model (false) or first person armor model (true). *female: Whether to set the file path of the male armor model (false) or female armor model (true). == Return Value == None. == Examples == <syntaxhighlight lang="papyrus"> ; Change all Ebony Armor (cuirass) to appear as Orcish Armor ArmorAddon orcishCuirassAA = (Game.GetForm(0x00013957) as Armor).GetNthArmorAddon(0) string FilePath = orcishCuirassAA.GetModelPath(false, false) ; Get Orcish Armor file path ArmorAddon ebonyCuirassAA = (Game.GetForm(0x00013961) as Armor).GetNthArmorAddon(0) ebonyCuirassAA.SetModelPath(FilePath, false, false) ; Sets Ebony Armor model path to Orcish Armor .nif file ; NOTE: Only affects male actors in 3rd person view ; Set the ArmorAddon nif file for any armor removed from a container ; Assumes the first four strings already have values, see GetModelPath - ArmorAddon example string mFilePathPOV string mFilePathBiped string fFilePathPOV string fFilePathBiped Event OnItemRemoved(Form akBaseItem, int aiItemCount, ObjectReference akItemReference, ObjectReference akDestContainer) if akBaseItem.GetType() == 26 ; If item is Armor ArmorAddon tempAA = (akBaseItem as Armor).GetNthArmorAddon(0) ; 0 = first, 1 = second, etc. tempAA.SetModelPath(mFilePathPOV, true, false) ; 1st person view, male tempAA.SetModelPath(mFilePathBiped, false, false) ; biped, male tempAA.SetModelPath(fFilePathPOV, true, true) ; 1st person view, female tempAA.SetModelPath(fFilePathBiped, false, true) ; biped, female endif endEvent </syntaxhighlight> == Notes == *'''WARNING:''' Changing the file path of an ArmorAddon affects <u>all</u> armor using it! *This is to set the nif file of the equipped model on an actor. Use [[SetModelPath - Armor]] to set the nif file of the armor as it appears on the ground. *Remember that this function sets string values for ''ArmorAddon'' objects, not for ''Armor'' objects. You can use [[GetNthArmorAddon - Armor|GetNthArmorAddon]] on Armor objects to quickly retrieve ArmorAddon objects, however. *Graphical glitches can result if the target ArmorAddon and the source ArmorAddon do not use the same [[Biped Object]]s. **Example: Changing IronHelmetAA (Biped: 31 & 43) to use the model path from EbonyHelmetAA (Biped: 30) will result in a bald character wearing no helmet. == See Also == *[[ArmorAddon Script]] *[[GetModelPath - ArmorAddon]] *[[GetNthArmorAddon - Armor]]
Summary:
Please note that all contributions to the CreationKit Wiki are considered to be released under the Creative Commons Attribution-ShareAlike (see
CreationKit:Copyrights
for details). If you do not want your writing to be edited mercilessly and redistributed at will, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource.
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Navigation menu
Personal tools
Not logged in
Talk
Contributions
Create account
Log in
Namespaces
Page
Discussion
English
Views
Read
Edit
Edit source
View history
More
Search
Navigation
Landing page
Tutorials
Game Systems
Editor Reference
Scripting Reference
Recent changes
Help
Tools
What links here
Related changes
Special pages
Page information
Page values