Jump to content
SubSpace Forum Network

Recommended Posts

Posted

Alright, in this topic I will attempt to help you make a module. Making a module is easy pie once you know what to do, so let's get to it.

 

Windows with MSVC:

 

First step: make a new VS.net C++ Project.

 

1. File -> New Projectw

2. Win32 Console Project

3. Give your project a name ("TestModule" in the picture)

4. Press Ok

http://img.photobucket.com/albums/v622/bak2007/disc_module1.png

 

5. Click on application settings on the left

6. Click DLL from the list of radio buttons

7. Press the Empty Project checkbox

8. Press Finish

http://img.photobucket.com/albums/v622/bak2007/disc_module2.png

 

9. File -> Add New Item

10. Select C++ Source File (.cpp)

11. Name your source file ("testmodule.cpp" in the picture)

12. Press Open

http://img.photobucket.com/albums/v622/bak2007/disc_module3.png

 

13. Paste the following code into your source file

// Sample Discretion Module Source File
#include "Module.h"

void* getClassInstance(void* _mm, LoadMode lm)
{
if (lm == LOADMODE_Init)
	printf("Test Module Initialized\n");

return 0;
}

extern "C" 
{
EXPORT void* getInstance(void* mm, LoadMode lm)
{
	return getClassInstance(mm,lm);
}
}

 

14. Right Click your project in the Solution Explorer and go to Properties (You can also access this through the Project Menu, Project -> Properties)

http://img.photobucket.com/albums/v622/bak2007/disc_module4.png

 

15. In the properties window, from the drop down menu select "All Configurations"

16. Select C++, General from the tree view on the left

17. Type the directory to the Modules directory (the one with Module.h in it, not the one with only .dlls!) that comes with the full version of Discretion in the Additional Include Directory property ("E:/client/modules" in the picture)

18. Press Ok

http://img.photobucket.com/albums/v622/bak2007/disc_module5.png

 

19. Go to Buld -> Build ("TestModule" in the pictue)

http://img.photobucket.com/albums/v622/bak2007/disc_module6.png

 

If all goes well, you code should compile and a .dll should be produced that is a Discretion module! Now let's put the module into Discretion to see it at work.

 

20. Copy the produced .dll into your Discretion executable's Module folder (the one with the .dlls in it, not the one with Module.h in it).

http://img.photobucket.com/albums/v622/bak2007/disc_module7.png

 

21. Edit conf/MAIN.CONF with a program such as Notepad

22. Add the name of your dll to the Modules::Names setting (it's a comma seperated list of module names, order doesn't matter)

23. Save the file

http://img.photobucket.com/albums/v622/bak2007/disc_module8.png

 

24. Run Discretion, Select Practice Offline

25. Observe your modules initialization in the console window

http://img.photobucket.com/albums/v622/bak2007/disc_module9.png

 

 

Now you might say, rightfully so, that this module doesn't do anything. The way to do real things in Discretion is by using other modules. Want to react to user key presses? Use the KeyControls module. Want to display some images? Use the Graphics module. I'll gladly write additional tutorials for how to use each of these as needed. Tell me what you want to do and I'll write a tutorial with how to use the existing modules to accomplish what you want to do.

Linux:

Todo... let me know if you're interested in linux dev post here and I'll make a guide, although the makefile provides some hints.

Posted
how did they work?
The one that keeps popping in my mind is where the wormhole's warp feature would be completely turned off and you can shoot clearly through the wormhole. Bombs and players would eventually end up confined in the center of the wormhole, thus stuck and would have a few options:

1) Be killed by enemy bombs, bullets, etc - by people flying around the wormhole

2) Insert (Warp)

3) Attach to a teammate

4) Change ship

 

Other than that, if you can't attach to a teammate, warp, or change ship (including spectator mode), you would be confined to your death pit. It'd be nice if I could somehow integrate some of the old VIE scripts into my zone. smile.gif Though the zone would have to require the Discretion client to prevent confusion and "cheating."

 

Right now I have a headache, a dozy brain, and somehow I feel really strange although I slept about 9 hours; at the moment I can't think of any other ... oh. There was another one where only Sysops could use Ship 8. Back then Ship 8 was reserved for the gods of the zone, and was known as a super ship compared to the ships 1 through 7.

 

There might be more scripts than this, but I'm unable to remember because of my head problem.

Posted
I have been told by many of the VIE vets that "back in the day" (atleast of Jackpot Zone) VIE had some special scripts, exactly as the ones I described above. I spent a few days researching "VIE Scripts" and asking a bunch of people around.
  • 2 weeks later...
Posted
MS Visual C++ edition is free, and it's just as capable.

 

Google it if you want it. (And yes, it is much better than Dev-C++)

its not

 

only the re!@#$%^&*ed "express" edition is, which is impossible to get anything done it.

Posted
the wormhole thing can be done by laying fly-under tiles all over the wormhole
That hardly works. Continuum is strange and that doesn't work for me, no matter what tiles I use, it always swings a player around a center. Guaranteed. Your example maps somehow manages to act differently. And by the way, that's not an efficient and very professional method, because the player jitters uncontrollably in the center of the wormhole anyway and the top left tile fails to function with the rest of the wormhole region.

 

I already explained this to you a while ago. It does not fully work as you think it does. I don't know why it does this. I experimented with this pretty heavily at all angles using my "ServerKit-Full.exe" with no modified files, and I used Jackpot SVS to experiment and found exactly the same results.

 

 

 

Please recreate the VIE scripts. smile.gif

Posted
I'm not sure. I don't think VIE ever shared their scripts, and possibly eventually disabled this feature from Subgame or something. Who knows. But it is known that VIE called them "scripts," and they were something they could program.
  • 1 month later...
  • 1 month later...
Posted (edited)

What about Python, or you guys going to do everything in C?

I can not tick DLL I am really eager to learn blum.gif help?

 

I just read the above post... God alright I will try to fix.

heplpls.jpg

Edited by Russky

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...