Slasher7 Posted July 25, 2020 Share Posted July 25, 2020 Hello guys, I am making this cool Gunners Hideout location in the Creation Kit. I have 3 main errors and tried different Creation Kit tutorials but can't wrap my head around this one. Error 1:If you explore this building at certain locational spots more enemies will spawn in.But the ambush enemies that spawn in only happens once. It never resets by waiting 7 days... Does someone got this to work? My Xmarker that enables the ambushing gunners is set to respawn, the trigger field is also set to respawn. Yet, enemies don't respawn after 7 ingame days!!! Error 2:Caps Stashes and Bobby Pin boxes also don't respawn in this building. I think it has to do with the attached vanilla script "bobbyPinBoxSCRIPT.psc".Which both items use this script. Scriptname bobbyPinBoxSCRIPT extends ObjectReference Const {add a random number of bobby pins to the player and disable self.} LeveledItem Property LL_BobbyPinBox Auto Const EVENT OnLoad() blockActivation() endEVENT EVENT OnActivate(ObjectReference akActionRef) ;debug.trace("bobby pin box taken by "+akActionRef) ;if akActionRef == game.GetPlayer() akActionRef.addItem(LL_BobbyPinBox) disable() delete() ;endif endEVENT Error 3: Stacks of items don't respawn as a stack but as a single 1. For example; ammobox 5.56 which contains 20 rounds of 5.56 will only respawn as a single bullet of 5.56. Not as a ammo box. Same thing happens for stacks of crafting materials. Conclusion; I think it has to do with the faulty game engine. Scripts are not meant to respawn and activate for a second time? That would explain error 1 and error 2. Does someone know a way to program the Gunner building Cell to set everything to respawn after 7 days? Like the game handles the cell like you visited it for the first time? So a complete reset of a cell? Link to comment Share on other sites More sharing options...
SKKmods Posted July 26, 2020 Share Posted July 26, 2020 https://www.creationkit.com/fallout4/index.php?title=Reset_-_Cell Link to comment Share on other sites More sharing options...
Slasher7 Posted July 26, 2020 Author Share Posted July 26, 2020 https://www.creationkit.com/fallout4/index.php?title=Reset_-_Cell Hello SKK50 thank you for your reply! Does that make it a complete reset? Sorry I don't have an idea how to incorporate that line of code into the CK. Do I have to make a trigger field with a script with just that single piece of line? And how does it take 7 days of wait time in effect? I want the interior cell to completely reset after 7 days. Not having it reset everytime I enter it? Sorry to come over as a noob, I know my way in CK when it comes to adding new materials, edit stats, make maps etc. But when it comes to scripting I pass out..There are a some tutorials about NPC scripting but none about cell scripting.. Link to comment Share on other sites More sharing options...
SKKmods Posted July 26, 2020 Share Posted July 26, 2020 You will need to: Put an object in the cell that can have a script attached, a DefaultActivator will do. Attach a custom script which runs during the OnLoad event to start a 7 day gametime timer and then call reset for the next player visit, something like; Scriptname MyCellResetScript extends ObjectReference Bool bIsTimerRunning = FALSE Int iResetTimer = 10 Event OnLoad() If (bIsTimerRunning == FALSE) Debug.Notification("MyCellResetScript.OnLoad") ;comment this out for publication bIsTimerRunning = TRUE StartTimerGameTime(824, iResetTimer) ;7 game days in hours EndIf EndEvent Event OnTimerGameTime(Int aiTimerID) If (aiTimerID == iResetTimer) Debug.Notification("MyCellResetScript.OnTimer") ;comment this out for publication Self.GetParentCell().Reset() bIsTimerRunning = FALSE EndIf EndEvent Link to comment Share on other sites More sharing options...
Slasher7 Posted July 26, 2020 Author Share Posted July 26, 2020 Thanks im too spoiled! I placed a DefaultActivator in the Gunners Hideout Cell and attached your script to it. For testing purposes I inputted a very low StartTimerGameTime value to test out if anything works. I looted the whole gunners hideout and went to Red Rocket to sleep 2 days. Went back to the modded Gunners Hideout and good news; your script works. But.. Bad news; apparantly the .Reset cell function behaves the same way like a respawned cell... Everything respawned except the same errors again;* Ambush scripted enemies didn't respawn* Caps Stashes didn't respawn* Stacks of items respawned as a single item* Bobby pin boxes didn't respawn Im out of ideas, I think the above problems are hardcoded in the game and will never reset upon re-entry of the cell. I think the items and ambushes are not by design to reset by Bethesda? I really really appreciate your help. Your script is still very useful for custom cell respawn timers. Think im going to get creative and add custom item Caps Stashes and custom item Ammo Boxes. The player then needs to break down these custom items at Chem Station for the loot. Because that's the only way to make it respawn I guess..Game doesn't like respawning scripted items. Link to comment Share on other sites More sharing options...
SKKmods Posted July 26, 2020 Share Posted July 26, 2020 Check that the encounter zone attached to the location is not marked NO RESET, or if its a custom location then attach a resetting encounter zone. Link to comment Share on other sites More sharing options...
Slasher7 Posted July 26, 2020 Author Share Posted July 26, 2020 (edited) Yes it's a custom location and the interior cell has an attached Enzounter Zone and the "Never Reset" Checkbox is off. Same for the rest of the 4 checkboxes in this menu they are all off. I tried googling if anybody has the same problems but apparantly no one cares about respawning stuff o_O There are plenty of quest mods but all are set up like an one time experience for new locations. Maybe a lot of modders already figured most scripted items and ambush NPC's cannot respawn. But then again, there isn't much light on this issue. EDIT: Ok now I got something different. The Ambush enemies do now respawn. But they instantly spawn in the interior cell upon re-entry instead of spawning in when player reaches the trigger box. Going to tweak that triggerbox script now to see if I can make it reset.. Edited July 27, 2020 by Slasher7 Link to comment Share on other sites More sharing options...
ghostfc3s Posted September 25, 2020 Share Posted September 25, 2020 Any update on getting an ambush to respawn? I am trying to do a similar thing. I've had to use xmarkers with placeatme() to respawn my npcs on entry since rest() on load seems to mess up nav meshing, but if I could get Ambushes to respawn functionally that would be awesome. Link to comment Share on other sites More sharing options...
Slasher7 Posted September 26, 2020 Author Share Posted September 26, 2020 Any update on getting an ambush to respawn? I am trying to do a similar thing. I've had to use xmarkers with placeatme() to respawn my npcs on entry since rest() on load seems to mess up nav meshing, but if I could get Ambushes to respawn functionally that would be awesome. I've still had no luck to make ambush triggers respawn on re-entry. The script seems never be able to reset itself and the enemies just all spawn on re-entry few ingame days later. Script works fine on initial entry though.. I've tried different ways of ambush scripts but all had no success. If someone ever came up with a solution I would be much obliged and I will be able to update my mod! Link to comment Share on other sites More sharing options...
Recommended Posts