• GMod - What are you working on? March 2017 (#67)
    213 replies, posted
It makes sense for addons to have APIs (e.g. Wiremod) and for other addons to make stuff that uses this APIs, either as a secondary feature (e.g. a SENT that can optionally be hooked up to wiremod) or a core function (e.g. a new kind of wiremod chip). It doesn't make sense for libraries though. Just think of the mess the used to happen after every single gmod update before we got prerelease, and multiply it by every library update ever, to the power of library developers don't have any real obligation to continue support while facepunch does for gmod. If you trust bobbleheadbob enough to not suddenly change what draw.Arc does, then go ahead. FWIW I'd trust him, because I've seen enough of his stuff to see that he's not an asshole. But if XxXCrazyJackXxX were to upload a useful library to workshop, I'd probably not assume it stays there forever. FWIW, especially useful functions should be pull-requested. If there's enough demand for draw.Arc, maybe it should be part of the vanilla draw library (which is 100% Lua anyway).
Made better covering system for the human SNPCs [media]http://www.youtube.com/watch?v=6GkddXVAUtU[/media]
[QUOTE=maksimiljan;52020434]Filters can be bypassed. "Oh whoops I just happened to forget to sanitize user input, sorry about that guy wiping your database. Won't happen again."[/QUOTE] Only let certain developers with a degree of skill or past work to submit code. People can apply. [editline]27th March 2017[/editline] Nevermind, there's obvious flaws there. idk
I was thinking about the library version idea, and the solution that I think would work is like this: The server would store an original copy of the library, version 1.0.0. Whenever a change to the library is uploaded (by an authorized maintainer) the version increments and doesn't change the original but stores the changes associated with a new version number. The way I would do versions is (M.m.P): Functions content changes, or variable value changes. This would increment the patch version 0.0.P. Addition of new functions, or new variables This would increment the minor version 0.m.0 Changes to the arguments a function takes, removal of any functions, or removal of variables. This will increment the major version M.0.0. When you use a library from the server you import it based on a specific version. Then notify the developer's using it that a new version is available. If they update their code to use the new version then great, but if they don't it won't break either. Since I am thinking we are talking about GMod Lua specifically, you could use a web server for this, and add to the Lua interpreter a command to fetch a page like, importManagedLibrary("library.1.2.1"). On the web server it would equate to a path, "/libraries/libraryName/Major/minor/Patch/library.lua". The first fetch of library from the server would generate and cache a complete copy of the version requested up to that version, (original + changes up to version requested). If a version is imported a lot it will stay cached, if it use used less it will at some point be deleted to save server space. If the library needs multiple files, each file will be counted as it's own library and get an entry in the server with it's own version. You would just include them in the main library file the same way the user of the library included the library. There are a lot of details missing still, but it's an idea. I feel at this point i'm rambling, so i will stop here.
[QUOTE=Fantym420;52021379]*reinvents git+cronjobs*[/QUOTE] I think the interesting discussion is around auto-downloading dependencies, versus including a copy in each project, and how you can auto-download without the backdoor drama that seems omnipresent in the gmod community.
[QUOTE=Apickx;52021452]I think the interesting discussion is around auto-downloading dependencies, versus including a copy in each project, and how you can auto-download without the backdoor drama that seems omnipresent in the gmod community.[/QUOTE] I can see that, security is always an issue, but by not updating the version that's being used automatically the exploit or backdoor wouldn't propagate automatically at least. It would need to be open source like git so people can review the code changes before updating which version they are using. Maybe someone fill figure it all out, but not me at this time.
A few of you expressed a desire to use that zone-designation tool I was working on. I'm turning it into a common API for any script to use in any gamemode. Here's a preview of the script's header. Any questions? [lua] --[[ ZONES - by Bobbleheadbob WARNING: If you edit any of these files, make them use a different name. Multiple scripts may depend on this library so modifying it can break other scripts. Purpose: For easy in-game designation of persistent polygonal zones which are used by any script. How to Use: All zones are saved in zones.List; see an example below. Zone creation is handled with weapon_zone_designator and ent_zone_point, but can be done in code as well. When a zone is created, changed, or removed all zones are synced to clients. When clients join they are also synced. Any extra details can be saved to a zone. Everything is written to a txt file and is persistent to the map. Since multiple scripts might use the zones system, don't assume that every zone is related to your script. To register a zone class, use zones.RegisterClass(class, color); use a unique string like "scriptname_room". When a zone class is registered, admins can use the tool to create new ones. When a new zone is created, the "ShowZoneOptions" hook is called clientside. See the hook below for example usage. Use zones.FindByClass() to find all zones which are of a given class. Use ply:GetCurrentZone() to find the zone that a player is standing in. Installation: This is a shared file so include it in any shared environment. Also include ent_zone_point and weapon_zone_designator as a shared ent and weapon. ]] [/lua]
[QUOTE=vrej;52021148]Made better covering system for the human SNPCs [media]http://www.youtube.com/watch?v=6GkddXVAUtU[/media][/QUOTE] it's a shame that you need 3 man to kill 1 man with no automatic rifle
There's only one person properly capable of updating dependencies of a script, and that is the author of the script. The updating of dependencies should thus not happen on servers that have the script installed. Have it happen on the author's pc. Darkrp has a bunch of dependencies that have their own repositories. Fn, MySQLite, FPP and CAMI are some examples. I just use git subtree merging to keep them in sync. Git submodules and offline programs that do something similar would also work. The biggest problem is that dependencies would have to be made such that they can be loaded multiple times, multiple versions even, without conflicts. That and there needs to be some way to make your libraries known to the world. Using other people's code has been [I]very[/I] unpopular in Gmod over the years.
Apply "don't-repeat-yourself" within own projects - it's not realistic to expect third party libraries not to break across versions in Gmod, whether using semver+git or otherwise. Gmod [i]itself[/i] has changed the API enough as it is, without depending on the non-breakage of the modules of others. As wasteful as it may be, I tend to prefer everything being packaged together. At least for Gmod addons.
[QUOTE=YoutoYokodera;52021761]it's a shame that you need 3 man to kill 1 man with no automatic rifle[/QUOTE] These are not sequenced battles or anything, they are random. The Soviet soldier kept getting lucky and winning, which why I zoomed in his face because I was surprised how lucky he kept getting
[QUOTE=bobbleheadbob;52021755]A few of you expressed a desire to use that zone-designation tool I was working on. I'm turning it into a common API for any script to use in any gamemode. Here's a preview of the script's header. Any questions? [lua] *Stuff* [/lua][/QUOTE] Is there a way to pick and choose which zones get sent to the client or pick and choose the clients? (For example, maybe I want zones for spawning npc enemies, and the player shouldn't be able to tell where the zones are or which npcs spawn in any particular zone)
Made a GTA V Style transition between switching characters [video=youtube;Eb8PX71dWUM]http://www.youtube.com/watch?v=Eb8PX71dWUM[/video]
[QUOTE=Apickx;52024396]Is there a way to pick and choose which zones get sent to the client or pick and choose the clients? (For example, maybe I want zones for spawning npc enemies, and the player shouldn't be able to tell where the zones are or which npcs spawn in any particular zone)[/QUOTE] Zones are not visible unless you're editing them. Only a hacker could see them.
[QUOTE=Pigsy;52025098]Made a GTA V Style transition between switching characters [video=youtube;Eb8PX71dWUM]http://www.youtube.com/watch?v=Eb8PX71dWUM[/video][/QUOTE] Neat idea, but it takes too many steps to get to max height, height change is too minimal, and the time between height changes is a bit too long.
Agreed, also, I'd make the camera's angle transition gradual rather than immediately snap to a horizontal view, fading into the character's eyepos. If I wouldn't want to be blunt about how copied this is, I'd lose the blue colors/steps altogether and make it a single transition
The travel speed from one character to another is way too linear and slow in my opinion.
[QUOTE=Z0mb1n3;52025567]Neat idea, but it takes too many steps to get to max height, height change is too minimal, and the time between height changes is a bit too long.[/QUOTE] Yeah I can add adjustments to the config file, but what you see there is just what I set it to for demonstration purposes. It will be a free plugin where people could adjust these parameters (height gain speed, transition speed, colour filter, time between changes) in its config to best suite their needs. As for the height change, it really depends on the skybox, rp_florida has a small one generally when compared to other maps but I can see if I can adjust it a little. Thanks for the feedback
maybe you could try to make it seem higher by increasing/decreasing the FOV a bit?
[video=youtube;ffv4m33i-Sc]https://www.youtube.com/watch?v=ffv4m33i-Sc[/video] I have another 2-3 death screens in the works. Since there are so many to choose from, made a faux entitiy to switch between them quickly without using the console. [t]http://i.imgur.com/RaqneG0.png[/t]
[QUOTE=Minelayer;52029549]maybe you could try to make it seem higher by increasing/decreasing the FOV a bit?[/QUOTE] would be better to just make it higher and increase NearZ
Finishing up requested artillery I love making private scripts because I don't have to give a shit about other things [media]https://www.youtube.com/watch?v=4-Y7wAOSTQU[/media] [media]https://www.youtube.com/watch?v=QL3E1-5z0p4[/media] [media]https://www.youtube.com/watch?v=e1gRLLrKHZY[/media]
[QUOTE=rebel1324;52037002]Finishing up requested artillery I love making private scripts because I don't have to give a shit about other things [media]https://www.youtube.com/watch?v=4-Y7wAOSTQU[/media] [media]https://www.youtube.com/watch?v=QL3E1-5z0p4[/media] [media]https://www.youtube.com/watch?v=e1gRLLrKHZY[/media][/QUOTE] *begging for music name guy*
[QUOTE=YoutoYokodera;52044850]*begging for music name guy*[/QUOTE] iirc it's something from payday 2 [editline]1st April 2017[/editline] Dead man's hand
Some people only lurk this thread and not the forum so here's the finished zone editor. [video=youtube;Cht0jQBcVL8]http://www.youtube.com/watch?v=Cht0jQBcVL8[/video] [url]https://facepunch.com/showthread.php?t=1558948&p=52044995[/url]
Working on blocking for my new turnbased mmorpg gamemode. Doesn't look like much for now but it makes editing and making battles 100% faster [t]http://www.potatofactory.net/~/hl2_2017-04-01_19-41-39.jpg[/t] [t]http://www.potatofactory.net/~/2017-04-01_19-39-41.jpg[/t]
A little late, but [URL="https://facepunch.com/showthread.php?t=1559031"]here's the new thread[/URL]!
Sorry, you need to Log In to post a reply to this thread.