Skyrim
0 of 0

File information

Last updated

Original upload

Created by

Felisky

Uploaded by

Felisky384

Virus scan

Safe to use

Custom Conditions (95 comments)

  1. Felisky384
    Felisky384
    • premium
    • 2,111 kudos
    Sticky
    In the version 1.0.0, you can apply different animations only depending on ActorBase. I describe custom conditions added in version 1.1.0. By using custom conditions, users can customize the conditions. This is a bit complicated and for modders, but if you know how to use it, you can do a lot of things.

    Folder structure
    meshes\actors\(project folder)\animations\DynamicAnimationReplacer\_CustomConditions\<PriorityNumber>\(animation pack and a _conditions.txt file)

    + (project folder) is the folder that contains the behavior graph set for the race. For example, "character".
    + <PriorityNumber> is a folder named by the priority to which the animations will be applied. The higher the number, the higher the priority. Priority 0 cannot be used in custom conditions, as it is used for ActorBase, the original function of this mod. Use a negative number for lower priority. When publishing a mod using custom conditions, I recommend that you consider the priority of other mods. This number is between -2147483648 and 2147483647 in decimal.
    + (_conditions.txt file) is just a file with format of "txt" and named "_conditions". Specify conditions in this file.
    (NOT) Function name("esp name" | formID, ...) (AND or OR)
    ...
    The esp name is enclosed in "". To specify the formID in hexadecimal, prefix it with 0x.
    For formID, remove the first two digits indicating the load order.

    Example:
    Actors who have an iron dagger equipped to the right hand and are in the exterior
    IsEquippedRight("Skyrim.esm" | 0x0001397E) AND
    NOT IsInInterior()

    Logical operation is performed in the same way as CK.
    (A || B) && C
    =A || B && C
    A OR
    B AND
    C

    (A && B) || C
    =A || C && B || C
    A OR
    C AND
    B OR
    C

    Function List
    v1.1.1
    A number can now be specified directly in the GlobalVariable argument.

    IsEquippedRight(Form item)
    Does the actor have the specified item equipped to his right hand?
    IsEquippedRightType(GlobalVariable type)
    Is the item equipped to the actor's right hand the specified type?
    IsEquippedRightHasKeyword(Keyword keyword)
    Does the item equipped to the actor's right hand have the specified keyword?
    IsEquippedLeft(Form item)
    Does the actor have the specified item equipped to his left hand?
    IsEquippedLeftType(GlobalVariable type)
    Is the item equipped to the actor's left hand the specified type?
    IsEquippedLeftHasKeyword(Keyword keyword)
    Does the item equipped to the actor's left hand have the specified keyword?
    IsEquippedShout(Form shout)
    Does the actor currently have the specified shout?
    IsWorn(Form item)
    Is the actor wearing the specified item?
    IsWornHasKeyword(Keyword keyword)
    Is the actor wearing anything with the specified keyword?
    IsFemale()
    Is the actor female?
    IsChild()
    Is the actor a child?
    IsPlayerTeammate()
    Is the actor currently a teammate of the player?
    IsInInterior()
    Is the actor in an interior cell?
    IsInFaction(Faction faction)
    Is the actor in the specified faction?
    HasKeyword(Keyword keyword)
    Does the actor have the specified keyword?
    HasMagicEffect(MagicEffect magiceffect)
    Is the actor currently being affected by the given Magic Effect?
    HasMagicEffectWithKeyword(Keyword keyword)
    Is the actor currently being affected by a Magic Effect with the given Keyword?
    HasPerk(Perk perk)
    Does the actor have the given Perk?
    HasSpell(Form spell)
    Does the actor have the given Spell or Shout?
    IsActorValueEqualTo(GlobalVariable id, GlobalVariable value)
    Is the ActorValue of the specified ID equal to the value?
    IsActorValueLessThan(GlobalVariable id, GlobalVariable value)
    Is the ActorValue of the specified ID less than the value?
    IsActorValueBaseEqualTo(GlobalVariable id, GlobalVariable value)
    Is the base ActorValue of the specified ID equal to the value?
    IsActorValueBaseLessThan(GlobalVariable id, GlobalVariable value)
    Is the base ActorValue of the specified ID less than the value?
    IsActorValueMaxEqualTo(GlobalVariable id, GlobalVariable value)
    Is the max ActorValue of the specified ID equal to the value?
    IsActorValueMaxLessThan(GlobalVariable id, GlobalVariable value)
    Is the max ActorValue of the specified ID less than the value?
    IsActorValuePercentageEqualTo(GlobalVariable id, GlobalVariable value)
    Is the percentage ActorValue of the specified ID equal to the value?
    IsActorValuePercentageLessThan(GlobalVariable id, GlobalVariable value)
    Is the percentage ActorValue of the specified ID less than the value?
    IsLevelLessThan(GlobalVariable level)
    Is the actor's current level less than the specified level?
    IsActorBase(ActorBase actorbase)
    Is the actorbase for the actor the specified actorbase?
    IsRace(Race race)
    Is the actor's race the specified race?
    CurrentWeather(Weather weather)
    Is the current weather the specified weather?
    CurrentGameTimeLessThan(GlobalVariable time)
    Is the current game time less than the specified time?
    ValueEqualTo(GlobalVariable value1, GlobalVariable value2)
    Is the value1 equal to the value2?
    ValueLessThan(GlobalVariable value1, GlobalVariable value2)
    Is the value1 less than the value2?
    Random(GlobalVariable percentage)
    The probability of the specified percentage (from 0 to 1).
    ==========================================================================
    Added in v1.2.0
    IsUnique()
    Is the actor flagged as unique?
    IsClass(Class class)
    Is the actor's class the specified class?
    IsCombatStyle(CombatStyle combatStyle)
    Is the actor's CombatStyle the specified CombatStyle?
    IsVoiceType(VoiceType voiceType)
    Is the actor's VoiceType the specified VoiceType?
    IsAttacking()
    Is the actor currently attacking?
    IsRunning()
    Is the actor currently running?
    IsSneaking()
    Is the actor currently sneaking?
    IsSprinting()
    Is the actor currently sprinting?
    IsInAir()
    Is the actor in the air?
    IsInCombat()
    Is the actor in combat?
    IsWeaponDrawn()
    Does the actor have his equipped weapon and/or magic spell drawn?
    IsInLocation(Location location)
    Is the actor in the specified location or a child of that location?
    HasRefType(LocationRefType refType)
    Does the actor have the specified LocationRefType attached?
    IsParentCell(Cell cell)
    Is the actor in the specified cell?
    IsWorldSpace(WorldSpace worldSpace)
    Is the actor in the specified WorldSpace?
    IsFactionRankEqualTo(GlobalVariable rank, Faction faction)
    Is the actor's rank in the specified faction equal to the specified rank?
    IsFactionRankLessThan(GlobalVariable rank, Faction faction)
    Is the actor's rank in the specified faction less than the specified rank?
    IsMovementDirection(GlobalVariable direction)
    Is the actor moving in the specified direction?

    Note that the Random () function can get mixed up in some animations unintentionally.

    Please refer to the following for the ActorValue ID.
    https://www.creationkit.com/index.php?title=ActorValueInfo_Script

    Item types are as follows.
    -1=Others
    0=Fists
    1=Swords
    2=Daggers
    3=War Axes
    4=Maces
    5=Greatswords
    6=Battleaxes
    7=Bows
    8=Staff
    9=Crossbows
    10=Warhammers
    11=Shields
    12=Alteration Spells
    13=Illusion Spells
    14=Destruction Spells
    15=Conjuration Spells
    16=Restoration Spells
    17=Scrolls
    18=Torches

    The actor's rank in the specified faction:
    -2 if the Actor is not in the faction.
    -1 if the Actor is in the faction, with a rank set to -1. By convention, this means they may eventually become a member of this faction.
    A non-negative number equal to the actor's rank in the faction.

    Movement direction:
    0=Standing Still
    1=Forward
    2=Right
    3=Back
    4=Left

    If you are having trouble applying animations, open "..My Games\Skyrim\SKSE\DynamicAnimationReplacer.log". There may be error messages.

    Note:
    Condition checking is done dynamically, so too many may affect performance. Unlike the ActorBase assignment of this mod, animations added by custom conditions are pre-cached on load for all actors in the project.
    1. JZBai
      JZBai
      • premium
      • 273 kudos
      Thanks for the post and the heads up on what's coming Felisky!
      Looking at the conditions that you've listed here; I think most major alternate animation mods could be covered by the conditions you are planning to provide and clever scripting, magic effect use, etc. can probably cover the rest. Great job man! I can't wait for the next release!
      A minor question: could you clarify a bit where in the folder structure the "_conditions.txt" will need to be placed? Does it go in the same folder as the animations or is it higher up in the folder structure somewhere?
    2. Felisky384
      Felisky384
      • premium
      • 2,111 kudos
      "_conditions.txt" is placed in the same folder as the animations.
      DynamicAnimationReplacer\_CustomConditions\(priority)\_conditions.txt
    3. Seijin8
      Seijin8
      • premium
      • 26 kudos
      Could use more examples on implementation. For instance:
      (animation folders and files)
      Does that start with meshes\...
      or actors\...
      or...?

      IsWornHasKeyword(Keyword keyword)
      would be
      IsWornHasKeyword("Update.esm" | 0x00BD44BB)
      or IsWornHasKeyword(Keyword ClothingRisque)

      In the above case, that is an injected record from another file. Is it able to handle this, or does the keyword have to be explicitly supplied in Skyrim.esm?

      Thanks!
    4. Felisky384
      Felisky384
      • premium
      • 2,111 kudos
      (animation folders and files) contains the animation folders and files in the "animations" folder.
      Example:
      "meshes\actors\character\animations\1hm_attackpowerleft.hkx" ->
      "meshes\actors\character\animations\DynamicAnimationReplacer\_CustomConditions\1\1hm_attackpowerleft.hkx"

      You can specify a new record in the esp file.
      Example:
      Keyword with form ID 0x00000800 in aaa.esp
      IsWornHasKeyword("aaa.esp" | 0x00000800)

      Note:
      In case of overriding records, specify the original esp file.
    5. Seijin8
      Seijin8
      • premium
      • 26 kudos
      Got it, thank you for the details, and for the fantastic piece of work!
    6. JZBai
      JZBai
      • premium
      • 273 kudos
      I'm having trouble getting some conditions to work and I have a feeling it has something to do with how I'm inputting the FormID. So let's say I want to use "IsEquippedRightHasKeyword(Keyword keyword)" and the keyword I want is from the esp "NewArmoury.esp." I opened up the esp in TES5Edit and it says the formID for the keyword is "04000801." Would it look like this in the _condition.txt:
      IsEquippedRightHasKeyword("NewArmoury.esp" | 0x04000801)
      Also, are the FormIDs load order dependent?
    7. Felisky384
      Felisky384
      • premium
      • 2,111 kudos
      I'm sorry. My explanation was not enough. For FormID, remove the first two digits indicating the load order. 0x000801 instead of 0x04000801.
    8. JZBai
      JZBai
      • premium
      • 273 kudos
      No problem!
      Works great now! Thanks for all your hard work!
    9. bridgeofsunrise
      bridgeofsunrise
      • member
      • 1 kudos
      At first, sorry above comment is mine;;
      Thanks for your great work! I'm not good at English.
      Could use more examples on implementation. For instance:

      I want to use "IsEquippedRightType(GlobalVariable type)" for applying Swords motion.
      So,I described "IsEquippedRightType(1)" in _conditions.txt according to explanation "Item types are as follows. 1=Swords".
      But it's not work.
      What is wrong?
    10. bridgeofsunrise
      bridgeofsunrise
      • member
      • 1 kudos
      Sorry, now it works.
    11. Felisky384
      Felisky384
      • premium
      • 2,111 kudos
      Specify the argument as ("esp name" | FormId). GlobalVariable is a form. To specify 1 for the argument of IsEquippedRightType, create a new esp with CK or TES5Edit and create a GlobalVariable record with a value of 1.000000 in it. And specify the esp name and FormId to the argument of IsEquippedRightType.
    12. bridgeofsunrise
      bridgeofsunrise
      • member
      • 1 kudos
      Thanks a lot!!
      Oh, It's a bit complicated for me but I'll challenge it!
    13. riskirills
      riskirills
      • member
      • 2 kudos
      -
    14. nicholas888
      nicholas888
      • member
      • 34 kudos
      Hi, Felisky.

      Why integer and float parameters should be set as the GlobalVariable form ?
      The technical Issue ?

      We would like to set as follows.
      Please consider at the next version if possible.

      Random(0.2)
      or
      Random("%" | 0x14)

      IsActorValueLessThan(24, 100.0)
      or
      IsActorValueLessThan("_AV" | 0x18, "_Value" | 0x64)

      ---

      Regards.
    15. Felisky384
      Felisky384
      • premium
      • 2,111 kudos
      The reason is my simple parser. I will consider whether we can write numbers directly.
    16. nicholas888
      nicholas888
      • member
      • 34 kudos
      I see. Thanks for your consideration.

      And one more question.

      Is the specified global variable in "_conditions.txt" evaluated only when starting the game ?
      This means that, is the changed value evaluated immediately if the global variable is changed in the game ?

      ---
      Regards.
    17. Felisky384
      Felisky384
      • premium
      • 2,111 kudos
      This mod gets the value of the GlobalVariable just before the animation is activated, so if the value changes during gameplay, the changed value should be evaluated.
    18. nicholas888
      nicholas888
      • member
      • 34 kudos
      Ok. Thanks for your quick reply.
    19. nicholas888
      nicholas888
      • member
      • 34 kudos
      Thanks for your updating.

      Now there are many requests for this mod,
      I worry many checking functions will cause the performance issue.

      It's a just idea but how about checking by one versatile function.

      e.g.
      IsState(String type, Float value[, Form option])

      IsState("Class", 1)
      IsState("IsWeaponDrawn", 1)
      IsState("IsSwimming", 1)
      IsState("CombatStyle", 1, "Foo.esp" | 0x00123456)
      IsState("FooStatus<", 100.0)
      IsState("BarStatus>=", 100.0)
    20. Felisky384
      Felisky384
      • premium
      • 2,111 kudos
      There is no performance impact from increasing the number of functions available in this mod. Please don't worry.
    21. Jackworld
      Jackworld
      • premium
      • 1 kudos
      I can't believe how amazing this mod is! I have two questions I would love anyone to help me with:

      Is there a way to express walking vs running as a condition?

      Is there a way to blend idle animations so the character won't snap into the new idle when a new condition is satisfied?

      Thanks to all modders and Felisky especially today!
    22. Jackworld
      Jackworld
      • premium
      • 1 kudos
      I've had trouble getting animations to play using the HasMagicEffect condition. Here is my _conditions.txt:

      HasMagicEffect("WalkToggle.esp" | 0x005E32)

      Anyone see a problem? Thank you.
    23. riskirills
      riskirills
      • member
      • 2 kudos
      -
    24. Corvinus18
      Corvinus18
      • premium
      • 76 kudos
      Edit. Nevermind
    25. ruffled2000
      ruffled2000
      • member
      • 0 kudos
      wait a second. What about I use animation that doesn't contain a esp file? And how can I get formID as well? Can you explain some more pls....
    26. MaeroDestroya
      MaeroDestroya
      • member
      • 13 kudos
      Guys, can anyone give examples for the following new addons?

      IsInLocation(Location location)
      Is the actor in the specified location or a child of that location?
      HasRefType(LocationRefType refType)
      Does the actor have the specified LocationRefType attached?
      IsParentCell(Cell cell)
      Is the actor in the specified cell?
      IsWorldSpace(WorldSpace worldSpace)
      Is the actor in the specified WorldSpace?

      I've understood the earlier conditions, but I don't know what to put in them.
      Like in "IsInLocation(Location location)"

      Do I put ("skyrim.esp" | Whiterun) like so?
    27. Vortiturtle
      Vortiturtle
      • supporter
      • 0 kudos
      Were support for condition functions IsInDialogueWithPlayer and IsTalking added to this mod, could they be used to make conversations between PC and NPCs more lively? This could allow for interesting possibilities, especially with TW3 style Alternate Conversation Camera.
    28. Thynar
      Thynar
      • member
      • 28 kudos
      I'm looking to make an animation replacer for a certain actor based on the chicken skeleton, but I can't seem to get it to work.


      meshes\actors\chicken\animations\DynamicAnimationReplacer\_CustomConditions\444

      the .hkx files and _Conditions.txt are here, but it still doesn't work in-game. I'm wondering what I'm doing wrong with the structure.

      I tried making human animations before and I can confirm they work on my machine with this layout:

      meshes\actors\character\animations\DynamicAnimationReplacer\_CustomConditions\700

      edit:

      i fixed it
       
      this works:
      meshes\actors\ambient\chicken\animations\DynamicAnimationReplacer\_CustomConditions\444
       
    29. deleted37497205
      deleted37497205
      • account closed
      • 1 kudos
      Jackworld
      I'd really want to know the same thing... I want it because of UNDERDOG's crawling animation to be honest. The speed multiplier thing is a bit too much for me.

      EDIT: Actually, there seems to be. Would be able to combine these

      IsSneaking() AND NOT
      Is the actor currently sneaking?
      IsRunning()
      Is the actor currently running?

      EDIT 2: It does work but it seems to kind of shift downwards when you stop moving while in "running" mode. Kind of weird ngl. Like, you shouldn't switch running/walking while crouched. You have to get up in order for it to fully update. It still is cool but not sure if it's worth using it.
  2. Malmsteen211193
    Malmsteen211193
    • member
    • 0 kudos
    i try change serana idle animatin with _condition
    IsActorBase("Dawnguard.esm" | 0x0002B6C)
    and this animation not work..
    what the solution? please help
    DAR log :
    error: actors\character\animations\DynamicAnimationReplacer\_CustomConditions\77777\_conditions.txt
    IsActorBase("Dawnguard.esm"|0x0002B6C)
    couldn't find actors\character\animations\DynamicAnimationReplacer\_CustomConditions\77777\_conditions.txt
  3. Skybroom
    Skybroom
    • supporter
    • 78 kudos
    ...
    The esp name is enclosed in "". To specify the formID in hexadecimal, prefix it with 0x.
    For formID, remove the first two digits indicating the load order.

    What does that mean?

    So, if I have this keyword comming with the Update.esm:
     [01] Update.esm (E5B67BDA) \ Keyword \ 010009BD <ArmorMaterialFalmer>

    The condition will look like this (?):
    IsWornHasKeyword("Update.esm"| 0x010009BD)

    Or it will look like this (?):
    IsWornHasKeyword("Update.esm"| 0x000009BD)

    Or it will look like this (?) (I removed the first two digits indicating the load order):
    IsWornHasKeyword("Update.esm"| 0x0009BD)
  4. Skybroom
    Skybroom
    • supporter
    • 78 kudos
    Custom conditions:
    IsCurrentFurnitureRef

    How 'bout that one?
    I need to specify animation for a Chaise, which is a custom furniture with default sitting animation attached to it. I need to change that.

    Does DAR work with furniture?
  5. Krijanowsky
    Krijanowsky
    • supporter
    • 25 kudos
    I've been trying to make some animations play when I recharge a weapon, but from what I see in the conditions, there is nothing related to "is enchanting" or "recharging". Tried the keyword, but it didn't work... does anyone have a tip? Skyrim's soul gem mechanics seems a little under the hood.
  6. ICEJOCKO
    ICEJOCKO
    • member
    • 2 kudos
    I want to make a thing, so that during the first person view, turns other walk and run back animations, because usually the animation works in 360 degrees. I have animations to use but no idea how to enable them in first person camera. With this mod can i do it? Or only when adding additional keyword into the dll file of the mod?
  7. theblazzer1203
    theblazzer1203
    • member
    • 2 kudos
    Hello, does anybody know is there a condition about "is player in 3rd person?".Just to make mod "Equip 360 Movement by Ni-iru" compatible with "Enhanced Camera" by disabling its 360 animation to prevent weird body that can be seen in 1st person view. Thanks for the answer)
  8. hellgeist
    hellgeist
    • premium
    • 31 kudos
    This is highly mysterious:
    "+ (project folder) is the folder that contains the behavior graph set for the race. For example, "character"."

    I cannot get DAR anims to work with custom conditions in any project folder other than \character\DynamicAnimationReplacer\_CustomConditions\

    So, why mention (project folder)? If it is possible, what is the file structure required? I'd like to create some alternate riding anims, but I cannot get custom conditions working in \horse_rider\DynamicAnimationReplacer\_CustomConditions\ for example
  9. AndragonFirefly
    AndragonFirefly
    • supporter
    • 23 kudos
    I love this mod! I have implemented several sub-mods doing all sorts of various things. Here is a project I would like to see done but I think there may need to be more conditions implemented to this mod in order for it to work. 
    The Dragonsoul absorption mod is way out of date and is not compatible with USLEEP apparently. At least, if you use the Dragonborn DLC
    But I would like to see some animations during dragon soul absorbing. I believe this function is attached to a quest. So could there be conditions added for quests such as completed, started, or stages? 
  10. FrizeHsueh
    FrizeHsueh
    • member
    • 4 kudos
    Hi, I'm always confused with the "and" with "or" using together. And I'm not familiar with CreationKit's logic.

    But I just kinda figured out what the author of DAR means with the "A||B &C" stuff.
    I always think that the "And" is prior to the "Or", but from my testing, it turns out it's "Or" that has priority over "and".

    1. The first logic/order DAR author said is:"(A|B) &C".
    So if you wanna set [ "A and C" , or "B and C" ], it should be writing:[A or B and C], instead of [A and C or B and C].

    (*The first command means[(A or B) &C],
    i.e.: [A & C , or B & C], this one works OK for my testing, and I use this logic in my own Tesedit tweaking besides DAR, for manytimes , it should be right.(..plus if reversed should be wrote as [C &(A or B)]? )
    *The second command means: [A&(C or B )&C],
    i.e.:[A &C&C , or A &B &C] , if my guessing is right.)


    2. The second logic/order that DAR author mention is :
    "(A&B) |C" ,which writes as [A or C and B or C] , meaning
    [(A & B) or just C ], which you can consider [A(or C) & B (or C)] for simpler looking.If you directly write [A and B or C] it will become the first logic/order.(This logic I've done testing, confirmed)

    Though, this is just my testing, not sure if I made mistakes or got it all wrong. I hope it will help, and if not right pls correct me, that sure will help me. XD
    1. AndragonFirefly
      AndragonFirefly
      • supporter
      • 23 kudos
      I can answer this..... AND means both conditions, whereas OR mean one condition or the other but only one. This is why sometimes AND/OR is used combined so that it will include all the above except for none.
  11. bendiwolf
    bendiwolf
    • member
    • 1 kudos
    Hi everyone

    I am using the DAR version of Edg3k's Male Idle Animation Replacer and I absolutely love it !!!

    I only have one small issue: male actors use all the idles when wearing a shield, which generates some unrealistic situations where the shield is cutting through their face/torso !!!

    Is there any way I can configure the mod to avoid using certain stances if the actor is holding a shield ???

    Many thanks for any helpful replies,

    Bendiwolf
    1. ChunchunMachu
      ChunchunMachu
      • premium
      • 16 kudos
      I know this is a month late but u can use "NOT IsEquippedLeftType(11)" to state that the your animation will not work if there is a shield equipped on the left hand. Consequently, the animation will only play if and only if there is something else equipped on the left hand, remember when a sword is equipped npcs will not hold it outside combat.
      I use it on certain idles provided in the pretty female idles mod that also face your very own issue, works as intended. Hope this helps a little.
    2. AndragonFirefly
      AndragonFirefly
      • supporter
      • 23 kudos
      If you are already using a current animation that your are happy with for male sitting except when equipped with a shield, then how about try making a DAR male sit condition that requires an equipped shield to use. Then just pick an animation that you are happy with for the shield users. Everyone else just uses what you already have and like.