• GMod compiling info (aka, re-learning the basics).
    12 replies, posted
I'm going to just describe my situation as clearly as possible here without going into a bunch of detail on the subject. I've pretty much been unable to compile anything for GMod that actually works without throwing errors in the console and being unable to spawn the model(s) in question for almost the last two years or so (pretty much since GMod 13 initially rolled out), and I've pretty much gotten to the point that I'm thinking whatever worked for GMod 12 before doesn't exactly work for the current version of GMod now. I know that the necessary tools haven't exactly changed much (a 3D modelling program, a compiling program, a working .QC, etc.) since GMod 12, and I know that some of the same steps as before haven't really changed either, but I'd like to know whatever it is that has changed so that I can get back up to speed with the current methods that are required to compile something that won't constantly throw errors for no discernible reason. I've actually had to get other people to help me with compiles since then, and I've asked them on multiple occasions to help me figure out why I specifically can't compile anything, but they've all said that they're either too busy or I'm just being an idiot. Either way, I need help so that I don't have to rely on others to compile anything for me in the future, and any help would be appreciated. TL;DR version: I've been unable to compile anything GMod related since everything has thrown errors at me, and I obviously need to re-learn the basics again for GMod. I know some of the same things as before still work, but I need to know what all has changed, such as where to compile to and how to ensure that a simple model won't throw a random console error that stops me from spawning the compiled model in question. Any help would be appreciated.
Can you show an example .QC that you normally try to compile, yet doesn't work? OR better yet, if you could upload the SMD's and QC for a model that you're unable to compile, people including myself can see what's wrong.
This is a rather old and basic .QC that I've used for prop compiles (and also before I somewhat learned how to use bodygroups), but it always worked for me prior to the rollout of GMod 13 and any subsequent updates that have followed. After GMod 13 was released, I haven't been able to use this without it somehow having the compiled model cause an error in GMod's console and prevent itself from spawning. [code]$modelname "Ganryu\rif_m16a4_eotech.mdl" $model "studio" "w_rif_m16a4EOTech_gmod.smd" $cdmaterials "models\Ganryu\M16A4" $surfaceprop "weapon" $sequence idle "idle" fps 1.00 $collisionmodel "w_rif_m16a4EOTech_gmod.smd"[/code]
For comparison, I decompiled a model that was released back prior to Garry's Mod 13, and looking at the QC, this command stood out: [code] $sequence "idle" "gearspistol_anims\idle.smd" { fps 1 }[/code] I'm not sure if it matters that the prop itself has an SMD associated with the idle sequence, [del]but you can try either making an animation SMD where the prop stays the same for about 30 frames, which IIRC is the minimum amount for the animation sequence to work properly, and[/del] you may want to format the sequence in a similar manner as a test. [del]Also, I don't think it really matters, but most models I compile/decompile have a slash at the end of their cdmaterials path, but then again I'm sure that doesn't mater either.[/del] Lastly, try switching $model to $body or even make it into a bodygroup with one available selection. EDIT: I tested some other static props, and I'm pretty sure $model is what's causing the issue.
I'll try swapping out $model for $body and structuring the $sequence line a bit more like that first. Is there any specific location I need to compile to in GMod's directory, or can I just compile straight into GMod's directory like I used to with GMod 12?
Typically you'd need to run whatever program you're using as Administrator to give the program permission to create or move anything to any folder that isn't right below the drive's path. IE: Admin permission is needed to compile into Program Files\whatever, but not needed to compile into your C:\ path itself. Typically though, I find it easier to compile in Crowbar, even though it doesn't compile into Garry's Mod itself, it compiles into one of the possible folders in steamapps\common\ and won't be hard to find.
Not to sound rude, but that doesn't exactly answer my last question. I was mainly referring to where it's supposed to be compiled to/placed so that I can actually the model in my spawn list when I go to spawn it. Looking directly into the `Steam\steamapps\common\garrysmod\garrysmod` location, it doesn't look like it has the models folder there by default anymore; was this changed when GMod 13 rolled out?
Sorry, I thought you meant something else. You can merge the prop's materials and models folders with the Garry's Mod ones, or you can put them into legacy addon format by putting them in a folder and creating a text file with this in it: [code] "AddonInfo" { "name" "Katra" "version" "1" "up_date" "Blah" "author_name" "Blah" "author_email" "Blah" "author_url" "Blah" "info" "Blah" }[/code] and you'll find the compiled models in the "Katra" folder (or whatever you decide to put in for the "name" parameter). You'll also need the legacy addons browser which is somewhere in the workshop to do the second choice, which I think is a but easier to deal with than the first. You probably know most of the stuff I just said, but I'm putting all that info out here anyways.
Just to make sure I don't screw up the second method (which is what I'll go with), I make the folder for the legacy addon format in the addons folder, correct?
yes.
Alright, I'll give this a test later. I'll post again if I'm either still having problems or if this worked out.
Alright, that seemed to work perfectly. Thanks for the help. Any chance you guys might be able to inform me on how to go about uploading to the workshop as well? Now that I can get around to compiling again, I intend to make releases there.
For future reference, I have a cleaner demo QC here you might be interested in: [url]http://pastebin.com/raw.php?i=4cWYcf6L[/url]
Sorry, you need to Log In to post a reply to this thread.