Jump to content

Auto Closing workshop player settlement doors.


Recommended Posts

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 by Vincente Valtieri
Link to comment
Share on other sites

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

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

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

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

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

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...