ITrainz

From TrainzOnline
Jump to: navigation, search

The iTrainz technology provides a mechanisms for scripts to communicate between computers in an internetworked environment. Trainz users are uniquely identified via their Planet Auran username.


Contents

Network Interface Library

An iTrainz interface is implemented via a script library. The library is responsible for performing the actual network communication and maintaining any local state. An example of this technique is the built-in "OAChat.gs" script library. The library should isolate the "front-end" script code (such as a rule or scripted map object) from the details of network communication, and instead provide a specific feature set.

Internally, the script library makes use of the "OnlineAccess.gs" script class to perform network operations. Where communication is shared between multiple users, the "OnlineGroup.gs" script class may be useful.


iTrainz Capabilities

The iTrainz API presents the following capabilities to a script programmer:

  • Connection management functions - connect, disconnect, and status queries.
  • Determine the Planet Auran username for the local user.
  • Store custom data on the local user's profile.
  • Send messages to script instances running on another user's machine, including a 'mailbox' mechanism if the user is offline.
  • Receive alerts on incoming data.
  • Create and manage transient groups of users.
  • Create persistent server applications via iTrainz Servlets.


iTrainz Chat

Auran includes the iTrainz Chat interface as an example of iTrainz functionality. This script allows communication between users whenever they are in-game, enabling community chat channels and private messaging.


iTrainz Usage Policy

Auran reserves the right to ban accounts or specific KUIDs from the iTrainz network if they are found to be abusing the network, for example by spamming, by attempting to work around documented restrictions, or by attempting to capture information from client machines without permission. If there's something that you'd like to implement but you have doubts regarding its legitimacy, don't hesitate to contact Auran for clarification.

Personal tools