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
psychonic

BAFFLED
Join Date: May 2008
Old 12-07-2010 , 15:13   Re: How to make plugins more universal
Reply With Quote #8

Are you asking about any one Kuma game in particular? Kuma appears to have seven Source games. They all share the same engine files (which seems to be Source 2007) but all with different server files.
psychonic is offline
Dietz
Junior Member
Join Date: Dec 2010
Old 12-07-2010 , 21:02   Re: How to make plugins more universal
Reply With Quote #9

Quote:
Originally Posted by psychonic View Post
Are you asking about any one Kuma game in particular? Kuma appears to have seven Source games. They all share the same engine files (which seems to be Source 2007) but all with different server files.
I would be most interested in Kuma/War2. As you stated, and through the preview of their files, all of kuma's games seem to be in the same basic format.
Dietz is offline
Send a message via Yahoo to Dietz
psychonic

BAFFLED
Join Date: May 2008
Old 12-07-2010 , 21:17   Re: How to make plugins more universal
Reply With Quote #10

Quote:
Originally Posted by Dietz View Post
I would be most interested in Kuma/War2. As you stated, and through the preview of their files, all of kuma's games seem to be in the same basic format.
The virtual offsets can still differ between them for sdktool's natives.

File a bug (login with forum email and pass) with the one you one and I'll at least take a look when I get time. It will be a pain since it's windows-only.
psychonic 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:17.


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