View Full Version : [DModule 0.13] - Module based Scripting Framework for SA-MP

10/12/2007, 01:17 PM
http://dracoblue.net/upload/dmodule.gif (http://dev.dracoblue.net/index.php/DModule)

Hello coders, hello scripters.

Since I am coding on GTA:Tournament and other GameModes with a lot of coders at once, its difficult to coordinate all stuff if you use normal-pawn-include-method. So I wrote especially for GTA:T a module system which auto-merged scripting parts "contained" in modules and so it was easy to test only parts of the 20.000 lines gamemode.

But it was pretty ugly if somebody is new to my coding team, so I sat down with my coding staff and asked them: What are you missing in pawn and that old module system?
- compiling more then one module at once
- defining own callbacks
- defining sets of modules as project
- defining ... lots of more

Then DModule was born. The whole month I have been developing on DModule (from V0.1 to V0.12, 10th Dec 2007) and now we think DModule is ready for the masses.

SAMP 0.2.2 Enchancements: (means default SAMP-functions repaired)
- TextDraws (fixed crashes)
- SetPlayerTeam/GetPlayerTeam/AddPlayerClassEx/AddPlayerClass (fixed teams)
- FriendlyFire (made working)

It has been a time since dmodule 0.13 was release. The development moved further and 0.15-dev is already available on github: https://github.com/DracoBlue/Dmodule

Please use that version if you are really interested in Dmodule!

What is DModule?
If you want to play Grand Theft Auto: San Andreas online, check the official sa-mp site instead. If you are developing or want to get in development of gamemodes for SA-MP Multiplayer Modification for Grand Theft Auto San Andreas, you'll be interested in DModule.

DModule is not a library. Its an open source (under MIT-license: use it, copy it, hack it, sell it, love it) framework for Pawn-Development (optimized for SA-MP GameModes). It provides project and module based development functions. Whole samp-functionality is implemented as modules, too. So you can see how powerful the modulesystem is. It also provides complete translation support with own implementation of gettext.
For expirienced developers its implements definition of own events (dynamic callbacks) and Read/Write-Properties - called Values. Throwing an Event as soon as a Value changes and allowing you to react just in time, instead of checking with a fancy Timer EverySecond!
For debugging it implements lots of debug prints without you need to write a line of extra code. It also supports an own version of pwndoc (similar to javadoc) to autogenerate wiki-documentation for your project!

The dependency features of DModule fix the issues big library packages like MIC or YSI currently have. All callbacks "need to be implemented" somewhere. DModule "fixes" that by implementing dynamic callbacks a.k.a events. If you wrote such a library and need help to use all the features of dmodule - feel free to join us in irc (http://irc://irc.gtanet.com/dmodule)!

Downloading DModule
Before we can start with DModule, you need a new folder for DModule.
1. Open your explorer, create a folder called "DModule" and head over to the Download-Section (http://dev.dracoblue.net/index.php/DModule/Download).
2. There you'll find a file called dmodule_0_13.zip. Open it with your explorer and you'll find a folder dmodule_0_13 in it. Extract all contents to your folder "DModule" (which we created a step above).
3. You are ready to use DModule!

Open Source
DModule is licensed under the terms of MIT-License. That is a very open license, which allows you using it in (non-)commercial closed/open-source projects. Anyways a comment in your about box is always appriciated :-).

That was the very very short introduction. I suggest you to download latest version and give it a try. We have set up a Tutorial (http://dev.dracoblue.net/index.php/DModule/First_Steps_With_DModule#Downloading_DModule) for you and love to see you guys in #dmodule (http://irc://irc.gtanet.com/dmodule) channel on irc.gtanet.com!

Kind regards,
Jan (DracoBlue)

10/12/2007, 01:19 PM
Nice! I gotta try this! 8)

10/12/2007, 01:19 PM
Very nice! thanks!

10/12/2007, 01:24 PM
Holy shit!
That is nice Draco ;)

10/12/2007, 01:25 PM

Crazy work !!!!

10/12/2007, 01:37 PM
Since i am used to it now more and more, its really great to manage scripts :-)

10/12/2007, 01:44 PM
I've already tested it (what a suprise :lol:) and all i can say is scripting professional sa-mp gamemodes has never been so easy

it's really worth a try, especially dynamic event system + values, this is really great!

10/12/2007, 01:53 PM
Sorry if I sound like a n00b but where the hell is the .exe in this? :P

10/12/2007, 01:56 PM
It's more easy to script with that ? really? :D :?:

10/12/2007, 01:57 PM
Thanks, this should be fairly useful. I was waiting for a system like this to make coding a bit more organized.

10/12/2007, 02:00 PM
Sorry if I sound like a n00b but where the hell is the .exe in this? :P

You create the exe with that command: "compile sfteam"

and will find it in sfteam\build as samp-server.exe then :-)

Have fun coding,
Jan (DracoBlue)

10/12/2007, 02:04 PM
Sorry if I sound like a n00b but where the hell is the .exe in this? :P

You create the exe with that command: "compile sfteam"

and will find it in sfteam\build as samp-server.exe then :-)

Have fun coding,
Jan (DracoBlue)

