(Redirected from CCS)
Jump to: navigation, search


The System Node $CHARACTERCREATIONSYSTEM (abbreviated CCS) implements the Clean Engine character creation mechanics including:

What problem(s) does this solve?

What problem(s) does this not solve?


The CCS is both Client and Server System Nodes

The $CHARACTERCREATIONSYSTEM implements an interface on the client through which GUIs may communicate with the server system node to execute code in permissible ways. Both system nodes may be extended individually, allowing each side to be overridden as needed replacing individual behaviors without requiring the implementation of a whole system.

The CCS Area is Registered as a "System Area" with the World

One of the scalability features of the CCS is that it registers, when enabled, the CCS area as a System Area which provides access to some types of data that are normally only available at the World Server. Specifically, this means area data (which area instances are currently up).


Adding game-specific functionality

As a required class/script, it is not permissible to make changes to the _characterCreationSystemClassMethods script. Instead, extension/overriding the script is accomplished by the creation of a game-specific class (and class methods script) that is GLOMmed onto the CHARACTERCREATIONSYSTEM prototype.

Create a game-specific class

Using the DOM Editor create a new (server|client) class. Our recommendation is that you use a class name that incorporates the _characterCreationSystem as a suffix to the name (ex. HJ_characterCreationSystem), this makes it easier to locate the pair of classes (the required script prefixed in _characterCreationSystem and your game-specific class).

Once you have created the game-specific class, create a new client class methods script for that class.

Adding a game-specific class

Adding your game-specific class to the CHARACTERCREATIONSYSTEM prototype is achieved using the System Node Configuration GUI or the CLI server command \mpac or client |mpac in the Console Panel. The System Node Configuration GUI is the preferred method because it handles the communication to update any instantiations of a system node to reflect the changes you have made.

Using the System Node Configuration GUI


Opening the System Node Configuration GUI requires you to access the hidden Utilities Interface toolbox, located in the top left corner of the render window with ctrl-shift-click (or press F5), which will open the Interface. On the Tools tab within the menu, is an option to open the System Nodes Configuration GUI.

See also: Adapting Clean Engine

Using the CLI

It is important to recognize that modification of the prototype from which a system node is instantiated will not update any instantiations that have already been made in various local GOMs. That means your changes will not take effect until the area (in the case of server system nodes) restarts, or the client (in the case of client system nodes), restarts.

Adding a class to a prototype is done via the CLI command Modify Prototype Add Class(MPAC).

Server: \mpac CHARACTERCREATIONSYSTEM, hj_characterCreationSystem;
Client: |mpac CHARACTERCREATIONSYSTEM, hj_characterCreationSystem;

Disable the CCS

If you do not want to take advantage of the CCS, or have implemented an alternate system that has not yet been adapted to using the CCS, you can easily disable the entire system by implementing the method described below in a game-specific override class that is GLOMmed onto the server system node.

method HE_CCSEnabled( enabled references Boolean ) as Boolean
// Globally enabled/disable the CCS system
// To disable the CCS system:
  enabled = false
  return true

Change to a game-specific Character Creation GUI

The CCS launches the character creation GUI in a method on the client system node. What kind of GUI to launch is easily overridden by implementing the following method in your game-specific class on the system node.

method HE_CCSInvokeGUI( args as LookupList indexed by String of String ) as Boolean
// Used to invoke the character creation GUI.  The args passed in are the args that where passed
//   to the client system node by the _CCSInvokeGUI method on the server node which could be extended/overridden
//   by implementing the HE_CCSInvokeGUI method on the server and adding whatever data is needed to a remote call that
//   the override makes to the client system node.
// return true to indicate you handled everything ie popped up your game-specific GUI
  return false

Specify a game-specific area for the CCS

By default, the CCS uses a Clean Engine area named HeroEngine_CharacterCreation. As soon as your designers have created your game-specific character creation area, you will want to implement the method below to specify that area. The CSS (Character Selection System as opposed to Character Creation System) has built-in scalability. This functionality allows it to select an instance from those of the CCS Area currently running, in order to send a user there for character creation. This too may be overridden on the CSS system node.

method HE_GetCCSArea() as ID

Specify a game-specific starting area

Once a character has been created, it is sent by default to a play instance of the Clean Engine area HeroEngine_StartingArea. This should eventually be changed to your own game-specific starting area. So as soon as your designers have created your own game-specific starting area, get the Area ID of that area, and then implement the method below in order to specify that area:

method HE_GetStartingArea() as ID

Specify an Instance

Though the starting area has been specified, it may also be necessary to specify which instance of that area that a new character will be placed into. By default, Clean Engine puts each new character into a random play instance of the starting area. To modify this behavior, implement the method below to specify the instance to which a player should be sent.

The _CharacterSelectionSystemClassMethods has two examples of ways you might potentially want to implement your game-specific selection of the target instance number. These are located in the methods _CSSSelectCCSAreaInstance and _CSSSelectLastAreaInstance.

The CCS area, when enabled, is registered with the world as a System Area and consequently has access to world knowledge about areas (including which area instances are up). The $WORLD system node can be used to determine the list of currently running instances.

method HE_GetStartingInstance() as ID
  return 0                               // If a 0 is returned, it means to put the character into an edit instance

Specify the default Character Specification for _CharacterAppearance

By default, the character specification used for newly created characters is determined by the (server) CHARACTERCREATIONSYSTEM system node, which has the method _CCSUseCharacterSpecificationForVisibleCharacter. The default value in Clean Engine is character_sample.

Shortly after your art team has completed their first character model, they are going to want to you swap from the Clean Engine default to your game-specific default character specification. To specify a different character specification that should be used by default for new characters, implement the method HE_CCSUseCharacterSpecificationForVisibleCharacter in your game-specific class methods script for the (server) CHARACTERCREATIONSYSTEM system node.

method HE_CCSUseCharacterSpecificationForVisibleCharacter( character as NodeRef of Class character_class, characterSpecification references String ) as Boolean
  characterSpecification = "GameSpecificCharacterSpecificationName"
  return true

Request a new character type for _CharacterAppearance

If all you ever needed was a single model, then changing the default as detailed above would be sufficient. However for most games the user has the option of choosing a gender for their character (and perhaps even a different race). This requires that the GUI be able to request the server to change the _CharacterAppearance character type. This is done using the (client) CHARACTERCREATIONSYSTEM system node's _CCSRequestSetCharacterType method.

// Assume the GUI is created from a class that inherits obsListener
// me = The GUI
  $CHARACTERCREATIONSYSTEM._CCSRequestSetCharacterType( "GameSpecificCharacterType", me )


Personal tools