FrameworkZ 4.4.2
Provides a framework for Project Zomboid with various systems.
Loading...
Searching...
No Matches
FrameworkZ::Characters Class Reference

Characters module for FrameworkZ. Defines and interacts with CHARACTER object. More...

Public Member Functions

void CreateCharacterTick (player, tickTime)
 
table GetCharacterByID (username)
 Gets the user's loaded character by their ID.
 
void GetCharacterInventoryByID (username)
 
void GetDescriptionLines (description)
 
string Initialize (username, character)
 Initialize a character.
 
table New (username, id, data)
 Create a new character object.
 
void OnClientCommand (module, command, player, args)
 Initialize a character called by OnServerStarted event hook.
 
void OnPreUIDraw ()
 
boolean PostLoad (isoPlayer, characterData)
 Initializes a player's character after loading.
 
boolean Save (username)
 Saves the user's currently loaded character.
 

Data Fields

FrameworkZ Characters __index
 
FrameworkZ Characters
 
 EQUIPMENT_SLOT_BACKPACK
 
 EQUIPMENT_SLOT_BELT
 
 EQUIPMENT_SLOT_EARS
 
 EQUIPMENT_SLOT_FACE
 
 EQUIPMENT_SLOT_GLOVES
 
 EQUIPMENT_SLOT_HEAD
 EQUIPMENT_SLOT_HEAD = "Hat" Enumeration for the character's head slot.
 
 EQUIPMENT_SLOT_OVERSHIRT
 
 EQUIPMENT_SLOT_PANTS
 
 EQUIPMENT_SLOT_SHOES
 
 EQUIPMENT_SLOT_SOCKS
 
 EQUIPMENT_SLOT_UNDERSHIRT
 
 EQUIPMENT_SLOT_VEST
 
FrameworkZ Characters EquipmentSlots
 
 HAIR_COLOR_BLACK_B
 
 HAIR_COLOR_BLACK_G
 
 HAIR_COLOR_BLACK_R
 
 HAIR_COLOR_BLONDE_B
 
 HAIR_COLOR_BLONDE_G
 
 HAIR_COLOR_BLONDE_R
 
 HAIR_COLOR_BROWN_B
 
 HAIR_COLOR_BROWN_G
 
 HAIR_COLOR_BROWN_R
 
 HAIR_COLOR_GRAY_B
 
 HAIR_COLOR_GRAY_G
 
 HAIR_COLOR_GRAY_R
 
 HAIR_COLOR_RED_B
 
 HAIR_COLOR_RED_G
 
 HAIR_COLOR_RED_R
 
 HAIR_COLOR_WHITE_B
 
 HAIR_COLOR_WHITE_G
 
 HAIR_COLOR_WHITE_R
 
FrameworkZ Characters List
 
 SKIN_COLOR_BROWN
 
 SKIN_COLOR_DARK_BROWN
 
 SKIN_COLOR_PALE
 
 SKIN_COLOR_TANNED
 
 SKIN_COLOR_WHITE
 

Detailed Description

Characters module for FrameworkZ. Defines and interacts with CHARACTER object.

Definition at line 18 of file Characters.lua.

Member Function Documentation

◆ CreateCharacterTick()

void CreateCharacterTick ( player ,
tickTime  )

◆ GetCharacterByID()

table GetCharacterByID ( username )

Gets the user's loaded character by their ID.

Parameters
usernamestring The player's username to get their character object with.
Returns
table The character object from the list of characters.

◆ GetCharacterInventoryByID()

void GetCharacterInventoryByID ( username )

◆ GetDescriptionLines()

void GetDescriptionLines ( description )

◆ Initialize()

string Initialize ( username ,
character  )

Initialize a character.

Parameters
usernamestring The player's username.
charactertable The character's object data.
Returns
string The username added to the list of characters.

◆ New()

table New ( username ,
id ,
data  )

Create a new character object.

Parameters
usernamestring The player's username as their ID.
idinteger The character's ID from the player stored data.
datatable (Optional) The character's data stored on the object.
Returns
table The new character object.

◆ OnClientCommand()

void OnClientCommand ( module ,
command ,
player ,
args  )

Initialize a character called by OnServerStarted event hook.

Parameters
modulestring
commandstring
playertable Player object.
argsstring

◆ OnPreUIDraw()

void OnPreUIDraw ( )

◆ PostLoad()

boolean PostLoad ( isoPlayer ,
characterData  )

Initializes a player's character after loading.

Returns
boolean Whether or not the post load was successful.

◆ Save()

boolean Save ( username )

Saves the user's currently loaded character.

Parameters
usernamestring The player's username to get their loaded character from.
Returns
boolean Whether or not the character was successfully saved.

Field Documentation

◆ __index

Definition at line 20 of file Characters.lua.

◆ Characters

Definition at line 99 of file Characters.lua.

◆ EQUIPMENT_SLOT_BACKPACK

FrameworkZ::Characters::EQUIPMENT_SLOT_BACKPACK

Definition at line 77 of file Characters.lua.

◆ EQUIPMENT_SLOT_BELT

FrameworkZ::Characters::EQUIPMENT_SLOT_BELT

Definition at line 87 of file Characters.lua.

◆ EQUIPMENT_SLOT_EARS

FrameworkZ::Characters::EQUIPMENT_SLOT_EARS

Definition at line 75 of file Characters.lua.

◆ EQUIPMENT_SLOT_FACE

FrameworkZ::Characters::EQUIPMENT_SLOT_FACE

Definition at line 73 of file Characters.lua.

◆ EQUIPMENT_SLOT_GLOVES

