• [ANNOUNCEMENT] Im bringing back toybox
    40 replies, posted
I assume the deprecation warning is just because it's being removed from the server side, as it's meant for lazy loading addon content on clients. Dunno, too lazy to look into it or ask a dev. Not sure if this is going to cause any issues for you, I'd assume mounting is shared in singleplayer.
[QUOTE=MadParakeet;50351503]I assume the deprecation warning is just because it's being removed from the server side, as it's meant for lazy loading addon content on clients. Dunno, too lazy to look into it or ask a dev. Not sure if this is going to cause any issues for you, I'd assume mounting is shared in singleplayer.[/QUOTE] I can confirm mounting is shared singleplayer
[QUOTE=MadParakeet;50351503]I assume the deprecation warning is just because it's being removed from the server side, as it's meant for lazy loading addon content on clients. Dunno, too lazy to look into it or ask a dev. Not sure if this is going to cause any issues for you, I'd assume mounting is shared in singleplayer.[/QUOTE] To simplify what I was saying above. I basically need functions to A) Load STools in-game like weapons.Register or scripted_ents.Register and B)To load custom models/sounds/effects/particles/materials in-game as well for both the clients and server. I've also already posted two threads about my issue, but they keep getting pushed to the bottom because nobody responds.
Hooookay. - With a bit of hackery you should be able to register your own tools. [URL="https://github.com/garrynewman/garrysmod/blob/451b4ff5d1aea7b9b06a8024ef706c248a79647e/garrysmod/gamemodes/sandbox/entities/weapons/gmod_tool/stool.lua#L134-L150"]Just look at how they're loaded.[/URL] Now, you have two options for loading content. If you want to do things the hard way: - Images and textures can be loaded from the data folder. Possibly entire materials, but if not, creating them via lua should be trivial. - You can use IMesh and PhysicsFromMesh / PhysicsInitConvex / PhysicsInitMultiConvex. This is actually one of the first things I ever made in glua, ages ago, but you're going to have quite a fun time if you want to load meshes in the source engine format. You should also note that these functions are designed like shit. A table of Vectors? FUCKING SERIOUSLY? - You can make sounds dynamically with sound.Generate, which is designed much better but is still laggy as fuck for obvious reasons. I dare you to try making a MP3 decoder in glua. IIRC there's no way to clean these up so have fun with that... - You should be able to create your own effects the same way you create entities, it's all glua. If there isn't a built in API, RTFSC and hack it in. - No idea how you'd do particles, IIRC the ones that you define in GLUA aren't the same as engine particles. There may be better ways to handle most of these things by loading them direct from the disk, I'm not well versed on the latest hackery. Now, on to option "I Still Want To Kill Myself But Not Nearly As Much" - Handle the clientside content the same way this fine gentleman is. - Make a module for serverside shit. Mounting stuff is pretty easy via C++, one of the first things I ever threw into that shithole now known as the glua github was a module that did this in a really ghetto and probably incorrect manner.
[QUOTE=MadParakeet;50354156]Hooookay. - With a bit of hackery you should be able to register your own tools. [URL="https://github.com/garrynewman/garrysmod/blob/451b4ff5d1aea7b9b06a8024ef706c248a79647e/garrysmod/gamemodes/sandbox/entities/weapons/gmod_tool/stool.lua#L134-L150"]Just look at how they're loaded.[/URL] Now, you have two options for loading content. If you want to do things the hard way: - Images and textures can be loaded from the data folder. Possibly entire materials, but if not, creating them via lua should be trivial. - You can use IMesh and PhysicsFromMesh / PhysicsInitConvex / PhysicsInitMultiConvex. This is actually one of the first things I ever made in glua, ages ago, but you're going to have quite a fun time if you want to load meshes in the source engine format. You should also note that these functions are designed like shit. A table of Vectors? FUCKING SERIOUSLY? - You can make sounds dynamically with sound.Generate, which is designed much better but is still laggy as fuck for obvious reasons. I dare you to try making a MP3 decoder in glua. IIRC there's no way to clean these up so have fun with that... - You should be able to create your own effects the same way you create entities, it's all glua. If there isn't a built in API, RTFSC and hack it in. - No idea how you'd do particles, IIRC the ones that you define in GLUA aren't the same as engine particles. There may be better ways to handle most of these things by loading them direct from the disk, I'm not well versed on the latest hackery. Now, on to option "I Still Want To Kill Myself But Not Nearly As Much" - Handle the clientside content the same way this fine gentleman is. - Make a module for serverside shit. Mounting stuff is pretty easy via C++, one of the first things I ever threw into that shithole now known as the glua github was a module that did this in a really ghetto and probably incorrect manner.[/QUOTE] Oh wow, this is probably the most comprehensive answer I have gotten. Thank you immensely. Although, this sounds like a million and a half headaches. My noobular lua skills probably aren't ready for this kind of wizardry. I'll probably have to get much more experienced with it before I can do even a quarter of what you just said. Blegh, nothing's ever easy is it?
[QUOTE=RileyGuy1000;50355434]Blegh, nothing's ever easy is it?[/QUOTE] [URL=http://xkcd.com/1349/][IMG]http://imgs.xkcd.com/comics/shouldnt_be_hard.png[/IMG][/URL]
[QUOTE=NeatNit;50355873][URL=http://xkcd.com/1349/][IMG]http://imgs.xkcd.com/comics/shouldnt_be_hard.png[/IMG][/URL][/QUOTE] That's very accurate. I think I'll take what parakeet said to do one step at a time and gradually work my way down the list.
So it is a gun that shoots toys and makes sounds? Who would pay for that? I can make it myself in less than an hour. EDIT* SMH, so it is a website than links to the Q menu and you can spawn tools from it. I think you should release it for free and have it become official so people can upload tools to there and maybe have one big sharing community kinda like the steam workshop..... oh wait....
[QUOTE=ThePeanut;50357349]So it is a gun that shoots toys and makes sounds? Who would pay for that? I can make it myself in less than an hour.[/QUOTE] wow you're a big boy now
An addon that would display the workshop in a toybox-like way would be nice. But trying to make a [i]competitor[/i] to workshop? Come on.
Sorry, you need to Log In to post a reply to this thread.