Jump to content

How do I apply enchanments or spells to provisioners?


AtomsChosen

Recommended Posts

I wanted to make a mod that removes Provisioners protected flag and instead gives them buffs that makes them much harder to kill as well as figure out how to assign other npcs to follow provisioners. The second part Ill worry about later. For now I just want to know how I can add a spell or enchanement to a provisioner? I already now how enchantments and Magic effects work. However I want to know how I can specify an enchanment or spell to be applied to an active provisioner. I want to add a spell to a provisioner that increases damage and resistance. I was looking at keywords and I see some stuff regarding provisioners under "caravan". However I am still not sure how to apply the spell only if they are currently a provisioner.

Link to comment
Share on other sites

There's a RefCollectionAlias 'CaravanActors' on WorkshopParentQuest. It has all the Provisioners in it.

You can directly do a bunch of things with the alias from script, such as setting IsProtected or IsEssential. This will apply to *all* the Provisioners in the alias at once.

 

And to access each reference in the alias individually, you could use something like this:

RefCollectionAlias Property CaravanActors Auto Const

Function ProcessProvisioners()
    Int i = 0
    While (i < CaravanActors.Length)
        ObjectReference refProvisioner = CaravanActors.GetAt(i)
        ; do something with refProvisioner here
        i += 1
    EndWhile
EndFunction
Link to comment
Share on other sites

 

There's a RefCollectionAlias 'CaravanActors' on WorkshopParentQuest. It has all the Provisioners in it.

You can directly do a bunch of things with the alias from script, such as setting IsProtected or IsEssential. This will apply to *all* the Provisioners in the alias at once.

 

And to access each reference in the alias individually, you could use something like this:

RefCollectionAlias Property CaravanActors Auto Const

Function ProcessProvisioners()
    Int i = 0
    While (i < CaravanActors.Length)
        ObjectReference refProvisioner = CaravanActors.GetAt(i)
        ; do something with refProvisioner here
        i += 1
    EndWhile
EndFunction

 

Hey. Thank you for the response. I am not as familiar with scripting, but I am going to try to learn, because I really REALLY want to get this mod working. If I was to come up with a script, where would I put it. And is their any alternative ways to make this work that don't require scripting?

Link to comment
Share on other sites

Create your spell and add it to the RefCollectionAlias for CaravanActors. There is an Alias Spell window in there that you can access in the Creation Kit when you open the RefCollectionAlias. The Provisioners already come with two spells but you can add your own. You can also uncheck the protected box there but the actors may be in other aliases that also make them protected. To make actors follow the provisioner, you will need a follow package and a RefAlias or RefAliasCollection that uses that package.

Link to comment
Share on other sites

  • Recently Browsing   0 members

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