Jump to content

Modding Power Armor Frames...Material Swapping


Recommended Posts

...make 1 suit and a bunch of different mod options and have the above mentioned on activate script add the proper mod to the suit to trigger the keyword matchup. That would require spawning the suit with PlaceAtMe to get the ObjectReference so you can use the addmod function. Then move it to inventory and equip it. You'd have to remove any others from inventory before hand or it'll get confused on which one to equip. Best method for this scenario would be to play an XMarker somewhere hidden. Then in the script properties add the xmarker so you can reference it. then it'd go something like this example: Make an armor, or clone one - like the vault suit to be lazy. (for this example we'll call it "myPASuit")Make a attach parent keyword. This'll be used for the mod. ("ap_myPAColor")Put keyword on the armor you made/cloned. Make a keyword for the color choice. ("myPAColorBlue")Make an omod with property adding the keyword for color choice ("omod_myPAColorBlue"). Then in the script attached to the furniture spawn the suit, add the mod, then pick it up and equip.

Actor Player = Game.GetPlayer()
ObjectReference NewRef = XMarker.PlaceAtMe(myPASuit, 1) ; assign reference with new placement
NewRef.AttachMod(omod_myPAColorBlue) ; attach the mod
Player.RemoveItem(myPASuit, 100) ; remove up to 100 of the suit from inventory. untested if it'll unequip and remove or leave equipped alone.
Player.AddItem(NewRef, 1, true) ; add newly made ref to inventory and mute the message
Player.EquipItem(myPASuit, false, true) ; equip the suit in inventory silently
Or something like that. I'm not sure if you can skip the add and equip and just use equip with the objectreference. I think I tried that once and it didn't work because it requires the base id though.
I've played around with something similar. I'll take a look at this approach.
Link to comment
Share on other sites

  • 2 years later...
  • Recently Browsing   0 members

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