From 2e301600565c6fe763a49835c509a2fdcb0c8c7a Mon Sep 17 00:00:00 2001 From: Eddoursul Date: Wed, 6 Oct 2021 02:44:56 +0200 Subject: [PATCH] Removed redundant SKSE overriding scripts --- scripts/objectreference.pex | Bin 16543 -> 0 bytes scripts/potion.pex | Bin 1419 -> 0 bytes scripts/source/objectreference.psc | 839 ----------------------------- scripts/source/potion.psc | 56 -- 4 files changed, 895 deletions(-) delete mode 100644 scripts/objectreference.pex delete mode 100644 scripts/potion.pex delete mode 100644 scripts/source/objectreference.psc delete mode 100644 scripts/source/potion.psc diff --git a/scripts/objectreference.pex b/scripts/objectreference.pex deleted file mode 100644 index e6f918c97e451644db93b298402bff826712e130..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 16543 zcmb7L2bdhiv97utbU`_Q#S#?2LP)0olCj}*K{_Pe9lApaFrM3;yBltAX4&17beQOD zaKHg)6OC~qI)MqsHqJKK2r%Frcz%912K=6JHt(XBx&6Dky1Ki%x~jSt z{=VzJpH){86F%p(UvVeR9vC^-PZxLiqki5G)Beg_Ax$;i!K6p^XAJf1IDW8;pQN@5 zF0|&|#CwSMQtS4p7)0SY-P55r8Kh~hD-Y$yA+j$l`uSqu(JV*a6dj0Z?T)t9pB~M7 zlYWL~I7)AD0Ht}ZG&~-Jhica~?&ZBSI-rKlesQSi6@6;l92FxAn;(h+B zLcj0j2eaNZ*iq^W%`k!}PZ-8Ne>mzJJtNFUUIrawutM22?uRk0wcF47MPF#0BC)kI zlfl6IM*DqV+B9^gi@`n_!qKSd_H%xi@xx+g2wfKaOr-|rgQ+jv2aYH|-6P+Gi zmWi?$;;ty4&Cp?nzQdoyTDYp-d^Bk*Td?4meUu;AA7VC*QVhqk{_X_sN#I^uU>Ia6 zFx8!2K9HepilQvdKU58DgBBjDq8AoYBJlrUIj#imY;k$N{_u3pH|)ED3}!1m8cQ0=dC++)ibH;O zw6kE0irTk$g`Uw-Yy@a&f0WNqJt+NA#-}C#XvoN$)i)MKd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>`Pua(I diff --git a/scripts/potion.pex b/scripts/potion.pex deleted file mode 100644 index 782c6aaba7a141a3820b0d1a015cb2e4ebe43e8d..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1419 zcmZ`&*>2N76g^Jj>}k@CLfOJvwwA&hd81289;hm!!UICc*pp^ZGE;fR6!-@uBz}ko zeu5W1geUIUp43T;rP$}5yPV_e$=^3W|KxLUK-c@$_g|#sx9v^-PfLGsO(8CQ`l24q|$uEQ0%F$lmW^;bs)Kt0uAcekH))$0rR!O zvI+Gt3150gg6k+?Xl3c=A@i`5Wp<*_Gxo5OWvQL}$)q^3O(sU1DV=aV5wOo#?w>E1 zr4zv{GZCzj;GtrD8HoUk6wEkRn46GhjKabswnG$}#AVzn)VHZtvvjXDUy6X67xYFb z4tWqTfkIb?W0Y9BxJIV`?K@P*c6SP;?nru?NY{%UxIJN_N|0_%q2h(1_odIjGUO=< zm&dy)>`TG$tQ!g6h`067(`|LawLfHvBCguCWe7K318SK?rRV$G4=mB)b&xaX-GICW1q)mYiWZbC zC|gjmplU(Qg1Q9_3+60nTF|m!-hu@S7A-J7>2k1a9ywfauwp{P{l>)vP3{i8mnn?% zdAPWQRb0juT*Wn9r(YX4Oe-q%jEl^F{$@(fQ(;QRMW~)vmB%gIPVx@!;4ZbS5tUzY zaL>VgisEH996X>ru@5sW3V1ZFu|y81MCWK&O5|c|>#4mQX>BCJ=I*SL0*bTqN~fNa r+68*;DS;LqPZQ1mDb{CaEzZtroNe8VWovk1MNSv&&YCS_^Gwx0piT#o diff --git a/scripts/source/objectreference.psc b/scripts/source/objectreference.psc deleted file mode 100644 index 466fa466..00000000 --- a/scripts/source/objectreference.psc +++ /dev/null @@ -1,839 +0,0 @@ -Scriptname ObjectReference extends Form Hidden - -bool FUNCTION rampRumble(float power = 0.5, float duration = 0.25, float falloff = 1600.0) - ; Function to shake cam/controller based on distance from player - ; should always be called on the source of the rumble, - ; as final intensity is relevant to player - if power > 1.0 || power <= 0 -; debug.traceStack(self + " called rampRumble() but parameter 'power' was invalid. Must be a non-zero float less than 1.0",1) - ; throw the warning, but don't return false - value gets clamped anyway - endif - float playerDist = game.getplayer().getDistance(self) - ; ignore if the player is too far away - if playerDist < falloff - float intensity = (1 - (playerDist / falloff)) - ; ramp actual intensity down based on parameter value - intensity = intensity*power - if intensity > 1.0 - ; clamp to prevent invalid values -; debug.traceStack(self + " called for too much controller/camera shake. Clamped to 1.0", 0) - intensity = 1.0 - elseif intensity <= 0 - ; clamp to prevent invalid values -; debug.traceStack(self + " called for too little controller/camera shake", 0) - intensity = 0 - return false - endif - game.shakeCamera(game.getPlayer(), intensity) - game.shakeController(intensity, intensity, duration) - return true - else -; debug.traceStack(self + "called for rampedRumble(), but player is too far away", 0) - return False - endif -endFUNCTION - -; Function to know if I'm near the player (whether I can be safely enabled or disabled) -bool Function IsNearPlayer() - Actor player = Game.GetPlayer() - Cell targetCell = self.GetParentCell() - Cell playerCell = player.GetParentCell() - - if (targetCell != playerCell) - ; player and target are in different cells - if (targetCell && targetCell.IsInterior() || playerCell && playerCell.IsInterior()) - ; in different cells and at least one is an interior - ; -- we can safely enable or disable - return false - else - ; both in an exterior -- no means of testing - ; worldspace at the moment, so this will do. - if (player.GetDistance(self) > 3000) - ; pretty darned far away -- safe - return false - else - ; too close for comfort - return true - endif - endif - else - ; in the same cell -- err on the side of caution - return true - endif -endFunction - -;jduvall -bool Function IsInInterior() -{Returns !IsInExterior()} - Cell parentCell = GetParentCell() - Return parentCell && parentCell.IsInterior() -EndFunction - -;kkuhlmann: -bool function MoveToIfUnloaded(ObjectReference akTarget, float afXOffset = 0.0, float afYOffset = 0.0, float afZOffset = 0.0) -{Calls MoveTo if the calling ObjectReference is currently unloaded. Doesn't do anything if it IS loaded. No waiting or while loops. Returns true if it does the moveto} - if !Is3DLoaded() - MoveTo(akTarget, afXOffset, afYOffset, afZOffset) - return true - else - return false - endif -endFunction - -;jduvall: -function MoveToWhenUnloaded(ObjectReference akTarget, float afXOffset = 0.0, float afYOffset = 0.0, float afZOffset = 0.0) -{DEPRECATED: DO NOT USE. Calls MoveTo if both the calling ObjectReference and the akTarget ObjectReference have current locations that are not loaded.} - while self.GetCurrentLocation().IsLoaded() || akTarget.GetCurrentLocation().IsLoaded() - ;do nothing -; debug.trace(self + "MoveToWhenUnloaded() waiting for current location and target location to be unloaded before moving. If called by a quest stage fragment, this may cause that quest stage to not complete until this function finishes (and if it's a startup stage, the quest will not report itself as running until the stage finishes.).", 1) - Utility.Wait(5) ;when this function is threaded we can increase this wait time... I set it lower for testing purposes so it reevaluates faster when I need to purge cell buffers in the Civil War when calling moveto on the player between Civil War campaigns - EndWhile - self.MoveTo(akTarget, afXOffset, afYOffset, afZOffset) -EndFunction - -;jduvall -Function DeleteWhenAble() -{This will become a native function... it will wait until the object is not persisting, then delete itself.} - While GetParentCell() && GetParentCell().IsAttached() - ;do nothing -; debug.trace(self + "DeleteWhenAble() waiting for current location to be unloaded before deleting. If called by a quest stage fragment, this may cause that quest stage to not complete until this function finishes (and if it's a startup stage, the quest will not report itself as running until the stage finishes.).", 1) - Utility.Wait(5) ;when this function is threaded we can increase this wait time... I set it lower for testing purposes so it reevaluates faster when I need to purge cell buffers in the Civil War when calling moveto on the player between Civil War campaigns - EndWhile - Delete() -EndFunction - - - -;jduvall -Function AddKeyIfNeeded(ObjectReference ObjectWithNeededKey) -{Should only be called by ObjectReferences that have/are containers (ie Containers and Actors). Checks to see if self has the key to ObjectWithNeededKey, and if not, creates a copy of the key and puts it in self.} - key NeededKey = ObjectWithNeededKey.GetKey() - if NeededKey != None - if GetItemCount(NeededKey) == 0 - AddItem(NeededKey) - EndIf - EndIf -EndFunction - - -; Property to obtain the current X position of the object -float Property X - float Function get() - return GetPositionX() - EndFunction -EndProperty - -; Property to obtain the current Y position of the object -float Property Y - float Function get() - return GetPositionY() - EndFunction -EndProperty - -; Property to obtain the current Z position of the object -float Property Z - float Function get() - return GetPositionZ() - EndFunction -EndProperty - -; Have akActivator activate this reference. If abDefaultProcessingOnly is true then any block will be bypassed -; and no OnActivate event will be sent. The function returns true if default processing ran, and succeeded. If -; default processing has been blocked, will always return false. -bool Function Activate(ObjectReference akActivator, bool abDefaultProcessingOnly = false) native - -; Sets up a dependent animated object -; This function should be used only with a coder supervision. It is left undocumented because it can cause dangling pointers as well as very broken functionality -; for the dependent object if used improperly. -bool Function AddDependentAnimatedObjectReference( ObjectReference akDependent ) native - -; Add an inventory event filter to this reference. Item added/removed events matching the -; specified form (or in the specified form list) will now be let through. -Function AddInventoryEventFilter(Form akFilter) native - -; Adds the specified base object or object reference to this object reference's container/inventory -; Note that you cannot add more then one copy of a reference to a container (a warning will be printed if you try) -Function AddItem(Form akItemToAdd, int aiCount = 1, bool abSilent = false) native - -; Adds this reference (which is a map marker) to the map, optionally making it available for fast travel -Function AddToMap(bool abAllowFastTravel = false) native - -; Apply an impulse to this reference -Function ApplyHavokImpulse(float afX, float afY, float afZ, float afMagnitude) native - -; Turns on and off blocking of normal activation - OnActivate events will still be sent -Function BlockActivation(bool abBlocked = true) native - -; Calculate's this references encounter level based on the requested difficulty level -; 0 - Easy -; 1 - Medium -; 2 - Hard -; 3 - Very Hard -; 4 - None -int Function CalculateEncounterLevel(int aiDifficulty = 4) native - -; Can the map marker be fast traveled to? -bool Function CanFastTravelToMarker() native - -; Clears all effects of destruction from this object -Function ClearDestruction() native - -; Create a detection event at this reference, with the specified owner. Sound level is between 0 and 100 - -Function CreateDetectionEvent(Actor akOwner, int aiSoundLevel = 0 ) native - -; Damages this object and advances the destruction stage - does not return until the object is damaged -Function DamageObject(float afDamage) native - -; Delets this object -Function Delete() native - -; Disables this object - fading out if requested -Function Disable(bool abFadeOut = false) native - -; Disables this object - fading out if requested. Does NOT wait for the fade or disable to finish -Function DisableNoWait(bool abFadeOut = false) native - -; Drops the specified object from this object's inventory -ObjectReference Function DropObject(Form akObject, int aiCount = 1) native - -; Enables this object - fading in if requested -Function Enable(bool abFadeIn = false) native - -; Enables the ability to fast travel to this marker - or disables it. Note that if you disable -; fast travel the player will see "You haven't discovered this location" as an error message -Function EnableFastTravel(bool abEnable = true) native - -; Enables this object - fading in if requested. Does NOT wait for the fade or enable to finish -Function EnableNoWait(bool abFadeIn = false) native - -; Forcibly adds / removes the ragdoll for a reference to the world -Function ForceAddRagdollToWorld() native -Function ForceRemoveRagdollFromWorld() native - -; Gets the actor that owns this object (or None if not owned by an Actor) -ActorBase Function GetActorOwner() native - -; Get the current X angle of this object -float Function GetAngleX() native - -; Get the current Y angle of this object -float Function GetAngleY() native - -; Get the current Z angle of this object -float Function GetAngleZ() native - -; Get a variable from the reference's animation graph (if applicable). Bool version. -bool Function GetAnimationVariableBool(string arVariableName) native - -; Get a variable from the reference's animation graph (if applicable). Int version. -int Function GetAnimationVariableInt(string arVariableName) native - -; Get a variable from the reference's animation graph (if applicable). Float version. -float Function GetAnimationVariableFloat(string arVariableName) native - -; Returns the base object this reference represents -Form Function GetBaseObject() native - -; Returns the object's current destruction stage -int Function GetCurrentDestructionStage() native - -; Returns this reference's current location -Location Function GetCurrentLocation() native - -; Returns the scene this reference is currently in - if any -Scene Function GetCurrentScene() native - -; Calculates the distance between this reference and another - both must either be in the same interior, or same worldspace -float Function GetDistance(ObjectReference akOther) native - -; Returns this reference's editor location -Location Function GetEditorLocation() native - -; Gets the faction that owns this object (or None if not owned by a Faction) -Faction Function GetFactionOwner() native - -; Gets the angle between this object's heading and the other object in degrees - in the range from -180 to 180 -float Function GetHeadingAngle(ObjectReference akOther) native - -; Get the current height of the object -float Function GetHeight() native - -; Returns how many of the specified item is in this object reference's inventory -int Function GetItemCount(Form akItem) native - -; Returns the smithed health of this object reference (1.0 == 100%) -float Function GetItemHealthPercent() native - -; Returns the key base object that will unlock this object -Key Function GetKey() native - -; Get the current length of the object -float Function GetLength() native - -; Get our linked reference -ObjectReference Function GetLinkedRef(Keyword apKeyword = NONE) native - -; Get the level of the lock on this object -int Function GetLockLevel() native - -;jtucker, jduvall -;This function counts the number of linked refs that are in a linked Ref chain (ie object is linked to A, A is linked to B, etc. this then counts all the linked refs.) -;Often used in conjunction with GetNthLinkedRef() -;*** WARNING: Having a link ref chain that at any point loops back on itself and calling this function will result in very bad things. Don't do that!*** -int Function countLinkedRefChain(keyword apKeyword = None, int maxExpectedLinkedRefs = 100) - ;Don't use this on a loop of linked refs. - ObjectReference CurrentLink = self - ObjectReference NewLink - int NumLinkedRefs = 0 - - while(currentLink) && NumLinkedRefs <= maxExpectedLinkedRefs - - NewLink = currentLink.getLinkedRef(apKeyword) - - if NewLink != self - currentLink = NewLink - NumLinkedRefs = NumLinkedRefs + 1 - Else - currentLink = None -; debug.trace( self + "countLinkedRefs() found itself. This suggests it was linked back to itself. This will create an infinite loop, so we are killing the function now. NumLinkedRefs =" + NumLinkedRefs) - EndIf - - endWhile - - if NumLinkedRefs >= maxExpectedLinkedRefs -; debug.trace( self + "countLinkedRefs() bailing out early because it found more linked refs than maxExpectedLinkRefs (suggesting an infinite loop). LinkedRefs found:" + NumLinkedRefs + ", maxExpectedLinkedRefs:" + maxExpectedLinkedRefs) - EndIf - - - return NumLinkedRefs - -endFunction - - -; Returns the Nth linked ref from this reference (0 = self, 1 = GetLinkedRef, 2 = GetLinkedRef.GetLinkedRef, etc) -ObjectReference Function GetNthLinkedRef(int aiLinkedRef) native - - -; Enables all of the references that are linked, in a chain, to this one. -Function EnableLinkChain(Keyword apKeyword = None) - ObjectReference CurrentLink = GetLinkedRef(apKeyword) - While CurrentLink - CurrentLink.Enable() - CurrentLink = CurrentLink.GetLinkedRef(apKeyword) - endWhile -endFunction - - -; Disables all of the references that are linked, in a chain, to this one. -Function DisableLinkChain(Keyword apKeyword = None, bool abFadeOut = false) - ObjectReference CurrentLink = GetLinkedRef(apKeyword) - While CurrentLink - CurrentLink.Disable(abFadeOut) - CurrentLink = CurrentLink.GetLinkedRef(apKeyword) - endWhile -endFunction - - -; Get this object's mass -float Function GetMass() native - -; Gets the open state of this object. Which can be one of the following: -; 0 - None -; 1 - Open -; 2 - Opening -; 3 - Closed -; 4 - Closing -int Function GetOpenState() native - -; Gets the cell this object is in -Cell Function GetParentCell() native - -; Get the current X position of the object -float Function GetPositionX() native - -; Get the current Y position of the object -float Function GetPositionY() native - -; Get the current Z position of the object -float Function GetPositionZ() native - -; Get the current scale of the object -float Function GetScale() native - -; Get the number of objects inside this trigger (throws warning if not a triggger) -int Function GetTriggerObjectCount() native - -; Gets the voice type for this reference. Will return None if not an actor or a talking activator -VoiceType Function GetVoiceType() native - -; Get the current width of the object -float Function GetWidth() native - -; Get this objects worldspace -WorldSpace Function GetWorldSpace() native - -; Returns self cast as an actor -actor Function GetSelfAsActor() - return self as Actor -endFunction - -; Returns if this reference has an active effect coming from a magic effect with the specified keyword attached -bool Function HasEffectKeyword(Keyword akKeyword) native - -; Returns whether the reference has the given node -bool Function HasNode(string asNodeName) native - -; Returns if this reference has the specified location ref type -bool Function HasRefType(LocationRefType akRefType) native - -; Flags this reference as ignoring (or not ignoring) friendly hits -Function IgnoreFriendlyHits(bool abIgnore = true) native - -; Interrupts any spell-casting this object may be doing -Function InterruptCast() native - -; Checks to see if the passed in reference is the activate child of this one -bool Function IsActivateChild(ObjectReference akChild) native - -; Checks to see if activation is currently blocked on this object -bool Function IsActivationBlocked() native - -; Returns if the 3d for this object is loaded or not -bool Function Is3DLoaded() native - -; Is this object currently flagged for delete? -bool Function IsDeleted() native - -; Is this object currently disabled? -bool Function IsDisabled() native - -; Because Shane got tired of remembering which way to call this -bool Function IsEnabled() - return !IsDisabled() -EndFunction - -; Is any marker on this furniture in use? -bool Function IsFurnitureInUse(bool abIgnoreReserved = false) native - -; Is a particular marker on this furniture in use? -bool Function IsFurnitureMarkerInUse(int aiMarker, bool abIgnoreReserved = false) native - -; Is this object ignoring friendly hits? -bool Function IsIgnoringFriendlyHits() native - -; Is this actor or talking activator currently talking to the player? -bool Function IsInDialogueWithPlayer() native - -; Is the lock on this object broken? -bool Function IsLockBroken() native - -; Is the lock on this object locked? -bool Function IsLocked() native - -; Is the map marker visible? -bool Function IsMapMarkerVisible() native - -; Executes a knock effect to an area -Function KnockAreaEffect(float afMagnitude, float afRadius) native - -; Lock/unlock this object. If told to lock it, it will add a lock if it doesn't have one. If locked/unlocked as the owner on a door, -; the adjoining cell will be made public/private as appropriate -Function Lock(bool abLock = true, bool abAsOwner = false) native - -; Moves this object to the position of the specified object, with an offset, and optionally matching its rotation -Function MoveTo(ObjectReference akTarget, float afXOffset = 0.0, float afYOffset = 0.0, float afZOffset = 0.0, bool abMatchRotation = true) native - -; Moves this object to the position (and rotation) of the specified object's interaction position -Function MoveToInteractionLocation(ObjectReference akTarget) native - -; Moves this object to its editor location -Function MoveToMyEditorLocation() native - -; Moves this object to the position (and rotation) of the specified node on the specified object's 3D -Function MoveToNode(ObjectReference akTarget, string asNodeName) native - -; Create x copies of the passed in form (forcing them to persist if desired) and place them at our location, returning the last object created -ObjectReference Function PlaceAtMe(Form akFormToPlace, int aiCount = 1, bool abForcePersist = false, bool abInitiallyDisabled = false) native - -; Create an actor at this object's location. Level mod is one of the following: -; 0 - Easy -; 1 - Medium -; 2 - Hard -; 3 - Boss -; 4 - None -Actor Function PlaceActorAtMe(ActorBase akActorToPlace, int aiLevelMod = 4, EncounterZone akZone = None) native - -; Start the specified animation playing - returns true if it succeeds -bool Function PlayAnimation(string asAnimation) native - -; Start the specified animation playing and wait for the specified event - returns true if succeeds -bool Function PlayAnimationAndWait(string asAnimation, string asEventName) native - -; Start the specified Gamebryo animation playing - returns true if it succeeds -bool Function PlayGamebryoAnimation(string asAnimation, bool abStartOver = false, float afEaseInTime = 0.0) native - -; Play the specified impact effect - returns true if it succeeds -bool Function PlayImpactEffect(ImpactDataSet akImpactEffect, string asNodeName = "", float afPickDirX = 0.0, float afPickDirY = 0.0, float afPickDirZ = -1.0, float afPickLength = 512.0, bool abApplyNodeRotation = false, bool abUseNodeLocalRotation = false) native - -; Play two animations at once - one on this object, one on another object -bool Function PlaySyncedAnimationSS(string asAnimation1, ObjectReference akObj2, string asAnimation2) native - -; Play two animations at once - one on this object, one on another object - and wait for both -bool Function PlaySyncedAnimationAndWaitSS(string asAnimation1, string asEvent1, ObjectReference akObj2, string asAnimation2, string asEvent2) native - -; Play a terrain effect that is attached to the specified bone of this object. -Function PlayTerrainEffect(string asEffectModelName, string asAttachBoneName) native - -; Tells this object to process a trap hitting it -Function ProcessTrapHit(ObjectReference akTrap, float afDamage, float afPushback, float afXVel, float afYVel, float afZVel, float afXPos, float afYPos, float afZPos, int aeMaterial, float afStagger) native - -; Pushes the passed-in actor away from this object, using the passed in knockback force to determine the speed -Function PushActorAway(Actor akActorToPush, float aiKnockbackForce) native - -; Remove all inventory event filters from this reference - all item added/removed events will now be received -Function RemoveAllInventoryEventFilters() native - -; Removes all items from this container, transferring it to the other object if passed -Function RemoveAllItems(ObjectReference akTransferTo = None, bool abKeepOwnership = false, bool abRemoveQuestItems = false) native - -; Remove an inventory event filter from this reference. Item added/removed events matching the -; specified form (or in the specified form list) will no longer be let through. -Function RemoveInventoryEventFilter(Form akFilter) native - -; Removes the specified item from this object reference's inventory -Function RemoveItem(Form akItemToRemove, int aiCount = 1, bool abSilent = false, ObjectReference akOtherContainer = None) native - -; Removes a previously added dependent object -; This function should be used only with a coder supervision. It is left undocumented because it can cause dangling pointers as well as very broken functionality -; for the dependent object if used improperly. -bool Function RemoveDependentAnimatedObjectReference( ObjectReference akDependent ) native - -; Resets this object, optional place the object at the new target -Function Reset(ObjectReference akTarget = None) native - -; Has this object "say" the specified topic, as if spoken by the specified actor (if one is -; provided, and potentially "speaking" in the player's head. -Function Say(Topic akTopicToSay, Actor akActorToSpeakAs = None, bool abSpeakInPlayersHead = false) native - -; Has this object behave as if the specified actor attempted to steal it -Function SendStealAlarm(Actor akThief) native - -; Sets this object's actor cause to the specified actor -Function SetActorCause(Actor akActor) native - -; Sets this object's owner to the specified actor base - None means to remove ownership -Function SetActorOwner(ActorBase akActorBase) native - -; Set the orientation of the object (angles are in degrees) -Function SetAngle(float afXAngle, float afYAngle, float afZAngle) native - -; Set a variable on the reference's animation graph (if applicable). Bool version. -Function SetAnimationVariableBool(string arVariableName, bool abNewValue) native - -; Set a variable on the reference's animation graph (if applicable). Int version. -Function SetAnimationVariableInt(string arVariableName, int aiNewValue) native - -; Set a variable on the reference's animation graph (if applicable). Float version. -Function SetAnimationVariableFloat(string arVariableName, float afNewValue) native - -; Sets this object as destroyed or not -Function SetDestroyed(bool abDestroyed = true) native - -; Sets this object's owner to the specified faction -Function SetFactionOwner(Faction akFaction) native - -; Sets the lock level on this object. Will add an unlocked lock to it if it doesn't have one -Function SetLockLevel(int aiLockLevel) native - -; Sets the motion type of the reference -; aeMotionType: The type of motion (see properties at end of file) -; abAllowActivate: When setting to a dynamic type, allows the simulation to be activated -Function SetMotionType(int aeMotionType, bool abAllowActivate = true) native - -; Sets this object reference as one that teammates will refuse to do favors on -Function SetNoFavorAllowed(bool abNoFavor = true) native - -; Opens/closes this object -Function SetOpen(bool abOpen = true) native - -; Set the position of the object -Function SetPosition(float afX, float afY, float afZ) native - -; Set the current scale of the object -Function SetScale(float afScale) native - -; Makes the reference translate to the given position/orientation -; Note: Rotation speed is entirely dependent on the length of the path and the movement speed -; that is, the rotation will happen such that the reference reaches the goal orientation at the end -; of the translation. -Function TranslateTo(float afX, float afY, float afZ, float afXAngle, float afYAngle, float afZAngle, float afSpeed, float afMaxRotationSpeed = 0.0) native - -; Makes the reference translate to the given position/orientation on a spline -Function SplineTranslateTo(float afX, float afY, float afZ, float afXAngle, float afYAngle, float afZAngle, float afTangentMagnitude, float afSpeed, float afMaxRotationSpeed = 0.0) native - -; Makes the reference translate to the target node's ref/orient on a spline at the given speed -Function SplineTranslateToRefNode(ObjectReference arTarget, string arNodeName, float afTangentMagnitude, float afSpeed, float afMaxRotationSpeed = 0.0) native - -; Stops the reference from moving -Function StopTranslation() native - -; Makes the reference translate to the target ref position/orient at the given speed -Function TranslateToRef(ObjectReference arTarget, float afSpeed, float afMaxRotationSpeed = 0.0) - TranslateTo(arTarget.X, arTarget.Y, arTarget.Z, arTarget.GetAngleX(), arTarget.GetAngleY(), arTarget.GetAngleZ(), afSpeed, afMaxRotationSpeed) -endFunction - -; Makes the reference translate to the target ref position/orient on a spline at the given speed -Function SplineTranslateToRef(ObjectReference arTarget, float afTangentMagnitude, float afSpeed, float afMaxRotationSpeed = 0.0) - SplineTranslateTo(arTarget.X, arTarget.Y, arTarget.Z, arTarget.GetAngleX(), arTarget.GetAngleY(), arTarget.GetAngleZ(), afTangentMagnitude, afSpeed, afMaxRotationSpeed) -endFunction - -; Tether a prisoner cart to the given horse. -Function TetherToHorse(ObjectReference akHorse) native - -; Waits for the animation graph to send the specified event -bool Function WaitForAnimationEvent(string asEventName) native - -; Convenience function to check if I'm in a location or any of its children -bool Function IsInLocation(Location akLocation) - ; cache current location to avoid changing location while this function is running (surprisingly that seems to be happening occasionally) - Location currLoc = GetCurrentLocation() - if currLoc == None - return false - else - return akLocation.IsChild(currLoc) || currLoc == akLocation - endif -endFunction - -; Enderal - Forgotten Stories additional functions -float function calculateContentStrength() native - -ObjectReference function getClosestRefWithKeywordInCell(Keyword data) native - -; Event received when this reference is activated -Event OnActivate(ObjectReference akActionRef) -EndEvent - -; Event received when this object has moved to an attached cell from a detached one -Event OnAttachedToCell() -EndEvent - -; Event received when this object's parent cell is attached -Event OnCellAttach() -EndEvent - -; Event received when this object's parent cell is detached -Event OnCellDetach() -EndEvent - -; Event received when every object in this object's parent cell is loaded (TODO: Find restrictions) -Event OnCellLoad() -EndEvent - -; Event received when this object is closed -Event OnClose(ObjectReference akActionRef) -EndEvent - -; Event received when this object enters, exits, or changes containers -Event OnContainerChanged(ObjectReference akNewContainer, ObjectReference akOldContainer) -EndEvent - -; Event received when this reference's destruction stage has changed -Event OnDestructionStageChanged(int aiOldStage, int aiCurrentStage) -EndEvent - -; Event recieved when this object moves to a detached cell from an attached one -Event OnDetachedFromCell() -EndEvent - -; Event received when this object is equipped by an actor -Event OnEquipped(Actor akActor) -EndEvent - -; Event received when this object is grabbed by the player -Event OnGrab() -EndEvent - -; Event received when a this trigger is tripped -Event OnTrigger(ObjectReference akActionRef) -EndEvent - -; Event received when this trigger volume is entered -Event OnTriggerEnter(ObjectReference akActionRef) -EndEvent - -; Event received when this trigger volume is left -Event OnTriggerLeave(ObjectReference akActionRef) -EndEvent - -; Event received when this object is hit by a source (weapon, spell, explosion) or projectile attack -Event OnHit(ObjectReference akAggressor, Form akSource, Projectile akProjectile, bool abPowerAttack, bool abSneakAttack, bool abBashAttack, bool abHitBlocked) -EndEvent - -; Event received when an item is added to this object's inventory. If the item is a persistant reference, akItemReference will -; point at it - otherwise the parameter will be None -Event OnItemAdded(Form akBaseItem, int aiItemCount, ObjectReference akItemReference, ObjectReference akSourceContainer) -EndEvent - -; Event received when an item is removed from this object's inventory. If the item is a persistant reference, akItemReference -; will point at it - otherwise the parameter will be None -Event OnItemRemoved(Form akBaseItem, int aiItemCount, ObjectReference akItemReference, ObjectReference akDestContainer) -EndEvent - -; Event recieved when this object is completely loaded - will be fired every time this object is loaded -Event OnLoad() -EndEvent - -; Event received when the lock on this object changes -Event OnLockStateChanged() -EndEvent - -; Event received when a magic affect is being applied to this object -Event OnMagicEffectApply(ObjectReference akCaster, MagicEffect akEffect) -EndEvent - -; Event received when this object is opened -Event OnOpen(ObjectReference akActionRef) -EndEvent - -; Event received when this object, if a book, is read -Event OnRead() -EndEvent - -; Event received when this object is released by the player -Event OnRelease() -EndEvent - -; Event received when this reference is reset -Event OnReset() -EndEvent - -; Event received when this reference is sold by an actor -Event OnSell(Actor akSeller) -EndEvent - -; Event received when a spell is cast by this object -Event OnSpellCast(Form akSpell) -EndEvent - -; Event received when translation is almost complete (from a call to TranslateTo, "almost" is determined by a gamesetting, default is 90% of the way) -Event OnTranslationAlmostComplete() -EndEvent - -; Event received when translation is complete (from a call to TranslateTo) -Event OnTranslationComplete() -EndEvent - -; Event received when translation is aborted (from a call to StopTranslateTo) -Event OnTranslationFailed() -EndEvent - -; Event recieved when this reference hits a target -Event OnTrapHit(ObjectReference akTarget, float afXVel, float afYVel, float afZVel, float afXPos, float afYPos, float afZPos, \ - int aeMaterial, bool abInitialHit, int aeMotionType) -EndEvent - -; Event recieved when this starts hitting a target -Event OnTrapHitStart(ObjectReference akTarget, float afXVel, float afYVel, float afZVel, float afXPos, float afYPos, float afZPos, \ - int aeMaterial, bool abInitialHit, int aeMotionType) -EndEvent - -; Event recieved when this stops hitting a target -Event OnTrapHitStop(ObjectReference akTarget) -EndEvent - -; Event received when this object is unequipped by an actor -Event OnUnequipped(Actor akActor) -EndEvent - -; Event recieved when this object is being unloaded - will be fired every time this object is unloaded -Event OnUnload() -EndEvent - -; Event received when this object's Ward is hit by a spell -Event OnWardHit(ObjectReference akCaster, Spell akSpell, int aiStatus) -EndEvent - -; Set of read-only properties to essentually make a fake enum for motion types passed in to the trap hit -int Property Motion_Dynamic = 1 AutoReadOnly -int Property Motion_SphereIntertia = 2 AutoReadOnly -int Property Motion_BoxIntertia = 3 AutoReadOnly -int Property Motion_Keyframed = 4 AutoReadOnly -int Property Motion_Fixed = 5 AutoReadOnly -int Property Motion_ThinBoxIntertia = 6 AutoReadOnly -int Property Motion_Character = 7 AutoReadOnly - - -; SKSE64 additions built 2019-11-21 05:06:53.443000 UTC - -; Container-only functions -int Function GetNumItems() native -Form Function GetNthForm(int index) native -float Function GetTotalItemWeight() native -float Function GetTotalArmorWeight() native - -; Tree and Flora only functions -bool Function IsHarvested() native -Function SetHarvested(bool harvested) native - -; Tempering -Function SetItemHealthPercent(float health) native - -; Charges - -; Only works on ObjectReferences that have user-enchants -Function SetItemMaxCharge(float maxCharge) native -; Works on any enchanted item -float Function GetItemMaxCharge() native - -float Function GetItemCharge() native -Function SetItemCharge(float charge) native - -Function ResetInventory() native - -bool Function IsOffLimits() native - -; Returns the name of this reference -; this is the name that is displayed -string Function GetDisplayName() native - -; Sets a reference's display name -; returns false if force is false and the reference -; is held by an alias using 'Stored Text' or 'Uses Stored Text' -; Text Replacement does not use this name and may be lost if forced -bool Function SetDisplayName(string name, bool force = false) native - -; Returns the enable parent object -ObjectReference Function GetEnableParent() native - -; Returns the player-made enchantment if there is one -Enchantment Function GetEnchantment() native - -; Changes an item's player-made enchantment to something else -; None enchantment will remove the existing enchantment -; does not delete the custom enchantment, only removes it -Function SetEnchantment(Enchantment source, float maxCharge) native - -; Creates a new enchantment on the item given the specified parameters -; all arrays must be the same size -; created enchantments are not purged from the save when removed or overwritten -; exact same enchantments are re-used by the game -Function CreateEnchantment(float maxCharge, MagicEffect[] effects, float[] magnitudes, int[] areas, int[] durations) native - -; Returns the number of ref aliases holding this reference -int Function GetNumReferenceAliases() native - -; Returns the nth ReferenceAlias holding this reference -ReferenceAlias Function GetNthReferenceAlias(int n) native - -; Returns the poison applied to the weapon -Potion Function GetPoison() native - -; Returns all base forms in the inventory/container into the specified FormList -Function GetAllForms(FormList toFill) native - -; Returns all base forms from the container into a new array -Form[] Function GetContainerForms() native - -; Returns all of the aliases holding this reference -ReferenceAlias[] Function GetReferenceAliases() native \ No newline at end of file diff --git a/scripts/source/potion.psc b/scripts/source/potion.psc deleted file mode 100644 index 9e99d230..00000000 --- a/scripts/source/potion.psc +++ /dev/null @@ -1,56 +0,0 @@ -Scriptname Potion extends Form - -; Is this postion classified as hostile? -bool Function IsHostile() native - -; SKSE64 additions built 2019-11-21 05:06:53.443000 UTC -; Is this potion classified as Food? -bool Function IsFood() native - -; Is this potion classified as Poison? -bool Function IsPoison() native - -; return the number of the effects -int Function GetNumEffects() native - -; return the magnitude of the specified effect -float Function GetNthEffectMagnitude(int index) native - -; return the area of the specified effect -int Function GetNthEffectArea(int index) native - -; return the duration of the specified effect -int Function GetNthEffectDuration(int index) native - -; return the magic effect of the specified effect -MagicEffect Function GetNthEffectMagicEffect(int index) native - -; return the index of the costliest effect -int Function GetCostliestEffectIndex() native - -; sets the magnitude of the specified effect -Function SetNthEffectMagnitude(int index, float value) native - -; sets the area of the specified effect -Function SetNthEffectArea(int index, int value) native - -; sets the duration of the specified effect -Function SetNthEffectDuration(int index, int value) native - -; gets the use sound of this potion -SoundDescriptor Function GetUseSound() native - -; Returns all the magnitudes of this object in order -float[] Function GetEffectMagnitudes() native - -; Returns all the areas of this object in order -int[] Function GetEffectAreas() native - -; Returns all the durations of this object in order -int[] Function GetEffectDurations() native - -; Returns all the magic effects of this object in order -MagicEffect[] Function GetMagicEffects() native - -; Added by Enderal FS -Potion Function CreatePotion(MagicEffect[] effects, float[] magnitudes, int[] areas, int[] durations, int arraySize) native global