1: Create a Character Selection Plus fresh project with whatever version of engine you are using then open it.
2: Navigate to the contents folder of your newly created project
3: Right click on the CharacterSelectionPlus Folder and click migrate
4: when it asks for location to migrate navigate to where your project files are and on your PC go inside your folder find the contents folder and migrate to that.
5: Open your project and you will see the Character Selection is now in your project.
6: Open your Character BP
7: Add 3 skeletal mesh components names CharTop,CharPants and CharBoots by clicking add component(big green tab) on left and adding 3 skeletal meshes (Important:names must be the exact same as one in BP_CharacterSelection for code to work)
Make sure the new components are all connected to the mesh by dragging them on top of the mesh component.
8: Double click on construction script on the left hand side to open construction script code box
9: Go back to the ThirdPersonCharacter BP from the character selection pack and copy the nodes from the construction script and paste them into your characters construction script and connect it up same as pic (If you have named your mesh different to Mesh then change the Mesh variable one to your one.
10: Go to project settings under the edit tab at top on left inside there click on maps and modes inside there you will see game instance class Set the Game Instance to CharSelect_GI (If you already have own game instance with variables inside and cant change it you need to copy everything in my game instance and put into yours then find any casts to my game instance in code inside of character select BP and change to cast to your game instance. Also Change editor default map and game default map to CharacterSelect map
11: Next go back to BP_CharacterSelection and copy all of the code from the red box and above from the event graph (if it isnt open Double click on the event graph on the left hand side) (if you already have an event begin play then you dont need that node but you need all the rest)then go back to your characters bp and paste the code into the event graph. Any nodes if there are red lines right click and just refresh node (If you had your own event begin play hook the code in at the very start of your code from event begin play)
12: Hit Compile
13: Click on the node that says construct none (Highlighted in Pic) and set class dropdown to MainHud (If you cant see it, but you see a node called create main hud widget it means it has stayed set already and you dont need to worry about this step)
14: Right click on any of the variables that are showing red or yellow warning and click create variable.
15: On the left now you will see 4 skeletal mesh variables named SKMesh, SKTop, SKPants and SKBoots click on each one of these and in its details set the replication dropdown to RepNotify then hit compile again and save.(Important Hit Compile and Save at this point to make sure the repnotify functions show up).
16: On the left now you will see you have 4 new Onrep Functions for each of the skeletal meshes you just created (If you dont see them click the arrow on Functions to show all the functions in BP)Double click each one of them and it will open the code for it.
17: Go back to the Character Selection ThirdPersonCharacter BP and copy the rep notify code from the functions inside the BP and paste it inside of your new RepNotify Function and connect them up (if they are not open on the left just double click them and you will see the code) Make sure you match the names Mesh, Top, Pants, and Boots to the correct ones in your character BP.
18: Make sure you double click on the character select map to open it as your start map so you can see the widget ingame, Go into editor and test with the default characters all functions should be now working correctly.
Assuming you already have your characters and clothes Imported and set to your skeleton
Adding Your Own Character
19: Open the CharacterSelection_BP found in the Character selection Folder and navigate to the Variables section in there you will see 2 variales named Female DT and Male DT click on whichever gender you are adding, on right you will see the default values.(hit the dropdown on default values if you cant see all the options in Pic below)
Click the dropdown on eg. Male Skin
20: In the DT go down to the Game animations section and set your Main Animation BP to the same index as you have put your mesh on eg.index 0,1,2 and so on.
21: (If you have your own skeleton for character you need to do this step if your character used ue4 animations then you can skip this step)
Inside the the animations folder then the anim-BP's right click on the Idle_StartScreenAnimBP and retarget anims to your skeleton. Also do this for the DanceAnim_BP same steps just retarget anims to your character.
22: Go back to the BP_CharacteterSelection and in the same Gender DT as you were just in set the default Values of your dance anims class and the Idle anim class
The next steps are for adding fade to your character
(To disable fade function completely go to event graph and on the event begin play just disconnect the 1st two nodes on the sequence SetFadeMaterial_MI and CharacterFadeInTimer)
23: Go to your characters material and open it click on the main result node inside material where the base color plugs into, in the details change the blend mode to masked this will get the opacity mask input to be not greyed out.
Create a material expression constant by holding number 1 and left clicking anywhere in the graph.
Right click on new node and convert to parameter, in details the Parameter Name should be Opacity (Make sure to spell correctly with caps O)
drag of the new Opacity node and type Dither and get the DitherTemporalAA node now connect that into the Opacity Mask on the main node this will give the Dither effect when Fading In.
24: In the WB_MainHud in event begin play find the event contruct node and change the cast from BP_ThirdPersonCharacter to cast to your Characters_BP then drag off from your new cast to character node from the blue pin and promote to variable name it to whatever you want.
25: Still in the WB_MainHud on the left double click to open the get_qiutbutton_visiblility, function drag in your new character variable you made then drag off from your variable and get the set visibility quit button and reconnect them in place of old ones.
26: Still in the WB_MainHud one the left double click to open the Get_ScreenTutVertBox_Visibility function drag in your new character variable you made then drag off from your variable and get the set visibily quit button and reconnect them in place of old ones.
30: (For the Face Only Zoom To Work) If you have your own skeleton and not using the original one in pack you also need to go to your skeleton and create a new socket on the head bone named FaceSocket (Make sure to spell this the exact same as I have here)
31: Go to the Structs_Tables folder and open the male or FemaleMaterials_DT of which gender you are adding and set the materials do this by clicking on the character 0,1,2 at the top and setting the materials to the same order as in the characters Mesh (If you need more indexes in the array you are setting just click the + icon and add more indexes
: Make sure to compile and save and try it out your character should be now selectable and ready to play.
Having a big sale, on-site celebrity, or other event? Be sure to announce it so everybody knows and gets excited about it.
Special thanks go out to HMS and Habbibi
I would like to thank Pallyqle for helping me get Character Selection Plus Replicated and other things to many to mention, here is a link to all of his great work on youtube check it out.
Copyright © 2020 Wallies gaming studio - All Rights Reserved.
Wallies Gaming Studio