FlashyJoer Posted February 19, 2018 Share Posted February 19, 2018 Hi all, Looking for some feedback / help with location ref aliases. In a nutshell, I am attempting to recreate quest WorkshopRaiderAttack01. I do not wish to use it directly because I want to script the scenario to fit a purpose tied uniquely to my mod. In short, I have buildable safes. What I am trying to do is trigger a raider attack when the player teleports into an owned settlement that contains a safe and if so, if the contents of said safe are in excess of a determined amount. This part I have working - determining if a safe is present and how much is in it and then starting the quest. My problem is that since my quest does not use script events, it appears the location is not filling properly. What I have done to try to remedy this is have a PlayerREF alias as the first ref in the quest. And then a location ref alias that uses fill type of Reference Alias Location using the PlayerREF alias and a keyword of LocTypeWorkshopSettlement. My understanding of the CK wiki is that this will populate the name of the location into the loc ref based on the conditions. "Select a Reference Alias on this quest (must be higher in the alias list); fill with that reference's current location (optionally use a keyword to select a desired parent location of the current location - no keyword means the current location)." For guidance, I am wondering if I am interpreting this correctly. I do need to get the location name so that the subsequent ref alias fills will function, as they do in the WorkshopRaiderAttack01 quest. Those aliases are the Workshop, Edge Markers and Center Marker. And once those are filled, I do have a Ref Collection Alias to populate the requisite amount of Raiders using LvlRaiderMixed. For some reason though - this quest does not start as expected. I know it attempts to start and then fails, so one of the refs is failing to fill. I have now enabled papyrus logging so that I can see if there is a fill issue, which on my next test I will validate. My thought though is that the location ref alias is not pulling the location name in quite the same way as the vanilla workshop attacker quest does, due to it using the Script Event to receive the location. So yes, any insight would be thankfully received. Link to comment Share on other sites More sharing options...
wim95 Posted February 19, 2018 Share Posted February 19, 2018 (edited) You can't start WorkshopXXAttackNN quests outside of Story Manager. WorkshopScript -> DailyUpdate -> CheckForAttack -> (Days Since Last Attack > 7 days) -> WorkshopParentScript -> TriggerAttack -> Send WorkshopEventAttack keyword to Story Manager -> Story Manager randomly selects quest -> Attack happens See WorkshopParentScript, function TriggerAttack uses command WorkshopEventAttack.SendStoryEventAndWait(akLoc = workshopRef.myLocation, aiValue1 = attackStrength, akRef1 = workshopRef) Story Manager uses argument "akLoc" to fill aliases of WorkshopXXAttackNN quests Read Skyrim CK wiki about Story Manager, because FO4 CK wiki empty. Try create new independent of Story Manager quest or Send WorkshopEventAttack keyword to Story Manager, but attack will not only raiders Edited February 19, 2018 by wim95 Link to comment Share on other sites More sharing options...
FlashyJoer Posted February 19, 2018 Author Share Posted February 19, 2018 (edited) Sorry, I thought I made this clear. I am not using the Story Manager. In fact, I am not using any part of the vanilla system for such things. I have made my own from scratch. My problem, as stated, is getting the Loc Ref Alias to populate the player's location when it is a workshop type (loctypeworkshopsettlement). No matter how I fill in the loc ref alias, it fails to fill and thus the entire quest fails to start. As you can see below, the loc ref alias is populated with what I think will get me the location, but in-game, this loc ref alias does not fill and thus the quest it is attached to fails to start. This is my ask - will the way it is setup give me the location or not and more importantly, said location will be able to be used to find the workshop, edge markers and center markers contained in the location? Edited February 19, 2018 by joerqc Link to comment Share on other sites More sharing options...
FlashyJoer Posted February 19, 2018 Author Share Posted February 19, 2018 (edited) For a little more clarity, I will attach a SS of the quest itself so you can see the aliases and also the calling code. Of import, there are no references to the workshop script, the workshop attack script or the REscript. It is literally a blank quest whose sole purpose right now, for testing, is to find the location, assign refs to the markers in the locations and then populate raiders at the edge marker. I will of course be coding my own script to deal with the actual attack once I know the quest starts and populates the raiders. Right now, everything is set to optional so that I can track where the breakdown in the quest start conditions are - and it is at the loc ref alias. Now, the code that starts this quest is: Event OnPlayerTeleport() CheckLocation() EndEventFunction CheckLocation() Location WhereAmI = PlayerREF.GetCurrentLocation() If WhereAmI.HasKeyword(LocTypeWorkshopSettlement) ObjectReference Moolah = Game.FindClosestReferenceOfTypeFromRef(RSE_Profit_Safe, PlayerREF, 5000.0) If Moolah If Moolah.GetItemCount(caps001) > 100 Debug.Messagebox("Your safe has over 100 caps in it! An attack is coming!") RSE_BrothelAttack.stop() RSE_BrothelAttack.start() If RSE_BrothelAttack.IsRunning() Debug.Notification("Brothel Attack is running...") Endif Endif Endif Endif EndFunction Note that this code works - the minute I teleport to an owned settlerment with a safe that has 100+ caps in it, the message box pops up, but the quest fails to start, due to the loc ref alias... Edited February 19, 2018 by joerqc Link to comment Share on other sites More sharing options...
wim95 Posted February 19, 2018 Share Posted February 19, 2018 My understanding of the CK wiki is that this will populate the name of the location into the loc ref based on the conditions. "Select a Reference Alias on this quest (must be higher in the alias list); fill with that reference's current location (optionally use a keyword to select a desired parent location of the current location - no keyword means the current location)." Don't use a keyword. Parent location is Commonwealth Link to comment Share on other sites More sharing options...
FlashyJoer Posted February 19, 2018 Author Share Posted February 19, 2018 (edited) Thank you for clearing the fog from my eyes on that one! :smile: It still did not allow the ref to populate but I have figured out why by researching the Quest Alias Tab page for Skyrim's CK wiki. The location will not populate because it is locked to a reserved alias on another quest. I am using Sanctuary as my test and it is currently in use by a minuteman radiant quest. So by selecting allow reserved on the location, the quest now starts. Slowly getting there - and I thank you for making me re-examine the wiki. Edited February 19, 2018 by joerqc Link to comment Share on other sites More sharing options...
FlashyJoer Posted February 19, 2018 Author Share Posted February 19, 2018 To circle back - once I made all of my aliases Allow Reserved, the quest fires precisely as scripted upon teleport to Sanctuary, when the safe is 100+ caps in capacity. The raiders immediately populated at the bridge to Vault 111 and begin invading Sanctuary, which is precisely what I wanted to happen. Many, MANY thanks for assisting me in this endeavor! Link to comment Share on other sites More sharing options...
Recommended Posts