Raised This Month: $ Target: $400
 0% 

How to make plugins more universal


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Dietz
Junior Member
Join Date: Dec 2010
Old 12-04-2010 , 09:30   How to make plugins more universal
Reply With Quote #1

Sorry, but I know barely anyting surrounding plugins. However I am extremly interested in learning how to write them (although that day is a long ways away).

My question was how would I tweak any given plugin to make it compatiable with other games, specifically kuma games. Although I know every game is not set up the same way, I am not sure how or why certain plugins are game specific. I realize it will not be as easy as swtching a line from css/addons/sourcemod/plugin to kumagames/addons/sourcemod/plugins but just the basic knowledge of what makes it incompatible would be helpfull.

As a side note the plugin I was most interested in was the laser tag one. I have read over the wiki directions but still feel lost.

Dietz
Dietz is offline
Send a message via Yahoo to Dietz
AtomicStryker
Veteran Member
Join Date: Apr 2009
Location: Teutonia!!
Old 12-04-2010 , 11:55   Re: How to make plugins more universal
Reply With Quote #2

In general every Sourcemod plugin in itself is compatible with all Source games. However there are differences in SDK Tools support, resulting in different functions available depending on the engine version.

Also, most Plugins work in a specific context with specific entities only, and since those aren't usually similar in different games they won't do what theyre supposed to in foreign games.



Furthermore, if a Plugin hacks into SDK Calls it's usually engine exclusive. For example CSS Laser Tag uses something called "Weapon_ShootPosition", which means that function would have to exist and you would have to get its binary Signature for the game you intend it for.

Then there's events, but as far i can see Laser Tag only uses bullet_impact and round_start, both of which are found in all Source games.

Last edited by AtomicStryker; 12-04-2010 at 11:59.
AtomicStryker is offline
berni
SourceMod Plugin Approver
Join Date: May 2007
Location: Austria
Old 12-05-2010 , 13:48   Re: How to make plugins more universal
Reply With Quote #3

Specific game events, specific entities (weapons, ...), specific behavior, specific functions... That's mostly the reasons why plugins are written for specific games only.

If you ask me... there are a lot of plugins out there, that could be game independent, but the author just cares about the game he is playing, that's why he doesn't write game independent code.

Sometimes you just need to add a few more code lines to get it working on every game, but plugin authors tend to be lazy.

If you have specific questions on how to write game independent code, I'm glad to help you.
__________________
Why reinvent the wheel ? Download smlib with over 350 useful functions.

When people ask me "Plz" just because it's shorter than "Please" I feel perfectly justified to answer "No" because it's shorter than "Yes"
powered by Core i7 3770k | 32GB DDR3 1886Mhz | 2x Vertex4 SSD Raid0
berni is offline
FaTony
Veteran Member
Join Date: Aug 2008
Old 12-05-2010 , 14:28   Re: How to make plugins more universal
Reply With Quote #4

Simple: don't use game specific entities, don't use game specific events, don't use game specific functions.
__________________
FaTony is offline
Dietz
Junior Member
Join Date: Dec 2010
Old 12-06-2010 , 12:34   Re: How to make plugins more universal
Reply With Quote #5

Thanks for the replies,

So does this all mean I only need to change the even code and change SDK calls. If so where would these files be located? I know I have been through my files a couple times over but cannot seem to find any file, or folder, that seems similar to these commands. It seems to me as though all games would have codes squivilant to those mentioned, but I do realize that Kuma Games is not a large company and does seem to have flaws that seem to pop up too often.

Once again thanks for the replies, they truly have helped.

Dietz
Dietz is offline
Send a message via Yahoo to Dietz
AtomicStryker
Veteran Member
Join Date: Apr 2009
Location: Teutonia!!
Old 12-06-2010 , 17:41   Re: How to make plugins more universal
Reply With Quote #6

Does Sourcemod even support Kuma games lol
AtomicStryker is offline
Dietz
Junior Member
Join Date: Dec 2010
Old 12-07-2010 , 14:09   Re: How to make plugins more universal
Reply With Quote #7

