Jump to content

dylbill

Premium Member
  • Posts

    1500
  • Joined

  • Last visited

Everything posted by dylbill

  1. Math.Floor will work, or you can do String msg4 = (PlayerRef.GetValue(CarryWeightAV) As Int) You don't need to put As String as papyrus does this automatically. Putting As Int though is the same as Math.Floor
  2. Try this link too, maybe it works https://github.com/blu3mania/npp-papyrus Not sure why the other one didn't
  3. I personally use this for scripting: https://www.nexusmods.com/skyrimspecialedition/mods/43691/ although have used Papyrus Plus Plus as well.
  4. The one on Nexus is out of date. The current one is on github: https://github.com/blu3mania/npp-papyrus It includes paths for Skyrim LE, SE and Fallout 4
  5. You should only need to include scripts that you directly altered in your mod. The scripts you altered may reference other scripts, which is why you're seeing them updated when compiling, but you shouldn't include those scripts in your mod if you didn't directly alter them.
  6. Yep, also remember to update the actor after changing speed. You can by adding and removing an item from their inventory.
  7. You can use a script to set speedmult actor value to 0.1 which will prevent moving, but they'll still be able to attack.
  8. Skyrim's way of doing it is version control. Basically you have a master esm file that esp's are merged to periodically. Here's a tutorial on version control:
  9. I tested this out actually, and it doesn't conflict. I used this method in a recent mod of mine to detect when the player opens a container. I made another esp with another perk that had basically the same entry and put debug notifications in both fragments. With both esps active, I got notifications from both perk entries when activating a container.
  10. Hello, thought I'd give my take. As an alternative, you can use a perk with a perk fragment script. Add it to the player With PlayerRef.AddPerk(MyPerk). In your perk, make a new perk entry. Set it to Entry Point, Activate, Add Activate Choice and check the Run Immedately box. Add a keyword to Target, HasKeyword CraftingSmithingForge == 1 Then, in your perk fragment you can do: Debug.Notification(akTargetRef.GetDisplayName() + " Was Activated") The perk entry will run whenever the player activates an object reference with the CraftingSmithingForge keyword.
  11. To add perks, you have to do so in the actual Actor record, not the race record. It's under SpellList.
  12. I would change the functions that are events to events. All events that I know of start with On. Example: Change Functon OnInit() ;code here stays the same EndFunction To Event OnOnit() ;code here stays the same EndEvent
  13. For the floats, you have to put a period to initialize. So change to 1.0 and 64.0 Edit: and this is because 1 or 64 is viewed by papyrus as an int, so you're trying to initialize float properties to ints and papyrus doesn't like that.
  14. To be able to craft anything, you need to create a new Constructible Object form in the Creation Kit. Not sure about the depleting part.
  15. @Maxaturo, I was thinking to set stagger for all weapons onInit or on load game if the changes don't persist based on settings and conditions. I do something similar with my mod Customize Weapon Speed.
  16. Cool cool. Another thing to consider, weapons have their own stagger attribute. With script there is getStagger and setStagger functions (require skse) to affect weapons directly. https://www.creationkit.com/index.php?title=GetStagger_-_Weapon https://www.creationkit.com/index.php?title=SetStagger_-_Weapon
  17. So you want an effect to apply when the actor attacks with any weapon in the right hand? If so, then yes you will need a script. You can use animation events. You can make an ability spell and put a script on the magic effect, something like this: Actor Target Event OnEffectStart(Actor akTarget, Actor akCaster) Target = akTarget If Target.GetEquippedWeapon() RegisterForAnimationEvent(Target, "weaponSwing") ;weaponSwing fires when attacking with right hand. weaponLeftSwing for left. Endif EndEvent Event OnObjectEquipped(Form akBaseObject, ObjectReference akReference) If Target.GetEquippedWeapon() ;target has weapon in right hand RegisterForAnimationEvent(Target, "weaponSwing") Endif EndEvent Event OnObjectUnequipped(Form akBaseObject, ObjectReference akReference) If !Target.GetEquippedWeapon() ;target does not have weapon in right hand UnRegisterForAnimationEvent(Target, "weaponSwing") Endif EndEvent Event OnAnimationEvent(ObjectReference akSource, String asEventName) ;do something EndEventHere's a list of animation events for reference. https://www.creationkit.com/index.php?title=Animation_Events
  18. If you want an effect to apply when only attacking with a weapon, I suggest to use an enchantment on the weapon itself
  19. You can use the GetEquipped condition. According to the Wiki, this condition only works for armor or weapons in the right hand. https://www.creationkit.com/index.php?title=GetEquipped
  20. Hey I just took another look, the indents were confusing me. The script as you have it, indented correctly should look like this: Actor Property PlayerRef Auto GlobalVariable Property _RightWeaponMass Auto Float RightWeaponMass = 0.00 Event OnObjectUnequipped(Form akBaseObject, ObjectReference akReference) if akBaseObject as Weapon Utility.Wait(0.5) Debug.Notification("This actor just unequipped a weapon!") Weapon MyRightWeapon = PlayerRef.GetEquippedWeapon() as Weapon Float WeaponWeight = MyRightWeapon.GetWeight() as Float RightWeaponMass = WeaponWeight Else RightWeaponMass = 0 _RightWeaponMass.SetValue((RightWeaponMass) * 1) EndIf EndEvent Event OnObjectEquipped(Form akBaseObject, ObjectReference akReference) if akBaseObject as Weapon Utility.Wait(0.5) Debug.Notification("This actor just equipped a weapon!") Weapon MyRightWeapon = PlayerRef.GetEquippedWeapon() As Weapon Float WeaponWeight = MyRightWeapon.GetWeight() as Float RightWeaponMass = WeaponWeight Else RightWeaponMass = 0 _RightWeaponMass.SetValue((RightWeaponMass) * 1) EndIf EndEventAnd you can see, you're only setting the global variable value if the equipped item is not a weapon. Change to something like this: Actor Property PlayerRef Auto GlobalVariable Property _RightWeaponMass Auto Float RightWeaponMass = 0.00 Event OnObjectUnequipped(Form akBaseObject, ObjectReference akReference) if akBaseObject as Weapon Utility.waitMenuMode(0.5) ;use waitMenuMode instead. Wait will pause this script until a menu is closed. Debug.Notification("This actor just unequipped a weapon!") Weapon MyRightWeapon = PlayerRef.GetEquippedWeapon() as Weapon Float WeaponWeight = MyRightWeapon.GetWeight() as Float RightWeaponMass = WeaponWeight _RightWeaponMass.SetValue(RightWeaponMass) Debug.Notification("_RightWeaponMass = " + _RightWeaponMass.GetValue()) EndIf EndEvent Event OnObjectEquipped(Form akBaseObject, ObjectReference akReference) if akBaseObject as Weapon Utility.waitMenuMode(0.5) ;use waitMenuMode instead. Wait will pause this script until a menu is closed. Debug.Notification("This actor just unequipped a weapon!") Weapon MyRightWeapon = PlayerRef.GetEquippedWeapon() as Weapon Float WeaponWeight = MyRightWeapon.GetWeight() as Float RightWeaponMass = WeaponWeight _RightWeaponMass.SetValue(RightWeaponMass) Debug.Notification("_RightWeaponMass = " + _RightWeaponMass.GetValue()) EndIf EndEvent Also, is there a reason you're storing the weapon weight to the local float variable RightWeaponMass and to the global variable?
  21. The script looks fine. Did you fill properties when attaching the script in the creation kit? You can also put some debug notifications to tell you the weight. Debug.Notification("RightWeaponMass = " + RightWeaponMass + " Global Value = " + _RightWeaponMass.GetValue())
  22. Hey Maxaturo, with the script I posted, whenever you press a button, it calls the SetBanners function on the main script, so should work as is without needing timers.
×
×
  • Create New...