FrameworkZ::Characters::EQUIPMENT_SLOT_GLOVES

Definition at line 79 of file Characters.lua.

◆ EQUIPMENT_SLOT_HEAD

FrameworkZ::Characters::EQUIPMENT_SLOT_HEAD

EQUIPMENT_SLOT_HEAD = "Hat" Enumeration for the character's head slot.

Definition at line 71 of file Characters.lua.

◆ EQUIPMENT_SLOT_OVERSHIRT

FrameworkZ::Characters::EQUIPMENT_SLOT_OVERSHIRT

Definition at line 83 of file Characters.lua.

◆ EQUIPMENT_SLOT_PANTS

FrameworkZ::Characters::EQUIPMENT_SLOT_PANTS

Definition at line 89 of file Characters.lua.

◆ EQUIPMENT_SLOT_SHOES

FrameworkZ::Characters::EQUIPMENT_SLOT_SHOES

Definition at line 93 of file Characters.lua.

◆ EQUIPMENT_SLOT_SOCKS

FrameworkZ::Characters::EQUIPMENT_SLOT_SOCKS

Definition at line 91 of file Characters.lua.

◆ EQUIPMENT_SLOT_UNDERSHIRT

FrameworkZ::Characters::EQUIPMENT_SLOT_UNDERSHIRT

Definition at line 81 of file Characters.lua.

◆ EQUIPMENT_SLOT_VEST

FrameworkZ::Characters::EQUIPMENT_SLOT_VEST

Definition at line 85 of file Characters.lua.

◆ EquipmentSlots

FrameworkZ Characters EquipmentSlots

Definition at line 97 of file Characters.lua.

◆ HAIR_COLOR_BLACK_B

FrameworkZ::Characters::HAIR_COLOR_BLACK_B

Definition at line 36 of file Characters.lua.

◆ HAIR_COLOR_BLACK_G

FrameworkZ::Characters::HAIR_COLOR_BLACK_G

Definition at line 34 of file Characters.lua.

◆ HAIR_COLOR_BLACK_R

FrameworkZ::Characters::HAIR_COLOR_BLACK_R

Definition at line 32 of file Characters.lua.

◆ HAIR_COLOR_BLONDE_B

FrameworkZ::Characters::HAIR_COLOR_BLONDE_B

Definition at line 42 of file Characters.lua.

◆ HAIR_COLOR_BLONDE_G

FrameworkZ::Characters::HAIR_COLOR_BLONDE_G

Definition at line 40 of file Characters.lua.

◆ HAIR_COLOR_BLONDE_R

FrameworkZ::Characters::HAIR_COLOR_BLONDE_R

Definition at line 38 of file Characters.lua.

◆ HAIR_COLOR_BROWN_B

FrameworkZ::Characters::HAIR_COLOR_BROWN_B

Definition at line 48 of file Characters.lua.

◆ HAIR_COLOR_BROWN_G

FrameworkZ::Characters::HAIR_COLOR_BROWN_G

Definition at line 46 of file Characters.lua.

◆ HAIR_COLOR_BROWN_R

FrameworkZ::Characters::HAIR_COLOR_BROWN_R

Definition at line 44 of file Characters.lua.

◆ HAIR_COLOR_GRAY_B

FrameworkZ::Characters::HAIR_COLOR_GRAY_B

Definition at line 54 of file Characters.lua.

◆ HAIR_COLOR_GRAY_G

FrameworkZ::Characters::HAIR_COLOR_GRAY_G

Definition at line 52 of file Characters.lua.

◆ HAIR_COLOR_GRAY_R

FrameworkZ::Characters::HAIR_COLOR_GRAY_R

Definition at line 50 of file Characters.lua.

◆ HAIR_COLOR_RED_B

FrameworkZ::Characters::HAIR_COLOR_RED_B

Definition at line 60 of file Characters.lua.

◆ HAIR_COLOR_RED_G

FrameworkZ::Characters::HAIR_COLOR_RED_G

Definition at line 58 of file Characters.lua.

◆ HAIR_COLOR_RED_R

FrameworkZ::Characters::HAIR_COLOR_RED_R

Definition at line 56 of file Characters.lua.

◆ HAIR_COLOR_WHITE_B

FrameworkZ::Characters::HAIR_COLOR_WHITE_B

Definition at line 66 of file Characters.lua.

◆ HAIR_COLOR_WHITE_G

FrameworkZ::Characters::HAIR_COLOR_WHITE_G

Definition at line 64 of file Characters.lua.

◆ HAIR_COLOR_WHITE_R

FrameworkZ::Characters::HAIR_COLOR_WHITE_R

Definition at line 62 of file Characters.lua.

◆ List

Definition at line 95 of file Characters.lua.

◆ SKIN_COLOR_BROWN

FrameworkZ::Characters::SKIN_COLOR_BROWN

Definition at line 28 of file Characters.lua.

◆ SKIN_COLOR_DARK_BROWN

FrameworkZ::Characters::SKIN_COLOR_DARK_BROWN

Definition at line 30 of file Characters.lua.

◆ SKIN_COLOR_PALE

FrameworkZ::Characters::SKIN_COLOR_PALE

Definition at line 22 of file Characters.lua.

◆ SKIN_COLOR_TANNED

FrameworkZ::Characters::SKIN_COLOR_TANNED

Definition at line 26 of file Characters.lua.

◆ SKIN_COLOR_WHITE

FrameworkZ::Characters::SKIN_COLOR_WHITE

Definition at line 24 of file Characters.lua.


The documentation for this class was generated from the following file: