AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Plugins (https://forums.alliedmods.net/forumdisplay.php?f=108)
-   -   [ANY] Bacon (https://forums.alliedmods.net/showthread.php?t=217444)

mukunda 06-02-2013 18:12

[ANY] Bacon
 
7 Attachment(s)

A must have installation on all servers to allow bacon transactions and statistics.

http://www.mukunda.com/baconstrip.png

With this plugin, players can finally share what they love most with their closest friends. Players can type !bacon <friend's name> ingame to pass some of their bacon to that player. If they change their mind, they can invoke !nobacon <bad friend's name> to take away their bacon.

Features
:bee: Threaded SQL powered bacon management.
:bee: Transaction throttling to prevent bacon from clogging up your system.
:bee: Localization support.
:bee: Ability to give the server bacon.
:bee: Cleanup feature in case the bacon gets out of control. The server will eat all of the bacon.
:bee: Automatic updating to keep your bacon smelling great! (requires updater)
:bee: Fresh Delicious Bacon
Command List

:bacon!:sm_bacon <player>
Give bacon to player. If no argument is given, it will show how much bacon you have. Specify "server" to give bacon to the server. The server can also give bacon to players.
:bacon!:sm_nobacon <player>
Take bacon from player. Specify "server" to take your bacon away from the server.
Alias: sm_takebacon
:bacon!:sm_mostbacon
Prints who has the most bacon.
:bacon!:sm_drop_bacon [server command]
Cleanup function as mentioned in the features. Destroys all bacon. :grrr:
Warning: will halt server for up to two (2) seconds.
Any player can only give up to one (1) bacon to another player. And (of course) any of these commands can be used in chat with the chat trigger prefix (i.e. !bacon, !nobacon, !mostbacon)

CVars

A cvar configuration file will be generated automatically at cfg/sourcemod/plugin.bacon.cfg for you when you run bacon for the first time.

Recommended to delete this file after updates to get the most out of your bacon!

Public CVar: serves_bacon
Servers can now be easily checked if bacon service is available!
sm_bacon_notify <0,1,2>
Controls who sees bacon transactions take place.

0 = Do not notify players when bacon is given or taken.
1 = Target of transaction sees a message.
2 = Everyone sees a message.
3 = Everyone sees a gift message. (DEFAULT) (NEW)

Visual Examples:
(MODE1) "<player> gave you some bacon" is seen by the target.
(MODE2) "<player> gave some bacon to <player>" is seen by everyone.
(MODE3) "<player> has received a gift: Bacon" is seen by everyone

Colors for mode3 are supported for CSS (I think),TF2, and CSGO
sm_bacon_cooldown <decimal number>
Controls how long clients must wait between execution of bacon transactions.
Default = 7.77
Units are in seconds.
Changing this resets all cooldowns.
sm_bacon_topcount <1-10>
Controls how many Bacon Masters are printed to people who use !mostbacon
Default = 1
Installation :fox:

Copy files from the archive provided below into your sourcemod folder. A mapchange or a server restart is required for the system to function.

Optional: Install Updater to keep your bacon bug free (ew!) and tasty!

1.1.0 NOTICE: The database operations are now using GetSteamAccountID which is a sourcemod 1.5 feature. If you aren't already using the latest and greatest SourceMod, you will need to upgrade to use this plugin (until the near future when 1.5 is a reality of course).

Localization

Special thanks to the people who have contributed to making Bacon available in every language!
  • German translations by mikazoid

Changes

Keep track of whats happening to your bacon:
Code:

// 1.1.2
//  minor bugfix
//  german translations provided by mikazoid
//
// 1.1.1
//  attempted to fix sql escape string thingy
//
// 1.1.0 9:33 AM 6/12/2013
//  removed [SM] tags from code, if these are desired, place them in the translations
//  added some delicious colors
//  added gift emulation layer
//  added public cvar
//  added sm_bacon_topcount
//  lowered default bacon cooldown
//  improved database access (all existing bacon will be erased, sorry!)
//
// 1.0.3b 9:57 PM 6/5/2013
//  localization improvements (grammar flexibility)
//  notify options added
//  cooldown options added
//  freshened up bacon
//  added user manual
//
// 1.0.2b
//  fixed memory leak
//  enhanced plugin description
//  added updater support
//  freshened up bacon


Screenshots

Below are a few pictures of the delectable system in progress. The first one shows me typing in a bacon command--attempting to give myself some of my bacon.

Of course, in the second picture it shows that it is a strict rule that one simply cannot give himself bacon, and it can only be shared with others.

Picture #3 shows me demanding bacon via abuse of SourceMod's admin chat feature. A person agrees to my demand directly after, and then fails to retract his decision by using an invalid bacon command. I then count my bacon by entering the bacon command without any arguments.

The purple text is not included and is actually a bug in one of my other plugins. :3

The last picture is an accurate visual the recipients when a bacon transaction takes place. (Contributed by r3dw3r3w0lf)

New in 1.1.0: Bacon gift notifications!

Sreaper 06-02-2013 21:17

Re: [ANY] Bacon
 
Very nice. Would you mind adding a screenshot to the OP?

mukunda 06-02-2013 22:00

Re: [ANY] Bacon
 
Quote:

Originally Posted by Sreaper (Post 1963419)
Very nice. Would you mind adding a screenshot to the OP?

Ah, yes. Excellent idea. Pictures say more than a thousand words after all!

thetwistedpanda 06-02-2013 22:08

Re: [ANY] Bacon
 
You sir, deserve more :bacon!:

cool_myll 06-03-2013 06:29

Re: [ANY] Bacon
 
All players have one bacon or infinite? Can we set donators to start with more bacon to give?

EDIT: The server can also give bacon to players. How?

mukunda 06-03-2013 12:39

Re: [ANY] Bacon
 
Updated with a minor memory leak fix, plus updater support to keep your bacon at its freshest!

Quote:

Originally Posted by cool_myll (Post 1963581)
All players have one bacon or infinite? Can we set donators to start with more bacon to give?

All players have infinite bacon, but they can only give one bacon to another player. The database operations are programmed in mind that every player has equal weighting with their bacon and it would be difficult to allow donators to have heavier bacon.

Quote:

Originally Posted by cool_myll (Post 1963581)
The server can also give bacon to players. How?

sm_bacon can be executed via RCON or through the server console directly to deliver bacon to players.

Powerlord 06-03-2013 16:08

Re: [ANY] Bacon
 
I love bacon and all, but... wtf? :P

mukunda 06-03-2013 16:22

Re: [ANY] Bacon
 
Quote:

Originally Posted by Powerlord (Post 1963920)
I love bacon and all, but... wtf? :P

I know it is truly hard to believe that your favorite dish is now easily sharable to your friends--without even leaving your seat! However, please dismiss all doubts and simply rejoice that this dream is now a reality.

lyric 06-03-2013 17:36

Re: [ANY] Bacon
 
Quote:

Originally Posted by Powerlord (Post 1963920)
I love bacon and all, but... wtf? :P

its one of those funny plugins

Marverlous 06-03-2013 21:31

Re: [ANY] Bacon
 
you should make it so that the player (or the whole server) will be notify in the chat when some one give them bacon, thank you

cool_myll 06-04-2013 09:12

Re: [ANY] Bacon
 
Can you make it so !mostbacon shows top 5 or 10 bacon masters?

Drixevel 06-04-2013 11:02

Re: [ANY] Bacon
 
http://madewithbacon.com/images/uplo.../kid-bacon.jpg

Nolongerinthegame 06-04-2013 13:52

Re: [ANY] Bacon
 
Can we have a command which can show which servers are meat eaters and which are not ;)

friagram 06-05-2013 03:11

Re: [ANY] Bacon
 
Add tf2 style item messages for tf2 on recieving bacon.
Add tf2 style item messages when gifting bacon.

pvkii 06-05-2013 09:05

Re: [ANY] Bacon
 
!mostbacon doesn't seem to work: [SM] has the most bacon. (1) Also, make the possible delay between messages configurable, it's annoying, too long for me. But I love this plugin already please fix those bugs :DD

mukunda 06-05-2013 23:59

Re: [ANY] Bacon
 
Your wishes are my commands.

Quote:

Originally Posted by Marverlous (Post 1964081)
you should make it so that the player (or the whole server) will be notify in the chat when some one give them bacon, thank you

I have added the cvar sm_bacon_notify which can activate either of your desires!!

Quote:

Originally Posted by cool_myll (Post 1964301)
Can you make it so !mostbacon shows top 5 or 10 bacon masters?

Hmm, yes I like this idea. And that term, Bacon Master. This feature didn't make it in 1.0.3b but it will for sure be in a future release.

Quote:

Originally Posted by r3dw3r3w0lf (Post 1964368)

Thank you for your contribution. This is a very accurate visual of how clients receive their bacon. I have added this to the screenshots.

Quote:

Originally Posted by nelioneil (Post 1964512)
Can we have a command which can show which servers are meat eaters and which are not ;)

Can you elaborate on how this would be determined? Technically the server only eats the bacon if the server administrator has to run the panic command.

Quote:

Originally Posted by friagram (Post 1964913)
Add tf2 style item messages for tf2 on recieving bacon.
Add tf2 style item messages when gifting bacon.

I don't have any experience with the TF2 API. This sounds like a cool feature, but it also sounds like a potentially exploitable feature depending on how flashy item transactions are.

Quote:

Originally Posted by pvkii (Post 1965055)
!mostbacon doesn't seem to work: [SM] has the most bacon.

This is a very strange bug! I have doublechecked the code that caches the bacon recipient names, but I couldn't find the cause. That message comes directly after the database correctly yields a name for the bacon master. Can you check your SourceMod error logs and see if there are any errors containing Bacon?

Quote:

Originally Posted by pvkii (Post 1965055)
Also, make the possible delay between messages configurable, it's annoying, too long for me. But I love this plugin already please fix those bugs :DD

Excellent suggestion. I have added the sm_bacon_cooldown cvar to configure this delay.

Nolongerinthegame 06-06-2013 03:14

Re: [ANY] Bacon
 
Quote:

Originally Posted by mukunda (Post 1965412)


Can you elaborate on how this would be determined? Technically the server only eats the bacon if the server administrator has to run the panic command.



