• Smartness
    52 replies, posted
[quote=Facepunch][b]Smartness[/b] These forums contain a smartness system. It detects common spelling/grammar mistakes and you lose points from your smartness level. If your points drop below a certain level you're automatically banned for a few days. I know people will say "Hey we don't need this, you nazi". But we really do. People are idiots. If you make a mistake and correct it you will regain your points. If your mistakes aren't highlighted red then the problem was probably because you typed quite a lot and didn't use a single capital letter. Grammar Lesson [list] [*] Your - your house, your mom, your shoes. [*] You're - Short for "you are". You're stupid. [*] there - over there, it's there. [*] their - their shoes, their hat, their mom [*] they're - they are; they're stupid idiots [*] were - they were nice, his shoes were painted on [*] we're - we are; we're going to the zoo [*] where - where was it, where can we go [/list] So their you go, you're own little grammer lesson![/quote] [release][b]Smartness[/b] [i]Currently in livetime development at:[/i] [url=steam://connect/68.227.240.182:27015/]flaming-gummy-bear's Server![/url] A recreation of Facepunch's old Smartness module. [/release] [media]http://img.photobucket.com/albums/v308/flaming-gummy-bear/gm_flatgrass0001.jpg[/media] [b]Concepts:[/b] :downs: [list] [*]Decreases with misspelling [*]New player methods [*]Increases with each post [/list] [b]Developer features:[/b] :science: [i]Added HUD Elements:[/i] "CHudSmartness" - Displays your smartness in the style of a HL2 indicator, shows up next to your health or armor. Disable using: [lua]local function HUDShouldDraw( name ) // So we don't draw smartness on the HUD if ( name == "CHudSmartness" ) then return false end end[/lua] [i]New methods:[/i] Player:AddSmartness( [i]int[/i] smartness ) - Adds to a player's smartness Player:GetSmartness() - Retrieves the player's current smartness Player:RemoveSmartness( [i]int[/i] smartness ) - Removes from a player's smartness Player:SetSmartness( [i]int[/i] smartness ) - Sets a player's smartness [i]Rating this dumb is ironic. Do it.[/i] [highlight](User was autobanned for this post - ("Losing over 5000 smartness in a single post" ))[/highlight]
How does it go up? 1+1=2?
Yeah, I'm thinking it'll have a manifest of words that will determine when it goes down.
Memes should lower smartness. A 0 smartness results in constant death even when you spawn.
I think on Facepunch once you hit zero, you were banned for a while, I intend on doing the same for servers. I'll be using archive.org to reference the smartness junk from the past.
[QUOTE=Rubs10;17818619]Memes should lower smartness. A 0 smartness results in constant death even when you spawn.[/QUOTE] Make them have to chat their way back to life!
Haha, maybe. But a 24h ban seems more conformist to the old module. [editline]04:52PM[/editline] Added a link to the server, currently up testing it out.
Wow, awesome.
This system looks like it could be used as an automatic moderation system for much more then just spelling ( losing smartness for kills in serious build\rp ) . I like it! :smile:
Great idea.
[QUOTE=Crazy Quebec;17821065]This system looks like it could be used as an automatic moderation system for much more then just spelling ( losing smartness for kills in serious build\rp ) . I like it! :smile:[/QUOTE] Completely possible. [lua] local function DumbPlayerDeath( Victim, Inflictor, Killer ) if ( !string.find( GAMEMODE.Name:lower(), "rp" ) ) then return end if ( !Killer:IsValid() ) then return end if ( !Killer:IsPlayer() ) then return end if ( Killer:IsAdmin() ) then return end Killer:RemoveSmartness( 100 ) end hook.Add( "PlayerDeath", "DumbPlayerDeath", DumbPlayerDeath ) [/lua] I've hatched little ideas out of the methods, such as a Dumbnade, players caught within the blast of the grenade lose dumbness based on distance from the epicentre. [editline]08:09PM[/editline] (I wanted to use "epicentre" instead of "epicenter", because it looks cooler.)
In place of "bullet time" you could have "dumb time" where you gain smartness for doing dumb things. :v:
While it sounds like an interesting idea, a Dumbnade would defeat the purpose of the addon. It's supposed to determine whether or not you're smart. An idiotic minge could take a Dumbnade and toss it into a group of intelligent builders, diligently working on their next contraption.
[QUOTE=Entoros;17821814]While it sounds like an interesting idea, a Dumbnade would defeat the purpose of the addon. It's supposed to determine whether or not you're smart. An idiotic minge could take a Dumbnade and toss it into a group of intelligent builders, diligently working on their next contraption.[/QUOTE] It's really up to the idiotic developers. [i]Gimme boxes. I wanna put my penis in them.[/i] [img]http://upload.wikimedia.org/wikipedia/en/0/0b/Dick_in_a_Box.jpg[/img] [editline]08:17PM[/editline] Can anyone help me with a simple MySQL query? I've attempted to use the same type of system used to record ratings, as this is a similar concept, however it is not working at the moment. I really don't want to have to result to something stupid like using .txt files to record player data. Here's what I have so far: [url]http://code.google.com/p/gmodplus/source/browse/trunk/lua/autorun/gmp_smartness_functions.lua[/url]
I think you're doing a lot more than you need to. All you need is something like this: [lua]sql.Query("CREATE TABLE IF NOT EXISTS smartness('steam' TEXT NOT NULL, 'smarts' INTEGER NOT NULL, PRIMARY KEY('steam'));") function SaveData(pl) sql.Query("UPDATE smartness SET smarts = "..pl:GetNWInt("Smartness").." WHERE steam = "..sql.SQLStr(pl:SteamID())..";") end function LoadData(pl) ply:SetNWInt("Smartness",tonumber(sql.QueryValue("SELECT smarts FROM smartness WHERE steam = "..sql.SQLStr(pl:SteamID())..";"))) end[/lua] Also, it would be more optimized if you saved the player's data to the SQLite database on disconnect rather than every time they lose/gain smarts.
In all honesty, I know this sounds ridiculous, but I have OCD that manifests within my coding, and have to have it a certain way just to comfort myself... Is this conceptually valid code? Internal: UpdatePlayerSmartness [lua]/*--------------------------------------------------------- Name: Update the player's networkvars based on the DB ---------------------------------------------------------*/ local function UpdatePlayerSmartness( ply ) local result = sql.QueryValue( "SELECT int FROM smartness WHERE target = "..ply:UniqueID().." " ) if ( !result ) then return end ply:SetNetworkedInt( "Smartness", tonumber( result ) ) end[/lua] Player.SetSmartness [lua]function meta:SetSmartness( smartness ) if ( !sv_smartness:GetBool() ) then return end sql.Query( "UPDATE smartness SET int = "..tonumber( smartness ).." WHERE target = "..self:UniqueID().." " ) // We changed something so update the networked vars UpdatePlayerSmartness( self ) end[/lua]
Can I ask what font did you use to display the smartness amount? Or if it's not a font then what is it? I looked for it, checked the source, but no font I could find looked like it.. :frown:
You mean my replica of the HL2 HUD? I will gladly hand the code over my friend. Here's my mimic of the sprint styled form, in which I take up the unused sprint HUD space for my ownership module. [url]http://code.google.com/p/gmodplus/source/browse/trunk/lua/autorun/client/gmpcl_ownership_functions.lua[/url] Here's another mimic using exactly what you asked for, the smartness display: [url]http://code.google.com/p/gmodplus/source/browse/trunk/lua/autorun/client/gmpcl_smartness_functions.lua[/url] These layouts are dependent on calculations from garrysmod/scripts/HudLayout.res, but do not use the actual file themselves. Rather, I took the measurement from there to replicate a clean display on the HUD. Considering that ScreenScale isn't mathematically proportional to the actual scale of the end-user's screen, I wrote a correction and added it to the surface library, as to not overwrite a global function that many people already use. Values within this file will help throw your positions in pixel perfect space. [url]http://code.google.com/p/gmodplus/source/browse/trunk/lua/autorun/client/gmpcl_hud_functions.lua[/url]
Thanks a lot! We need more persons like you around here!
You're welcome. :D I hope I can help out the community more in the future.
Just taught myself a little MySQL. [IMG]http://img.photobucket.com/albums/v308/flaming-gummy-bear/gm_flatgrass0015-1.jpg[/IMG] :saddowns:
This is great, just implimented a SQL database for recording player smartness. Flawless so far.
[QUOTE=CptFuzzies;17824267]Just taught myself a little MySQL. [media]http://img.photobucket.com/albums/v308/flaming-gummy-bear/gm_flatgrass0015-1.jpg[/media] :saddowns:[/QUOTE] It's under MINUS NINE THOUSAND!
when would you ever need this?
When would you ever need 99.9% of ANYTHING made for Garry's Mod? When would you ever NEED to play the game? Go outside and exercise. [highlight]CptFuzzies lost 10 smartness for this post.[/highlight] In a related manner, does anyone remember what was attached to your post if you lost smartness? Or can bring back an archived thread of what was said for a good reference?
I think this is what you're looking for. Everyone is talking about words which caused smartness loss. [url]http://www.facepunch.com/showthread.php?t=691368[/url]
Okay.. but this.... Do I need to finish this sentence..
[img]http://www.facepunch.com/fp/rating/heart.png[/img] Polite/Nice/Friendly x [b]5000[/b]
Hey CptFuzzies, can i talk to you over steam?
valvprivate3
Sorry, you need to Log In to post a reply to this thread.