Skyrim Special Edition
0 of 0

File information

Last updated

Original upload

Created by

AndrealphusVIII

Uploaded by

AndrealphusVIII

Virus scan

Safe to use

43 comments

  1. ItsAlways710
    ItsAlways710
    • premium
    • 25 kudos
    Awesome mod - this mod Spellcraft Functions SKSE64 has been abandoned by the author, and is open source (source on github), there are several functions that would be awesome to be able to use again in AE (it has by far the BEST get all actor spells functions, was super fast and unlike PO3's function it actually returns race spells). Would be awesome if you were able to roll up some or all of these functions into your mod. If I knew C I would redo it myself

    - IA710
    1. AndrealphusVIII
      AndrealphusVIII
      • premium
      • 1,242 kudos
      That's beyond my skill unfortunately. I'd love to see it ported as well.
    2. ItsAlways710
      ItsAlways710
      • premium
      • 25 kudos
      Appreciate you taking a look at it. If you know of anybody that has what's needed to get it updated please let them know about it.

      Maybe after I do this next update of Handy Crafting I'll try to learn enough to get through it

      -IA710
  2. MaybeAsrak
    MaybeAsrak
    • premium
    • 17 kudos
    Cool mod! what happens if there are multiple instances of an AME present on an actor when you use the function to find the instance?
    1. AndrealphusVIII
      AndrealphusVIII
      • premium
      • 1,242 kudos
      Not sure. It should take the first one, afaik.
  3. Shekhinaga
    Shekhinaga
    • premium
    • 279 kudos
    If I may make a very selfish request... could you add a "GetAndrealphusExtenderVersion()" function? I want to make sure that my mod only works if the extender is working, and this is the least hacky way I could think of.
    1. AndrealphusVIII
      AndrealphusVIII
      • premium
      • 1,242 kudos
      I'd love to, but I'm not sure how to do that. I assume it doesn't need to be a native function, but rather something like this?

      Int Function GetAndrealphusExtenderVersion() global
      Return 141

      Would that work?
      141 refers to v1.4.1, but the number increases each time I update, so you can make checks to determine whether the user is using at least version X or higher.
    2. Shekhinaga
      Shekhinaga
      • premium
      • 279 kudos
      It may be better to return the value as an array through the DLL. For example something like this for the script:
      Int[] Function Foo() Global Native

      And this in a header or something
      inline std::vector<std::int32_t> Foo(RE::StaticFunctionTag*){
      return { 1, 4, 1 };
      }
    3. AndrealphusVIII
      AndrealphusVIII
      • premium
      • 1,242 kudos
      Okay. I'll try that.
    4. AndrealphusVIII
      AndrealphusVIII
      • premium
      • 1,242 kudos
      I've added said function. Please read the description for more information.
  4. mansamsan
    mansamsan
    • member
    • 0 kudos
    Thank you for the modding resources.  I am just starting modding using papyrus and they helped me.  I wanted to ask for an opinion.  I want to offset something that is cast from both hands (dual cast).  How do you think I should go about this?  Only CastSpellFromHand seems to have the offset parts below it but that is for a specific hand...  Can I offset CastSpellFromRef somehow?
    1. AndrealphusVIII
      AndrealphusVIII
      • premium
      • 1,242 kudos
      I think there's a misunderstanding here. All the Cast related papyrus functions don't take into consideration the slots that are used by the
      game.
      If you use the vanilla Cast function, the spell projectile will ALWAYS be auto-cast from the head (without any animations btw),
      regardless of it using the ingame BothHands equipment slot.
      With my functions, you can have the spell originate from the specified point, so it no longer gets cast from the head.

      From which point would you like your spell projectile to originate?
    2. mansamsan
      mansamsan
      • member
      • 0 kudos
      I wanted to make it so dual cast gets casted from two places with the head in the middle and maybe a bit behind it (I had some ideas of adding levels to the perk (dual cast) that will increase the places the spell comes out of along with the cost of course but at a later date).  I don't care for animations since I will use the mod on VR.
    3. AndrealphusVIII
      AndrealphusVIII
      • premium
      • 1,242 kudos
      It can only be cast from one spot, unless you make multiple Cast calls. This is a scripted cast function, not an actual ingame spell cast.
      To do what you're describing, you'd need to make a dummy spell that fires on self, and within that spell's effect, you use the Cast functions to fire the actual spell.
      As for the position, I'd recommend using the CastSpellFromHand with Right hand parameter and then play with the X and Y offsets for Right and Right sneaking.

      I hope this helps.
    4. mansamsan
      mansamsan
      • member
      • 0 kudos
      Thank you for the pointers!  They help me a lot.  I feel like I can do it from this point on!  Have a nice day!
  5. pande4360
    pande4360
    • supporter
    • 18 kudos
    So I was wondering if I could get the following effect for a Onhit event:

    Player gets hit by an arrow--> casts a spell from the left or right hand aimed at the aggressor.

    CastSpellFromHand doesnt have a designated Target right? and the other functions dont cast from hand?
    1. AndrealphusVIII
      AndrealphusVIII
      • premium
      • 1,242 kudos
      In that case, I'd recommend using the CastSpellFromPointToPoint() and then use certain values/calculations from CastSpellFromHand() for the origin point and get the X, Y, Z coordinates of the target. Something like this:

      Spoiler:  
      Show


      Function CastSpellFromHandToTarget(Actor akSource, Spell akSpell, Bool IsLeftHand, Actor akTarget, Float Offset_NoSneak_Left_X = 30.0, Float Offset_NoSneak_Left_Y = 30.0, Float Offset_NoSneak_Left_Z = 110.0, Float Offset_NoSneak_Right_X = 30.0, Float Offset_NoSneak_Right_Y = -30.0, Float Offset_NoSneak_Right_Z = 110.0, Float Offset_Sneak_Left_X = 30.0, Float Offset_Sneak_Left_Y = 30.0, Float Offset_Sneak_Left_Z = 70.0, Float Offset_Sneak_Right_X = 30.0, Float Offset_Sneak_Right_Y = -30.0, Float Offset_Sneak_Right_Z = 70.0)global
      {
      - akSource: The caster.
      - akSpell: The spell to cast.
      - IsLeftHand: True if cast from the left hand, false if cast from the right hand.
      - akTarget: The target.
      - Offset_NoSneak_Left_X: Optional, X Offset for left hand when the actor is not sneaking. Default value is 30.0.
      - Offset_NoSneak_Left_Y: Optional, Y Offset for left hand when the actor is not sneaking. Default value is 30.0.
      - Offset_NoSneak_Left_Z: Optional, Z Offset for left hand when the actor is not sneaking. Default value is 110.0.
      - Offset_NoSneak_Right_X: Optional, X Offset for right hand when the actor is not sneaking. Default value is 30.0.
      - Offset_NoSneak_Right_Y: Optional, Y Offset for right hand when the actor is not sneaking. Default value is -30.0.
      - Offset_NoSneak_Right_Z: Optional, Z Offset for right hand when the actor is not sneaking. Default value is 110.0.
      - Offset_Sneak_Left_X: Optional, X Offset for left hand when the actor is sneaking. Default value is 30.0.
      - Offset_Sneak_Left_Y: Optional, Y Offset for left hand when the actor is sneaking. Default value is 30.0.
      - Offset_Sneak_Left_Z: Optional, Z Offset for left hand when the actor is sneaking. Default value is 70.0.
      - Offset_Sneak_Right_X: Optional, X Offset for right hand when the actor is sneaking. Default value is 30.0.
      - Offset_Sneak_Right_Y: Optional, Y Offset for right hand when the actor is sneaking. Default value is -30.0.
      - Offset_Sneak_Right_Z: Optional, Z Offset for right hand when the actor is sneaking. Default value is 70.0.
      }

      Float GameX = akSource.GetAngleX()
      Float GameZ = akSource.GetAngleZ()
      Float AngleX = 90 + GameX
      Float AngleZ

      Float SourceMarkerXOffset_Standard
      Float SourceMarkerYOffset_Standard
      Float SourceMarkerZOffset_Standard

      If GameZ < 90
      AngleZ = 90 - GameZ
      Else
      AngleZ = 450 - GameZ
      EndIf

      If !akSource.IsSneaking()
      If IsLeftHand
      SourceMarkerXOffset_Standard = Offset_NoSneak_Left_X
      SourceMarkerYOffset_Standard = Offset_NoSneak_Left_Y
      SourceMarkerZOffset_Standard = Offset_NoSneak_Left_Z
      Else
      SourceMarkerXOffset_Standard = Offset_NoSneak_Right_X
      SourceMarkerYOffset_Standard = Offset_NoSneak_Right_Y
      SourceMarkerZOffset_Standard = Offset_NoSneak_Right_Z
      EndIf
      Else
      If IsLeftHand
      SourceMarkerXOffset_Standard = Offset_Sneak_Left_X
      SourceMarkerYOffset_Standard = Offset_Sneak_Left_Y
      SourceMarkerZOffset_Standard = Offset_Sneak_Left_Z
      Else
      SourceMarkerXOffset_Standard = Offset_Sneak_Right_X
      SourceMarkerYOffset_Standard = Offset_Sneak_Right_Y
      SourceMarkerZOffset_Standard = Offset_Sneak_Right_Z
      EndIf
      EndIf

      Float SourcePosX = akSource.GetPositionX()
      Float SourcePosY = akSource.GetPositionY()
      Float SourcePosZ = akSource.GetPositionZ()

      Float TargetPosX = akTarget.GetPositionX()
      Float TargetPosY = akTarget.GetPositionY()
      Float TargetPosZ = akTarget.GetPositionZ()

      CastSpellFromPointToPoint(akSource, akSpell, (SourcePosX + (cos(AngleZ)*SourceMarkerXOffset_Standard - sin(AngleZ)*SourceMarkerYOffset_Standard)), (SourcePosY + (cos(AngleZ)*SourceMarkerYOffset_Standard + sin(AngleZ)*SourceMarkerXOffset_Standard)), (SourcePosZ + SourceMarkerZOffset_Standard), TargetPosX, TargetPosY, TargetPosZ)
      EndFunction



      Let me know if it works. If it does, I'll add it to this mod.
    2. pande4360
      pande4360
      • supporter
      • 18 kudos
      Thx, so I tried and noticed that it´s not working in VR at least.Still some issue with the address Library.
  6. jedib1
    jedib1
    • member
    • 1 kudos
    Is CastSpellFromHand() operating correctly after its update? I was using it fine in 1.3, but the script using it doesn't function correctly and cast in 1.4.1. I can pop back and forth between versions and the older update will work while the new one will not.

    Edit:
    Just had to alter the casts/passes on the function call, working fine on 1.4.1 afterwards, oddly enough
    1. AndrealphusVIII
      AndrealphusVIII
      • premium
      • 1,242 kudos
      Yeah, same here.
  7. ferrari365
    ferrari365
    • premium
    • 851 kudos
    Andrealphus doing SKSE plugins, I'm scared... :D

    How difficult do you think it would be to implement a function that checks if you collide with something? I'm thinking about the player getting ragdolled when he sprints into a wall or an NPC getting launched away when you bump into it, those kinds of things.
    1. AndrealphusVIII
      AndrealphusVIII
      • premium
      • 1,242 kudos
      Funny you ask that. I was actually looking into something similar. I don't know if it can be done though.
    2. PhxFuryKnight
      PhxFuryKnight
      • premium
      • 33 kudos
      There is a somehwat ragdoll function that already exists with npcs, where you bump them and they kinda take like 2 steps and almost fall over. Idk if that is vanilla or not
    3. ferrari365
      ferrari365
      • premium
      • 851 kudos
      Yes, vanilla has a feature that causes NPCs to stumble and take a few steps back when you sprint into them. I'm not entirely sure how that works, but I think it's handled by an animation event, not a native function.
  8. deleted172859425
    deleted172859425
    • account closed
    • 1 kudos
    There's no "Bugs" section, so I'll post this here:

    One of the FAQs says:

    "Q: Does this work with AE?
    A: AFAIK, it should. Although I haven't tested it. Same goes for VR."

    However, when I launch the game with this installed:

    "A DLL plugin has failed to load correctly.
    If a new version of SKyrim was just released, the plugin needs to be updated.
    Please check the mod's webpage for updates.

    ANDR_PapyrusFunctions.dll: couldn't load plugin (0000007E).

    Continuing to load may result in lost save data or other undesired behavior."

    I'm on 1.6.640.08 (Steam).
    1. AndrealphusVIII
      AndrealphusVIII
      • premium
      • 1,242 kudos
      I don't know. I have been told that CommonlibSSE NG works on SE, AE and VR. But myself I'm still on SE, so I said, it's untested. I'll ask if anything can be done.

      Edit: I have found the issue and I'm looking into ways to fix it. For now, it only works with SE 1.5.97. I've updated the FAQ in the description to reflect this. Hopefully this can be resolved soon.
    2. deleted172859425
      deleted172859425
      • account closed
      • 1 kudos
      Awesome.
      Looking forward to it.
    3. AndrealphusVIII
      AndrealphusVIII
      • premium
      • 1,242 kudos
      I uploaded a new version which hopefully works with AE. Could you test whether it works for you?
    4. deleted172859425
      deleted172859425
      • account closed
      • 1 kudos
      Unfortunately, the same error message is still present after installing the latest version and launching the game.

      Anyways, a while ago, Actor Value Generator game me the same issue, in which the mod author fixed it by re-uploading the file without its debug version.
    5. AndrealphusVIII
      AndrealphusVIII
      • premium
      • 1,242 kudos
      You mean the .pdb file? If you remove it, do you still get the message?
    6. deleted172859425
      deleted172859425
      • account closed
      • 1 kudos
      I removed the .PDB file, and still, same issue.
    7. AndrealphusVIII
      AndrealphusVIII
      • premium
      • 1,242 kudos
      I changed debug to release, rebuild and uploaded the file. Does this one work for you?
    8. deleted172859425
      deleted172859425
      • account closed
      • 1 kudos
      The error message no longer shows, but ANDR_PapyrusFunctions.log is empty.
    9. AndrealphusVIII
      AndrealphusVIII
      • premium
      • 1,242 kudos
      Yes, it will only show messages when you call certain functions for debug reasons.
    10. deleted172859425
      deleted172859425
      • account closed
      • 1 kudos
      Then, everything's fine now.
      Thank you very much.
  9. DylanJames
    DylanJames
    • premium
    • 894 kudos
    An SKSE Developer Andrealphus sounds dangerous. I'm ready.
    1. AndrealphusVIII
      AndrealphusVIII
      • premium
      • 1,242 kudos
      We'll see what the future brings, I guess.
  10. MissileMann
    MissileMann
    • premium
    • 298 kudos
    He's becoming to powerful!
    Nice work!
    1. AndrealphusVIII
      AndrealphusVIII
      • premium
      • 1,242 kudos


      Cheers, mate.