<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>http://wiki.minegoboom.com/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=AcoucAricc</id>
		<title>ASSS Wiki - User contributions [en]</title>
		<link rel="self" type="application/atom+xml" href="http://wiki.minegoboom.com/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=AcoucAricc"/>
		<link rel="alternate" type="text/html" href="http://wiki.minegoboom.com/index.php/Special:Contributions/AcoucAricc"/>
		<updated>2026-05-05T22:11:01Z</updated>
		<subtitle>User contributions</subtitle>
		<generator>MediaWiki 1.28.2</generator>

	<entry>
		<id>http://wiki.minegoboom.com/index.php?title=Installing_New_Modules&amp;diff=5967</id>
		<title>Installing New Modules</title>
		<link rel="alternate" type="text/html" href="http://wiki.minegoboom.com/index.php?title=Installing_New_Modules&amp;diff=5967"/>
				<updated>2008-07-13T02:59:29Z</updated>
		
		<summary type="html">&lt;p&gt;AcoucAricc: olositzel&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;orolobasrac&lt;br /&gt;
When you want to add more functionality to your server you can install new custom modules. Differences in server versions often mean something will break in a module, compiling from source can  help fix this.&lt;br /&gt;
&lt;br /&gt;
== C modules ==&lt;br /&gt;
&lt;br /&gt;
=== Using Makefile fragments ===&lt;br /&gt;
This is probably the easiest way to get a new module compiling under linux. Let's call &amp;lt;tt&amp;gt;*.mk&amp;lt;/tt&amp;gt; files &amp;quot;Makefile fragments&amp;quot;. All the correct compiler flags and such are supplied for you since the Makefile fragments are in included into the main Makefile.&lt;br /&gt;
&lt;br /&gt;
This example will demonstrate how to create a shared library &amp;lt;tt&amp;gt;example.so&amp;lt;/tt&amp;gt; containing two modules &amp;lt;tt&amp;gt;moo&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;lala&amp;lt;/tt&amp;gt;. Create a directory for your module as a subdirectory of &amp;lt;tt&amp;gt;src&amp;lt;/tt&amp;gt;, the directory containing all the ASSS code.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ cd asss-1.4.3/src&lt;br /&gt;
$ mkdir example&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Place your source code &amp;lt;tt&amp;gt;moo.c&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;lala.c&amp;lt;/tt&amp;gt; into this newly created directory. Then create a file called &amp;lt;tt&amp;gt;example.mk&amp;lt;/tt&amp;gt; within that directory that looks like this:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
example_mods = moo lala&lt;br /&gt;
&lt;br /&gt;
$(eval $(call dl_template,example))&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
All &amp;lt;tt&amp;gt;*.mk&amp;lt;/tt&amp;gt; files in any subdirectories will be included during compilation. Two fragments come in the &amp;lt;tt&amp;gt;contrib&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;turf&amp;lt;/tt&amp;gt; directories of the ASSS package, which you might want to look at as examples.&lt;br /&gt;
&lt;br /&gt;
Now before we can compile the module we need to update the &amp;quot;deps&amp;quot;. Make sure you are in the &amp;lt;tt&amp;gt;src&amp;lt;/tt&amp;gt; directory.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ cd ..&lt;br /&gt;
$ pwd&lt;br /&gt;
asss-1.4.3/src&lt;br /&gt;
$ make deps&lt;br /&gt;
(some output here, some warnings can be safely ignored)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Finally we can compile it, this step will automatically install it to the bin directory:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ make&lt;br /&gt;
(some output here)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The module specifier for the new modules will be &amp;lt;tt&amp;gt;example:moo&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;example:lala&amp;lt;/tt&amp;gt;, for use in modules.conf or with ?insmod.&lt;br /&gt;
&lt;br /&gt;
=== Using a custom Makefile ===&lt;br /&gt;
Sometimes you might want to create your own Makefile, if you need to use custom compilation options, or a different source file layout. Here is a very basic one (they can get very long).&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# simple makefile&lt;br /&gt;
&lt;br /&gt;
OUTFILE = somefile.so&lt;br /&gt;
MODULES = autoturret.o&lt;br /&gt;
&lt;br /&gt;
CC = gcc -std=gnu99 -pipe&lt;br /&gt;
CFLAGS = -s -O2 -Wall&lt;br /&gt;
&lt;br /&gt;
all: ${OUTFILE}&lt;br /&gt;
&lt;br /&gt;
${OUTFILE}: ${MODULES}&lt;br /&gt;
	${CC} -fPIC -shared -o ${OUTFILE} ${MODULES}&lt;br /&gt;
&lt;br /&gt;
install: ${OUTFILE}&lt;br /&gt;
	install ${OUTFILE} ../bin/${OUTFILE}&lt;br /&gt;
&lt;br /&gt;
clean:&lt;br /&gt;
	rm -f ${OUTFILE} ${MODULES}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
