ElysianMods Posted August 24, 2019 Share Posted August 24, 2019 So I'm working on a mod that makes Preston completely ignore Nuka-World events. In short, it's pretty lame that I have to choose between sacrificing 10+ hours of DLC content or 10+ hours of Minutemen faction quests, not to mention the benefits given with both. So I found the initial checks for Overboss and Nuka-World events when you first meet Preston and shortly during The First Step. That was fairly easy to remove. I also was able to negate the Nuka-World speel that Preston gives once you place the first raider flag, but for the life of me I can't find how his affinity is constantly being set to -1100 as soon as the flag is planted. I've checked in many places (DLC04COMPreston plus Clearing Out <Location> and Home Sweet Home) and tried looking into the CA scripts attached (even going so far as to remove the CA scripts from the quests entirely) - sadly this has no effect on CA_Affinity being set to -1100 (even if it sits at 1100 as is). I'm at a loss as to how this is set up to happen. I've smashed my head against the wall like 45 times. If anyone could pitch in some feedback, I'll be your hoe tbh. Link to comment Share on other sites More sharing options...
ElysianMods Posted August 24, 2019 Author Share Posted August 24, 2019 Okay, so I found the script fragment. Not sure why I overlooked this before. All I have is the psc file though. I mean, I can edit the psc file but Creation Kit won't actually let me open the fragment in an external editor. I can edit the source file but that won't really help me without being able to recompile it and it's throwing up red flags based on expected name being dlc04:fragments:quests:dlc04mq04_01000804 as opposed to simply dlc04mq04_01000804. I understand that it's looking at the source address (which would be DLC04\Fragments\Quests\DLC04MQ04_01000804 for the source file)...I haven't really edited any script fragments before. I am at a loss. Once again if you have any feedback that can help me I'll be your hoe. Link to comment Share on other sites More sharing options...
SKKmods Posted August 25, 2019 Share Posted August 25, 2019 (edited) Rather than hack base game scripts it would be better to "wrap" it with an external script that detects the change and reverts it. There is a companion affinity change custom event you can subscribe to and test if nukaworld quest stage is X and preston affinity is Y then reset preston affinity. A 5 minute off the top of my head outline can be elaborated; Quest Property pFollowers Auto Const Mandatory Quest Property pNukaworldQuestName Auto Const Mandatory ;fill in actual quest name Actor Property pPrestonGarvey Auto Const Mandatory ActorValue Propert CA_Affinity Auto Const Mandatory Keyword Property CA_CustomEvent_PrestonHates Auto Const Mandatory Event OnInit() RegisterForCustomEvent(pFollowers, "AffinityEvent") RegisterForRemoteEvent(pNukaworldQuestName, "OnStageSet") EndEvent Event FollowersScript.AffinityEvent(FollowersScript akSender, Var[] args) keyword EventKeyword = args[0] as keyword GlobalVariable EventSize = args[1] as GlobalVariable CheckCompanionProximity = args[2] ;which is set above actorvalue associatedActorValue = args[3] as actorValue keyword CustomTopicKeyword = args[4] as keyword bool IsDialogueBump = args[5] as bool float ResponseDelay = args[6] as float objectReference Target = args[7] as objectReference If (EventKeyword == CA_CustomEvent_PrestonHates) CheckPrestonaffinity() EndIf EndEvent Event Quest.OnStageSet(Quest akSender, int auiStageID, int auiItemID) If akSender == pNukaworldQuestName && auiStageID = 999 ;fill in correct values CheckPrestonaffinity() EndIf EndEvent Function CheckPrestonaffinity() If (pNukaworldQuestName.GetStage() == 9999) && (pPrestonGarvey.GetValue(CA_Affinity) == -1100) pPrestonGarvey.SetValue(CA_Affinity) == 0 UnRegisterForRemoteEvent(pNukaworldQuestName, "OnStageSet") UnregisterForCustomEvent(pFollowers, "AffinityEvent") (Self as Quest).Stop() EndIf EndFunction Edited August 25, 2019 by SKK50 Link to comment Share on other sites More sharing options...
Recommended Posts