What I meant was a public value in the plugin. By typing this into gametracker etc, you can see the servers running this mod.

pvkii 06-06-2013 04:38

Re: [ANY] Bacon
 
Quote:

Originally Posted by mukunda (Post 1965412)
This is a very strange bug! I have doublechecked the code that caches the bacon recipient names, but I couldn't find the cause. That message comes directly after the database correctly yields a name for the bacon master. Can you check your SourceMod error logs and see if there are any errors containing Bacon?

It's strange but I do not have any errors from the session where I tested your plugin. Is it possible that the bug is mod-specific? I would like to use it in Pirates, Vikings and Knight 2, it's a mod based on source2007 and orangebox. I tried to look at the code myself by searching for that "has the most bacon." string, but I couldn't find it, don't know why.
Quote:

Originally Posted by mukunda (Post 1965412)
Excellent suggestion. I have added the sm_bacon_cooldown cvar to configure this delay.

Awesome!:bacon!:

EDIT:
I think I found the problem of !mostbacon:

[IMG]http://**************/a/img29/3950/clipboard01pze.jpg[/IMG]

I looked at the database and it seems that he does not write the names of the clients in there. For whatever reason.

cool_myll 06-06-2013 07:12

Re: [ANY] Bacon
 
Quote:

Originally Posted by mukunda (Post 1965412)
Your wishes are my commands.

I have added the cvar sm_bacon_notify which can activate either of your desires!!

Thanks for the updates. I haven't check the messages yet but it will be nice if the messages are the same style as tf2.
Like this:

http://content.screencast.com/users/...01-08_1001.png

http://forums.alliedmods.net/showthread.php?p=1553366

mukunda 06-12-2013 11:18

Re: [ANY] Bacon
 
I'm pleased to annonuce that Bacon v1.1.0 has been released.

Quote:

Originally Posted by cool_myll (Post 1965538)
Thanks for the updates. I haven't check the messages yet but it will be nice if the messages are the same style as tf2.
Like this:

http://content.screencast.com/users/...01-08_1001.png

http://forums.alliedmods.net/showthread.php?p=1553366

"sm_bacon_notify 3" has been added to support such delicious user messages. Featuring color codes sampled from actual bacon!!

Quote:

Originally Posted by cool_myll (Post 1964301)
Can you make it so !mostbacon shows top 5 or 10 bacon masters?

This is now supported with sm_bacon_topcount which controls how many Bacon Masters are shown!

Quote:

Originally Posted by nelioneil (Post 1965484)
What I meant was a public value in the plugin. By typing this into gametracker etc, you can see the servers running this mod.

Public CVar serves_bacon has been added!

Quote:

Originally Posted by pvkii (Post 1965495)
It's strange but I do not have any errors from the session where I tested your plugin. Is it possible that the bug is mod-specific? I would like to use it in Pirates, Vikings and Knight 2, it's a mod based on source2007 and orangebox. I tried to look at the code myself by searching for that "has the most bacon." string, but I couldn't find it, don't know why.

EDIT:
I think I found the problem of !mostbacon:

[IMG]http://**************/a/img29/3950/clipboard01pze.jpg[/IMG]

I looked at the database and it seems that he does not write the names of the clients in there. For whatever reason.

I added a small change to the code that stores the name, hopefully it won't eat the text now.:bee:

Additional Notes

The database accessing code has been reworked slightly, and all bacon will be erased during this update. SourceMod 1.5 or later is required for Bacon to function now! :bee:

cool_myll 06-13-2013 03:10

Re: [ANY] Bacon
 
Quote:

Originally Posted by mukunda (Post 1969184)
I'm pleased to annonuce that Bacon v1.1.0 has been released.



"sm_bacon_notify 3" has been added to support such delicious user messages. Featuring color codes sampled from actual bacon!!