You can change the name of the resulting file with ''OUTFILE'' and add more modules on the ''MODULES'' line. Note: the indentation must be a tab and not a bunch of spaces.&lt;br /&gt;
&lt;br /&gt;
To use a makefile one would type something like this:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ make -f some.mk&lt;br /&gt;
$ make -f some.mk install&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
The ''-f'' switch tells make to use ''some.mk'' instead of the default which is 'Makefile'. Also two commands are used so you can spot any errors during compilation.&lt;br /&gt;
&lt;br /&gt;
=== With Dev C++ ===&lt;br /&gt;
This tutorial uses [http://www.bloodshed.net/dev/devcpp.html Dev C++ 4.9.9.2] ASSS 1.4.0 and Smong's [http://toktok.sscentral.com/ss-asss.html nomysql] module. Although it should work with all modules and a recent version of Dev C++.&lt;br /&gt;
&lt;br /&gt;
==== Step 1 ====&lt;br /&gt;
[[Image:devcpp-140-step1.png|right]]&lt;br /&gt;
Load up Dev C++ and go to ''File'', ''New'', ''Project''.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Step 2 ====&lt;br /&gt;
[[Image:devcpp-140-step2.png|left]]&lt;br /&gt;
Choose the DLL project and give the project a descriptive name. Note: the name of the project will also be the name of the final .dll file, more about that later. Make sure to select ''C Project''.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Step 3 ====&lt;br /&gt;
[[Image:devcpp-140-step3.png|right]]&lt;br /&gt;
'''A)''' The DLL project comes with some template files. Remove them by right clicking on their tab and selecting close.&lt;br /&gt;
&lt;br /&gt;
'''B)''' Click the icon of a document with a plus sign on it. This will open a dialog that lets you add files to the project. Here you can add the module's source files. For nomysql this is just nomysql.c. Also add util.c from from asss/src/main. You can download the ASSS source code from http://asss.yi.org/asss.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Step 4 ====&lt;br /&gt;
[[Image:devcpp-140-step4.png|left]]&lt;br /&gt;
Before compiling some include and library paths must be setup. Go to ''Project'', ''Project Options'' from the menu bar.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Step 5 ====&lt;br /&gt;
[[Image:devcpp-140-step5.png|right]]&lt;br /&gt;
First add pthread.dll by going to the ''Parameters'' tab and clicking on ''Add Library or Object''. &lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Step 6 ====&lt;br /&gt;
[[Image:devcpp-140-step6.png|left]]&lt;br /&gt;
You need to change the file type filter in the open file dialog to ''All Files (*.*)''. Then select pthread.dll (actual name may vary).&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Step 7 ====&lt;br /&gt;
[[Image:devcpp-140-step7.png|right]]&lt;br /&gt;
Now add the following include directories:&lt;br /&gt;
* asss/src&lt;br /&gt;
* asss/src/include&lt;br /&gt;
* asss/windeps&lt;br /&gt;
These are needed so the compiler can find all the .h files that the module source requires.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Step 8 ====&lt;br /&gt;
[[Image:devcpp-140-step8.png|left]]&lt;br /&gt;
This part is optional. You may want to change the name of the output .dll file and you can do so from the ''Build Options'' tab. The default name for the output .dll file is the name you gave the project when you created it.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Step 9 ====&lt;br /&gt;
[[Image:devcpp-140-step9.png|right]]&lt;br /&gt;
Now click the compile button. It looks like four colored squares.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Step 10 ====&lt;br /&gt;
[[Image:devcpp-140-step10.png|left]]&lt;br /&gt;
If all goes well you should see this dialog. Congratulations on compiling your first module!&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== With MSVC ===&lt;br /&gt;
-write me-&lt;br /&gt;
&lt;br /&gt;
=== By hand ===&lt;br /&gt;
You may need to execute the commands to compile from source, and then move the resulting .so file to the bin directory using install if running ASSS on Linux. If you are running ASSS on Windows and are updating a module you should shutdown the server before copying the .dll file to the bin directory.&lt;br /&gt;
&lt;br /&gt;
== Python modules ==&lt;br /&gt;
No compiling is necessary. Move the .py file to the bin directory. There may be 'softcoded' settings within the .py file, so examine any comments near the top of the file for instructions.&lt;br /&gt;
&lt;br /&gt;
== Configuring ==&lt;br /&gt;
It is a good idea to examine any documents that came with the module. There may be comments at the top of the source code and if you are unsure you can do a search on the file for 'cfg-&amp;gt;Get', which will return all customisable settings this module reads.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ grep 'cfg-&amp;gt;Get' src/module.c&lt;br /&gt;
$ grep 'cfg.Get' bin/module.py&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
I suggest putting module settings in their own .conf file and include this from your [[arena.conf]].&lt;br /&gt;
&lt;br /&gt;
There may also be commands that you must set the permissions for. You can add new commands to the group files found in conf/groupdef.dir. Prefix cmd_ to the command to allow users to send the command publicly and privcmd_ for team and private targets.&lt;br /&gt;
&lt;br /&gt;
Finally you must load the module. Either add an entry to conf/modules.conf or use ?insmod. Some modules are arena specific, in which case you must also add it to your arena.conf Modules:AttachModules setting or use ?attmod.&lt;br /&gt;
&lt;br /&gt;
If you have any questions left chances are they have already been answered at the [[Module General Faq|Module FAQ]].&lt;br /&gt;
&lt;br /&gt;
[[Category:Module]]&lt;br /&gt;
[[Category:Guides]]&lt;/div&gt;</summary>
		<author><name>AcoucAricc</name></author>	</entry>

	</feed>