Jump to content

LarannKiar

Premium Member
  • Posts

    1415
  • Joined

  • Last visited

Nexus Mods Profile

3 Followers

About LarannKiar

Profile Fields

  • Country
    United States

Recent Profile Visitors

127838 profile views

LarannKiar's Achievements

Mentor

Mentor (12/14)

98

Reputation

  1. I haven't tested this code but something like this should work in vanilla: Container Property TempContainerBase Auto Const Function RemoveAllMiscItems(ObjectReference theRef) If !theRef Return None EndIf ; create a temporary container ObjectReference tempContainerRef = theRef.PlaceAtMe(TempContainerBase) If !tempContainerRef Return None EndIf ; transfer all items from theRef to the temp container theRef.RemoveAllItems(tempContainerRef) If tempContainerRef.GetItemCount() == 0 Return None EndIf Int iMaxRunCount = 1000 Int Index = 0 ; drop and check each object reference of the items While Index < iMaxRunCount && Index < tempContainerRef.GetItemCount() ObjectReference DroppedRef = tempContainerRef.DropFirstObject() ; presumably, tempContainerRef is now empty If !DroppedRef Index = iMaxRunCount Else Form ItemBase = DroppedRef.GetBaseObject() If ItemBase ; add the items which are not Misc Items back to the inventory of theRef If !(ItemBase as MiscObject) theRef.AddItem(DroppedRef) ; otherwise, remove DroppedRef.Delete() EndIf EndIf EndIf Index = Index + 1 EndWhile ; optional, move everything back to theRef's inventory that happens to be in the temp container, just in case tempContainerRef.RemoveAllItems(theRef) ; delete the temp container tempContainerRef.Delete() EndFunction
  2. Perhaps this works too. theActorRef.MoveTo(theFurnitureRef) theActorRef.SnapIntoInteraction(theFurnitureRef)
  3. Open Starfield.esm in the Creation Kit and check out the Story Manager Event Node (it's in the Character category). I think these random quests are there.
  4. If you have SF1Edit, you can try opening your mods and check their Projectile, Weapon and Object Modification records. This effect is likely from a mod.
  5. Actor and object references can be persistent. Make sure the vendor container (usually a reference of a Container form) or the bed for the Sleep package is persistent.
  6. PushActorAway() doesn't work with the player. Someone reported this to me it earlier, I looked into it and I made a quick fix that instantly restores the player's original standing position but considering it'd probably be more useful for mods, I'd like to release it after the get up animation is fixed too. BGS intentionally chose a different design for the Gravity Wave when casted by Starborn NPCs (they cast Stagger instead of Knockdown effect) so there's chance they are aware of this issue.
  7. Have you tried generating LOD? Does stuttering go away if you disable a few buildings or the NPCs? AI Package target references are often persistent to ensure the package can be evaluated when the reference is unloaded. Certain combination of AI procedures that can be used for AI packages can cause stuttering but it is unlikely if it's a simple vendor package.
  8. I made a mod years ago that disables this AI behavior globally but I revisited the idea and released a F4SE plugin today if anyone's interested.
  9. Fill the reference into a Quest Alias (with Fill type Specific reference), save your mod, reopen this quest and remove the quest alias (if you don't need this alias). The Creation Kit won't unset the Persistent flag on the reference. (As for SF1Edit, REFR record >> Record Header >> Persistent).
  10. You could try this code: Scriptname CoolShotRifleScript extends ObjectReference Const ; if it extends ObjectReference, you either need to attach this script to the reference (since PlayerRef 0x14 is hardcoded it's not really an option) or the reference's base form (in which case all object references of this base would inherit this script) Event OnInit() ; sent when this script is initialized ; RegisterForAnimationEvent is a native function so it looks like "bool Function RegisterForAnimationEvent(ObjectReference akSender, string asEventName) native" in ScriptObject.psc; it doesn't have "EndFunction" as it's native: it's only declared in ScriptObject.psc while being defined in the native code ; "Self" is technically this script instance, so an instance of CoolShotRifleScript bound to the object the script is attached to: in this case it is an ObjectReference; the vanilla code automatically casts it to ObjectReference, that's why you don't need to type "Self as ObjectReference" (the first parameter of RegisterForAnimationEvent is ObjectReference) RegisterForAnimationEvent(Self, "weaponFire") EndEvent Function AttachModFunction() ; you could call it "user defined function" Debug.Notification("AttachModFunction called.") EndFunction Event OnAnimationEvent(ObjectReference akSource, string asEventName) ; parameters don't contain the value like Game.GetPlayer() but the type and name, e.g. ObjectReference akSource If akSource == Game.GetPlayer() && asEventName == "weaponFire" ; the anim event is called "weaponFire" as far as I remember AttachModFunction() EndIf EndEvent The notes above the native functions and events in the vanilla .psc (Papyrus script source) files aren't always in depth descriptions so you should take a look at the Creation Kit wiki.
  11. You can all ActorRefID.GetOffersServicesNow in the Console to determine whether the vendor should buy or sell items, e.g. 5986.GetOffersServicesNow.
  12. It is expected yes. I knew Bool wasn't properly implemented in Starfield either but I thought I fixed it earlier.. I added a quick fix to Starfield Engine Fixes, thanks for the heads up. I don't know if someone has already did for Fallout 4 but I added it to my to do list.
  13. Reference 3D and textures aren't kept in the memory when the persistent ref is not in the loaded area regardless of persistence (by Fallout 4, I don't know whether the Creation Kit does but I doubt it). Having too many loose files can increase the loading time of the Creation Kit. I think if you remove the Persistent flag in FO4Edit and it should automatically move the ref to the non persistent Worldspace record.
  14. There seem to be several conditions of the "excess dead" cleanup but I can't see anything related to their Encounter Zone. The cleanup code looks for Quest Alias data which ApplyToRef() adds to the reference. I don't know if it gets removed OnDeath() so maybe this is the why they can't be removed. I'll look into this later.
×
×
  • Create New...