nikashubaiton Posted April 8, 2017 Share Posted April 8, 2017 (edited) Hey all, I'm making a mod that involves putting a workshop in a cave, so you can create a base underground. What I would normally do is just use the interior workshop, but since I want the player to be able to build a little I've opted to use the regular one. The problem with this is, when trying to use the workshop I am given the immediate popup "you must clear all enemies from the location" even though the cell is void of any living things. I know there is script work to make it so the cell itself is set as clear, but I have no idea how to do that. Can anybody help? EDIT: I followed what Lisselli said, here's another way of showing their example Scriptname ClearLocationScript extends ObjectReferenceLocation Property myLocation AutoAUTO STATE WaitingForPlayer Event OnCellAttach() ; This will fire when the player enters the cell. ; Note: It will NOT fire if the player is already in the cell on game load. ; The Player will need to leave the cell first and then come back, if so. GoToState("Done") myLocation.SetCleared() EndEventENDSTATESTATE Done Event OnCellAttach() ; empty event. Will not run anymore. EndEventENDSTATE So just fill in "myLocation" with your location, and you're good to go Edited May 7, 2017 by nikashubaiton Link to comment Share on other sites More sharing options...
Lisselli Posted April 8, 2017 Share Posted April 8, 2017 There's a lot of ways to do this. The most easiest way is to put an xmarker in the cell containing the workshop and attach this script to it: Scriptname LocationClearedScript extends ObjectReference Location property LocationToClear auto AUTO STATE Waiting Event OnCellAttach() GoToState("Done") LocationToClear.SetCleared() EndEvent ENDSTATE STATE Done Event OnCellAttach() ; EndEvent ENDSTATE What this will do is set the location to clear, and then run no more after that. Fill the property with the location you want. Link to comment Share on other sites More sharing options...
caleb68 Posted April 8, 2017 Share Posted April 8, 2017 (edited) double click the workshop in the render window, or right click in the cell view window on the workshop and click edit. scroll to last tab, scripts, double click the script, set the following (don't use defaults): OwnedByPlayer = trueStartsHostile = FalseEnableAutomaticPlayerOwnership = TrueMinRecruitmentProhibitRandom = trueMinRecruitmentAllowRandomAfterPlayerOwned = FalseAllowAttacksBeforeOwned = FalseAllowAttacks = False (if this is a player home and not a settlement, if settlement, set to true for random attacks)that should automatically make it so the player can use the workbench. You'll probably also want to set AllowBrahminRecuritment = False so you don't end up with brahmin running around inside your cave. Another step you can do is add a workshopSetOwnedTrigger, it doesn't need to be big, just place it right where the player teleports in to the cell at and linkref it to the workshop, this will ensure that for any reason the workshop gets flipped to not player owned even with the above flags set, that the workbench will get set to player owned as soon as they enter the cell. don't forget to setup your workshop quest too. if you haven't:create a new quest and give it a unique name, something like mymodSettlementQueston the Quest Data tab, check Start game enabled, run once, set priority to 41on the quest stage tab on the right hand side, right click and click new, type in 10, right click again and click new, type in 20click on 10, check the box that says Run on Startright click in Log Entry and click new, add a Designer note that says 'quest start'click on 20, right click in log entry and click new, add a designer note that says 'quest end'click the 'Quest Aliases' tabright click and click new Ref Alias Collectionset the alias name to 'Workshops'add a match condition - haskeyword workshopkeywordadd a match condition - locationhaskeyword loctypeworkshopadd a match condition - getincurrnetlocation - the location assigned to your cellclick okayClick okay again, then open the quest back up and click on Scriptsadd the script WorkshopAddLocationif properties didn't pop up, double click the scriptclick autofill in properties and it should autofill the workshopParentclick on workshopCollection, click edit, and set it to WorkshopsThe location assigned to your cell will need a couple keywords added to it:loctypeclearableloctypesettlementloctypeworkshoploctypeworkshopsettlementyour zone for the location will need to have never reset and workshop checked on it. you'll need a centermarker for the workshop and a spawnmarker (bothxmarkers) you linkref from the workshop to them using workshoplinkcenter for the center marker and workshoplinkspawn for the spawn marrker, bother markers should be xmarkerheadings If you want the people you send to the cave / settlers to wander about the cave you'll need to add a defaultdummy and linkref the workshop to it with the keyword workshopsandbox then size it for where you want them to wander about, this can also come in handy say if you have a room on the outer edge of the area you don't wnat the settlers to enter, as they will only wander the sandbox area. the buildable area is a defaultdummy linkref it to the workbench using the keyword workshoplinkprimative, you can have multiples of these linked to the workshop to cover odd shaped areas, and scale them to fit the area.. Hope the info helps. Edited April 8, 2017 by caleb68 Link to comment Share on other sites More sharing options...
greekrage Posted April 9, 2017 Share Posted April 9, 2017 (edited) doesnt a setowned trigger do the same thing ? In my new locaction mods where i have to setup settlement data as apposed to a vanilla location i never use the "initialization "quest method since i use the setowned trigger instead and everything works fine. Edited April 9, 2017 by greekrage Link to comment Share on other sites More sharing options...
caleb68 Posted April 9, 2017 Share Posted April 9, 2017 I've had it go both ways, sometimes works, sometimes doesn't. so If its not a area they clear I set both to be on the safe side. Link to comment Share on other sites More sharing options...
BlahBlahDEEBlahBlah Posted April 9, 2017 Share Posted April 9, 2017 @Caleb and Greek recent replies:It's really just preference or out of habit at this point, same as how some people use the Atomatron version of the quest as an example. Though I will concede that some poeple seem to just have better luck doing it one way or the other (or the other (or the other)) for whatever reasons. Case in point: I still do it the same way (other than a few specific changes made for certain situations, like inmediatly on map or type of settlers) I've been doing it for a year or so now and have had very few issues (at least I hope I don't...least no one reports them, heh)....then again, most of what I do is highly separated from most things that might cause issues (relative location to other settlements, conflicts of other builders, settler changes, etc), so maybe I'm not the best example. =P Link to comment Share on other sites More sharing options...
nikashubaiton Posted April 10, 2017 Author Share Posted April 10, 2017 See the setting it as owned already with the true false flags doesn't fix the issue, but I will definitely try the other steps and let you guys know, thanks! Link to comment Share on other sites More sharing options...
BlahBlahDEEBlahBlah Posted April 10, 2017 Share Posted April 10, 2017 Just in case, after you do settings changes, you are going back to a save from before you had the mod enabled, correct? Link to comment Share on other sites More sharing options...
nikashubaiton Posted April 10, 2017 Author Share Posted April 10, 2017 (edited) so for the top script, I'm not actually sure how to add it as I've never done one before. In the scripts section I clicked add and then new, is that the section? Sorry for all the basic questionsEdit: I'm trying now for the default clear location script, am I getting closer? Edited April 10, 2017 by nikashubaiton Link to comment Share on other sites More sharing options...
nikashubaiton Posted April 10, 2017 Author Share Posted April 10, 2017 (edited) I added it to the default clear location script, that didn't work, I'll just wait until someone gets back to me so I don't f*** it up lmao Additionally, you're talking to a guy with literally NO SCRIPTING EXPERIENCE AT ALL so if you can simplify it I would really appreciate it Edited April 10, 2017 by nikashubaiton Link to comment Share on other sites More sharing options...
Recommended Posts