/HENPC
/HENPC <action> <parameter1>...<parameterN>
Arguments
- <action>
- One of the following actions:
- HELP <argument> :- Get help on the specified argument.
- <argument> : Any of the other arguments are valid options.
- ADD - Add character types, specifications, morph target coefficients etc. (details)
- REMOVE - Remove character types, specifications, morph target details etc. (details)
- LIST - Various lists of relevant information for npcs (details)
- CREATE - Instantiate a character of the specified character type (details)
- DELETE - Delete a character created by the required system (details)
- SET - Various set operations for a target character (details)
- POSSESS - Assume control of a target character (details)
- UNPOSSESS - Resume control of your own character (details)
- MOVE - Teleport an NPC to a new location/rotation (details)
- SPEEDUPDATE - Update the movement data on the server for the character type
- TURNUPDATE - Update the turn data on the server for the character type
Description
The /HENPC chat command (an abbreviation of HeroEngine Non-Player Character), provides command line access to the components of the Creatures and NPCs system. This is an HSL command so it must be entered in HeroBlade's Chat Panel, not the Console Panel.
Usage
ADD
/HENPC ADD <option> <parameter1>...<parameterN>
- <option> - Options are Type, Specifications, MorphTargetCoefficients
- TYPE <characterType> <characterSpecification> - Sets the characterType specified as being an alias to a specification. Additional information such as morph target coefficients are stored on a per type basis.
- SPECIFICATION <characterSpecification> <path> - Register the specification as being located in the specified path.
- <characterSpecification> - Name for this character specification, dictates the name of the .DAT file to read in the destination <path
- <path> : Path in the repository in which the .DAT file for this specification is located.
- MORPHTARGETCOEFFICIENTS <characterType> <race1>=<race1Percent>...<raceN>=<raceN> - Used in skeleton/geometry morphing allows the specification of relative percentages of 1..N races as detailed in the .DYC file.
- <characterType> - One of the defined character types
- <race> - One of the races detailed in the .DYC as valid
- <racePercent> - Weight assigned to the specified race for the purposes of skeleton/geometry morphing. The sum of the racePercents should be approximately 1.0 (i.e. 100%)
TYPE
The TYPE option allows the addition of character types which function as an alias to a character specification and allow other types of data to be stored on a per character type basis rather than per specification basis. This is particularly useful for advanced characters using techniques like skeleton/geometry morphing where the character types share a common character specification and their differences is in the mix of relative values between their 1..N races.
example
/HENPC add type sample character_sample
SPECIFICATION
The SPECIFICATION option allows for the registration of new character specifications with the engine. It maps a character specification to the path in which the files are located in the repository. It is important to note that the character specification must have an identical name to the .DAT file located in the specified path.
example
/HENPC add specification character_sample \Character\Character_Sample\
MORPHTARGETCOEFFICIENTS
The MORPHTARGETCOEFFICIENTS option allows for the setting of relative percentages of 1..N races as specified as valid in the .DYC file for the purposes of skeleton/geometry morphing. The sum of the relative values should be approximately 1.0 (i.e. 100%).
example
/HENPC add morphtargetcoefficients sample human=0.5 ilvari=0.5 dwarf=0.0
REMOVE
/HENPC REMOVE <option> <parameter1>...<parameterN>
- <option> - Valid options are Type, Specifications, MorphTargetCoefficients
- TYPE <characterType> - Remove a character type
- SPECIFICATIONS <characterSpecification> - Remove a character specification
- MORPHTARGETCOEFFICIENTS <characterType> - Remove the morphtargetcoefficients for the specified character type
TYPE
Remove a character type from the list of valid character types.
example
/HENPC remove type sample
SPECIFICATION
![]() |
Removing a character specification which is in use will result in any characters using the specification not rendering and a non-fatal error in the console. |
Unregister a character specification for the engine, it is generally not a good idea to remove a specification unless you know it is not in use.
example
/HENPC remove specification character_sample
MORPHTARGETCOEFFICIENTS
Remove the morph target coefficients for the specified character type, you might choose to do this if a character type is no longer supposed to use skeleton/geometry morphing.
example
/HENPC remove morphtargetcoefficients sample
LIST
/HENPC LIST <option> <parameter1>...<parameterN>
- <option> - Valid options are Types, NPCs, Specifications, MorphTargetCoefficients
- TYPE - Displays a list of all character types, this includes specifications which are inherently valid character types
- NPCS - Displays a list of all npcs created using the required system mechanics
- SPECIFICATIONS - Displays a list of all character specifications and their path
- MORPHTARGETCOEFFICIENTS - Displays a list of all character types that have morph target coefficients and the values
TYPE
Displays a list of all valid character types, this list includes all character specifications which are implicitly considered character types. Each display character type (if not a specification) will display -- ref --> pointing to the character specification that it uses.
example
/HENPC list type
// partial list from Hero's Journey humanfemale -- ref --> humanlike_female humanlike_female humanlike_male humanmale -- ref --> humanlike_male ilorax ilvarifemale -- ref --> humanlike_female ilvarimale -- ref --> humanlike_male
NPCs
Displays a list of the non-player characters in the current area instance created by the Creatures and NPCs system. It displays the character node (_nonPlayerCharacter node) and the _characterAppearance node along with their ids and other relevant information.
example
/HENPC list npcs
// partial list from an area in Hero's Journey List of all NPCs _nonPlayerCharacter(93729373789) Name: character_sample1 _characterAppearance: 93729373791 _nonPlayerCharacter(93745741635) Name: character_sample2 _characterAppearance: 93745741636
SPECIFICATIONS
Displays a list of all known character specifications and the path in which the engine looks to find their .DAT file.
example
/HENPC list specifications
// partial list from Hero's Journey
humanlike_female \Character\Dynamic_2\Human\Female\
humanlike_male \Character\Dynamic_2\Human\Male\
ilorax \Character\Ilorax\
MORPHTARGETCOEFFICIENTS
For character types that have morph target coefficients, displays a list by character type that includes the races and relative percentages of each that is applied during skeleton/geometry morphing.
example
/HENPC list morphtargetcoefficients
// partial list from Hero's Journey humanfemale dwarf=0.0 human=1.0 ilvari=0.0 ilvarifemale dwarf=0.0 human=0.0 ilvari=1.0 ilvarimale dwarf=0.0 human=0.0 ilvari=1.0
CREATE
/HENPC CREATE <characterType>
- <characterType> : One of the character types registered with the system as valid (/HENPC list types)
Instantiates a character in the game engine using the specified character type. The character will automatically be persisted in an edit instance and non-persisted in non-edit instances.
example
/HENPC create character_sample
DELETE
/HENPC DELETE <npcName|ID
- <npcName|ID> - The commandline accepts either the name assigned to a character or its ID to identify the target character
Permanently destroys the specified non-player character node and its children.
example
If you know the name of the npc, the easiest way to delete it is by name.
/HENPC delete sample1
If you only know the ID of an npc, then you can delete the npc by its ID instead.
/HENPC delete 123456789
SET
/HENPC SET <npcName|ID> <option> <parameter1>...<parameterN>
- <npcName|ID> - The commandline accepts either the name assigned to a character or its ID to identify the target character
- <option> - Valid options are MorphTargetCoefficients, Name, Specification, Type
- MORPHTARGETCOEFFICIENTS <race1>=<race1Percent>...<raceN>=<raceN> - Modify the morph target coefficients for the target character's _characterAppearance node
- <race> - One of the races detailed in the .DYC as valid
- <racePercent> - Weight assigned to the specified race for the purposes of skeleton/geometry morphing. The sum of the racePercents should be approximately 1.0 (i.e. 100%)
- NAME <newName> - Modify the name for a target character
- SPECIFICATION <characterSpecification> - Change the specification used by the character's _characterAppearance
- TYPE <characterType> - Change the character type used by the character, applying the new character specification and any morph target coefficients that are appropriate.
MORPHTARGETCOEFFICIENTS
![]() |
The races that are valid to use with this command are specified in the .DYC file of the character specification. |
The MORPHTARGETCOEFFICIENTS option allows you to change the relative percentages each race contributes to determining the skeleton/geometry morph for the target character. This affects only the target character and overrides the default values specified by the character type from which the character was instantiated.
example
Assuming you have an npc named sample1
/HENPC set sample1 morphtargetcoefficients human=0.8 ilvari=0.2 dwarf=0
NAME
Change the name of the specified non-player character to a new value.
example
// assuming you have an npc named sample1
/HENPC set sample1 name mySampleName
SPECIFICATION
The SPECIFICATION option enables you to change the specification the specified character uses. This has the effect of switching the model you see rendered to the model for the new character specification.
example
/HENPC set mySampleName specification orc
TYPE
The TYPE option enables you to change the character type of the specified character. This has the effect of switching the model you see rendered to the model of that type's character specification and then applying any morph target coefficients that might be appropriate.
example
/HENPC set mySampleName type elf
POSSESS
/HENPC POSSESS <npcName|ID>
- <npcName|ID> - Assume control of a target character
example
// assuming you have an npc named sample1
/HENPC possess sample1
UNPOSSESS
/HENPC UNPOSSESS <npcName|ID>
- npcName|ID> Resume control of your own character
example
/HENPC unpossess
MOVE
/HENPC MOVE <npcName|ID> <option> <parameter1>...<parameterN>
- <option> - Valid options are Position, Rotation, Tome, PositionAndRotation
- POSITION <position> - Teleport the npc to the specified position
- ROTATION <rotation> - Teleport the npc to assume the specified rotation
- TOME - (to me) Teleport the npc to the user's position and rotation
- POSITIONAndRotation <position> <rotation> - Teleport the npc to the specified position and rotation
- <option> - Valid options are Position, Rotation, Tome, PositionAndRotation
See also
- Creatures and NPCs - Clean engine framework for creatures and npcs.
- $NPC - System node supporting the /HENPC command and Creatures and NPCs system.
- Creating Dynamic Characters