Rhutos Posted January 12, 2017 Share Posted January 12, 2017 (edited) Hello,i am trying to expand my MaxLockWorkshopTerminals mod with protectron podsEverything works fine, except the "Occupied" animation does not playI copied the ProtectronPod01 for it and of course I kept the AnimFurnProtectronPod keywordBut every time, the abProtectronRaceScript or any other script, tries to play the animationI get the error: the animation graph (GenericFurniture) cannot currently process event "Occupied". I tried:To enable / disable the pod and the spawned protectron in different orderCreate a while loop to keep trying, to play the animationSpawning the ProtectronPod01 instead and link the protectron to itPlaced the objects in a Cell (maybe it just won't work if created on run time?)Add certain keywords or remove all keywords except AnimFurnProtectronPodDouble and triple checked the ProtectronPod01 form and my workshop form in FO4Edit.Replaced my custom protectron const property with the default lvlProtectron formIt's just no use, the furniture won't start the animation at all and keeps throw out the error.Google and any other search was useless as ever and just shown me "my game keeps crashing, please help me" threads.http://www.creationkit.com/fallout4/index.php?title=Subgraphs only handles racial animationsMy last hope is, anyone else has a clue.I would appreciate any help. Edited January 12, 2017 by Rhutos Link to comment Share on other sites More sharing options...
steve40 Posted January 12, 2017 Share Posted January 12, 2017 Why is there a red diamond with an exclamation mark over the pod? Looks like there is a mesh missing? does it need a model marker or something? Link to comment Share on other sites More sharing options...
Rhutos Posted January 12, 2017 Author Share Posted January 12, 2017 (edited) It's the same as in the original form.Maybe there is a NIF I didn't extract.I uploaded a screenshot of the original too. Edited January 12, 2017 by Rhutos Link to comment Share on other sites More sharing options...
steve40 Posted January 13, 2017 Share Posted January 13, 2017 (edited) Hmm. I'll have to check in the CK to see if mine is the same or not. What script command are you using to play the animations? Sometimes I have overcome the animation graph errors by using PlayGamebryoAnimation instead of PlayAnimation and vice-versa. Also, maybe try using a different animation entry point (asAnimation string). e.g. "Occupied" might not be the correct string for calling that animation. EDIT: also look in the editor warnings log file in the Fallout 4 root folder. Look carefully for all the errors related to animation graphs. They might give some clues about the problem. Edited January 13, 2017 by steve40 Link to comment Share on other sites More sharing options...
Rhutos Posted January 13, 2017 Author Share Posted January 13, 2017 (edited) abProtectronRaceScript is a native bethesda script and uses PlayAnimation ("Occupied").I didn't find the error, but a workaround. Using SnapIntoInteraction on the protectron.Thanks for you help.Now I just need to find out, why the protectron won't run the shutdown package correctly Edited January 13, 2017 by Rhutos Link to comment Share on other sites More sharing options...
Rhutos Posted January 17, 2017 Author Share Posted January 17, 2017 (edited) Hmm I simply cannot get the protectron to use it's pod with the ProtectronSleepInsidePodPKG packageThe package starts, the linked ref is correct. But the protectron just stands there doing nothing.IsUnconscious () returns falseAI is enabled :sad: Edited January 17, 2017 by Rhutos Link to comment Share on other sites More sharing options...
steve40 Posted January 18, 2017 Share Posted January 18, 2017 I've noticed a furniture glitch when modifying furniture already present in the game (not freshly crafted) - e.g. I added a script to make the furniture assignable. One symptom was that settlers wouldn't use the furniture that I had just assigned them to - they just stood there next to it. However, storing the (craftable) furniture and re-crafting it fixed the problem. The problem also seemed to fix itself if I did something that forced the item to unload/reload itself, such as fast travelling away and back, or entering an interior cell and leaving again. part of the reason is that existing items won't run OnInit() and won't necessarily run OnLoad() immediately if they were already loaded when I updated them. So you could try- - Test if the problem still happens on a new game- Try going indoors and then outdoors again (or vice-versa)- Check if any scripts on the furniture/actor rely on OnInit() and OnLoad(). You might need to change your scripts to make the code fire somewhere else, such as from an OnActivate() event or OnPlayerLoadGame() or something. Link to comment Share on other sites More sharing options...
Rhutos Posted January 18, 2017 Author Share Posted January 18, 2017 Thanks for your advice.I am always testing my mods on early, non-modded saves in sanctuaryDidn't seem to workMy script don't use any of these events. It's a workshop script, so it uses workshop events. The protectron doesn't use any custom scripts at all, just the default protectronScript by bethesda. The scripts work just fine (except the furniture's issue with animations). Just the protectrons acts like the furniture doesn't exist. ProtectronPodWorkshopScript Scriptname MaxLockWorkshopTerminals:ProtectronPodWorkshopScript extends WorkshopObjectScript ;-------------------------------------------------------------- ; Properties ;-------------------------------------------------------------- group Protectron ActorBase Property ProtectronForm Auto Mandatory Const {Protectron to spawn when created} ActorValue Property ProtectronPodStatus Auto Mandatory Const {Protectron's pod status actor value} endgroup group Linking Keyword Property PodLinkKW Auto Mandatory Const {Protectron to protectron pod link keyword} Keyword Property TerminalProtectronPodLinkKW Auto Mandatory Const ; Safe to terminal link keyword {Protectron Pod to terminal linking keyword} endgroup ActorValue Property MiscStatRobotHasBeenDisabled Auto Mandatory Const {Statistics?} ProtectronScript Property ProtectronRef Auto Hidden ;-------------------------------------------------------------- ; Temporary debug redirection ;-------------------------------------------------------------- function Trace (string asTextToPrint, int aiSeverity = 0) Debug.Trace ("ProtectronPodWorkshopScript - " + asTextToPrint, aiSeverity) endfunction ;-------------------------------------------------------------- ; Local remote protectron wakeup ;-------------------------------------------------------------- function WakeUp () if (IsDead ()) return endif if (ProtectronRef.GetValue (ProtectronPodStatus) == 1) return endif Trace ("Wake up protectron: " + ProtectronRef) ProtectronRef.busy = true ProtectronRef.SetValue (ProtectronPodStatus, 1) ProtectronRef.Activate (self) ProtectronRef.EvaluatePackage () endfunction ;-------------------------------------------------------------- ; Local remote protectron shutdown ;-------------------------------------------------------------- function ShutDown () if (IsDead ()) return endif if (ProtectronRef.GetValue (ProtectronPodStatus) == 0) return endif Trace ("Shut down protectron: " + ProtectronRef) ProtectronRef.busy = true ProtectronRef.SetValue (ProtectronPodStatus, 0) ProtectronRef.Activate (self) ProtectronRef.EvaluatePackage () if (ProtectronRef.GetValue (MiscStatRobotHasBeenDisabled) == 0) Game.IncrementStat ("Robots Disabled", 1) ProtectronRef.SetValue (MiscStatRobotHasBeenDisabled, 1) endif endfunction ;-------------------------------------------------------------- ; Returns if wether this pod got destroyed ; or the protectron is dead, disabled or ; deleted / markfordelete ;-------------------------------------------------------------- bool function IsDead () if (ProtectronRef == none) ; No protectron ref at all return (true) endif return (IsDestroyed () == true || ProtectronRef.IsDead () || ProtectronRef.IsDisabled () || ProtectronRef.IsDeleted ()) endfunction ;-------------------------------------------------------------- ; (Re)Spawns the actual protectron ;-------------------------------------------------------------- function SpawnProtectron () ; Handle Protectron ref ProtectronRef = PlaceAtMe (ProtectronForm, 1, true, true) as ProtectronScript ; Spawns a initially disabled protectron if (ProtectronRef == none) Trace ("Error: Protectron ref could not be placed", 2) return endif ; Linking... ProtectronRef.SetLinkedRef (self, PodLinkKW) SetLinkedRef (ProtectronRef, PodLinkKW) RegisterForRemoteEvent (ProtectronRef, "OnDying") ; Register the ref for dying event ProtectronRef.BlockActivation (true, false) ; Block activation to prevent pickpocket and loot ProtectronRef.Enable () ; Every setting has been applied - now enable the ref ; Wait for 3D loading... ProtectronRef.WaitFor3DLoad () WaitFor3DLoad () ; Then force it into furniture ProtectronRef.SnapIntoInteraction (self) ; Get potential linked terminal MaxLockWorkshopTerminals:WorkshopTerminal TerminalRef = GetLinkedRef (TerminalProtectronPodLinkKW) as MaxLockWorkshopTerminals:WorkshopTerminal ; Update protectron status if possible if (TerminalRef) TerminalRef.SetProtectronStatus (TerminalRef.ProtectronStatus) endif endfunction ; Delete the protectron when stored / recycled event OnWorkshopObjectDestroyed (ObjectReference akReference) ProtectronRef.Delete () endevent ; Update sleeping protectron position when moved event OnWorkshopObjectMoved (ObjectReference akReference) if (ProtectronRef.GetValue (ProtectronPodStatus) == 0) ProtectronRef.MoveTo (self) endif endevent ; "Repair" the protectron ref when repaired event OnWorkshopObjectRepaired (ObjectReference akReference) if (ProtectronRef == none) SpawnProtectron () endif endevent ;-------------------------------------------------------------- ; If the protectron has been killed, the protectron pod ; gets destroyed and has to be repaired ;-------------------------------------------------------------- event Actor.OnDying (Actor akSender, Actor akKiller) SetDestroyed () UnregisterForRemoteEvent (akSender, "OnDying") ProtectronRef = none akSender.DeleteWhenAble () endevent ; Spawns the initial protectron ref event OnWorkshopObjectPlaced (ObjectReference akReference) SpawnProtectron () endevent Modified ProtectronSleepInsidePodPKGhttp://upload.rising-games.net/upload/Public/Nexus/MaxLockWorkshopTerminals/Package.pngResulthttp://upload.rising-games.net/upload/Public/Nexus/MaxLockWorkshopTerminals/ProtectronStandby.png--->http://upload.rising-games.net/upload/Public/Nexus/MaxLockWorkshopTerminals/ProtectronWokeUp.png--->http://upload.rising-games.net/upload/Public/Nexus/MaxLockWorkshopTerminals/ProtectronShutDownDoesNothing.png---> [01/18/2017 - 09:28:59AM] ProtectronPodWorkshopScript - Wake up protectron: [protectronscript < (FF000E3B)>] [01/18/2017 - 09:28:59AM] ProtectronSleepInsidePodPKG - On Change [01/18/2017 - 09:29:12AM] ProtectronPodWorkshopScript - Shut down protectron: [protectronscript < (FF000E3B)>] [01/18/2017 - 09:29:14AM] [protectronscript < (FF000E3B)>] is running package ProtectronSleepInsidePodPKG [01/18/2017 - 09:29:14AM] LinkedRef: [MaxLockWorkshopTerminals:ProtectronPodWorkshopScript < (FF0011CB)>] [01/18/2017 - 09:29:14AM] IsUnconscious: False [01/18/2017 - 09:29:14AM] IsAIEnabled: True Link to comment Share on other sites More sharing options...
Rhutos Posted January 19, 2017 Author Share Posted January 19, 2017 UpdateI got it to work. I simply re-created the protectron NPC_ form and now it seems to work flawless.Thanks for your help Link to comment Share on other sites More sharing options...
Recommended Posts