Quote:
Originally Posted by AtomicStryker View Post
Does Sourcemod even support Kuma games lol
Yes, Sourcemod does support Kuma, although many of the admin commands do not work (slay, slap, timebomb, Timeburn, burn, freeze, etc). Actually i take that back, timebomb turns your player orange, lol. Even though it is not as cool as blowing someone up, it is still pretty cool (sort of tiger looking). However, I assure you that I never planned on using sourcemod. It was indeed a last resort after a couple weeks of failed attempts of getting mani admin to work. Thinking about it, maybe i'll try mani admin again with the updated version of metamod:source.

If anyone has any idea where to look I'd still like to know where to find commands and SDK codes. I am away from the computer that I have kuma downloaded on but I do recall the following folders:

Materials, Scripts, Kuma content, configs, addons, cfg,

hmm, guess i really didn't remember as many as i thought i did, but my kuma folder is probably similar to all other games.
Dietz is offline
Send a message via Yahoo to Dietz
asherkin
SourceMod Developer
Join Date: Aug 2009
Location: OnGameFrame()
Old 12-08-2010 , 04:36   Re: How to make plugins more universal
Reply With Quote #8

Quote:
Originally Posted by Dietz View Post
However, I assure you that I never planned on using sourcemod. It was indeed a last resort after a couple weeks of failed attempts of getting mani admin to work. Thinking about it, maybe i'll try mani admin again with the updated version of metamod:source.
How nice of you to come to the SourceMod forums to "assure" us of the fact you have no wish to use it, after your original question received some very helpful answers from members of the SM community.

I have no idea if your post was meant to be encouraging or insulting, it certainly reads like the latter.

Feel free to continue your plan to go back to Mani, lest psychonic have to take up his offer of putting in the hours of work he was going to do for you to add full support for this game to SourceMod.
__________________
asherkin is offline
Dietz
Junior Member
Join Date: Dec 2010
Old 12-08-2010 , 07:52   Re: How to make plugins more universal
Reply With Quote #9

Quote:
Originally Posted by asherkin View Post
How nice of you to come to the SourceMod forums to "assure" us of the fact you have no wish to use it, after your original question received some very helpful answers from members of the SM community.

I have no idea if your post was meant to be encouraging or insulting, it certainly reads like the latter.

Feel free to continue your plan to go back to Mani, lest psychonic have to take up his offer of putting in the hours of work he was going to do for you to add full support for this game to SourceMod.
To be honest my posting was not meant to be insulting. I have not been on many kuma servers with sourcemod and am coming to the belief that it may not be the best program for kuma.

Additionally @psychonic thank you for offering to look at the program but I am not sure what you wanted me to send you and I'd rather not be relying on one person in particular to make a plugin work. I also rather not burden you with a game that will only help a slect number of people when you could be working with more popular games.

P.S. your and @$$ asherkin
Dietz is offline
Send a message via Yahoo to Dietz
asherkin
SourceMod Developer
Join Date: Aug 2009
Location: OnGameFrame()
Old 12-08-2010 , 08:18   Re: How to make plugins more universal
Reply With Quote #10

Quote:
Originally Posted by Dietz View Post
To be honest my posting was not meant to be insulting.
You may want to think more carefully before hitting the post button then, remember that emotions don't show through text .
Quote:
Originally Posted by Dietz View Post
I have not been on many kuma servers with sourcemod and am coming to the belief that it may not be the best program for kuma.
AFAIK, no one has asked for SM to support it before.

Quote:
Originally Posted by Dietz View Post
I'd rather not be relying on one person in particular to make a plugin work.
Psychonic is one of the SourceMod Developers, it's what he does, when people follow instructions.

Quote:
Originally Posted by Dietz View Post
P.S. your and @$$ asherkin
You're welcome.

P.S. "you're", "an"
__________________
asherkin is offline
Reply



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 04:41.


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