Files
PyG2O/README.md
2021-04-14 23:02:00 +02:00

3.4 KiB

Squirrel module template

Table of contents

Usage requirements

NOTE: Client modules aren't downloaded by default.

In order to use the module, the user have to install:
Microsoft Visual C++ 2015-2019 Redistributable (x86)
This package is essential only for Windows platform.

Build requirements

NOTE: Some of the requirements like IDE or compiler are just recommendation

In order to compile the module, you have to meet some
essential requirements, depending on the target platform.

Windows

  • Visual Studio, 2015+ (recommended 2019 Community Edition)

    Visual Studio Components

    • Windows SDK
    • one of the following toolsets, pick one: v140, v141, v142 (recommended v142)
    • (Optional) CMake Tools for Visual Studio
  • CMake 3.17+

Linux

Build instructions

Windows

Visual Studio with CMake tools

  • open a local folder using Visual Studio
  • build the project

Visual Studio without CMake tools

  • open command line in repo-directory
  • type mkdir build
  • type cd build
  • type cmake ..
  • open visual studio .sln and compile the project
  • alternatively if you want to build from command line instead,
    type cmake --build .

Linux

  • open terminal in repo-directory
  • type mkdir build
  • type cd build
  • type cmake ..
  • type cmake --build .

Loading client module

Global (client modules will be shared across multiple servers)

NOTE: You always gives a path to a module relative to a .xml file.
NOTE: The client module must be located in top server directory.
NOTE: The client module must be located in Game/Multiplayer/Modules directory.
NOTE: This approach can cause problems when different server is using older/newer version
of the client module.

To load your module, you have to add reference in .xml file (for example: config.xml).

<module src="NameOfTheModule.dll" type="client" />

Server specific

NOTE: You always gives a path to a module relative to a .xml file.
NOTE: The client module must be located in ServerFolder/YourServerName.
NOTE: The client module must be located in Game/Multiplayer/Modules/YourServerName directory.

Loading client module this way will help you to prevent situations when different
server is using the older/newer version of the module than yours.

To load your module, you have to add reference in .xml file (for example: config.xml).

<module src="YourServerName/NameOfTheModule.dll" type="client" />

Loading server module

NOTE: You always gives a path to a module relative to a .xml file.

You can put your server module in any directory you want, only client modules
must be placed in specific directories.

To load your module, you have to add reference in .xml file (for example: config.xml).

<!-- For windows server -->
<module src="NameOfTheModule.dll" type="server" />
<!-- For linux server -->
<module src="./NameOfTheModule.so" type="server" />