rhypht Posted December 18, 2017 Share Posted December 18, 2017 I originally posted this on r/skyrimmods, but figured this would be a better place for it. Basically what I am trying to do here is to somehow associate a set of equippable items (the "Gear") with a specific container (the "Chest"). The desired effect is that, whenever the Gear is unequipped, it automatically gets sent to the Chest it is bound to. You can then use a power to unequip everything from yourself, and pull the Gear from the Chest and equip it to yourself. In this way, you can "summon" sets of armors onto your body with a power (I got this idea from a discussion on "requipping" I saw earlier this week). My thought process was that you could either -load the Gear directly into the Chest by hand, and then activate a button that runs a script to bind all of the contents of the Chest to the Chest itself, or -have another power which removes all equipped items, puts them in a Chest associated with that power, and then auto-binds the contents to the Chest fo recall. Is any of this impossible/extremely difficult? I have basic working knowledge of the Creation Kit, and have started looking into basic scripting as well, but I am wondering if this is too complex for someone at my level. The big things to figure out how to do are: -remove all equipped items from the player -"bind" items to a specific Chest -force items to go straight to their Chest when unequipped -allow items to be removed from a chest via using a power -force items to be equipped when removed from a chest via any method Link to comment Share on other sites More sharing options...
GSGlobe Posted December 18, 2017 Share Posted December 18, 2017 I don't have enough knowledge on how to to it properly so you'll have to resort on help from others. But possibly, storing the armor in a formlist inside CK would do the trick, then on a magiceffect script call that formlist, and inside a while block you'd look for each object inside the formlist and equip it one by one. I don't know if it works but serves perhaps as a example on how you can do it, sorry about the ; description.. it was mostly for myself.. LOL Scriptname YourScriptName extends activemagiceffect FormList Property armorList AutoEvent OnEffectStart(Actor akTarget, Actor akCaster)Actor player = Game.GetPlayer()Int i = 0 ; integer i starts at 0 while i < armorList.GetSize() ; while 0 is less than the amount of armor pieces inside your formlistArmor TheArmor = armorList.GetAt(i) as Armor ; setting a variable then call the list at "i" which starts at 0Player.EquipItem(armorList.GetAt(i) as Armor) ; equip first armor piece in formlist, since "i" is still 0i += 1 ; makes the integer i, i + 1 which makes it int i = 1, then 2, then 3 etc, grabbing the next armor piece in your formlist until integer i = the amount of armor pieces inside the formlist.endWhile EndEvent Good luck with this, I'll follow this thread to perhaps learn something myself.Best regards,- gs Link to comment Share on other sites More sharing options...
rhypht Posted December 18, 2017 Author Share Posted December 18, 2017 Thanks for the insight, and as someone new to the scripting I appreciate the code commenting! If anything, it is a good place to start. I will experiment with this and hopefully others will join in here and provide further insight. Link to comment Share on other sites More sharing options...
GSGlobe Posted December 18, 2017 Share Posted December 18, 2017 I'm sorry I couldn't be of more help, I've looked into it somewhat before, like having 5 sets of armor stored in a formlist, then use a power to reequip those formlist. Do note that all player enchanted weapons / armor won't save when equipping it again, unless it's an enchantment you find or buy or make yourself in the CK. Anyway, you'll somehow want to either save armor as you equip them into a formlist, or perhaps as you add items into these chest/s you speak off, let it save the items added into the chest into a formlist, then. call this formlist from a magiceffect script. About moving the items back into a chest, I wouldn't know how to to be honest. Another way could be perhaps a MagicEffect scipt, OnEffectStart it would unequip all your armor, then equip the armor from your formlist. OnEffectFinish it would remove the items equipped from your inventory.. When the Spell duration ran out But I'm guessing for this to work properly as in "re-equipping" what you had before, You'll have to make a ReferenceAlias script that catches when you equip items so they could be stored in a formlist, and then called when your magiceffect "OnEffectFinish" block runs. s#*!, I make no sense. Right, let's leave it for the guys that know!Best regards,- gs Link to comment Share on other sites More sharing options...
Recommended Posts