LuciusConfucius Posted April 25, 2017 Share Posted April 25, 2017 (edited) Hey there! I know about a few mods on nexus that does this, but they seem outdated or over-complicated. I want to create a simple mod that closes all types of player created settlement and vault 88 doors after around 10 seconds, they should also open automatically when in workshop mode. I've been doing small mods and alterations over the years but have no experience with scripting (if that's even going to be necessary for this, I don't know). I read somewhere that the covenant door does this, so I will start there and look at any attached scripts or functions. My question is, what do you think is the optimal way of doing what I want without putting much strain on a player's system? When you have a vault with 100 doors, perhaps this will create some small fps drops? I want it to be as smooth and simple as possible. Any help is appreciated! Regards,Lucius Edited April 25, 2017 by Vincente Valtieri Link to comment Share on other sites More sharing options...
g2mXagent Posted April 26, 2017 Share Posted April 26, 2017 You need to bind the script to each door, anyway, I do so. please see my mod, you can easily see the script in CK: http://www.nexusmods.com/fallout4/mods/17088/? Link to comment Share on other sites More sharing options...
LuciusConfucius Posted April 28, 2017 Author Share Posted April 28, 2017 Thanks for the info and help! Will look into that. I can't really figure out right now how to look at scripts in CK, I can see them and their basics, but not open them up and view their codes. Will figure it out eventually. Link to comment Share on other sites More sharing options...
MissingMeshTV Posted April 28, 2017 Share Posted April 28, 2017 If you're trying to look a compiled script packed into a mod's BA2 archive, unless the mod author provided the source, you'll have to unpack the archive and decompile the .PEX file into a human readable .PSC. This decompiler does a bang of job of that:http://www.nexusmods.com/fallout4/mods/3742/? You should be able to view any vanilla script within the CK by just selecting the script from the Scripts window or Scripts tab of your desired item, right click and choose the View Source option. Typing on my phone and going from memory, but I think that's how the option is labeled. Link to comment Share on other sites More sharing options...
LuciusConfucius Posted April 29, 2017 Author Share Posted April 29, 2017 Thanks for that RedRocketTV! I've been thinking about optimizing this type of mod and had an idea. Instead of a script attached to every door, what if the script was attached to workshops by default, and checking every door within that workshops boundaries? Would that be more optimal? That might interfere with DDproductions workshop limit mod, though.. Link to comment Share on other sites More sharing options...
LuciusConfucius Posted April 29, 2017 Author Share Posted April 29, 2017 Can't seem to make sense in how to open your scripts g2m, sorry. But I found this in vanilla: Scriptname MS19DoorCloserScript extends ObjectReference Const Event OnTriggerLeave(ObjectReference akActionRef) utility.Wait(5) GetLinkedRef().SetOpen(false) EndEvent And was wondering, if I copy this and change the script name and change the Event OnTriggerLeave to OnActivation or something similar, and increase the utility.Wait(5) to (9) and then attach that to the standard workshop doors. Would that have the result I'm looking for? Going to play around a little and see. Link to comment Share on other sites More sharing options...
LuciusConfucius Posted April 29, 2017 Author Share Posted April 29, 2017 The above attempt failed. Can simply say that I have no idea what I'm doing with scripts and coding. Would learn, but must prioritize my time actually playing Fallout 4. Have never even gotten around to finishing it yet, lol, always looking for that perfect combination of mods, then edit them slightly myself, including some of my own. Then along the line something gets messed up and I take a long hiatus only to repeat the process some months later. Modder's Curse to never play the game they mod. Link to comment Share on other sites More sharing options...
g2mXagent Posted April 30, 2017 Share Posted April 30, 2017 Event OnOpen(ObjectReference akActionRef) Utility.wait(3); wait for 3 seconds Self.Activate(akActionRef)) ; endEvent Link to comment Share on other sites More sharing options...
Thuggysmurf Posted April 30, 2017 Share Posted April 30, 2017 Another approach in case it helps (the 10 refers to seconds): Event OnActivate(ObjectReference akActionRef) utility.Wait(10) Self.SetOpen(false)EndEvent And then incorporate the opposite if/when you want the doors to open. Link to comment Share on other sites More sharing options...
Recommended Posts