- 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?
- Allows game-specific system nodes to leverage MMO Foundation Framework code such as the System Nodes Configuration GUI
- Serves as a wrapper for the external functions dealing with system nodes
- Known pattern for extension of the system (a system node)
- Common game-specific functionality is easily implemented by overriding the appropriate method
- Reduces, but does not eliminate, the need to implement game-specific code
What problem(s) does this not solve?
- Does not eliminate the necessity for additional code to support alternate behaviors
$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 new class
- Create a class method script for the class
- GLOM the class onto the 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
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.
\mpac SYSTEMNODES, hj_systemNodes;
|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 .
- Adapting Clean Engine - Detailing the replacement/extension of clean engine via game-specific classes and the GUI created for that purpose.
- System Nodes - Primary mechanism for enabling the extension/overriding of the required clean engine implementations and a game-specific implementation of a licensee.