View Single Post
Author Message
BAILOPAN
Join Date: Jan 2004
Old 06-29-2007 , 03:01   Writing Sane Plugins
#1

Quote:
Originally Posted by asherkin
It'd be a shame to lose these, so moving this thread here verbatim until someone has time to clean it up to be general advice.
These are rough guidelines for getting your plugin approved.
  • Write neat code. If your source code is completely unreadable, or not formatted in any noticeable way, it will be ignored or unapproved.
  • Verify compilation. If your plugin does not compile, it won't be approved.
  • Check warning. If your plugin has a warning when compiling, it won't be approved. This includes deprecated functions.
  • Fill in the description and version fields.
  • If you fill in a version cvar, choose a descriptive cvar name. If your plugin is called "Nifty Tools," a good cvar name would be "niftytools_version." Bad names might be "nt_version," "nt," or "version_n." Check on game-monitor that the cvar is not in use for Source. Make sure FCVAR_NOTIFY is applied to the cvar flags.
  • Don't copycat. If you take someone else's plugin and modify it, you must give them credit for the original work. If your plugin does the same thing as someone else's plugin, it may be unapproved unless it adds new functionality or the original has been abandoned.
  • Translation files should end in ".txt" and you should not specify the extension in LoadTranslations().
  • Do not hardcode "addons/sourcemod" -- use BuildPath().
  • All plugins must have downloads attached. If you want to link to an external site, make sure that the plugin is findable within a reasonable number of clicks. If downloads require registration, it will not be approved.
  • All plugins must be comply with the SourceMod License, the GNU General Public License version 3. Equivalently licensed source code must be available.
  • Any "extra" files must comply with the DMCA. Attaching music/sound/video files from other games or authors might cause trouble. Distribute wisely.
  • Do not use any of our translation files other than core.phrases.txt and common.phrases.txt. The other files can and will change at our discretion, where as common and core will always be backwards compatible.
  • Do not rely on the existence or contents of any of our gamedata files -- not even core.games.
  • Do not use strange or proprietary archive formats (.7z, .rar, etc) - use .zip to keep the forums consistent.
  • Do not place repeated advertising in your plugin. This is generally obnoxious to end users, and creates problems as more and more plugins decide to do it. If you are concerned about a specific case, please PM me or an approver.

Most common mistakes:
  • You put a public cvar in your code, but not in your post's description section for public cvar.
  • You create a public cvar without FCVAR_NOTIFY.
  • Description fields are not filled in at all.
  • Illegal file formats... no .rar or .7z files.
  • Compiles on forums but you attach a compiled version. Do not do this if it will compile here.
For those of you who do not know, a public cvar is a console variable that you can create in your code to track your plugin. People usually do this with the version variable. Something like "sm_plugin_version". That is fine, but make sure it is not already taken, you have the proper flags assoicated with it, and you put it in your post's description section.

You are not required to make this, although it makes it work with the stat system and allows you to search for it on game-monitor to see who is using it. If you do make one, you have to follow these guidelines.

A post that has what it takes to be approved can be approved quickly.

You only get one chance at a public cvar. If you change the cvar name, it will not take effect unless your plugin gets unapproved and reapproved. For this, use the "Report Post" button.

If you need the rules clarified, use the "Report Post" button on your plugin thread. (:TODO: post usergroup member list link here)
__________________
egg

Last edited by asherkin; 01-12-2016 at 14:40. Reason: Changed Deprecation statement for Warning statement. And... cake.
BAILOPAN is offline