$SYSTEMNODES

From HEWIKI
Revision as of 20:18, 24 June 2011 by HE-NICK (Talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Contents

Available starting in v1.19

The $SYSTEMNODES system node implements the MMO Foundation Framework's mechanics for working with system nodes in the general sense. It supports the System Node Configuration GUI and maintains a "registry" of known system nodes which may be extended to include game-specific system nodes.


What problem(s) does this solve?

What problem(s) does this not solve?

$SYSTEMNODES exist on both Client and Server

The $SYSTEMNODES system node is both a Client as well as a Server System node, so you can call its methods in client and server scripts.


Adding game-specific functionality

As a required class/script, it is not permissible to make changes to the _systemNodesClassMethods 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 SYSTEMNODES 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 _systemNodes as a suffix to the name (ex. HJ_systemNodes), this makes it easier to locate the pair of classes (the required script prefixed in _systemNodes 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 SYSTEMNODES 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

UtilitiesInterfaceConfigureSystemNodes.jpg

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 SYSTEMNODES, hj_systemNodes;
Client: |mpac SYSTEMNODES, hj_systemNodes;


Register a Client System Node

Adding game-specific client system nodes to the "registry" is accomplished by implementing the following method in your game-specific override class for $SYSTEMNODES. Remember that the registry exists in both client and server versions, so you will almost certainly need to make your changes to both server and client override classes.

method HE_getRegisteredClientSystemNodeNames( systemNodeNames references List of String ) as Boolean
// Used by $SYSTEMNODES
//
// Return true if you do not want the default system node names added to the list
 
  add back "YOURCLIENTSYSTEMNODE" to systemNodeNames
 
  return false
.

Register a Server System Node

Adding game-specific server system nodes to the "registry" is accomplished by implementing the following method in your game-specific override class for $SYSTEMNODES. Remember that the registry exists in both client and server versions, so you will almost certainly need to make your changes to both server and client override classes.

method HE_getRegisteredServerSystemNodeNames( systemNodeNames references List of String ) as Boolean
// Used by $SYSTEMNODES
//
// Return true if you do not want the default system node names added to the list
 
  add back "YOURSERVERSYSTEMNODE" to systemNodeNames
 
  return false
.

See also

Personal tools
Namespaces
Variants
Actions
Navigation
Toolbox