Part I. Server Scripting Guide

Table of Contents

1. Overview
2. Physical Entity Structure for Scripting
2.1. The entities.xml File
2.2. The Entity Definition File
2.3. The Script Files
3. Physical User Data Object Structure for Scripting
3.1. The user_data_objects.xml File
3.2. The User Data Object Definition File
3.3. The Script Files
4. Properties
4.1. Property Types
4.1.1. Primitive Types
4.1.2. Composite Types
4.1.3. Custom User Types
4.1.4. Alias of Data Types
4.2. Default Values
4.3. Data Distribution
4.3.1. Data Propagation
4.4. Implementing Custom Property Data Types
4.4.1. Wrapping a FIXED_DICT Data Type
4.5. Volatile Properties
4.6. LOD (Level of Detail) on Properties
4.6.1. LOD and Hysteresis
5. User Data Object Linking With UDO_REF Properties
6. Methods
6.1. Basic Method Specification
6.2. Intra-Entity Communication
6.3. Sending Auxiliary Data to the Client Via Proxy
6.4. Exposed Methods ‐ Client-to-Server Communication
6.4.1. Security Considerations of Exposed Methods
6.5. Implicit set_<property_name> Methods
6.6. LOD on Methods
6.7. Inter-Entity Communication
6.7.1. Entity IDs
6.8. Mailboxes
6.9. Method Execution Context
7. Inheritance in BigWorld
7.1. Python Class Inheritance
7.2. Entity Interfaces
7.3. Entity Parents
7.4. Client Entity Reuse
7.5. User Data Object Interfaces and Parents
8. Entity Instantiation and Destruction
8.1. Entity Instantiation on the BaseApp
8.2. Cell Entity Creation From BaseApp
8.2.1. Creation Near an Existing Cell Entity
8.2.2. Creation in a Numbered Space
8.2.3. Creation in a New Space
8.2.4. Creation in Default Space
8.3. Entity Destruction
8.4. Entity Instantiation From The CellApp
8.4.1. Instantiation With No Base Counterpart
8.4.2. Instantiation With Base Counterpart
8.5. Loading Entities From Chunk Files
9. The Database Layer
9.1. Persistent Properties
9.1.1. Non-Persistent Properties
9.1.2. Built-In Properties
9.1.3. The Identifier Tag
9.2. Reading and Writing Entities
9.3. Mapping BigWorld Properties Into SQL
9.3.1. Entity Tables
9.3.2. The databaseID property
9.3.3. Simple Data Types
9.3.4. VECTOR Data Types
9.3.5. STRING, BLOB, and PYTHON Data Types
9.3.6. PATROL_PATH and UDO_REF Data Types
9.3.7. ARRAYs and TUPLEs
9.3.8. FIXED_DICTs
9.3.9. USER_TYPEs
9.4. Execute Arbitrary Commands on Database
9.4.1. Execute Commands on SQL Database
9.4.2. Execute Commands on XML Database
9.5. Secondary Databases
9.5.1. Data Consolidation
9.5.2. Database Snapshot
10. Proxies and Players
10.1. Proxies
10.2. Witnesses
10.3. Entity Control
10.4. Physics Correction
10.4.1. Avoiding Y-axis rubber-banding.
11. Entities and the Universe
11.1. Multiple Spaces
11.1.1. Spaces Pool
11.2. Navigation System
11.2.1. Key Features
11.2.2. Navpoly Data Format
11.2.3. Script Interface
11.2.4. Navigate
11.2.5. Graph Searches
11.2.6. Auto-Generation of Navpoly Regions ‐ The NavGen Utility
11.3. Time
11.3.1. Real Time
11.3.2. Server Time
11.3.3. Game Time
11.4. Initialisation: Personality script, eload, and runscript
11.5. Global Data
11.5.1. globalData, baseAppData and cellAppData
11.6. Space Data
11.7. Global Bases
12. XML Data File Access
12.1. ResMgr.DataSection
12.2. Accessing Data
12.2.1. Opening a Section Within an XML File
12.3. Data Types
12.4. Writing Data
12.5. Performance Issues
12.6. API Reference
13. Fault Tolerance
13.1. CellApp Fault Tolerance
13.1.1. Overview
13.1.2. Restoration process
13.1.3. Example
13.2. BaseApp Fault Tolerance
14. Disaster Recovery
15. Controlled Startup and Shutdown
15.1. Controlled Shutdown
15.2. Controlled Startup
16. Transactions and Handling Fault Tolerance and Disaster Recovery
16.1. Transaction logic
16.2. Fault Tolerance Behaviour
16.2.1. CellApp Fault Tolerance
16.2.2. BaseApp Fault Tolerance
16.3. Disaster Recovery Behaviour
17. User Authentication and Proxy Selection
17.1. The bigworldLogOnMapping Table
17.1.1. The bigworldLogOnMapping Table in the XML Database
17.2. Accepting All Users
17.3. Bypassing bigworldLogOnMapping and Using Account Entity
17.4. Using bigworldLogOnMapping Table with an Account Entity
18. Security
18.1. Client/Server Communications
18.2. Server-Side Network
18.3. Client Side
18.4. Client Cheating
18.4.1. General Rules for Managing Entity Data
18.4.2. Writing Secure Game Script
18.4.3. Balancing Security vs. Latency
18.4.4. Balancing Security vs. Server CPU Cost
19. Debugging
19.1. General Debugging
19.1.1. Information and Error Messages
19.1.2. Testing Scripts Using the Python Server
19.2. Performance Profiling
19.3. Common Mistakes
19.3.1. Definition Files Inconsistent Between the Server and Client
19.3.2. Implementation (.py) Does Not Match Definition (.def)
19.3.3. Accessing Other Entities' Properties and Methods Not Declared in the Definition File
19.3.4. Trying to Update the Properties of a Ghost Entity
19.3.5. Database backup and fault tolerance doesn't work for entities lacking a Base part
19.4. Fixed Cell Boundaries
19.5. Message Reliability And Ordering
20. Simplified Server Usage
20.1. Setting up the windows share
20.2. Mounting the Windows share on Linux
20.3. Caveats