RegisterCharacterModel

From The KillerJim Mod Wiki

PlayerProxy::RegisterCharacterModel

RegisterCharacterModel.png

Server Only Function - This is an function executes only on the server.

Description

This registers a character model so that the player can SetCharacterModel.

Normally character models are created in a dedicated workshop package. This project would have a data-table that would describe each model the package was exporting. This function allows any game-mode to register characters models directly (i.e. so you don't need to include another package just for character models your game-mode may use).

NOTE In order to register and show the character model immediately upon a player joining this function should be called during the Initialised event the player proxy receives. This event is called prior to the pawn being created and therefore can ensure that any model changes are shown immediately the pawn is created (both locally and remotely for other players).

This function takes a complex structure (detailed below) that describes the character model in detail. For more information on creating your own character models please see our Custom Character Creation section.

RegisterCharacterModel Struct.png

The mechanism used here (the KJModCharacterModelTableRow structure) is the same one used when creating many character models as part of a workshop package (the workshop package will use a data table of these structures for each model). This function allows you to register models outside workshop packages.

Arguments
1 KJModCharacterModelTableRow params
A structure representing the character model that is being registered.

String Character Category Name - Character models can be grouped in the Spawn (Q) Menu under this category (can be left empty)

String Character Name - The name of the character, used in Spawn (Q) Menu and SetCharacterModel

Texture Icon Texture - A texture (512x512) for the Spawn (Q) Menu (can be left blank)

Character Description - a description shown to uses in various locations (such as Spawn (Q) Menu)

Array String Character Third Person Skeletal Mesh Asset Path - An array of Naked Paths pointing to skeletal meshes that will be used with this characters third person view (i.e. full body); normally you have only one skeleton mesh.

String Character Third Person Physics Asset Path - If you wish to override your models default physics asset (as defined in the mesh) you can supply the Naked Path to the asset here; normally left blank.

String Character First Person Mesh Asset Path - A Naked Path to the skeletal mesh that will be used for the "arms" that are presented in front of the player, holding items. If left blank the current (or default) arms will be used.

String Character Anim BP Asset Path - If you are using a non UE4 Skeleton you need to provide an AnimBP that will operate the various features of KJMod (firing, jumping, walking, ducking, etc.) - See the section on Custom Character Creation to understand how to build this.

Bool AdultTheme - If the character model is naked or contains other adult theme's this option needs to be set; this allows the settings to filter out adult themes. Failure to set this correctly will have your model temporarily banned

Playing

Developers

Developer Reference