Frostbite10 Posted October 18, 2018 Share Posted October 18, 2018 Not the one where you put the mirror ingame via workshop mode, what I'm trying to accomplish is placing the mirror with creationkit. Such as Elianora's playerhome mod's, which have mirrors that allow the player to open looksmenu. I'm sure scripts are needed for this and I'm a complete newb at those. Link to comment Share on other sites More sharing options...
dikr Posted October 18, 2018 Share Posted October 18, 2018 (edited) Well the easiest way would be your mod being dependent on LooksMirror. Load them both up in the CK, set yours as active, find it somewhere in the container / furniture section and place it in your home. As long as your game loads looksmirror's esp first there shouldn't be a problem, I reckon. Edited October 18, 2018 by dikr Link to comment Share on other sites More sharing options...
Frostbite10 Posted October 18, 2018 Author Share Posted October 18, 2018 Well the easiest way would be your mod being dependent on LooksMirror. Load them both up in the CK, set yours as active, find it somewhere in the container / furniture section and place it in your home. As long as your game loads looksmirror's esp first there shouldn't be a problem, I reckon.Well i thought of that too, but the problem is looksmirror needs to be crafted ingame and i don't see which container in CK is the one used for looksmirror. If possible, could you take a look and let me know ? Thanks for the reply Link to comment Share on other sites More sharing options...
DieFeM Posted October 18, 2018 Share Posted October 18, 2018 (edited) In order to make it usable you need to create (if there is none already) an activator (a container would work as well, but you would see both menus at the same time) using the mirror nif, then attach a new script to this mirror, and use the OnActivate event to open the looks menu:https://www.creationkit.com/fallout4/index.php?title=ShowRaceMenu_-_Gamehttps://www.creationkit.com/fallout4/index.php?title=OnActivate_-_ObjectReferenceExample: Event OnActivate(ObjectReference akActionRef) If(akActionRef == Game.GetPlayer()) Game.ShowRaceMenu() EndIf EndEvent Use Game.ShowRaceMenu(uiMode = 1) instead if you don't want that the sex can be changed. Edited October 18, 2018 by DieFeM Link to comment Share on other sites More sharing options...
dikr Posted October 18, 2018 Share Posted October 18, 2018 (edited) Well the easiest way would be your mod being dependent on LooksMirror. Load them both up in the CK, set yours as active, find it somewhere in the container / furniture section and place it in your home. As long as your game loads looksmirror's esp first there shouldn't be a problem, I reckon.Well i thought of that too, but the problem is looksmirror needs to be crafted ingame and i don't see which container in CK is the one used for looksmirror. If possible, could you take a look and let me know ? Thanks for the reply Not near a CK at the moment so can't help you with that. It's easy to sort CK items if you expand the size of the window to sort on the date of object entries. Modded ID's mostly have a younger date. Also you could look at the Constructible Object for the Mirror to see exactly which item it adds to the workshop menu. Otherwise coding it yourself like DieFeM suggests should work too and prevents your mod needing a dependency on Looks MIrror I guess. Edited October 18, 2018 by dikr Link to comment Share on other sites More sharing options...
Frostbite10 Posted October 19, 2018 Author Share Posted October 19, 2018 (edited) In order to make it usable you need to create (if there is none already) an activator (a container would work as well, but you would see both menus at the same time) using the mirror nif, then attach a new script to this mirror, and use the OnActivate event to open the looks menu:https://www.creationkit.com/fallout4/index.php?title=ShowRaceMenu_-_Gamehttps://www.creationkit.com/fallout4/index.php?title=OnActivate_-_ObjectReferenceExample: Event OnActivate(ObjectReference akActionRef) If(akActionRef == Game.GetPlayer()) Game.ShowRaceMenu() EndIf EndEvent Use Game.ShowRaceMenu(uiMode = 1) instead if you don't want that the sex can be changed.I'll give this a try, thank you Edited October 19, 2018 by Frostbite10 Link to comment Share on other sites More sharing options...
DieFeM Posted October 19, 2018 Share Posted October 19, 2018 (edited) I've been trying it, and is not that easy, it shows the looks menu, but it doesn't place the camera in the right angle, so I ended up creating a Furniture object instead, with the mirror and a marker called MarkerSinkFaceGen: Model: SetDressing\PlayerHouse\PlayerHouse_BathroomMirror02.nifMarker: Markers\MarkerSinkFacegen.nif Click on the Interact Point 0 and set the Marker Position/Orientation at X=0.0 Y=-62.0 Z=-117.0 Rotation=0.0 and check all Marker Available Entry Types. Add the keywords AnimFurnSinkFacegen, FurnitureCantWait and FurnitureForce3rdPerson Add a new script, name it whatever you want, and after the scriptname line, add the next code: Event OnActivate(ObjectReference akActionRef) If akActionRef == Game.GetPlayer() RegisterForAnimationEvent(akActionRef As Actor, "idleChairSitting") EndIf EndEvent Event OnAnimationEvent(ObjectReference akSource, string asEventName) If(akSource == Game.GetPlayer() && asEventName == "idleChairSitting") UnregisterForAnimationEvent(akSource As Actor, "idleChairSitting") RegisterForRemoteEvent(akSource As Actor, "OnGetUp") ; give the load a second to get the player in the furniture Utility.Wait(1.5) ; dont show compass Game.SetCharGenHUDMode(1) ; no saving or waiting Game.SetInCharGen(True, True, False) ; make sure player has CharGen Skeleton for editing (akSource As Actor).SetHasCharGenSkeleton() ; precache the face gen data Game.PrecacheCharGen() Game.ShowRaceMenu(uimode = 1) EndIf EndEvent Event Actor.OnGetUp(Actor akSender, ObjectReference akFurniture) If (akFurniture == Self && akSender == Game.GetPlayer()) UnregisterForRemoteEvent(akSender As Actor, "OnGetUp") ; reset the surgery Game.SetCharGenHUDMode(0) Game.SetInCharGen(False, False, False) (akSender As Actor).SetHasCharGenSkeleton(False) Game.PrecacheCharGenClear() EndIf EndEvent But it still have a couple of errors: - Editing the body it doesn't move the camera to the proper angle. - The face shows this brown skin. Edited October 19, 2018 by DieFeM Link to comment Share on other sites More sharing options...
DieFeM Posted October 19, 2018 Share Posted October 19, 2018 (edited) This one fixes the "black skin" and also removes the pointer (the dot in the middle of the screen): InputEnableLayer ControllerEnableLayer Event OnActivate(ObjectReference akActionRef) If akActionRef == Game.GetPlayer() RegisterForAnimationEvent(akActionRef As Actor, "idleChairSitting") EndIf EndEvent Event OnAnimationEvent(ObjectReference akSource, string asEventName) If(akSource == Game.GetPlayer() && asEventName == "idleChairSitting") UnregisterForAnimationEvent(akSource As Actor, "idleChairSitting") RegisterForRemoteEvent(akSource As Actor, "OnGetUp") ; Precache the face gen data Game.PrecacheCharGen() ; Give the load a couple of seconds to get the player in the furniture Utility.Wait(2.0) ; Make sure the player can not move ControllerEnableLayer = InputEnableLayer.Create() ControllerEnableLayer.DisablePlayerControls(abLooking=True, abCamSwitch=True, abSneaking = True) ControllerEnableLayer.EnableSprinting(False) ; Disable Z-Key (Pointer) ControllerEnableLayer.EnableZKey(False) ; Do not show compass Game.SetCharGenHUDMode(1) ; No saving or waiting Game.SetInCharGen(True, True, False) ; Make sure player has CharGen Skeleton for editing (akSource As Actor).SetHasCharGenSkeleton() Game.ShowRaceMenu(uimode = 1) EndIf EndEvent Event Actor.OnGetUp(Actor akSender, ObjectReference akFurniture) If (akFurniture == Self && akSender == Game.GetPlayer()) UnregisterForRemoteEvent(akSender As Actor, "OnGetUp") ; Reset the surgery Game.SetCharGenHUDMode(0) Game.SetInCharGen(False, False, False) (akSender As Actor).SetHasCharGenSkeleton(False) Game.PrecacheCharGenClear() ; Make sure the player can move again ControllerEnableLayer.EnablePlayerControls() ControllerEnableLayer.EnableSprinting(True) ;Enable Z-Key ControllerEnableLayer.EnableZKey(True) EndIf EndEvent PD: Sorry for double posting. Edited October 19, 2018 by DieFeM Link to comment Share on other sites More sharing options...
Frostbite10 Posted October 20, 2018 Author Share Posted October 20, 2018 (edited) @DieFeMThank you, you've been a great help. However, I'm stuck at "create property from form", there are no properties for me to select In game, the mirror works, but it just shows the player using the furniture, no menu whatsoever shows up.Compiler was successful with no errors. Edited October 20, 2018 by Frostbite10 Link to comment Share on other sites More sharing options...
Frostbite10 Posted October 20, 2018 Author Share Posted October 20, 2018 (edited) I managed to figure out the create property from form, and it's working, thank you so much ! Currently, i'm trying to figure out a few things.1: Mirror button says E) Sit, I want to change it to E) Edit Appearance (Solved, activate text override)2: Activate light when using the mirror to light up the player face (by ticking initially disabled on the lights, the lights still light up in game) If you know the solution to these please do tell, in the meantime I'll try it out myself.Thanks again Edited October 20, 2018 by Frostbite10 Link to comment Share on other sites More sharing options...
Recommended Posts