DlinnyLag Posted April 21, 2023 Share Posted April 21, 2023 Is it possible add, find or remove armour form from loaded outfit F4SE getoutfit? I do not see any API for it. Probably it can be done by preparing some F4SE plugin, but I'm not sure is it possible to create/alter Outfit object at runtime without introducing new bugs %)I would suggest you not to focus on Outfit for your mod purposes. Link to comment Share on other sites More sharing options...
DieFeM Posted April 21, 2023 Share Posted April 21, 2023 You can not edit an outfit by a script, but you can edit a leveled item therefore, if your outfit only contains leveled items, you can certainly replace their content with scripts. Link to comment Share on other sites More sharing options...
F4llfield Posted April 21, 2023 Author Share Posted April 21, 2023 I tried "magic effect that constantly applied to NPC and ensuring that necessary clothing elements are applied in OnEffectStart event" but the OnEffectStart is never called. I must doing something wrong while setting the spell/perk because I'm not sure on to set them up for that specific case. Magic Effect Effect Archetype: ScriptCasting Effect: Constant EffectDelivery: SelfMagic Skill: NONETarget Condition: NONE Perk Perk Entries:Type: AbilityData 1: mySettlersSpell Spell Effect: mySettlersEffectCondition:GetQuestCompleted Quest: 'MQ101' == 1 In my main script I have a notification when the perk is added, and I receive it.I also have a notification in the OnEffectStart function but this one is never displayed. Link to comment Share on other sites More sharing options...
DlinnyLag Posted April 21, 2023 Share Posted April 21, 2023 I tried "magic effect that constantly applied to NPC and ensuring that necessary clothing elements are applied in OnEffectStart event" but the OnEffectStart is never called. I must doing something wrong while setting the spell/perk because I'm not sure on to set them up for that specific case. An example from my mod: Magic effect: And spell to apply this magic effect: AddSpell have to be used. Link to comment Share on other sites More sharing options...
F4llfield Posted April 22, 2023 Author Share Posted April 22, 2023 (edited) thanks DlinnyLag, the OnEffectStart is now called when the spell is added. I added a debug message box in the OnStartEffect I can see that it's being called only once when the spell is added. So let's say I added a script to the function OnStartEffect function, that gets all the settlers and applies the armor change to them. Does this mean all settlers added after that, won't be affected by the spell? added: after more testing, it seems the OnstartEffect is called when the spell is added, but also every time I go in and out of workshop mod. Edited April 22, 2023 by F4ll0uta Link to comment Share on other sites More sharing options...
lee3310 Posted April 22, 2023 Share Posted April 22, 2023 (edited) "I tested using the SetOutfit() on boots from mod on slot 33 but did not compile like I thought it would." Did you get a compilation error or it doesn't work (bug still occurs) Edited April 22, 2023 by lee3310 Link to comment Share on other sites More sharing options...
F4llfield Posted April 22, 2023 Author Share Posted April 22, 2023 (edited) So far I only setup the Effect and spell according to your settings and Add this script to the effect: Scriptname ClothingManagerSettlersEffect extends activemagiceffect ;--Events------------------------------------------- Event OnEffectStart(Actor akTarget, Actor akCaster) Debug.MessageBox("We are in the OnEffectStart Function!") EndEvent I'm trying to understand how the spell works before going further. Off subject lee3310, how did you get the creation kit in dark mod? all your panels are grey instead of white. Edited April 22, 2023 by F4ll0uta Link to comment Share on other sites More sharing options...
DlinnyLag Posted April 23, 2023 Share Posted April 23, 2023 how did you get the creation kit in dark mod? See https://www.nexusmods.com/fallout4/mods/51165 Link to comment Share on other sites More sharing options...
Recommended Posts