1. Check out the Store if you're looking to Buy HL2RP or other schemas for your server. You can click Buy Schemas on the very top navigation bar to visit the store.
  2. Use the Plugin Center to easily subscribe to and auto-install Clockwork plugins to your server, or submit and share plugins you have developed.
  3. Having trouble setting up or developing with Clockwork? Check out the Wiki or post in the Support Forum for advice from fellow users.
Dismiss Notice
Hi Guest, you need a Steam account to register and post on these forums. Login with Steam at the top of the forums to get started!
Dismiss Notice
Hi Guest, do you want to buy HL2RP or another Clockwork schema? Visit the Cloud Sixteen Store to get started!

Gr4Ss' plugin megathread

Discussion in 'Plugins' started by Gr4Ss, Jul 20, 2014.

  1. I have had these sitting around on my hard drive for long enough now, it's time to release them.

    All of these have been written by me over the past year as the developer for various communities. What that means is all of these have seen (extensive) use already and have been tested with a lot of players on the server and under heavy server load. They work and they work well.

    Due to the fact I'm a student in computer science, I try to adhere to a somewhat high coding standard. You'll notice my code is relatively readable, commented out and written in a relatively 'safe' manner so you don't horribly break everything. With that comes the fact however that I do expect you to have a basic ability to set these up (knowing how to make a simple item based on an example will do).

    In case you do manage to break things, run into a bug or need some help setting something up (I won't set it up for you, but I can answer some questions), feel free to add me on steam (just search for Gr4Ss) or post a reply here (if you tag me I'll respond within the day, most likely).

    Main Plugins



    (Ignore the first join and approve being there twice, it's because of an SQL edit)

    (Images resized. Click to view the full image).

    Checkpoint? What the hell might that be? Well... Checkpoint is mostly a plugin that assist in server administration, loaded with features to allow for better server administration while making admin life easier. To list most of the features:
    • Commands. There's things like a unified admin chat, admin helps and announce, administrative commands like respawn, teleport, slay, set health and so on (all of which can be used from the scoreboard as well) and some extras like clear decals, play sound and stop sound.
    • Player records. First time someone joins, whenever they are kicked, banned or warned, any notes the admins add, all stored nicely on their player record, even if they are not on the server.
    • Easily modified. Most of the coding has been done with the thought in mind that not everyone wants the same thing. There's plenty of hook calls, usage of the config or otherwise the option library to make it easy to change pretty much anything, without ever touching the Checkpoint plugin itself to keep updating it easy. It's even safe to use with lua refresh turned on (in case Clockwork ever gets fixed to work with that).
    • Death notifications. Notifications for whenever someone dies and what killed them in chat. Useful to keep track of things in firefights or events to hand out PK's or injuries.
    • Prevent punchwhores. Config option to disable punches from doing damage to other players.
    • Chat icons. All notifications from Checkpoint use nice little icons to go with them. And on top of that, there's the option to set icons for the owner, admins, developers and set custom icons for players. Icons will also show in LOOC, PM's, admin helps and admin chat.
    • Adjusted join notifications. It will say if someone is an operator, admin, super admin or the owner when they connect.
    • Anonymous messages disabled in various OOC chats. No more PM's from 'somebody'.
    • Update notifications. Yes, it will tell you in server console when it's out of date right after server restart. Just so you don't miss out on updates and bug fixes.
    Of course there's more little things that aren't listed here, or stuff that I still intend to add in the future (suggestions always welcome). Still the core of things is finished, tested and working so figured some of you may want the basis already.

    Original idea came from RJ's crafting plugin, but all code is written from scratch using examples out of Clockwork. I know there are a few other crafting plugins around already, each with it's own merits, but try this one out and judge for yourself which you like the most.

    This one makes it's own crafting menu that looks like the business menu. Recipes can be sorted into categories to make them easier to find. Mousing over a recipe will give an automatically generated tooltip with all requirements for it and recipes a player can craft are highlighted green.

    There's the option to add in any number of ingredients with an amount of that ingredient needed, any number of tools, one crafting station (an item the player has to look at, think workbench or furnace) and any number of results with a specific amount or a random amount from a list of possible amounts.

    Adding in new recipes is as easy as adding in a simple new item. In case you make any typos in item uniqueID's, the server console will say so on startup and in the tooltips.

    Update 27/07/2014: Various bugfixes/small changes in regards to recipe loading.

    NOTE: not -all- the needed items for the recipes are provided (mostly food stuff that's missing). The server's console will tell you which ones so you can easily update them yourself/remove them. If I ever get around to converting those items to my consumable base, I'll throw them up here somewhere.

    Radiation Zones
    This plugin is based off of the old surface zones plugin that's been floating about. This has been mostly rewritten to the point where not much of the original code or workings is still left. It's optimized into oblivion, spreads the load better and packs a bunch more radiation related features. All important values can be changed on the fly in the config menu.

    The idea is if the player is in a radiation zone, he gains rads (based on the scale of the zone and the config). The more rads, the more nasty effects he'll start to notice. Pretty much all of these effects come in very gradually instead of 'you hit 800 rads, suddenly your hitpoints are halved'. And with gradually I mean gradually to the point where the damage received at 700 rads would still take 9 OOC hours to kill you (radiation loss isn't much faster, by the way).

    On top of that there's the concept of foodRads. If you eat/drink something that has foodRads on it (mechanic included only, you'll have to make the items yourself or check the needs plugin out), you'll gain radiation from it over time (not instant).

    In terms of protection, the option for that is included in the script but none come packed with it. The armor plugin (FORP version) is setup to work with this one (it includes the radProtection and gasmasks).

    Gas Zones
    This one is much like the radiation zones one, except more straight forward. In other words: you in gas zone without a filter = you take damage. You have 0 hp = you die. No toxins buildup over time, no nasty side effects, no toxins in the food, just ruptured lungs from breathing very bad air.

    Armor plugin (both FORP and HL2RP) include filters to work with this.

    Download (HL2RP Items)
    Download (FORP Items)
    Pretty much an upgrade for Clockwork's clothes_base. Includes armor (damage absorption until it's gone) and protection (damage reduction). Armor can be repaired to 'refill' the armor. Armor will be saved on the item when it's taken off.

    Equipped armor no longer takes up inventory weight and can give additional inventory space (clothes have pockets in the end).

    There's also the ability to give something a gasmask or rebreather (code-wise, it doesn't change the model) for use with the zones plugins. Filters that can be unequipped/requipped (instead of being consumed on use) and refilled are included as well (also a HUD display for how much filter is left).

    On top of that there's the customizable armor, which allows SA to make specific armor items on the fly in-game and set anything from it's name, to its description to the model to any of the values on it. All of this is saved on the item itself so it is persistent and can be given to others.

    NOTE: you need the equipable item plugin (which is included in the download) if you want to use the filters. I tried to do this with CW's accessories but those seemed to be causing memory leaks.

    An entire recode of the original, this one has a few more features and a much more optimized inner working.

    The biggest difference is the fact that this one uses 'types' (5 included by default, but more can be added easily enough). Each type has a certain amount of points associated with it which determine the relative chance of it being picked. More points = higher chance of being selected. Once a type is selected, an item of that type is selected in much of the same manner. The advantage of the type system is that it gives much better control of what spawns regardless of how many items there are of that type. The points have the advantage of having a very very large upper limit (talking about the maximum size of integers here).

    The big downside with the points is they can't be lower than one which makes it hard to have -rare- items. That's why there's an option for rare items. When an item gets spawned, there is a 1% chance it will be a rare item. Then a rare item gets picked from the rare item list (meaning the more rare items, the less likely something will be picked). Then a roll happens. If the roll is lower than the item's value, it gets spawned. This value can be anything between 0 and 1 so the chance of something rare actually spawning can be infinitely small but only as big as (1% / <number of rare items>).

    All needed commands are included (add/remove/remove all) and there are various config variables that allow for easily setting things up. Config variables are spawn interval (how often to spawn things), spawn amount (how many items to try to spawn every interval), min amount (minimum amount of items to aim for), max amount (maximum amount of items to aim for) and items per player (amount of items to spawn per player on the server, used to determine the actual amount of items to aim for between the min and max). This allows for an easy way to set how many items should be spawned at the most and how large the influx should be.

    Every item spawned will have its spawntime set on it. After a while it will no longer be considered as a spawned item. This prevents an item build up while the server is empty (due to a limit on the amount that can be spawned), but prevents old items that haven't been found from clogging up spots.

    Radio Rework v1.2
    Download main plugin; updated 23/08/2014
    Download radio items
    Download radio voices (only for HL2RP! Place in schema plugins!)
    Download admin LRR
    Download example channels


    And stationary radios:
    (Images resized. Click to view the full image).

    Originally written for SSTRP, this reworks the radio system found in most schemas. It opens up much more possibilities such as listening on multiple channels, channels with sub-channels and global channels that transmit over multiple channels. Each channel has it's own display name and can have it's own color and sound.

    As of version 2, this plugin allows you to define as many channels as you want. Channels can be assigned to a player either based on his faction, his class or given by admins (permanently or until they disconnect/switch character/server restarts). Changing between transmit channel can be done either through a command or using the F1 menu.

    There is a HUD display in the top left corner that lists all the current channels (including sub-channel if applicable) and the one currently being transmitted on.

    Right now this plugin is still being build further upon and this is pretty much only the core workings. With how it's programmed it is easily expanded without even modifying any of the code. Some of the future updates will likely include the possibility for radio items (akin to the current handheld radios, except they each can have their own channel set) and the ability to create channels on the fly instead of being limited to predefined channels.

    The radio items plugin adds in handheld radios as you are used to (except they take any frequency from 100.0 to 999.9) and working stationary two-way radios. Stationary radios are limited to the 100.0 - 999.9 frequency range and any channel that is set to allow stationary radios on it. On top of that you can make radio items that only give access to one specific channel (be it a pre-existing one or not, the plugin will make any channels that don't exist as it needs them).

    Handheld radio channels can be changed from the inventory. After that you can switch to speak on that channel with /setchannel, /sc or the F1 menu. Press e on a stationary radio to change its channel, after that just speak, yell or whisper in it's vicinity while looking at it and it'll transmit on whatever channel it is set to. Stand near it in order to hear from it.

    The radio voices plugin will make human/combine/dispatch voices play over radio as well like it does over the default radio in HL2RP. Also adds in the '<::' in front of messages for combine players. It doesn't override any schema functions so it's safe to use in combination with other things.

    Update 4/08/2014: rewrote a lot of the back-end of this, including making a proper library for a lot of stuff. In terms of use not much changed, but it's coded a lot better now which I like. Also some small tids and bits are possible now without too much effort. And it's now even easier to make your own plugins that add onto this one.
    Update 6/08/2014: a few little fixes here and there. Moved the channels into it's own download to make updating easier.
    Update 23/08/2014: added the radio items download. Some minor changes in the radio plugin. These are NEEDED for the radio items plugin to work. /Sc has been added as a shortcut for /setchannel.

    Small PluginsChatbox Text Wrapping
    A few screenshots. These were taken on a 1920x1080 screen, chatbox is set to half of that width with a maximum of 1024 characters.
    (Images resized. Click to view the full image).
    Updates the Clockwork.chatBox:WrappedText function to more nicely wrap text. It will do its best to cut text on space characters within a certain range and will do its calculations on the proper entire width of the current line and not just the width of the current piece of text.

    In the end this makes all lines nicely cut off at about the same point (some variation remains due to cutting on spaces instead of on the exact correct spot).

    Basic needs plugin with hunger/thirst. Includes a consumable item base to make it easy to add in new items. Supports foodRads by default.

    Player Model Update
    Bodygroups, skins and scale all in one. Comes with the possibility for skins/bodygroups to be faction/class related and easy way to add in commands to change specific bodygroups.

    Update 26/09/2014: made a few small fixes and changed how bodygroups are saved slightly to ensure they don't fuck up (note: it will wipe previously set bodygroups due to the changes in saving).

    Temp Spawns v1.1
    Temporary spawnpoints, useful for events. Easily added and removed, won't save upon restart. Have to explicitly say which factions get affected by temporary spawns (by adding a faction.useTempSpawns = true to the faction file).

    Update 6/08/2014: added in compatibility with NightAngel's updated Enhanced ESP (if she already has posted that version).

    A rework of how backpacks work. Allows items to be equipped into different slots, taking up a certain amount of space in that slot. This allows for various backpack configurations, more backpack diversity, while keeping it easy to limit how many people can equip even when they start using combinations.

    NOTE: you need the equipable item plugin (which is included in the download). I tried to do this with CW's accessories but those seemed to be causing memory leaks.

    Giveweapons v1.1
    Gives weapons to people without them needing items for it. Easily used to ensure factions/classes are equipped with the right loadout (including ammo). Also allows weapons to be turned off. Really just makes life easier.

    Update 7/08/2014: fixed a typo in the code which broke class ammo. Also added /giveammo to give everyone ammo and added an optional argument to /toggleweapons to give everyone ammo.

    Other Plugins
    Equipable item
    An item base to go with some other plugins. Workaround for CW's accessories doing difficult. Can use this to make your own equipable items with relative ease.
    • Winner Winner x 4
  2. Lev

    Lev certified honorable guy Crusader

    Re: Gr4Ss' plugins

    Nice job. Will test this once I get home.
  3. Polis

    Polis Guest

    Re: Gr4Ss' plugins

    *admirable whistle*

    Gentlemen, we've hit the jackpot.
  4. NightAngel

    NightAngel Fuck off Lev Active Member

    Re: Gr4Ss' plugins

    Holy shit, these are awesome! Thanks for releasing them! :)
  5. Martz

    Martz Guest

    Re: Gr4Ss' plugins

    Aren't you Gr4Ss from LemonPunch?

    Nice plugins anyway.

    Also, dropbox link to the armor plugin seems to be borked.
  6. CakeZ

    CakeZ rp is for nerds right

    Re: Gr4Ss' plugins

    hi Gr4Ss

    how are you
  7. RJ

    RJ no pay Legend Clockwork Customer

    Re: Gr4Ss' plugins

    Just a tip, have comments on the line instead of before it, it makes it easier to read.
  8. Re: Gr4Ss' plugins

    Hot damn, this is a gold mine of good plugins. Great work.
  9. ilhamionur

    ilhamionur Clockwork Customer Active Member

    Re: Gr4Ss' plugins

    That was what I needed, Thank you man!
  10. Martz

    Martz Guest

    Re: Gr4Ss' plugins

    As I said, the armor plugin link seems to be borked.
  11. Discordia

    Discordia &gt;Implying that I care Active Member

    Re: Gr4Ss' plugins

    All I can say is.. wow, that's a lot of plugins, I'll have to test some of these myself. Very well done if I do say so myself Grass, hope that everyone gets a used out of these plugins.
  12. Re: Gr4Ss' plugins

    I prefer to have them on the line before, so yeah. Bit of a habit when commenting larger parts of code that I carried over to comments for single lines.

    I was from LP. Left three'ish months ago which is why I'm releasing them (I agreed to wait a few months with it).

    Also fixed the armor plugin, forgot to throw it into dropbox apparently.
  13. Martz

    Martz Guest

    Re: Gr4Ss' plugins

  14. Daemon01

    Daemon01 I&#039;ve covered in wars y&#039;know. Active Member

    Re: Gr4Ss' plugins

  15. The Owl

    The Owl Guest

    Re: Gr4Ss' plugins

    he's got more upvotes than he has posts.

    that's what i call a winner.
  16. Arbiter329

    Arbiter329 Owner of Arc-Factory Roleplay Active Member

    Re: Gr4Ss' plugins

    Nice stuff!
  17. Re: Gr4Ss' plugins

    And just added the FORP armor one that includes the radiationResistance value and isPA stuff that the HL2RP one doesn't have. Sounds go into the sound folder obviously.

    Also needs plugin which I forgot earlier. Runs pretty well and has its own consumable base to make it easier to add new items in. Includes foodRads in case you also have the radiation plugin.
  18. Re: Gr4Ss' plugins

    Good on you, sir Gr4ss.
  19. seigfred

    seigfred Dank af Active Member

    Re: Gr4Ss' plugins

    Damn, RJ just got served
  20. RJ

    RJ no pay Legend Clockwork Customer

    Re: Gr4Ss' plugins

    How so?

Previous Readers (Total: 0)