Difference between revisions of "Category talk:Conditions"

From the CreationKit Wiki
Jump to navigation Jump to search
imported>GetTheJojDone
imported>HawkFest
Line 60: Line 60:


Ah right, thanks! [[User:GetTheJojDone|GetTheJojDone]] ([[User talk:GetTheJojDone|talk]]) 11:52, 18 January 2013 (EST)
Ah right, thanks! [[User:GetTheJojDone|GetTheJojDone]] ([[User talk:GetTheJojDone|talk]]) 11:52, 18 January 2013 (EST)
== Missing an important information ==
The text mentions : "''The << and >> buttons are used to move Condition Items up or down in the list, respectively, and the New button can be used to create a new item.''". Fine, but from top or from bottom of the list? It's very important to know since the outcomes are different (check the example : reading and applying the discussed rule from left-to-right is not the same as right-to-left). It looks like the CK's doesn't integrate a full-fledged boolean algebra interpreter compliant with identity, distributy, etc. : it relies on "directional positioning" within a list, acting more like some Turing machine (which is understandable considering the CK is already "heavy" enough)... Hence we need to know if it starts from top or from bottom.
--[[User:HawkFest|HawkFest]] ([[User talk:HawkFest|talk]]) 2013-08-07T12:30:21 (EDT)

Revision as of 12:30, 7 August 2013

Passing Conditions to Papyrus

I've found a way to use Conditions in Papyrus.
These are the functions that you find in Conditions interfaces in the CK.

Basically, you get them across to Papyrus via Abilities:

(It is unusual that we can ForceFirstPerson () and ForceThirdPerson () with Papyrus, but we can't determine which camera mode is active.)
In this example, I'll Debug the value of the Condition, IsPC1stPerson:

  1. I create a Scripted Magic Effect for each condition you wish to trigger.
  2. I attach this Script below to it.
  3. I create an Ability and attach that Scripted Magic Effect.
  4. I Conditionalise that Magic Effect on the Ability with IsPC1stPerson.

This is the Script for the Magic Effect:

Event OnEffectStart(Actor akTarget, Actor akCaster)
     Debug.Notification ("IsPC1stPerson = True")
     Debug.Trace ("IsPC1stPerson = True")
 EndEvent
 Event OnEffectFinish(Actor akTarget, Actor akCaster)
     Debug.Notification ("IsPC1stPerson = False")
     Debug.Trace ("IsPC1stPerson = False")
 EndEvent

In the game, everytime the camera mode changes between 1st and 3rd person, I see the appropriate Debug.Notification ().

I've also tested this with IsPCSleeping.
Because Events still execute on Scripts of deactivated mods (re: http://www.creationkit.com/Talk:Save_File_Notes_%28Papyrus%29), I'll be using this method to trigger sleep start and sleep stop events.

You'll need only one Ability.
But you'll need a Scripted Magic Effect for each Condition you wish to keep track.

Also, I can imagine that not ALL conditions would work.
But I can also guess that a lot of them would.

You'll need to give this Ability to the Player, by the way.
And to do this the safest way is to create a Quest, add the Player as an Alias, and add the Ablity as an Alias Spell.
-- Kuertee 07:49, 1 March 2012 (EST)

It would be great if you created a page with this information to go in the Solutions category. I imagine it's a problem a lot of modders run into but few know how to solve.
Oh, and you can use this markup to add syntax highlighting to Papyrus:
<source lang="papyrus">Code goes here</source>
-- Cipscis 15:56, 1 March 2012 (EST)
Done. This is now in the Solutions category.
-- Kuertee 06:23, 2 March 2012 (EST)
I've removed this page from the Solutions category as the non-talk page version has now been added
-- Cipscis (talk) 20:16, 3 September 2012 (EDT)

Comp

In the "Comp" tab in conditions what does "!=" mean? GetTheJojDone (talk) 11:37, 18 January 2013 (EST)

The != operator, for conditions and Papyrus, means 'Not Equal To'. See Operator Reference.
- JustinOther (talk)

Ah right, thanks! GetTheJojDone (talk) 11:52, 18 January 2013 (EST)

Missing an important information

The text mentions : "The << and >> buttons are used to move Condition Items up or down in the list, respectively, and the New button can be used to create a new item.". Fine, but from top or from bottom of the list? It's very important to know since the outcomes are different (check the example : reading and applying the discussed rule from left-to-right is not the same as right-to-left). It looks like the CK's doesn't integrate a full-fledged boolean algebra interpreter compliant with identity, distributy, etc. : it relies on "directional positioning" within a list, acting more like some Turing machine (which is understandable considering the CK is already "heavy" enough)... Hence we need to know if it starts from top or from bottom. --HawkFest (talk) 2013-08-07T12:30:21 (EDT)