Add Creature to Engine

(Redirected from Add Creature To Engine)
Jump to: navigation, search


Caution: This page may contain information which is Hero's Journey-specific!

This page covers information for artists, on how to add a new creature to HeroEngine. For the more technical side of this, see Creatures and NPCs.


To add a creature or NPC into HeroEngine, it is necessary to:

HeroEngine has a basic implementation of Creatures/NPCs that is intended to allow your artists to quickly view their work in the game engine without requiring that the developers first write what will be your game-specific implementation of NPCs. The Required Systems include an HSL command /HENPC, which is fully customizable and can be later overridden by your own systems, enabling your developers to later extend or replace the system for your specific needs.


Note: The following assumes you have chosen to use the Required System: Creatures and NPCs as presented. It may be necessary to contact your system developers for usage if they have implemented an alternate system for this functionality. If you are implementing a system, please read the reference section for the technical details.

So you are an artist and you want to see the character model you just exported in HeroEngine. What do you do?

Introducing a new model to HeroEngine

Registering a character specification with HeroEngine

CautionSign.gif The character specification name must be the same as the name of the .DAT file located at the path specified.

The client must be told in which directory of the Repository to search for the .DAT file for a character specification. The .DAT file in turn tells HeroEngine where to find certain art files; such as the mesh, animation and the dynamic parts files.

The Required System: Creatures and NPCs is primarily accessed via the command /HENPC that you type in HeroBlades' Chat Panel (note: Chat, not Console as this command is implemented in HSL). It has a variety of options used in registering character specifications with HeroEngine as well as introducting/manipulating instantiations of a character specification (i.e. an NPC).

The following command registers the characterSpecification as being located in the repository using the the specified path.

/henpc add specification <characterSpecification> <path>


The character_sample specification is automatically registered as a part of HeroEngine as a reference sample, if you were registering it yourself the following command would suffice.

/henpc add specification character_sample \Character\Character_Sample\

Instantiate a character from a character specification

CautionSign.gif Your developers may have implemented an alternate means of instantiating characters in the game engine. If that is the case please consult them for the proper procedure.

Instantiation of a creature from a type or specification already registered with HeroEngine requires a single command typed in the Chat panel.

// Using the specification included with HeroEngine
/henpc create character_sample

Assuming control of a character

It is frequently useful, as well as darn fun, to be able to control a character other than your account's "real" character. This allows you to walk around and perform other actions as one of your game's creatures, to view the model animating in HeroEngine.

Possessing a character

Entering a command in the Chat panel allows you to assume control of a character.

// Assuming you use the required systems to create your NPCs, they are automatically assigned a name
//   that may be used in conjunction with /henpc.  Optionally you can use the id of the _nonPlayerCharacter node
/henpc possess <npcName|id>

Unpossessing a character

Entering a command in the chat panel allows you to resume control of your character.

/henpc unpossess

Character types


It is frequently useful to be able to define multiple character types as sharing the same character specification. Character types at the most basic level work as an alias to a character specification, but also support the storage of other advanced data on a per type basis.

What problems do character types solve?

What problems do character types not solve?


Adding a new character type

/henpc add type <characterType> <characterSpecification>


The specification character_sample is automatically included as a part of every Clean HeroEngine install. Assuming you hate typing character_sample, you might choose to alias it to something shorter using a character type.

/henpc add type sample character_sample

Removing a character type

/henpc remove type <characterType> <characterSpecification>


/henpc remove type sample

Create a character from a character type

Once a type is added, you can use the standard create functionality of the Required System: Creatures and NPCs and the command /HENPC to create characters using a character type.

/henpc create sample

Morph target coefficients

HeroEngine supports skeletal/geometry morphing based on a mixture of races as specified in the .DYC . The Required System: Creatures and NPCs uses morph target coefficient data stored on a per character type basis during instantiation of characters to apply the appropriate target coefficients for the given type.

Add morph target coefficients for a character type

/henpc add morphtargetcoefficients <characterType> <race1>=<float1> <race2>=<float2> <race3>=<float3>

Remove morph target coefficients for a character type

/henpc remove morphtargetcoefficients <characterType>

Add new creature to the library

The following assumes you are using the required System /HENPC, if this is not the case you should contact your development team for your game-specific implementation.

At this point, you should be able to add your creature to the game by typing /henpc create MyNewModel into the Chat window. However, it is convenient for others if you add the new creature to the library so they can use the library to add the creature to the game.

Open up the Library Browser, and select an appropriate folder. The Hero's Journey reference copy uses the path GameMaster Tools/Creatures tab as the location for creatures. Choose to add a new command to this library by right-clicking in the blank client area of the tab.

Add a New Library Command

Choosing New Command will bring up a text edit box into which you should type /henpc create MyNewModel (replace MyNewModel with the correct model name) and hit OK. There will now be an icon NO ICON in the library, double click that to add your NPC to the world near your character. Library Commands function by sending a command to the server just as if you had typed it, along with a list of the GUIDs (if any) that were added to the world.

Once your NPC has loaded, right click on the NO ICON iron and select the menu option Snapshot Icon... which will bring up a window to create an icon for your command.

Create an Icon for a Library Command

See also

Personal tools