$BASECLIENT

From HEWIKI
(Redirected from Technical:$BASECLIENT)
Jump to: navigation, search

Contents

Overview

The System Node $BASECLIENT handles a event callbacks on the Client from the C++ engine. The callbacks primarily deal with very low level concepts such as an area loading and the hot-spot menu. Callbacks made to the $BASECLIENT system node are made in the client's local GOM.

What Problem(s) Does This Solve?

What Problem(s) Does This Not Solve?

Concepts

$BASECLIENT is a System Node

System nodes were adopted as the primary mechanism at the HSL script level enabling game specific implementations of a licensee to extend/override the required functionality included in the clean engine. As with all system nodes, this is accomplished by GLOMming a game specific class on the BASECLIENT prototype from which a singleton node $BASECLIENT is instantiated in the local client GOM.

Events

The events for which the C++ engine notifies the $BASECLIENT system node area:

Usage

Various methods exist in the client-side _BaseClientClassMethods script. For a complete list, review the script via the HSL Script editor. Commonly-used ones are

Getting Area ID

$BASECLIENT._GetAreaID() will return the ID of the Area the client is currently connected to.

Getting Instance ID

$BASECLIENT._GetInstanceID() will return the ID of the Area Instance the client is currently connected to.

Getting Area name

$BASECLIENT._GetAreaName() will return the string name of the Area the client is currently connected to.


Adding game-specific functionality

As a required class/script, it is not permissible to make changes to the _baseClientClassMethods 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 BASECLIENT 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 _baseClient as a suffix to the name (ex. HJ_baseClient), this makes it easier to locate the pair of classes (the required script prefixed in _baseClient 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 BASECLIENT 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 BASECLIENT, hj_baseClient;
Client: |mpac BASECLIENT, hj_baseClient;


Advanced Usage

Reference

Personal tools
Namespaces
Variants
Actions
Navigation
Toolbox