Tenamil Posted May 4, 2016 Share Posted May 4, 2016 Hey folks, I'm trying to build a mod in CK that I thought it would be pretty straight forward. The mod creates an item (Mirror) that can activate the barber script. Right now I have the item created, and it can be placed (although not properly, I'm working on that atm), however whenever I activate it, it doesn't work, the mirror just opens and closes but it doesn't bring up the change hairstyle feature . I'm really new to making mods, and would appreciate any input you folks can give me on how to make this work. What I've done so far is: Created a new activator based off of a radio activator and gave it a mirror nif filePut the facegenbarber script into the activator (pretty much just copied the barber chair script from Diamond city)Created a new Workshop keyword for it and put it under misc decorAdded component requirements I'm just not sure what to do next to get it to work Thanks in advanced Link to comment Share on other sites More sharing options...
seekingthesun Posted May 4, 2016 Share Posted May 4, 2016 You need to probably duplicate or add a new stage at the end of The Barber script that makes action on activation Link to comment Share on other sites More sharing options...
Tenamil Posted May 4, 2016 Author Share Posted May 4, 2016 I tried editing the script file, but I don't have a program that edits a PSC file Link to comment Share on other sites More sharing options...
tartarsauce2 Posted May 4, 2016 Share Posted May 4, 2016 (edited) one of john's keywords is...Barber [KYWD:000306FE]http://fallout.wikia.com/wiki/John_(Fallout_4) base id (also known as Form ID in FO4Edit)00002ccbdunno if this'll helpalternatively if you can find some way to look and find the files used in the initial character creation section of the game I'm willing to bet they're essentially the same keywords etc that you'd need, I'm guessing that's where you got the inspiration from anyways, right? Edited May 4, 2016 by tartarsauce2 Link to comment Share on other sites More sharing options...
Tenamil Posted May 4, 2016 Author Share Posted May 4, 2016 Thats a good idea thanks Link to comment Share on other sites More sharing options...
EmissaryOfWind Posted May 4, 2016 Share Posted May 4, 2016 This mod adds chairs that open the surgery interface, maybe taking a look at it will help: http://www.nexusmods.com/fallout4/mods/12796/? Link to comment Share on other sites More sharing options...
Korodic Posted May 4, 2016 Share Posted May 4, 2016 Well, the way I did it, I decided to use less-obvious furniture with scissors as the activator. that forwards the player's activation to an invisible piece of furniture (the railroad woman's was good, but didnt re-position the camera. So I went with the mirror furniture that was used in the intro). The script on the invisible furniture is similar to the original barber, but strips out the parts that require the barber be present. Below code also includes black fade in case the camera moves weird into place. This can happen depending if objects are too close to the mirror (such as walls). Sharing is caring I guess.Scriptname SubHome_BarberMenu extends ObjectReference ImageSpaceModifier Property FadeToBlack auto ImageSpaceModifier Property HoldBlack auto ImageSpaceModifier Property FadeFromBlack auto Keyword Property AnimFaceArchetypePlayer Auto Const {Store Player Face Archetype. We need to switch player to Neutral while in the menu.} ;************************************** Function DoFadeOut() ; Black you out, disable player controls FadeToBlack.Apply() Utility.Wait(1.5) FadeToBlack.PopTo(HoldBlack) ;Game.DisablePlayerControls(abMovement = false, abFighting = false, abCamSwitch = false, abMenu = false, abActivate = false, abJournalTabs = false, aiDisablePOVType = 1) EndFunction ;************************************** Function DoFadeIn() ; Fade back in, enable player controls HoldBlack.PopTo(FadeFromBlack) HoldBlack.Remove() Utility.Wait(2) FadeFromBlack.Remove() ;Game.EnablePlayerControls(abMovement = false, abFighting = false, abCamSwitch = false, abLooking = false, abSneaking = false, abMenu = false, abActivate = false, abJournalTabs = false, aiDisablePOVType = 1) EndFunction Event OnCellAttach() Self.BlockActivation(True, True) EndEvent ;Event OnActivate(ObjectReference akActionRef) ; if (akActionRef == Game.GetPlayer()) ; Game.ShowRaceMenu(uimode = 2) ; Debug.MessageBox("I tried to show race menu...") ; (Game.GetPlayer()).ChangeAnimFaceArchetype(AnimFaceArchetypePlayer) ; endif ;EndEvent ;when player activates furniture, wait until he sits, then open the face gen menu Event OnActivate(ObjectReference akActionRef) Actor PlayerREF = Game.GetPlayer() If akActionRef == PlayerREF DoFadeOut() Self.Activate(Game.GetPlayer(), true) RegisterForRemoteEvent(PlayerREF, "OnSit") RegisterForRemoteEvent(PlayerREF, "OnGetUp") EndIf EndEvent Event Actor.OnSit(Actor akSender, ObjectReference akFurniture) If akFurniture == Self ;make sure player has CharGen Skeleton for editing ;Game.GetPlayer().SetHasCharGenSkeleton() Utility.Wait(2) DoFadeIn() Self.BlockActivation(False, False) Game.ShowRaceMenu(uimode = 2) UnRegisterForRemoteEvent(Game.GetPlayer(), "OnSit") EndIf EndEvent Event Actor.OnGetUp(Actor akSender, ObjectReference akFurniture) Actor PlayerREF = Game.GetPlayer() If (akFurniture == Self) && (akSender == PlayerREF) ;make sure player face is back to Player archetype PlayerREF.ChangeAnimFaceArchetype(AnimFaceArchetypePlayer) ;reset the surgery UnRegisterForRemoteEvent(PlayerREF, "OnGetUp") Self.BlockActivation(True, True) EndIf EndEvent Link to comment Share on other sites More sharing options...
seekingthesun Posted May 5, 2016 Share Posted May 5, 2016 I tried editing the script file, but I don't have a program that edits a PSC fileSome edits can be done in Pexinspector and the creationkit comes with a papyrus compiler/decompiler that you can use in situ for edits. Link to comment Share on other sites More sharing options...
Recommended Posts