Welcome to PlagueFest.com! Log in or Sign up to interact with the Plague Fest community.
  1. Welcome Guest! to interact with the community and gain access to all the site's features.

Problem decompiling models from CS:GO SDK

Discussion in Mapping Discussion started by llVeXXll, Jun 18, 2012

  1. Jun 18, 2012
    Posts
    Hey all I have realised that you cannot rescale models you place in Hammer and downloaded a program called studio decompiler or studiomdl. I have tried to follow the tutorial for decompiling. I specified the full path of the model I want to decompile, I specified the path for the files to get decompiled to (I made a new folder for this), but when I hit extract, it is saying either "program has stopped working" or "could not decompile model", please help! x
  2. Nov 11, 2011
    Posts
    Make sure you run the program in administrator mode. And it would be helpful if you could give us the log of the error so we can tell you exactly what is wrong. @GRUDGE
  3. Jul 28, 2011
    Posts
    y u tag me :bugeyes:

    There's some people who would know more about this kind of stuff at places like gamebanana. I hardly have any modelling experience, and none at all when it comes to decompiling models. As far as I know, simply rescaling an existing model isn't possible.
  4. Nov 11, 2011
    Posts
    Actually... func_scaleable but I have no idea. I read it's only in HL2 EP1 and Portal or something... I'm sure @GiGaBiTe can chime in on this.
  5. Jun 18, 2012
    Posts
    I am running the program in administrator mode. 50 % of the time it is coming up with "This program has stopped working, windows is checking for a solution" standard windows pop up box thing and the other 50 % of the time it is doing this:
    [IMG]
  6. Apr 9, 2012
    Posts
    I probably know the reason why it can't be decompiled...
    First ofc make sure to run it as administrator.

    Once that's done, there is onl 1 reason that can make a model get decompiled or not:

    All models start in their code with: IDLE(x) -> that 'x' always defines it's decompiling status to keep it simple!

    Now some models have IDLE0 and some models have IDLE,

    Those with 0 cannot be decompiled and those with , can
    Now you should open the .mdl of the model you want to decompile. NEVER EVER do it with notepad from windows, doing so will corrupt your model.
    Instead use Notepad++ -> if you haven't Notepad++ download it http://download.tuxfamily.org/notepadplus/6.1.3/npp.6.1.3.Installer.exe
    Once done, open it with Notepad++

    Look at it, if it has a 0 replace that 0 with ',' (without the ' sings ofc)
    Save the file by pressing 'Save'. Never save it under another name as how you opened it or it won't work.

    There, your model should be able to be decompiled now.

    If it didn't, then it means the models have changed code from CS:S to CS:GO but I'm pretty certain they haven't.

    EDIT: O if you can't figure it out, copy all the model files and send them to me. I'll do it for you in that case if you want. However it's handy to know how to do the trick as you'll need it for many future models. I forgot to say that indeed almost all (if not all) models of Valve start with IDLE0
    • Informative Informative x 2
    • Useful Useful x 1
      JorisCeoen, Jun 19, 2012 Last edited by JorisCeoen, Jun 19, 2012
    • JorisCeoen
      This message by JorisCeoen has been removed from public view. Deleted by JorisCeoen, Jun 19, 2012, Reason: double post with sajak's annoyance as result.
      Jun 19, 2012
    • Nov 11, 2011
      Posts
      Good job. And no, as far as I know, they haven't changed.

      Btw, please use the "Edit" button on the bottom left of your post instead of double posting, thanks!: [IMG]
      • Informative Informative x 1
      • Useful Useful x 1
      • Apr 9, 2012
        Posts
        erm... A func_scaleable does not exist at all in no single Source game up to date. That would btw only work on brushes (all funcs are brush entities) and certainly not models.

        Source has not the power (yet and if the EP3 behaviour continues perhaps never) to simply scale models to any size by an entity. In fact many editors still haven't that as most models are precreated with the ideas already corporated for the engine, thus perfectly scaling their models inside the 3D programming software instead of the editor.
        Besides from a logical viewpoint, if one model did not scale accordingly to the grid and units of an editor, scaling would for the model become ineffective as it would never be able to scale correctly with the grid unless you are willing to make messy alignments.

        For example when I create models in Sketchup for Source, I have to make the correct units into a template first before building anything, or I won't be abe to use the model if I want to align it perfectly with brushes inside hammer (and I often have to do that xD)

        The only way to scale a model is by decompiling it into it's .smd form, then open its .QC file and inside you'll find a command parameter called '$scale X.X'
        Usually it'll be 1.0 (replacing the X.X) but for most of my character models in ze_SSBB_b1 they were 4.0 because at that scale they would fit their size compared to humans in CS:S (just using my currently progressing map as an example).

        Then just recompile it without changinganything else and your model will be bigger or smaller depending what you choose. You can also use 4.1 and so on (but not 4.15 or more decimals).

        EDIT: O btw https://developer.valvesoftware.com/w/index.php?title=Special:Search&search=func_scaleable&go=Go
        and http://lmgtfy.com/?q=func_scaleable
        • Mapping King Mapping King x 2
          JorisCeoen, Jun 19, 2012 Last edited by JorisCeoen, Jun 19, 2012
        • Mar 26, 2009
          Posts
          It's prop_scalable, not func_scalable. prop_scalable also doesn't exist in CS:S, despite it being in other Ep2 engine based games.

          Just remember that model decompiling isn't perfect and the resulting model will both be corrupted to some degree and the QC will not be the same as the original QC that the model was compiled with. More complex models will have more problems with the QC that will have to be sorted out for the model to compile correctly again. I decompiled the prop_door_rotating model in order to make a right version of the model (Valve never made a right version, go figure.) What I thought would take a few hours, ended up taking 3 days. It was a nightmare. The door still doesn't work properly, but it functions well enough to be used in maps, bar the animations for the crash bars and handles not working.
          • Winner Winner x 2
          • Nov 11, 2011
            Posts
            Err...I meant prop_scaleable, not func_scaleable. I'm retarded. Dur dur herpa derp.
          • Apr 9, 2012
            Posts
            Hmm a prop_door_rotating is a very snitchy entity, and only about 4 or 5 models work for it :S Might as well just use a propped door with a jointed collision model and animate it that it turns around just like a prop_door_rotating. Less buggy, less difficult and especially easy to do if you can animate.
          • Jun 18, 2012
            Posts
            OK So I went into the folder where the models are located and they are all .vtx files, no wonder the decompiler wouldn't work, what's going on :/ ? Thanks.
          • Apr 9, 2012
            Posts
            Well there should be an .mdl file, is it there? That's the only file you can select to decompile a model.
          • Mar 26, 2009
            Posts
            Making a prop door with an animation is just about as difficult to do as making a door model for prop_door_rotating. Dynamic entities in MP also have bad collision detection, causing the player to bounce when running into dynamic models.

            All you really have to do to make a prop_door_rotating door model is make the door and add a bone for the hinge origin, and add another bone for the door hardware in the same chain as the hinge bone.
          • Apr 9, 2012
            Posts
            Hmmm I tend to disagree ofc because I'm a modeller. Making a simple door, even if it was just a tin block with a door texture onto, it takes about 2mins to create such a door. If the door doesn't move they won't be bounced, and if you make the door move for 1 sec or 2 it won't be noticable at all. I know it because I've done it myself
          • Nov 11, 2011
            Posts
            Uh oh. Gigabite vs Joris, two epic modelers/mappers going at it, who will prevail? STAY TUNED!

            PS: they do bounce.
          • Apr 9, 2012
            Posts
            Lol no, I'm not making this into any kind of battle... But it really works. I did forgot to mention an important thing that of course the door has to turn away from the players and not into them. However it's pretty obvious that a prop_door_rotating is a better choice as it will not trigger the bouncy thing at all, but I just wanted to say that the bouncing is such a little thing that on a door, turning away from players in a timerate of 1 second will not ruin the game experience at all :-/ It's just an alternative to that entity which 'might' be easier depending if you can make other models than the 4 default in-game ones for the prop_rotating_door (Which I can't. I mean I can make any door I want but not for that entity.)

            Also another thing you can do is for example still making a animated door without joined collisions but simply with a non-moving collision model (like the ones that prop_statics have). Then make the door move and when the animations is over you remove the collision. A bit like the elevator door on Mako (only on normal and hard modes).
            • Informative Informative x 1
            • Jun 18, 2012
              Posts
              Sorry guys not ignoring the other conversation on this thread but still not got a solution, no there are no .mdl files wtf? I opened up the properties of a model in Hammer and even copied the full path that was shown there into explorer and I even set hidden files to show and theyre all just .vtx. In fact, I tried this with several models and some of the folders that the models were shown as to be in (in hammer) just plain did not exist when I tried to find them in explorer :frown: it says c:\program files (x86)\steam\steamapps\common\counter-strike global offensive\csgo\models\props_mill\stair_railing_long.mdl for example but the folder "props_mill" doesn't exist and even on the ones where the folder does exist it's full of .vtx no .mdl to be found please help! x
            • Nov 11, 2011
              Posts
              Hm, I think it might be because some of the models are shared.

              For example, the model you are looking at, I only find it in:
              C:\Program Files (x86)\Steam\steamapps\scx\counter-strike source\cstrike\models\props_mill\stair_railing_long.mdl

              When I check the same path you gave, this is what I see:
              [IMG]
            • Apr 9, 2012
              Posts
              Hmmm... I think I know again what's wrong!

              Go to your steam folder, like this:
              c:\program files (x86)\steam\steamapps\

              If you are there you will see a bunch of files with a .gcf extension right?
              Well that's actually where most models of Valve are stored into. Many model from CS:S cannot be found into the folders of their game directory, but instead into these files.
              I know that the CS:S .gcf is called 'counter-strike source shared.gcf'
              I do not have CS:GO, but it might be something like 'counter-strike global offensive shared.gcf' or anything that says something in the direction of CS:GO

              Ok once you found that, go to this site and download GCFScape: http://nemesis.thewavelength.net/files/files/gcfscape182.exe

              Once installed, open it, then browse to this file.
              Open it, and you will see an almost identical setup of CS:S like the materials folder and the models folder etc etc.
              Congratz, you can now extract about any model of CS:GO with the .mdl's and so on!