cumbrianlad Posted December 1, 2019 Share Posted December 1, 2019 Hi. I've asked this ages back, but did away with the idea, after much frustration. This time I really want to do it. I followed a tutorial by Hellcat5, where he adds armour items into the alias inventory of his mannequins, then tests in game using the coc (centre on cell) command. In the comments section of the video someone states that this only works with the coc command and not when using ordinary load doors. That is my experience also. Using load doors to enter the cell, the armour items are in the mannequin inventory and can be taken by activating it, but they are not worn. The person who wrote about the load door issue then goes on to say that they fixed the issue, but frustratingly doesn't add how they did so... doh! I've found nothing else useful on this except stuff about altering the mannequin skin, but that results in a mannequin that always wears the armour and it can't be taken. I've tried creating a reference alias for one piece of armour, created in the mannequin alias but this suffers the same issue of only working when using coc. I could add a number of armor properties to the quest script and have a dummy stage to add the items to the mannequins in the stage papyrus fragment. Looking at the mannequin script I'm guessing that ought to fire the event OnItemAdded part of the mannequin's script, which is the bit that makes the mannequin wear what it's given by the player, but with a total of 6 mannequins and 28 items added, I don't know if that's a good idea. I also try to avoid scripts wherever possible. I have 3 questions. 1) What is different between the way the game loads cells using the coc command and load doors? There must be differences, or else this problem would not exist. One way is making the mannequins wear their inventory items, the other doesn't. If I could find that out, there may be a way around this that is neater. 2) Has anybody else got this to work without scripts? If so, how, please? 3) If scripting is the only way to do this, would my idea of adding the items to the mannequins force them to use their mannequin script and wear the darned stuff? Is it a good idea to be running all those lines of code? I should add that I want to do all of this within a quest, because I want the items to be only added to the mannequins the first time the player visits this cell, so the quest is set up to run once only. The items are reward items and whilst the cells are set to respawn (so the mannequins will be there on subsequent visits), I don't want them to be equipped with the reward armour after the first time. P.S. to get very agressive actors to refrain from constantly assaulting the hapless mannequins, you need to make a faction for your mannequins, add it to them or their quest alias and make the new mannequin faction friends of the very aggressive actors. Not doing this results in the comical, but not very practical sight of your enemy NPCs attacking all of the mannequins like target dummies! I bet the mannequins wished they'd bothered to don all the lovely armour I gave them... who's laughing now, eh? Stupid mannequins! :laugh: Link to comment Share on other sites More sharing options...
IsharaMeradin Posted December 1, 2019 Share Posted December 1, 2019 When the player COCs into a cell from the main menu that cell must be loaded as nothing from it is in memory and the mannequins like any NPC will equip their gear. When the player enters through a load door, the cell could have already been loaded at a previous point and memory is used rather than loading it all again. If the cell data was loaded in passing (and the cell not actually entered) and the mannequins 3D did not load, they may not have had a chance to recognize and equip the gear. If I understand, you want the armor to be on the mannequin and available to be looted. You could change the skin to be that of the armor AND put the items in the mannequin alias. But then when looted the mannequin would appear to still have it. So that may not be the best idea. You could position the mannequins so that they are not seen from the door way and place a small trigger volume box that when the player enters will tell the mannequins to equip their gear. Or have this same trigger box start a separate quest that contains the mannequin alias with the gear. Hopefully by starting the quest while the mannequins are loaded they would recognize the items being added and equip them per normal. I do not think there is a way to get out of using any type of script at all. Have you tested with the unofficial patch installed? They edit the stock script to resolve some issues. It may be possible that the issue becomes resolved when the two work together. Link to comment Share on other sites More sharing options...
cumbrianlad Posted December 1, 2019 Author Share Posted December 1, 2019 I love it when you answer a question, IsharaMeredin... I'm not worthy! (If you haven't seen 'Wayne's World', ignore that last comment). First, your assumption about the stuff needing to be displayed and ready to loot is correct. That's what I referred to about altering the skins. It would look daft for the player to take it and it still looked like it was there. There are a couple of interesting ideas to try, so I'll experiment. Your comment about the unofficial patch is interesting and I definitely don't test with it active, the reason being that not everybody who downloads a mod will have the patch... i know that's a bit dumb, but it happens. I would like my mod to work for everyone, regardless of whether they have the patch installed. The mannequins are already positioned in an upstairs section of an Imperial fort, so they can't be seen when entering the cell. You've read my posts before, so you know I'm at average/apprentice level on papyrus. if I could trouble you further, how do I go about the script to get them to wear their lovely gear? Is that simply adding a script with the actor properties and armor properties defined and then adding an event 'OnTriggerenter', listing the actors and adding the items? If that's so, would my original idea of adding a stage with the papyrus fragment adding the items to the alias references not work? I could then make the trigger simply set my dummy stage. ie, Alias_mannequin01.GetActorRef().AddItem(MyObjectProperty)I'd need to do that line for each of the items. I suppose doing 28 of these actions is not a great problem? Link to comment Share on other sites More sharing options...
IsharaMeradin Posted December 2, 2019 Share Posted December 2, 2019 You can try with the alias. It is at least worth a test. If the unofficial patch does resolve the issue, there is no harm in sharing their script with your mod for those that do not use the unofficial patch. Just be sure to let the users know so that if any use mods that purposefully edit that script, they can adjust load order or hide files as necessary. Link to comment Share on other sites More sharing options...
cumbrianlad Posted December 2, 2019 Author Share Posted December 2, 2019 Well, I tested by adding one blades helmet to one of the mannequin quest aliases and the item went into the inventory but was not equipped. I then added a second line Alias_mannequin01.GetactorRef().EquipItem(ArmorBladesHelmet), with the same result, testing on a save that had never seen the mod. Weird. if I can't get it to work this way, I could always try adding new skins to 6 new mannequins. I add them into the cell and don't bother to set them up as normal. Instead I add 6 disabled naked mannequins onto the same places, 6 xmarkers and make them the enable parents of each of my mannequin pairs. I then make an activator called 'Armour Set' and put one around each mannequin, setting the active override text to 'Take'. My activators have a variant of a script I wrote before that adds items to the player inventory, when activated, enables an object (the x marker) and then disables and deletes itself. The player sees the armoured mannequins and an instruction to 'Take Armour Set', clicks it and the items are added to their inventory. At the same time the armoured mannequins are disabled, the plain ones enabled and the activator deletes itself, so that there is no way to use the mannequin again. If i can get altering the mannequin skin to work, this will do what I wanted, anyway. As an extra, I noticed that factions are not assessed properly when using COC, but they are when using a load door. Not ideal, maybe, but it will work. Link to comment Share on other sites More sharing options...
IsharaMeradin Posted December 2, 2019 Share Posted December 2, 2019 If you need to see how to change the skin, look at either the dark brotherhood assassins (the ones that get sent to kill you) or you can look at the player record in my Custom Player Body mod for original Skyrim. *************************I wonder if the mannequins AI needs to be enabled and / or 3D loaded in order to equip items. When you COC in, your quest starts along with the mannequins getting loaded so they are recognizing the items being added. But when you enter through the load door, your quest has already started, items were added but the mannequins were not active at that time. Thus when they do load, they do not know what to do with those items. If you want the items to be automatically equipped, you'll have to start the quest that gives the items within the same cell as the mannequins.************************* I do like the idea of having one actor fully decked out, with an activator that gives the items to the player and then swaps that actor out for a "naked" mannequin actor. Might want to play with the timing of the enabling and disabling of the two in an effort to eliminate any popping or fading to nothing. Link to comment Share on other sites More sharing options...
cumbrianlad Posted December 4, 2019 Author Share Posted December 4, 2019 Yep, you got it. The whole set up works beautifully, all the items displayed are added to the player, but the mannequins fade out, then in. In my dungeon scenario, this isn't too bad, but it's noticeable, so I don't like it! maybe I'm just being too fussy. Let's face it, when you access a normal mannequin in game, its head disappears and all sorts of nonsense takes place. The script basically runs through an OnActivate event and determines how many pieces of armour are to be given, then adds those to the player inventory. it then disables an object, which is the enable parent of the two mannequins. In game, it's the only thing that doesn't look quite right because one mannequin fades out and the second fades in. If I enabled and disabled the two objects directly, rather than doing it by disabling one xmarker, I could control whether they fade or pop. i'd need to adjust the script to try it because it seems like they are fading by default, once the enable parent is disabled (I thought the children were meant to pop by default). Link to comment Share on other sites More sharing options...
Recommended Posts