Ok thank you, I will try it out

10/12/2007, 02:06 PM
Good work, great initiative (sp?) :P
Keep it up, and if you need help with anything (translating, testing etc), don't hesitate to ask me :)

10/12/2007, 02:06 PM
So you released it, good work Jan (as always), i think this should be stickied. :)

10/12/2007, 02:09 PM
I vote admin stickies the topic! :mrgreen:

10/12/2007, 03:03 PM
Jupi. Finally u released it DracoBlue. Like always good work man. :P Well keep up good work. Arigato sempai that u released it :P :) ^^

P.S, Motivate somehow Rhbk becouse he is lazy atm and he don't script u know what. Maybe we will bite him a little? :) hihi

10/12/2007, 06:34 PM
So you released it, good work Jan (as always)

Thank you. Am realy happy that you like it. Really nice, already 190 downloads.

- Draco

11/12/2007, 09:43 PM
(sry for doublepost, announcement)

DModule 0.13 released (http://dracoblue.net/dev/index.php/2007/12/11/dmodule-013-finished/)

Today I got the first update of DModule for you guys. DModule 0.13 contains again some cool new features, like enchanced pawn-doc reader and a completely new command line interface to dmodule project managment! Very handy if you want to check what modules your project chooses from which directory or if you want to add modules on the fly.

Also it contains a bugfixed version of GetPlayerTeam and SetPlayerTeam (and the Spawn-Functions) to fix the issues with friendly fire in SA-MP.

Here is the detailed list of changes, also available in the Changelog:

* Added bugfixed version of SetPlayerTeam, GetPlayerTeam, SetSpawnInfo and AddPlayerClass(Ex) to provide working friendly fire in samp.
* Added commandline interface for project management
* Updated the pwn-doc reader
o able to read @param type varname description
o reading params_def correctly
o removing &ís and & from param name
* Ships now with
o dini 1.5.2
o dcmd
o timestamp
o dplayers 1.1
o dsystem 1.0
o dutils 1.11
o inouticon 1.0
o inoutmsg 1.0
o killlist 1.0
o killpunish 1.0
o killreward 1.0
o loginout 1.0
o modeconfig 1.0
o teamspawn 1.1

Have fun coding,
Jan (DracoBlue)

12/12/2007, 11:41 AM
When you click the 0.13 link it gives you version 0.12

EDIT: Never mind its just the rar archives name :-[

12/12/2007, 11:54 AM
very nice work this should be sticked

12/12/2007, 08:34 PM
quallity made in germany ^^ thats all what i have to say :D
Great Work "Kumpel" like we Germans say ^^ (Means "buddy")
Keep going on ^^

Lemme guess not a Workaholic but Insane am i Right? :mrgreen:


23/01/2008, 11:34 AM
Why i haven't see this topic before today? I'll give a try, sounds great Draco :)

23/01/2008, 11:51 AM
Amazing. Nice work.

23/01/2008, 03:01 PM
Have fun using.

If you need help, check irc://irc.gtanet.com/#dmodule channel.

- Draco

14/06/2010, 04:29 PM
Does this work for 0.3?


01/08/2010, 01:06 PM
Though it's an old thread, I'd also like to know if it works with 0.3

01/08/2010, 07:14 PM
It works with 0.3 (we are using it at gtat heavily [about 100.000loc]).

Anyways the 0.13 is not up to date anymore and many new functions have been introduced. I will update to 0.14 pretty soon, so you can get 100% of the entire samp universe within dmodule.

Have fun coding,

10/11/2010, 08:29 PM
I know this is a very old topic, I would really like to see that convertion and more added to the wiki, as I am quite interested in this. Would be great!

23/03/2011, 05:14 PM
Yeah, we are waiting for new versions with all new funcs compatible :D

23/03/2011, 06:58 PM
I uploaded it at https://github.com/DracoBlue/Dmodule already, it's not finished, yet.

Have fun coding,

24/03/2011, 08:44 AM
Waiting it to be finished and I'm kind of discovering it right now.
Anyway, seems amazing and Thank You.

Edit: Is it actually working for linux too?

Regards, HP aka Priit.

24/03/2011, 11:37 AM
wow damn draco ur still ripping up samp as usual cant wait for the update ;P

24/03/2011, 10:37 PM
Edit: Is it actually working for linux too?
Yes. I am using it with Wine (https://secure.wikimedia.org/wikipedia/en/wiki/Wine_%28software%29) and automatic bulding on my linux server :-)

- Draco

25/03/2011, 08:32 AM
I am aware of this software application. I'm using it for Adobe Photoshop on my Ubuntu.

Edit: The DModule wikia is a bit outdated, you could update it, if you have some time.

Regards, HP aka Priit.

29/03/2011, 12:30 PM
Doesn't it makes server slower while it takes time to read trough all modules?

29/03/2011, 09:35 PM
Doesn't it makes server slower while it takes time to read trough all modules?
Nope, it's compiled once. There is a little overhead if you have tons of listeners to one callback, but only each time the callback is executed.

- Draco

29/03/2011, 09:37 PM
looks great!
i will try it 2marrow...