GMod - What are you working on? February 2019 (#89)
80 replies, posted
That's pretty freaking sweet.
Are these going to be available for others to use? I can think of a situation or two I'd like to use them in.
Just released a huge update to StormFox. 97 files changed, 5,803 additions and 2,533 deletions. Phew.
BSP Parsing
StormFox now parses the mapfile, byte by byte. Allowing for faster and better interactions with the map. This eliminates the need to cache and send the large amount of map-data to clients, as this is generated on both sides.
Additionally, this also allows for more features in the future.
Tested on HL1, HL2, Gmod, L4D2 and CSGO maps.
StormFox's SoundScape
StormFox now overrides the default SoundScape with its own SoundScape-system. This is fully clientside and allows StormFox to edit, add or turn off ambient sounds (like birds) doing bad weather.
You can turn this off with “sf_overridemapsounds 0”, however disabling this might not work on all maps. As it overrides soundscape_trigger entities.
New language system
I’ve created a new language system, that should allow easy translations.
It uses the default language-setting set by GarrysMod, but you can override it with “sf_overidelanguage <xy>”.
You can run "sf_language_missing" in the console, to print the missing translations for the selected language.
Included languages atm: Russian, Pirate and some hidden ones.
New texture system
StormFox’s texture system now allows for more advance settings and tweaks. It also only synchronizes the changes with the clients, as most data are now created from the BSP-file directly.
It also allows for specialized weather textures, e.g. trees getting a specific snow-texture.
https://files.facepunch.com/forum/upload/107119/4d3c3423-6d5f-47a1-bb58-da7e218ca980/billede.png
Map creators also got 3 new entities, that they can use to edit the texture list directly. With custom snow-textures and/or other effects.
Finally decided to finish my compatibility tool. I'll probably throw it on the workshop tomorrow. It only watches a small whitelist of hooks (heavily biased towards things that interfere with my addon), but I plan to expand support to other things that people tend to fuck up.
http://tmp.bz/1bzEIdyAYNJ.png
Lightweight zone system based on brushes.
https://streamable.com/tbtlp
Added inventory support for my crafting system (finally)
https://streamable.com/l80dt
In the past few weeks I did some more work on my GLunaTest project.
I added so far:
Asynchronous testing using coroutines: Test can be run asynchronously so, they doesn't freeze the game while running. Test can also await asynchronous conditions, for example waiting for a timer to finish.
Nested testing: Tests can run their own sub tests. This is especially useful for isolation or for testing expected errors.
Extended assertion functions (glunatest.assert_not_equal_ex(), glunatest.assert_equal_ex()) with detailed output of checked variables on failure. This works with all kinds of tables/arrays and strings. Long outputs are cropped sensibly.
Added color support for windows dedicated server, Linux color support is planned.
Added support for warnings as the official lunatest doesn't have it. It output warnings on tests with no assertions now.
Dedicated server vs. client console:
Nested tests, formatting, colors, error handling and asynchronous test cases
https://files.facepunch.com/forum/upload/110792/dc46a07e-d3f7-44b6-a541-ff6aa9c91f4c/server-console.png
https://files.facepunch.com/forum/upload/110792/66cb305c-ad0a-4744-ae4f-d59a86f36ea4/ingame.png
Extended assertion outputs with for easier debugging. In this this case there are 4 failures shown.
https://files.facepunch.com/forum/upload/110792/b9b8aa7f-b8a4-474a-9ac6-29dea4fed204/diff.png
Usage of asynchronous testing:
function test_async_timer()
local done = false
-- async is a callable object.
local async = lunatest.async(function()
-- This callback is called when async is called.
-- This is needed as an alternative to plain functions as they would leave the testing environment upon call.
-- The assertion function would be called outside the testing environment making it useless for the test.
lunatest.assert_true(true)
done = true
end)
-- Using the __unm (-) operator gives you a real callable function. (needed for c-called functions)
-- async:ToFunction() can be used as well.
timer.Simple(2, -async)
-- Wait for the timer to finsh (2 sec) or throw an error after 4 sec.
-- This prevents infinite loops and detects uncalled callbacks.
async:Sync(4)
lunatest.assert_true(done)
end
Here another example:
function suite.test_nested_testing()
local glunatest = GLunaTestLib:CreateGLunaTestInstance()
-- load game or addon specific extensions for the new test environment.
glunatest:AddEmulatorHelper("glunatest/emulatorhelper/gmod.lua")
glunatest:EnablePrint(true) -- print the subtest's output.
glunatest:SetAsynchronous(true) -- set the test to run asynchronously.
lunatest.assert_true(glunatest:IsAsynchronous())
local async = lunatest.async(function(result)
-- result is an object that contains all important information about the done test.
lunatest.assert_testresult_passed(result) -- check the test to have passed.
end)
-- set async object as callback. In this case the callable is accepted without converting.
local run = glunatest:RunTestSuite("glunatest/tests/glunatest/test-nested.lua", nil, nil, async)
lunatest.assert_true(run)
-- wait for it
async:Sync(20)
end
i made a gui for windows gmod dedicated server:
[GDSM] Gmod Dedicated Server Manager
install / update and configure a dedicated server for gmod
https://www.youtube.com/watch?v=sHLTaGpyhlw
please don't sue me, i'm just a fan
https://files.facepunch.com/forum/upload/377014/4ee6090e-8adb-47e5-9337-3985ca8048e3/20190314144421_1.jpg
https://files.facepunch.com/forum/upload/377014/31579999-3469-4c25-a10a-58219e0b49b1/20190314132800_1.jpg
https://files.facepunch.com/forum/upload/377014/0b5ee082-569b-4805-a920-0b6068d6cf92/20190314132410_1.jpg
Fun Fact: The bullets are secretly hula dolls for the collision detection. Also, I need to work on my photography skills, lol. I am betatesting friends only on steam.
We got .gif's somehow working.
https://streamable.com/spqvd
Credits: @sleeppyy
RIP WAYWO Threads
O7
it wasn't worth posting a new thread this month because the February one had less than a full page of posts
Completely remade DarkRP's door system
https://www.youtube.com/watch?v=6XFL5IrQZY8
https://streamable.com/o1ado
Just saying, the UI on pickupables is absolutely H U G E.
It's easily bigger than the entity itself.
https://files.facepunch.com/forum/upload/112037/50709af1-3a91-4182-b0a3-fa4a1542981a/image.png
https://steamcommunity.com/sharedfiles/filedetails/?id=1693027072
Made this tool for NavalPlay but I noticed that no one made something like it before so I released it.
I had a hard time finding an easy way to check if two hitboxes (The Rotated 3D Cubes, not the Axis Aligned Bounding Boxes) are intersecting.
After trying a lot with physics I just pulled back my sleeves and got to work on a surprisingly fast function: hastebin
Here's a video showcasing it:
https://www.youtube.com/watch?v=86DNOOUmJGw
And here's the obligatory sketch that makes it look like I've put more effort into this (The numbers indicate the table indexes):
https://files.facepunch.com/forum/upload/788/9a3cfe42-a943-4fa3-9945-be02ce1a31c4/WhatsApp Image 2019-03-24 at 22.57.58.jpeg
Call me an amateur for something this basic but I'm pretty happy with how it turned out. In the video it doesn't show new stuff I added onto it like material and color so check the addon page if you want to see them.
Don't deprecate yourself. You're not an amateur. This kind of exercise will help you learn a ton about maths and programming in general. Keep it up.
I reckon this tool can be very useful if it can replace welds. Take something with way too many welds lagging the server, remove them all and recalculate the optimal weld set. Admins could go around "fixing lag". That sure beats clearing decals
The paperwork really helps in behavior calculating. It helps keeping your thoughts and clean your brain-RAM. I can't find my papers rn but they're looks the same
I honestly don't have anything super amazing to show off except this little reputation system I've been working on and then just stopped, mainly because I'm not the most creative person, so imma ask here: What should I add to my lil thing?
Some images
https://files.facepunch.com/forum/upload/111222/c9c359bd-bced-405c-ac5d-c061d6133032/hl2_2019-02-19_15-30-57.png
https://files.facepunch.com/forum/upload/111222/b9f1df8e-8e2f-4cbd-9135-445d4ebb86eb/hl2_2019-02-19_00-44-24.png
https://files.facepunch.com/forum/upload/111222/3945635b-bd85-47d7-a5a6-a9d97a3469d2/hl2_2019-02-19_00-43-24.png
And the current settings
https://files.facepunch.com/forum/upload/111222/bca0a124-5443-49bc-899c-81f556c1c063/atom_2019-02-19_19-58-32.png
I'm extremely sorry if the placement of the images is akward as hell working with a touchpad in an awkward position isnt the best. Again, any ideas on what I should do with this are highly appreciated!
If I'm showing off old stuff I can also post my long, looong dead crafting table entity.
TL;DR you could mine and craft other resources and use those for crafting items, sadly I stopped it mainly cause:
I'm really bad at networking.
I'm terrible at making more modular code.
However, for your eyes and mine, here's some images from the UI:
https://files.facepunch.com/forum/upload/111222/2fc6176a-1509-48e1-ad42-b6cda0c649b9/2018-10-28_17-01-57.gif
First and last version of the UI that I did.
https://files.facepunch.com/forum/upload/111222/ef36b237-4de8-442d-8e90-8c8baa11c86b/hl2_2018-10-04_14-31-43.png
Mining and getting resources meant the number of the things you had got bigger.
https://files.facepunch.com/forum/upload/111222/4d763638-17f3-4b00-a943-a5dc98ad0a86/hl2_2018-10-05_23-43-34.png
And of course how can we do crafting without the classic "Crafting" indicator from Rust Legacy
This is more like the stuff I'd love to see in Garry's Mod, enough of the DarkRP and TTT, need more fun and innovative PvP gamemodes old or new to be resurrected or made.
Making a calendar for a job, SWRP-ish? Not too sure, not much of a starwars guy myself. Video shows functionality a lil bit dated on the design aspect
https://upload.dawhale.us/8786f.png
https://youtu.be/L7DHx6DmL7w
I feel bad for you, the amount of polygons you are drawing on top of each other... better off just making an image.
Vaguely interesting day night thing because I needed one for a project i'm working on. I have no idea how to feed the shader meme the sun and sky values directly so I'm just janking it with the sky ents.
https://www.youtube.com/watch?v=slykFuV8oVQ&feature=youtu.be
1 day = 24 minutes IRL, Sunrise/set occurs between 6am/7 and 6pm/7 respectively. Don't bother watching after the first cycle as there's nothing interesting else.
5 polys for the top bit, render.SetScissorRect & surface.DrawTexturedRectRotated for the day display.
Better with this
https://www.youtube.com/watch?v=xMcMX_EfQ4A
To be honest, I could not compare to anything you guys have done. But I have this that I have been working on in and out for the workshop for server owners.
It's called DUNCE, the asshole I am this addon comes off of my personality, so beware.
DUNCE is an anti-banning addon, meaning an addon where it basically makes banning something you only do to people who are absolutely horrible people to the core.
What this addon does is it makes being 'banned' (dunced) fun, and its a way to educate new/naughty players into better players (its also a way to bully players who pissed you off).
Advertisement Message idea I had: Have you ever had that annoying player who applies for an unban straight after they were banned that was very well justified? Have you ever had a player who just keeps coming back after being banned and doing the exact same thing? Have you ever had a player who was so toxic that you just wanted to leave your own community? Well then this addon is for you! For the first time in Garry's Mod history, we are giving the Owners the ability to utterly abuse, torment, and put these stupid players into there rightful place.
What does this addon give the owner?
A very customizable system with a new way to 'ban' players.
Slot limit (if someone tries to join, but server maxed and this retard is online, then kick them).
Quests and Minigames to reduce sentence.
Quests include many activities that will make this player a better player, for example: Read the rules, learn the map, watch a staff sit.
Players who are dunced will be completely stripped of everything and will have a chat delay.
A feature that makes the player invisible or opaque to every player except admins to avoid fail rp/annoyance (in rp gamemodes).
Minigames:
The players line up and throws eggs, chairs, and tomatos at the dunced players as they walk down the line.
Shouting match, scream and laugh at the stupid player.
and many other fun minigames with rewards for not just the dunced player for winning.
https://files.facepunch.com/forum/upload/172239/9e834da5-c2d1-47d4-8140-c5654777758b/image.png
This is really just a 'im trying my idea' kinda thing, idk if people want it, idc if people want it. I just wanna make it and publish it.
(I have finished the base, I just have to make stuff now ;eek;) Anyway, it will take a while because I am busy with other things, but I tried making something unique many times and this is by far my favourite one.
If you think drawing a flying 3d2d text and set it's angle according to the player cameran angle is big gay, do this :
function ENT:Draw()
self:DrawModel()
local Pos = self:GetPos()
local Ang = self:GetAngles()
Ang:RotateAroundAxis(Ang:Forward(), 90)
Ang:RotateAroundAxis(Ang:Right(), -90)
local plyxy = LocalPlayer():GetPos()
local plyx = plyxy.x
local plyy = plyxy.y
local npcxy = self:GetPos()
local npcx = npcxy.x
local npcy = npcxy.y
local ang = math.fmod(math.atan2(plyy - npcy, plyx - npcx), math.pi * 2) --whoever set the angle of the ply -180 to set the text angle is a fucking idiot
local angd = Angle(0, math.deg(ang), 0)
angd:RotateAroundAxis(angd:Forward(), 90)
angd:RotateAroundAxis(cursorangd:Right(), -90)
cam.Start3D2D(Pos + (Ang:Right() * -80), angd, 0.1)
--draw ur shit here
cam.End3D2D()
end
It will LOOK at the player, not "mimic" the head angle.
Writing an (ANSI) C wrapper for Garry's Mod's C++ interface:
https://c2n.me/40Sf8Pg.png
all because i want to write gmod modules in C without suffering too much or opening Lua shared lib directly.
Sorry, you need to Log In to post a reply to this thread.