Defining a character in the Repository
This page covers the file types that are needed to define a character. To learn about the art requirements, see Creating characters
To introduce a new character to HeroEngine, you must define it in the Repository. Each character must have its own folder in the Repository where its data lives. In many cases all of the data will live in this folder, or sub-folders thereof. However, you can reference various parts outside of this folder, which is useful for sharing definition elements between character types.
Here is a folder organization that contains three distinct creatures, each given their own folder:
GAMEWORLD Characters BugEyedCreature Unicorn FuzzyBunny
The folder must contain a .DAT file which describes the creature. Here is a .DAT file for a creatured named Sunok. The .DAT file is named
sunok.dat and located in the
! ! Character Specification for Character\sunok\Sunok.dat ! ! Version=2 [PARTS] Model=sunok.dyc AnimationSetFolder=Character\sunok\animations\ Agent=Character\sunok\animations\sunok.aas Behavior=PlayerCharacter2 Gender=Male
Note: The version number must match the currently version used by HeroEngine, which is 2 as of this writing.
Model=sunok.dyc line tells HeroEngine that this character is dynamic, as specified by a .dyc file named
sunok.dyc file located in the same folder. Alternatively, we could specify a static character by just referencing a mesh file. For example:
Model=sunok.(file extension) would specify a static creature instead of a dynamic one.
AnimationSetFolder=Character\sunok\animations\ specifies the FQN path to where the animation definition (
ANIMATIONSET.DAT and other files) file is located for this creature. In this case, it is a subfolder of the current sunok folder, but it did not have to be. Multiple creatures could share the same animation set data.
An Animation Agent is a special script (using the Animation Agent Scripting language (AAS)) that is responsible for the logic that decides what animation sequence to play at any given moment. The line
Agent=Character\sunok\animations\sunok.aas specifies the FQN of the AAS file that will control this character.
The core logic that drives a creature is managed by a particular HeroEngine C++ class, called a Behavior class. This line defines what class object to factory up to manage this creature. Currently the only valid behavior is
PlayerCharacter2 which manages both creatures, NPCs and player characters of all varieties. More specialized versions can be created by your team, and we will add more in the future.
Gender=Male specifies that this character is male. This specification is of use only to the PlayerCharacter2 behavior, and is only meaningful for characters where this distinction is useful. For the Sunok creature, it isn't so male or female will do just as well in this case. Male was chosen arbitrarily. For player characters, this may be significant. NOTE: This method of specifying gender is inflexible and being depricated.