RngrHawk Posted May 15, 2017 Share Posted May 15, 2017 Hey guys, I've been thinking about trying something out in CK, but I have no idea how to approach it. So what I'm trying to accomplish is make objects like Basketball Hoops, Mailboxes or Nuka Cola Vending Machines (Mostly stuff that you can craft in the settlement workshops) disappear when a certain action is performed. And I mean those scattered around the world, and not those in settlements. I was also thinking I could make these things scrapable outside of settlements. Another idea is that maybe somehow I can enable workshop mode outside of settlements, disabling just the building section of the mode? But yet again, I have no clue how to do that. Ultimately, what I would want to finish off with is; have objects around the world that I can activate, loot their contents, and then make them automatically disappear. I was thinking of making them respawn after a few in-game days as well but that's kinda immersion breaking. Any suggestions or solutions? Thanks for any help in advance. Link to comment Share on other sites More sharing options...
akav1r Posted May 16, 2017 Share Posted May 16, 2017 (edited) As to scraping outside of a workshop, it just won't happen. You can only scrap what's inside an activator trigger. I mean, theoretically you could put one giant activator trigger across the entire Commonwealth, but it would like cause major issues in game. You could make many small "settlements" for scrapping purposes I suppose. As to a container than disappears after you loot it. You'd have to create a quest. Define the container as an alias. Now, here's the problem I'm not sure about. If there's only 1 item in the container, then on the alias attach a 'defaultaliasonactivate' papyrus script. It will allow you to set a quest stage within the quest when the player activates it. What you'd do is set up 3 quest stages, 10, 20, and 30. In 'Quest Data' tab click "Allow Repeated Stages." Mark stage 10 "Run on Start". Now, Stage 10 is just a dummy stage that's listening to set stage 20. In the 'defaultaliasonactivate' script have it set so it set's stage 20 when the player activates it. In the Stage 20 papyrus fragments: CONTAINERPROPERTY.Disable()or an OBJECTREFERENCEPROPERTY.Disable()(The difference between the 2 is the first will activate all instances of that container in the game. The second will only have to do with 1 specific container, if you use say the generic mailbox without duplicating it.) Go into the properties of that fragment, create a container property that points to the container you want the player to loot. Now if you want it to respawn after a few days, that's a little trickier. You'll need to create a whole new script and attach it to the quest. It's a timer for the respawn. Go to the 'Scripts' Tab in your quest. Click Add, and then 'NewScript' Give it a name, and make sure you check the 'Conditional' box. Now, you can add scripting. It should look something like this if you want a 3 day respawn timer(Set where it says 72 in number of hours for a different amount of time): Function StartContainerRespawnTimer() ;Start a timer for container to respawn StartTimerGameTime(72, 1) ;3d EndFunction Event OnTimerGameTime(int timerID) if (timerID == 1) (Self as Quest).SetStage(30) EndIf EndEventClick Compile. So now, go back to quest stage 20. Above the fragment box is a dropdown that says 'kmyQuest'. Find the scriptname you attached to the quest there. Now in the stage 20 fragments add kmyQuest.StartContainerRespawnTimer()This will trigger the timer after the object has been disabled. Now on stage 30, we're going to do the opposite. Since you've already defined either a container or object property just use the same property with an Enable: CONTAINERPROPERTY.Enable()or OBJECTREFERENCEPROPERTY.Enable()And also on stage 30, we need to set our stage back to 10 so the cycle repeats. (Self as Quest).SetStage(10) So let's recap. Your stage 20 fragments should look like: OBJECTREFERENCEPROPERTY.Disable() kmyQuest.StartContainerRespawnTimer() Your stage 30 fragments should look like: OBJECTREFERENCEPROPERTY.Enable() (Self as Quest).SetStage(10) Don't forget to click 'Compile' on each stage. Edited May 16, 2017 by akav1r Link to comment Share on other sites More sharing options...
RngrHawk Posted May 16, 2017 Author Share Posted May 16, 2017 (edited) Ah, oh man thanks for the detailed reply :D I will play around with this soon and see how I do:P It looks very logical, just a bit confusing with the quest alias and stages, but I'll figure it out soon too. And I had a feeling the settlement idea is gonna be terrible, since I looked into it quite a bit ages ago. Well, thanks akav1r for this explanation, its going to be very useful! :D Edited May 16, 2017 by marekto98 Link to comment Share on other sites More sharing options...
akav1r Posted May 16, 2017 Share Posted May 16, 2017 If you've never made a quest before, or scripted, it can seem daunting. This is a tutorial I wrote for my team on 'Realm of Dusk' that you may find helpful. It teaches how to make a basic kill quest and fetch quest, and explains a lot of the things like quest aliases and stages that you might find confusing. https://www.dropbox.com/s/lckzw8fwusupzsc/Papyrus101.pdf?dl=0 Link to comment Share on other sites More sharing options...
RngrHawk Posted May 17, 2017 Author Share Posted May 17, 2017 (edited) I've looked into quests before - mostly stages and dialogue, in fact I tried making some for FNV but gave up due to the lack of time and partly the tedium. But I can tell already, nowhere close to what your tutorial covers... there is a whole lot to it and explains even more mate, thanks a ton for this :D Edited May 17, 2017 by marekto98 Link to comment Share on other sites More sharing options...
akav1r Posted May 17, 2017 Share Posted May 17, 2017 The dialogue system from NV was COMPLETELY overhauled. I tried to make some stuff for someone else's project in NV and it was like pulling teeth to just get dialogue to work properly. That's MILES easier now. Here's two more tutorials about dialogue and the conditions that go along with them, if you're interested for future reading. https://www.dropbox.com/s/8dfup3db2srep3e/dialogue%20tutorial.pdf?dl=0 https://www.dropbox.com/s/xv5hlsh5vf5lwwk/Conditions%20and%20Advanced%20Dialogue.pdf?dl=0 Link to comment Share on other sites More sharing options...
RngrHawk Posted May 23, 2017 Author Share Posted May 23, 2017 (edited) Hey, sorry for not responding for a while, was kinda busy. I cannot thank you enough for all this, you must have put a ton of effort into these tutorials. I'll make sure to put them to good use when I have the time! If I need anything else, I'll make sure to hit you up :tongue: Thanks again bro! Much appreciated Edited May 23, 2017 by marekto98 Link to comment Share on other sites More sharing options...
Recommended Posts