Page 1 of 1

Use old Source Engine models in CSGO.

Posted: Wed Feb 24, 2016 8:24 am
by Predz
I am completely unsure on where to ask this, and I have tried to get hold of some modellers but no reply from them yet. Basically I am trying to bring models from Portal and HL2 into CSGO. I have tried decompressing the VPK files and directly taking the model files, but to no avail as the physics works for the model, however the actual model doesn't appear (the entity is invisible, but still responds to damage, and physics). From what I have read on forums, I have sorta picked up that CSGO updated the way models work a while ago, and so the old way they developed models no longer works. Any insight onto what I am trying to accomplish would be gratefully appreciated! :)

I have uploaded the portal turret model beneath. I believe there is a way to recompile the model but I don't own any of the software to do so, neither have the knowledge to do so.

Posted: Wed Feb 24, 2016 6:32 pm
by L'In20Cible
From what I remember, you simply need to replace the first "," with a "0" in the magic code of the mdl files.

Posted: Wed Feb 24, 2016 8:14 pm
by L'In20Cible
Also, I think this thread would fit better into General Discussion as it doesn't relate to any SP codes.

Posted: Wed Feb 24, 2016 9:53 pm
by Predz
Thanks for the reply L'In20cible, however I don't mean to be stupid but could you give me an example of what you mean by this?

L'In20Cible wrote:From what I remember, you simply need to replace the first "," with a "0" in the magic code of the mdl files.


When I open the .mdl file in Sublime it shows what I am guessing is the data in hexi code.

Example beneath:

Code: Select all

4944 5354 2c00 0000 30ee 666c 7072 6f70
735c 5475 7272 6574 5f30 312e 6d64 6c00
0000 0000 0000 0000 0000 0000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
0000 0000 0000 0000 0000 0000 102b 0000
0000 0080 0000 0000 0000 8042 8892 9c3f
00f4 06bc b646 0842 0000 80c1 0000 80c1
0000 0000 0000 8041 0000 8041 0000 8042
0000 0000 0000 0000 0000 0000 0000 0000
0000 0000 0000 0000 0100 0000 0900 0000
9802 0000 0000 0000 300a 0000 0100 0000
380f 0000 0e00 0000 2c11 0000 0b00 0000
b41b 0000 0000 0000 0000 0000 0200 0000
b827 0000 0100 0000 3828 0000 0200 0000
0200 0000 3c28 0000 0100 0000 7826 0000
0e00 0000 300a 0000 0000 0000 7826 0000
7826 0000 0000 0000 1c27 0000 0000 0000
1c27 0000 0000 0000 1c27 0000 0000 0000
1c27 0000 0000 0000 1c27 0000 0200 0000
1c27 0000 4528 0000 4428 0000 0000 0000
0000 0000 1c27 0000 0000 c842 0100 0000
0000 0000 b827 0000 0000 0000 4428 0000
0000 0000 b827 0000 0000 0000 2011 0000
0000 0000 0000 0000 0000 0000 0000 0000
0000 0000 1c27 0000 0000 0000 0000 0000
9801 0000 0000 0000 0000 0000 4428 0000
0000 0000 0000 0000 0000 0000 0000 0000

Posted: Wed Feb 24, 2016 10:01 pm
by Predz
I have just opened the file in Notepad and I see what you meant by the "," being replaced by "0". This is now causing a physics error:

Code: Select all

ERROR!: Can't create physics object for models/predz/turret_01.mdl

Posted: Thu Feb 25, 2016 1:20 am
by L'In20Cible
Did you try with a prop_physics_override?

Posted: Thu Feb 25, 2016 7:19 am
by Predz
Yep, have been testing with that from day 1, hehe. I realized though that I had done the replacement wrong above, because I used a text editor that seemed to not notice half the code for mdl files. Basically it had saved the file again but only at 5 bytes because it didn't see the rest of the text. However I have now tested it by replacing the "," with a "0" and ensured the file is the same size as before. This time the server crashes entirely, nothing in the logs.

Posted: Fri Feb 26, 2016 12:06 am
by Doldol
Predz wrote:Yep, have been testing with that from day 1, hehe. I realized though that I had done the replacement wrong above, because I used a text editor that seemed to not notice half the code for mdl files. Basically it had saved the file again but only at 5 bytes because it didn't see the rest of the text. However I have now tested it by replacing the "," with a "0" and ensured the file is the same size as before. This time the server crashes entirely, nothing in the logs.


Notepad++ works out of the box for basic hex editing, but you have packages that enable Sublime to do this too.

Posted: Sun Mar 13, 2016 5:19 am
by jzservices
Predz wrote:I have just opened the file in Notepad and I see what you meant by the "," being replaced by "0". This is now causing a physics error:

Code: Select all

ERROR!: Can't create physics object for models/predz/turret_01.mdl


Not sure if I did it right, but just props I simply recompiled and recompiled as a prop_dynamic, I had the same issue with prop_physics too from other games. Or the prop_physics would break and then stop spawning when trying other physics types