Jump to content

EquipItem & settlers reverting to default armor


Recommended Posts

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

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

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: Script

Casting Effect: Constant Effect

Delivery: Self

Magic Skill: NONE

Target Condition: NONE

 

Perk

 

Perk Entries:

Type: Ability

Data 1: mySettlersSpell

 

Spell

 

Effect: mySettlersEffect

Condition:

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

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:

H89J9zQ.png

 

And spell to apply this magic effect:

 

H89Hpmx.png

 

 

AddSpell have to be used.

Link to comment
Share on other sites

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 by F4ll0uta
Link to comment
Share on other sites

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 by F4ll0uta
Link to comment
Share on other sites

  • Recently Browsing   0 members

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