Jump to content

Is it possible to access SKSE functions in the CreationKit?


Wolfstorm

Recommended Posts

SKSE does not provide any additions to the condition system.

Sometimes, you can use scripts that use SKSE to feed things into the condition system by setting a faction, or a quest/objectreference property, which then can be tested for.  Not for the faint of heart.

Link to comment
Share on other sites

Simply no, what @xkkmEl is referring too (maybe ¯\_(ツ)_/¯ not really sure)  is Quested and Scripted Virtual Machine Variables.. which uses papyrus, and since a part of SKSE is Papyrus, you can use them in those too along with Vanilla Papyrus OFC

But lets make complicated. It is Scripted Code and Creation kit working together to create new CK Conditions like you want, that do not exist.

So you can do this, but its not for faint hearted or beginning learn to code Modders.

https://ck.uesp.net/wiki/GetVMScriptVariable

https://ck.uesp.net/wiki/GetVMQuestVariable

Has you can see, there not a lot info on it..

I am not 100% sure what @xkkmEl is referring too. Cause I never use faction to do it, but there is many ways  to skin a cat, as they say

Link to comment
Share on other sites

What OP referred to is essentially ability to call an SKSE function directly in a dialogue condition.    

I.e. one can set a dialogue condition 'GetIsVoiceType' on the subject to make sure subject has a specific voice type, which is basically equivalent to "if  Subject.GetVoiceType() == SomeVoiceType".  Or GetItemCount condition is literally equivalent to GetItemCount function.   So OP wants to set a dialogue condition if "GetItemMaxCharge" for some target object(weapon), say, is equal to or greater than some number.

It would have been cool if conditional properties could be full properties.  (A good read on properties here), then you could set a GetVMQuestVariable dialogue condition on a conditional property, and in the Get method for said property, call GetItemMaxCharge - but unfortunately, conditional properties must be Auto. 

So you have to look for workarounds.   Say, if you anticipate that in a certain dialogue, you need to check max charge on a weapon, you could structure your dialogue accordingly.

I.e.: player:  can you do me a favour?
NPC response: what do you need?   - attached script fragment calls a function in quest that does 'GetMaxItemCharge' on player's current weapon and saves value in MaxCharge conditional property.
One of follow-up branches where player says 'I need my weapon recharged'  has 'GetVMQuestVariable' condition to check MaxCharge.

 

Link to comment
Share on other sites

  • Recently Browsing   0 members

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