Raised This Month: $7 Target: $400
 1% 

compiling metamod "stub" and "sample"


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Old and Slow
Senior Member
Join Date: May 2005
Location: Arlington, Texas
Old 07-14-2019 , 19:28   compiling metamod "stub" and "sample"
Reply With Quote #1

At the moment, the Sample and Stub code that is included with the metamod download will not build as-is with Visual Studio or the Linux Makefile. I am not familiar with AMBuild but intend to use it eventually. Ages ago, I used these examples to write my first MMS plugins. I still think they are useful to folks trying to get a start in writing them.

I have made changes to the Makefiles for Linux and the solution and project files for Visual Studio versions 2010, 2012, 2013, and 1015. I didn't mess with VS2005 or VS2008. I understand that the AM build team uses VS2015 for all their work, so I didn't go any farther than that.

The plugin code was originally provided when the number of HL2SDK versions was smaller (12) where currently it looks like 26.

The older engine versions were:
SE_EPISODEONE=1
SE_DARKMESSIAH=2
SE_ORANGEBOX=3
SE_BLOODYGOODTIME=4
SE_EYE=5
SE_CSS=6
SE_ORANGEBOXVALVE=7
SE_LEFT4DEAD=8
SE_LEFT4DEAD2=9
SE_ALIENSWARM=10
SE_PORTAL2=11
SE_CSGO=12

I have limited the update to these except for Episode 1 and Orange Box Valve. These don't seem to have current or usable SDKs. I plan to add TF2.

Now, the AMBuild script has its own enumeration of these, 1-22. The are similar, SE_*.

The MMS defines a list in ISmmPluginExt.h:
#define SOURCE_ENGINE_UNKNOWN 0
...
#define SOURCE_ENGINE_DOI 24

It appears that the MMS list is used internally to MMS. I assume that the SE_* enumeration is defined by the build mechanism (AMBuild, Makefile, VS project) and is thus arbitrary and flexible.

The Stub code does not have any conditional compiles for engine type but the Sample code does. I have used older enumerations and both plugins compile and run, although Stub doesn't do anything.

The Sample plugin compiles and I tested it with CSS. It has an example for ClientCommand" that works except for "entry" which is supposed to turn the input into a "say" command. However, it generates the infamous "FCVAR_SERVER_CAN_EXECUTE prevented server running command: say" error. I assume that it worked at one time.

I could use some help with AMBuild. Right now I am having trouble getting it to install in my Windoze 10 machine - some permission issue in the python window.

Is anyone interested in this? I figure it would be helpful to someone looking for something to start with. Ultimately, it would be a tutorial on just how to do that with Linux makefile, Visual Studio, and hopefully, AMBuild.
__________________
.......Chuck |TxA| Old and Slow [AARP]
Old and Slow is offline
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 02:18.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode