Moongym Posted August 17, 2022 Share Posted August 17, 2022 Hi! Newbie to the Creation Kit here seeking guidance. I've spent ~150 hours in the creation kit trying to learn the basics between YouTube videos and self experimentation. I've made landscapes, navmeshed small areas and began very primitive coding (what's involved with dialogue trees and quests). Any way, I'd like to start trying to make a small world space with NPCs. Being somewhat ambitious, I'd love to be able to add dialogue options that are only available if the player has certain perks (not from the vanilla perk tree, mind you). Is this at all possible in FO4? From the little bit of research I've done, it seems like you'd have to attach the perk to, say, a magazine. Is this worth pursuing, or should I wait till I'm more experienced Link to comment Share on other sites More sharing options...
hereami Posted August 17, 2022 Share Posted August 17, 2022 (edited) By a script as well: AddPerk(), RemovePerk() - also works for original chart perks . Also can be attached temporarily by a MagicEffect. Then check in a dialogue or whenever else by Condition/Function HasPerk. Though if need just as a plain flag, then would rather use Global Variables. Edited August 17, 2022 by hereami Link to comment Share on other sites More sharing options...
Moongym Posted August 17, 2022 Author Share Posted August 17, 2022 By a script as well: AddPerk(), RemovePerk() - also works for original chart perks . Also can be attached temporarily by a MagicEffect. Then check in a dialogue or whenever else by Condition/Function HasPerk. Though if need just as a plain flag, then would rather use Global Variables.So I could create a blank perk, attach it to an in-game trigger, and then add dialouge options with the "Condition/Function HasPerk"? That sounds much easier than I was thinking it would be! Thank you for a useful answer! Link to comment Share on other sites More sharing options...
RaidersClamoring Posted August 17, 2022 Share Posted August 17, 2022 Certainly pursuable but if you just need a control-value that is set upon activating something (in this case picking up a mag iiuc but could be almost anything), and then checked true/false whether attached to the player in a given situation then you can just create a keyword or globalvariable that is added to the player or changed (respectively) when picking up the mag and then use it as a condition function. But maybe you had plans on creating an actual perk later and using a blank as a placeholder? Anyway, In conditions it would be HasKeywordorGetGlobalValue In papyrus (script attached to the mag or alias) Event OnActivate(ObjectReference akActionRef) If (akActionRef == Game.GetPlayer())TheGlobal.SetValue(1.0)EndifEndEvent or Event OnActivate(ObjectReference akActionRef) If (akActionRef == Game.GetPlayer())Game.GetPlayer().AddKeyword(theKeyword)EndifEndEvent Link to comment Share on other sites More sharing options...
hereami Posted August 17, 2022 Share Posted August 17, 2022 (edited) By a script as well: AddPerk(), RemovePerk() - also works for original chart perks . Also can be attached temporarily by a MagicEffect. Then check in a dialogue or whenever else by Condition/Function HasPerk. Though if need just as a plain flag, then would rather use Global Variables.So I could create a blank perk, attach it to an in-game trigger, and then add dialouge options with the "Condition/Function HasPerk"? That sounds much easier than I was thinking it would be! Thank you for a useful answer!Whoa, whoa.. For clarification, Perks can't be added to anything but Actors, so need an activation script to attach perk to Player entity, as in example above, just use AddPerk() instead. Well, again, if that's a flag-like need, then Globals would be most suitable and efficient. Though benefit of a dummy Perk would be visibility in Stats >Perks tab for informational purpose, that yes. PS. To mark an object should use Keywords or ActorValue, if applicable.For a ready thing - script PerkMagBaseScript.psc, but would need a custom one for OnTriggerEnter event. Edited August 17, 2022 by hereami Link to comment Share on other sites More sharing options...
Zorkaz Posted August 17, 2022 Share Posted August 17, 2022 Perks can be added via simple scripts like Event OnRead()Game.Getplayer().AddPerk (MyPerk)EndEvent Event OnActivate(ObjectReference AkActionRef)Game.Getplayer().AddPerk (MyPerk)Endif As for dialogue you just need a condition that is likeHasPerk MyPerk -RunOnPlayer == 1 Link to comment Share on other sites More sharing options...
Recommended Posts