This is now supported with sm_bacon_topcount which controls how many Bacon Masters are shown!



Public CVar serves_bacon has been added!



I added a small change to the code that stores the name, hopefully it won't eat the text now.:bee:

Additional Notes

The database accessing code has been reworked slightly, and all bacon will be erased during this update. SourceMod 1.5 or later is required for Bacon to function now! :bee:

Thanks for the update Bacon Master. Too bad we lose our bacon :(
I think the default notify is still 1 (bacon.cfg doesnt shows the new value). I changed it to 3 and will test it soon.

mukunda 06-13-2013 09:06

Re: [ANY] Bacon
 
Quote:

Originally Posted by cool_myll (Post 1969492)
I think the default notify is still 1 (bacon.cfg doesnt shows the new value). I changed it to 3 and will test it soon.

You will need to delete your config for the bacon software to generate a new one with the updated default values and cvars!

cool_myll 06-13-2013 12:20

Re: [ANY] Bacon
 
I have changed it to 3 and this is the message i am getting:

http://i.imgur.com/h9LxylV.jpg

mukunda 06-13-2013 12:36

Re: [ANY] Bacon
 
Quote:

Originally Posted by cool_myll (Post 1969682)
I have changed it to 3 and this is the message i am getting:

http://i.imgur.com/h9LxylV.jpg

Are you sure it's set to 3? That is a mode 2 message. Did your server have a chance to restart since the bacon update? if not, 3 may be inaccessible due to the old convar limit being 2.

cool_myll 06-13-2013 15:15

Re: [ANY] Bacon
 
Server did not restart only the map changed. Also when i put the new plugin and reloaded (while deleting the cfg) it the old cfg recreated with the 2 value. Changed it to 3 but still the same. I will report after a restart i guess.

micazoid 06-16-2013 16:31

Re: [ANY] Bacon
 
1 Attachment(s)
I just love it! It is :bacon!: for m players. What is better then :bacon!: ?

To thank you I translated into german. Translating it gave me a fun time =)

mukunda 06-16-2013 21:37

Re: [ANY] Bacon
 
Quote:

Originally Posted by micazoid (Post 1971600)
I just love it! It is :bacon!: for m players. What is better then :bacon!: ?

I'm glad you understand the significance of this module!


Quote:

Originally Posted by micazoid (Post 1971600)
To thank you I translated into german. Translating it gave me a fun time =)

Thank you for your contribution! I have pushed out a minor patch (1.1.2) to include them. I'm sure German's everywhere will be very pleased to received these "Specks" !

Caliban Avenged 06-17-2013 13:02

Re: [ANY] Bacon
 
I'm definitely interested in trying this feature out as part of our community, but I felt compelled to pass along some feedback from one of my senior admins when I shared the details on this as a proposed server change. There's definitely an interest in being able to
  • eat the bacon you receive, and to
  • steal someone else's bacon.

...which may (hopefully) inform your future development of this plug-in.

I should qualify the feedback by pointing out that I trust and support my admin team, and they've been nothing short of reliable, consistent and ethical in supporting our community; however, :bacon!:. Who could blame them?

Dr. Greg House 06-17-2013 22:50

Re: [ANY] Bacon
 
You should store the nickname and steamid in the database, and update the nickname automatically.

prom3th3an 06-18-2013 03:00

Re: [ANY] Bacon
 
Anything that might stop a user using MySQL? I'm gonna give it a test shortly.

pvkii 06-19-2013 04:43

Re: [ANY] Bacon
 
Can the phrases.txt also be in UTF-8? I would then do a polish translation.

Marverlous 06-20-2013 21:19

Re: [ANY] Bacon
 
instead of having to type !bacon <name> and !nobacon <name>. can a sm menu appear when people type !bacon? that would be more convinient, ty

Chdata 08-18-2014 02:08

Re: [ANY] Bacon
 
Heya, suggestion for ya.

Implement immunity levels, so lower immunity cannot takeback the bacons.

braak0327 08-18-2014 03:02

Re: [ANY] Bacon
 
you should make a bacon models for humanity

Dare.Devil 08-18-2014 05:18

Re: [ANY] Bacon
 
Bacon? really?

bacon is a good thing?!

what about CAKE! or ICE CREAM! ?

Chdata 08-20-2014 06:51

Re: [ANY] Bacon
 
Also suggestion: bacon external database support so we can carry bacon across all of a community's servers

Or is this feature already available?

+ Give one bacon a day.

icesteed 08-05-2015 21:47

Re: [ANY] Bacon
 
Hey does anyone know here how to change Bacon to something else? Like for example, I want to change !bacon to !toast for example. Does anyone know how to do this? Thanks!


All times are GMT -4. The time now is 08:11.

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