Jump to content

Edit armor effects, using scripts? NVSE


truestiven

Recommended Posts

Hey, people. I trying to made some armor to be mod-able, in the same way as mods for weapons work. So if someone know, please tell me, can you modify armor effect with scripts? I mean do NVSE has some functions which let you to change a item effect? Im digging NVSE documentation atm, but if someone already know and can just point me towards the function, help would be appreciated.

Link to comment
Share on other sites

You can do so with JIP. Especifically, the SetObjectEffect function. Check it out on the wiki to see how it works.

Also take a look at the AddNewEffect function as you might need it.

Yeah, i found it already, thx. But now i have another questing - are it is possible to get reference on "subject" of perk. I mean, can you essentially write something like:

 

begin Gamemode

 

let rActor : = GetActor

 

end

 

On side note - can someone explain which functions can be called on their own to get the object which run the script? For example wiki says you can get the container ref, just by using GetContainer.

Link to comment
Share on other sites

GetSelf

Is this what you were looking for?

It seems to be so, but how would it behave if you use it in effect script? For example, if i trying to make perk which would (by scripted ability) manipulate perk's owner (i trying to make it works on npc as well, so i need ActorRef) inventory or stats. If you use GetSelf in effect script, would it return ActorRef or ScriptRef or Object/Form ref?

Link to comment
Share on other sites

If you use it on an effect script, you get the reference of the actor affected by it.

What reference are you looking for? The reference to a piece of equipment I assume? If so, check GetEquippedItemRef function, a JIP function that returns an inventory reference. There is also GetEquippedObjectRef but it return a base reference.

If you want the reference of the PC just use the "player" keyword as your reference.

Edited by UnvalidUserName
Link to comment
Share on other sites

  • Recently Browsing   0 members

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