• GMod - What are you working on? October 2014 (#38)
    706 replies, posted
PM me if anything else needs to be added, as always. [img]http://i.imgur.com/ykNfADI.png[/img] [B]Highlights from the [URL="http://facepunch.com/showthread.php?t=1421714"]previous thread[/URL][/B] [QUOTE=LegoGuy;45858194]Finally decided to work on my phone addon again after [url=http://cloud-4.steampowered.com/ugc/43103518034999167/7FD4F4104E6587A34E830F551A9AE1FA06C66AD2/]several[/url] [url=http://cloud-2.steampowered.com/ugc/43103518035082078/6DD96B6A15C8385A0EFC30506EF87E040E728674/]mishaps[/url] [video=youtube;Iv8ciYNcW-4]http://www.youtube.com/watch?v=Iv8ciYNcW-4[/video] Better scrolling system being made now. As you can see, the icons can be in any random placement with any shape and still work.[/QUOTE] [QUOTE=thelastpenguin;45858723]Admin Mod I've been working on for a while now called oculus. Everything is stored in MySQL. It has a concept of 'global' and 'local' spaces so permissions and groups can be assigned on a global or local (to the server or a small group of servers) basis. This makes it very flexible since it's possible to have generic template groups with specific configuration per server. [T]http://i.lastpenguin.com/D5D8B[/T] [T]http://i.lastpenguin.com/UrExo-hl2[/T] and of course... sourcebans [T]http://i.lastpenguin.com/h2tHX[/T] NOTE: ui kinda sucks. I know. only admins are going to be using it so it's sorta w/e at the moment.[/QUOTE] [QUOTE=!cake;45876590]I made a function to diff two strings --snipped code, see post-- [img]https://dl.dropboxusercontent.com/u/7290193/Screenshots/Garrysmod/UND/ulx1.png[/img] And today I decided to make an addon that integrated my unicode name matching _system; with the chat commands of a bunch of admin mods. It supports ULX, Evolve, Exsto and Moderator. I initially downloaded 6 different admin mods, but I found that two of them didn't work and/or didn't have chat commands. I was going to pay the 15 USD fee to put the addon on coderhire, but now that it's going to be shut down I'm not sure if anyone would buy it from there :suicide:[/QUOTE] [QUOTE=BFG9000;45894220]Took a good deal of hacking around but it works well enough: [video=youtube;pK2VrLRxr8Y]http://www.youtube.com/watch?v=pK2VrLRxr8Y[/video] So far, it -Adds a green circle for a crosshair if you're in a vehicle with weapons enabled, in order to compensate for some weapon bases not having crosshairs that draw at your aimvector -Detours EyeAngles to return GetAimVector():Angle() because for some reason the two are different in vehicles -With a little hack, it is compatible with SetPunchAngles. I'll detour viewpunch so that becomes compatible as well -Detours SetEyeAngles to do nothing while in a seat since it acts really weird in vehicles and even after a month I haven't found the proper way to compensate it if your seat is pointing in any other direction besides (0,90,0)[/QUOTE] [QUOTE=Hoffa1337;45896877][media]http://www.youtube.com/watch?v=oLxUpDLeg2s[/media][/QUOTE] [QUOTE=Spencer Sharkey;45921679][t]http://i.imgur.com/IQUZujA.jpg[/t] [t]http://i.imgur.com/HuQFyYZ.jpg[/t] [t]http://i.imgur.com/A6P4FmI.jpg[/t] Alright, too tired to continue.[/QUOTE] [QUOTE=_Kilburn;45941046]You should alternate the orientation of your triangles, like this: [img]http://vinh.peniscorp.com/2014-09-10_16-21-45.png[/img] Results in a much better looking mesh when you start displacing it. [t]http://cloud-4.steampowered.com/ugc/702854404121467853/484C5B752268C994641A8FC92A845BA30D0025AA/[/t][/QUOTE] (this was obligatory) [QUOTE=NiandraLades;45952170]Don't want to get too off-topic here, since we should be showing off work, but on the other hand, relaxed chat is nice too fuk Also 2005 square monitor REPRESENT [img]http://puu.sh/buOWe/1470013b68.jpg[/img][/QUOTE] [QUOTE=FoohyAB;45965482][vid]https://dl.dropboxusercontent.com/u/1179448/Misc%20Video/gmod_yo%20%2850%29.mp4[/vid] then cry when your maps feel the wrath of lua touching them in bad places.[/QUOTE] [QUOTE=FoohyAB;45967510][hd]http://www.youtube.com/watch?v=RwjOzba3FE0[/hd] Been working on this nightclub for a bit, glad to finally show it.[/QUOTE] [QUOTE=rebel1324;46072394]I'm enjoying dev branch [media]http://www.youtube.com/watch?v=BxfUkkYeqL8[/media][/QUOTE] [QUOTE=LinkTwilight;46092651]Working on some more traps for TTT [img]http://i.imgur.com/mIdBR7n.gif[/img] [vid]http://a.pomf.se/cinyht.webm[/vid] [URL="https://www.youtube.com/watch?v=AhBPWOCb5_k"]Youtube Mirror[/URL][/QUOTE] [QUOTE=buu342;46096008]like promised :v: [video=youtube;wmhx4TXaz5Q]http://www.youtube.com/watch?v=wmhx4TXaz5Q&feature=youtu.be[/video] Kids, don't play with knives.[/QUOTE]
Awesome work on the highlights! I liked the NSFW tag better so guests couldn't view.
I fucking love that the monitor post made it to the highlights.
I made a module similar to what gm_preproc did back in the day to basically get all a callback every time lua gets run on you. Integrated it into 'my' clientside lua viewer to let me override clientside files servers send me for funsies. before [t]http://a.pomf.se/kfahoy.jpg[/t] after [t]http://a.pomf.se/eenque.jpg[/t] [t]http://a.pomf.se/tqcnev.png[/t] (tell me if you mind me "leaking" a config file of some paid addon) Changing the color of something is obviously just a small thing you could do
[QUOTE=LennyPenny;46121478]Awesome stuff[/QUOTE] Man, I wish I could do stuff like that..
[QUOTE=zeaga;46121297]I fucking love that the monitor post made it to the highlights.[/QUOTE] I'm really glad my first time in WAYWO highlights is fucking that
oh my thing is on there intriguing.
Dayum, LinkTwilight got all them super epic TTT traps.
[IMG]http://i.imgur.com/M5bfb1y.jpg[/IMG] [sp] It's not RDM if they're shitty addons [/sp] I'm making a client side script, so when I kill addons they get deleted/unsubbed. Everything is done, besides the detection of me killing someone due to no PlayerDeath client side :/ I had to go through the source to find out how to get the preview image, took me a little bit because I couldn't find anything. Once the script is done, I'll get a list of sv_allowcslua 1 servers and go RDM crazy till most are gone.
[QUOTE=AnonTakesOver;46122045][IMG]http://i.imgur.com/M5bfb1y.jpg[/IMG] [sp] It's not RDM if they're shitty addons [/sp] I'm making a client side script, so when I kill addons they get deleted/unsubbed. Everything is done, besides the detection of me killing someone due to no PlayerDeath client side :/ I had to go through the source to find out how to get the preview image, took me a little bit because I couldn't find anything.[/QUOTE] Nice concept for your 15k addons you have to download.
[QUOTE=AnonTakesOver;46122045]Everything is done, besides the detection of me killing someone due to no PlayerDeath client side :/ [/QUOTE] If you don't mind that your death messages are broken, you could replace the receiver of the killfeed: [lua] local function RecvPlayerKilledByPlayer() local victim = net.ReadEntity(); local inflictor = net.ReadString(); local attacker = net.ReadEntity(); --snip-- end net.Receive( "PlayerKilledByPlayer", RecvPlayerKilledByPlayer ) [/lua]
[QUOTE=MDave;46122103]If you don't mind that your death messages are broken, you could replace the receiver of the killfeed: [lua] local function RecvPlayerKilledByPlayer() local victim = net.ReadEntity(); local inflictor = net.ReadString(); local attacker = net.ReadEntity(); --snip-- end net.Receive( "PlayerKilledByPlayer", RecvPlayerKilledByPlayer ) [/lua][/QUOTE] Or you don't break it, since [code] local function RecvPlayerKilledByPlayer() local victim = net.ReadEntity(); local inflictor = net.ReadString(); local attacker = net.ReadEntity(); if ( !IsValid( attacker ) ) then return end if ( !IsValid( victim ) ) then return end GAMEMODE:AddDeathNotice( attacker:Name(), attacker:Team(), inflictor, victim:Name(), victim:Team() ) end net.Receive( "PlayerKilledByPlayer", RecvPlayerKilledByPlayer ) [/code] meaning: overwrite AddDeathNotice example: [code] local bak_deathnotice = GAMEMODE.AddDeathNotice function GAMEMODE:AddDeathNotice( attacker_name, attacker_team, inflictor, victim_name, victim_team ) print( attacker_name ... " killed " .. victim_name .. " !") return bak_deathnotice( attacker_name, attacker_team, inflictor, victim_name, victim_team ) end [/code]
-snip-
Just wanted to share an useful function I made today. [lua] function VDFtoTable( str, toArray ) local func = (toArray == true) and util.KeyValuesToTablePreserveOrder or util.KeyValuesToTable local t = {} for name, data in str:gmatch( [[(%b"")%c*(%b{})]] ) do t[ name:gsub("\"", "") ] = func( name .. "\n" .. data ) end return t end [/lua] Example: [lua] local f = file.Open( "surfaceproperties.txt", "r", "DATA" ) local str = f:Read( f:Size() ) f:Close() PrintTable( VDFtoTable( str ) ) [/lua]
as posted by [URL="http://facepunch.com/showthread.php?t=1421714&p=46119730&viewfull=1#post46119730"]BigBadWilly[/URL] on the old forum, the heart I used for that HUD element did look a little weird, so I'm fishing for a new image to photoshop a heart out of. I will upload a (much shorter) video of it using a better heart texture. I would love to actually render a detailed beating heart model there, but whatever. [editline]1st October 2014[/editline] Now I may release just the heart element itself to the public, where it does not affect any other HUD elements. (I will work in a way for it to display suit energy, too) This heart will not work properly if your health is above the player's max health setting, and the armor representation might look rather odd as well for values above your max suit armor above the player's max armor limit.
[QUOTE=WalkingZombie;46124518]:words:[/QUOTE] Perhaps one could be animated rather the photo shopped in?
[QUOTE=BigBadWilly;46125435]Perhaps one could be animated rather the photo shopped in?[/QUOTE] Yes, I thought of that, many times, but any and every time I try to make an animated texture I fail miserably. On top of that, I don't know how I'll sync the animation with the actual heart beat! I would love to have a realistic beating model to do it with, though. It could have real time environment lighting! Well anyway, despite being just a static growing VMT, you'll most likely appreciate the video I'm about to post, with the new texture, and a new little effect. [video=youtube;b0pniIFSnpE]http://www.youtube.com/watch?v=b0pniIFSnpE[/video] The heart is a little smaller than last time, though.
[QUOTE=WalkingZombie;46126100]:words:[/QUOTE] I think I perfer the one in the video then your previously shown ones.
In my opinion, using a realistic heart for this seems a little creepy..
[QUOTE=Author.;46126707]In my opinion, using a realistic heart for this seems a little creepy..[/QUOTE] Staring at it started changing my breathing patterns.
Playing around with databases, and wrote [URL="http://facepunch.com/showthread.php?t=1428159"]this.[/URL]
[QUOTE=AnonTakesOver;46126721][QUOTE=Author.;46126707]In my opinion, using a realistic heart for this seems a little creepy..[/QUOTE] Staring at it started changing my breathing patterns.[/QUOTE] Well, it was originally intended to be slipped into a horror scenario, in fact, an entire story incorporating horror. I feel like it would be a very effective HUD element in that setting, especially if you really are experiencing such things. I'll try to make a way to change it to a valentines heart instead
I made a simple script that lets me inspect entities ( including effects ) since the model viewer appears to be fucked unless you feel like using it in hammer. [img]http://puu.sh/bVTX4/25a176ffb3.jpg[/img] It's pretty much done, and I don't plan on doing much more with it, so have it [code]local function GetPoseParameters( ent ) local t, num, k, v, min, max t = { } num = ent:GetNumPoseParameters( ) if num < 1 then return t end for k = 0, num - 1 do min, max = ent:GetPoseParameterRange( k ) t[ k ] = { id = k, name = ent:GetPoseParameterName( k ), min = min, max = max, cur = ent:GetPoseParameter( k ) } end return t end local function GetBones( ent ) local t, num, k t = { } num = ent:GetBoneCount( ) for k = 1, num do t[ k ] = { id = k, name = ent:GetBoneName( k ) } end return t end local function GenerateInspectionMenu( ent, model ) local frame, w, h, materials, skins, sequences, bodygroups, n, k, v w, h = ScrW( ) / 2, ScrH( ) / 2 frame = vgui.Create( "DFrame" ) frame:SetTitle( "Inspecting: " .. tostring( ent ) .. " - " .. model ) frame:SetSize( w, h ) frame:Center( ) frame.Tree = vgui.Create( "DTree", frame ) frame.Tree:SetWide( w / 2 ) frame.Tree:Dock( LEFT ) frame.Model = vgui.Create( "DModelPanel", frame ) frame.Model:SetModel( model ) frame.Model:SetSize( w / 2, w / 2 ) frame.Model:Dock( RIGHT ) frame.Model:SetAnimated( true ) function frame.Model.LayoutEntity( this ) if this.bAnimated then this:RunAnimation( ) end --this.Entity:SetAngles( Angle( 0, RealTime( ) * 10, 0 ) ) if not this.once then local t = PositionSpawnIcon( this.Entity, this.Entity:GetPos( ) ) this:SetCamPos( t.origin ) this:SetLookAng( t.angles ) this:SetFOV( t.fov ) this.once = true end end frame.Model.Entity:SetMaterial( ent:GetMaterial( ) ) for k, v in pairs( ent:GetBodyGroups( ) ) do frame.Model.Entity:SetBodygroup( v.id, ent:GetBodygroup( v.id ) ) end for k, v in pairs( GetPoseParameters( ent ) ) do frame.Model.Entity:SetPoseParameter( v.id, v.cur ) end frame.Model.Entity:SetSkin( ent:GetSkin( ) ) local materials = frame.Tree:AddNode( "Material" ) local skins = frame.Tree:AddNode( "Skin" ) local sequences = frame.Tree:AddNode( "Sequences" ) local bodygroups = frame.Tree:AddNode( "Bodygroup" ) local poseparams = frame.Tree:AddNode( "Pose Parameters" ) local bones = frame.Tree:AddNode( "Bones" ) local att = frame.Tree:AddNode( "Attachments" ) --Materials if 1 then if ent:GetMaterial( ) ~= "" then materials:AddNode( "Current Material: " .. ent:GetMaterial( ) ) end for k, v in pairs( ent:GetMaterials( ) ) do materials:AddNode( v ) end end --Sequences if 1 then for k, v in pairs( ent:GetSequenceList( ) ) do sequences:AddNode( k .. " " .. v .. ( ent:GetSequence( ) == k and " (current)" or "" ) ).DoClick = function( ) frame.Model.Entity:ResetSequence( k ) end end end --Bodygroup if 1 then for k, v in pairs( ent:GetBodyGroups( ) ) do if v.name == "Body" then --Not used continue end bodygroups:AddNode( v.id .. " " .. v.name .. " (" .. ent:GetBodygroup( v.id ) .. "/" .. ( v.num - 1 ) .. ")" ) end end --Pose Parameters if 1 then for k, v in pairs( GetPoseParameters( ent ) ) do poseparams:AddNode( v.id .. " " .. v.name .. " (" .. v.min .. " to " .. v.max .. ", is " .. v.cur .. " )" ) end end --Skins if 1 then for k = 1, ent:SkinCount( ) do skins:AddNode( "Skin " .. k .. ( ( ent:GetSkin( ) == k or ( k == 1 and ent:GetSkin( ) == 0 ) ) and " (current)" or "" ) ) end end --Bones if 1 then for k, v in pairs( GetBones( ent ) ) do bones:AddNode( "Bone " .. k .. " " .. v.name ) end end --Attachments if 1 then for k, v in pairs( ent:GetAttachments( ) ) do att:AddNode( "Attachment " .. k .. " " .. v.name ) end end frame:MakePopup( ) end properties.Add( "inspect", { MenuLabel = "Inspect", Order = 1204, MenuIcon = nil, Filter = function( self, ent, pl ) if not IsValid( ent ) then return false end if ent:GetClass( ) ~= "prop_physics" and ent:GetClass( ) ~= "prop_effect" and ent:GetClass( ) ~= "prop_ragdoll" then return false end if not gamemode.Call( "CanProperty", pl, "inspect", ent ) then return false end return true end, Action = function( self, ent ) local k, v, t, j if ent:GetClass( ) == "prop_effect" then for k, v in pairs( ents.GetAll( ) ) do if v:GetParent( ) == ent then ent = v break end end end return GenerateInspectionMenu( ent, ent:GetModel( ) ) end, Receive = function( ) end, } )[/code]
[t]http://i.imgur.com/vEb8TAs.jpg[/t] Doing some sort of augmented reality menu thing with 3D2D derma. I'm so happy [URL="http://github.com/HandsomeMatt/3d2d-vgui"]this[/URL] exists, wouldn't have been able to do any of the derma in 3D2D without it.
[QUOTE=Atebite;46126972]stuff[/QUOTE] That's pretty nice man, great job!
[t]http://i.imgur.com/4BXn7M8.png[/t] more options and now works with sql, gonna put a lot of customization in here
[QUOTE=Kogitsune;46126934]I made a simple script that lets me inspect entities ( including effects ) since the model viewer appears to be fucked unless you feel like using it in hammer. [img]http://puu.sh/bVTX4/25a176ffb3.jpg[/img] It's pretty much done, and I don't plan on doing much more with it, so have it [code]-snip-[/code][/QUOTE] I'm going to see if I can modify this too look more like the model viewer now
If you are writting [I]that[/I] player settings, just write a file on the client (I think that's better than using queries and sending it to the client)
[QUOTE=gonzalolog;46127798]If you are writting [I]that[/I] player settings, just write a file on the client (I think that's better than using queries and sending it to the client)[/QUOTE] why? this stays on the server in case the user changes device, and i can also use the variables serverside (e.g. loading page changes)
I have added a variable to my Heart script that decides whether we use that realistic heart texture, or a shiny gem style [IMG]http://fc04.deviantart.net/fs71/f/2013/245/d/4/little_pixel_heart_by_kawiku-d6ksnjh.gif[/IMG] heart. I will show you a video sometime soon, although be fore-warned, I've already recorded it, and the video will be just under 10 minutes long!!!
Sorry, you need to Log In to post a reply to this thread.