Gothic Online Forums
[New G2O] Module example - Printable Version

+- Gothic Online Forums (https://archive.gothic-online.com)
+-- Forum: Scripting (English) (https://archive.gothic-online.com/forum-11.html)
+--- Forum: Resources (https://archive.gothic-online.com/forum-14.html)
+---- Forum: Modules (https://archive.gothic-online.com/forum-32.html)
+---- Thread: [New G2O] Module example (/thread-2649.html)



[New G2O] Module example - Patrix - 10.02.2019

*Introduction:

I've decided to make this simple module solution, because i think, that many people who wants to create modules,
doesn't know, how to built them. Not everyone wants to "check" how everything works in any other module, so this
simple solution can be very useful for people which doesn't neccessary know everything about squirrel.

This module isn't side specifc, so, it can be loaded on client side or server side.
This module isn't platform specific, so, this module can be compiled under Linux.

Repository

*Installation after compilation:



For client module:

NOTE! The best way, is to put the client-side module into main server directory

- Put the module into this directory: Game/Multiplayer/Modules (if you don't have this folder, create it)
- Put the module into main server directory
- Add this line into config.xml

PHP
  1. <module src="sqmodule.dll" type="client" />



- Put the module into main server directory
- Add this line into config.xml

PHP
  1. <module src="sqmodule.dll" type="client" />





Info: You can put the module in any directory you like, in this example i'll demonstrate how to install module in main server directory.

For server module:

-Put the module into main folder
-Add this line into config.xml

PHP
  1. <module src="sqmodule.dll" type="server" />





RE: [New G2O] Module example - Patrix - 11.02.2019

Module and thread has been updated!

- I've slightly changed some things, to make this module truly platform independent (i've forgot to remove #include <windows.h>).
- Added simple CMakeLists.txt, and instructions how to compile the code under Linux.
- Corrected installation steps for client module.


RE: [New G2O] Module example - Patrix - 11.02.2019

Module has been slightly updated (small, yet important correction).

I've noticed, that helloWorld function returns 1, instead of 0 (this function example shouldn't return anything).


RE: [New G2O] Module example - Patrix - 15.05.2019

In near future, i'll publish the module as the repository, due to many oversights.
For now, i've noticed that there are some typos in CMakeLists.txt file, as well as missing -m32 flag, and etc.
It will be corrected as soon as possible.


RE: [New G2O] Module example - Patrix - 17.05.2019

I've updated the topic and added the link to the repository.
If anyone have some suggestions, write them here, or make a Merge Request in repository.