Jump to content

So I'm building this mod and....


Tenamil

Recommended Posts

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 file

Put 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 decor

Added 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

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)
00002ccb
dunno if this'll help

alternatively 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 by tartarsauce2
Link to comment
Share on other sites

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

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...