Counter-Strike 2
Оценок: 40
How to spawn props and entities in CS:GO
От Schtekare
I will be going through the commands "prop_physics_create" and "prop_dynamic_create" as well as how to make explosive canisters in CS:GO that explode oupon receiving damage.
   
Наградить
В избранное
В избранном
Удалить
Introduction to the dev console and props.
As you may know, Counter Strike: Global Offensive is built on the source engine which in 9/10 cases includes a console. The console can be used to change almost every aspect of the game except for the engine itself, item properties and models ect.
When playing around you may have discovered "ent_create" and spawned hostage_entity or "Chicken" (These spawn hostages and chickens at the cursor).

If you ever went further than that and wanted to spawn for example watermelons or destructable crates you may be familiar with "prop_physics_create"
(usage: prop_physics_create props_junk/watermelon01.mdl).

if you want to leave it at that then have fun but for the rest that wants to know more, stick with me.
How to find things to spawn and what programs to use.
prop_physics_create inserts a model with properties, physics and a hitbox which allows the player to interact with the object like shoot it and in some cases destroy it. Maps in CS:GO usually lack these kinds of objects because of preformance issues but that won't stop people from experimenting.
However, prop_physics is not the only one. Prop_dynamic and prop_static are the other two.

If you are a map creator you will have heared about these already but for the beginner:
prop_static is like a wall, wont move and won't change (also can't be spawned in the console) and prop_dynamic is like a static one but that can turn and change it's hitbox placement but won't be affected by gravity.
If you take a look at "props_junk/watermelon01.mdl", you'll see that it contains a "/" sign which points towards a directory with the name "props_junk" and a file called "watermellon01.mdl".
Indeed such a file and directory exists but it's hidden and needs an external program in order to be seen.
What that means is that you can't just go to the folder, copy the location and spawn it ingame but instead you'll have to open the folder(s) in a program.

The program can be SDK's model viewer or hammer world editor or something of the type.
(a few tutorials by Worldofleveldesign:

https://www.youtube.com/watch?v=-bGzPrnA38E
https://www.youtube.com/watch?v=7HA-vGmSEeM

Remember that you only need the directory, the file name and what type of prop (physics, dynamic or both) to spawn it ingame with sv_cheats on 1.)
Explosive barrels and fixing the propane canister.
There has been an ongoing search of these and if you managed to make sense of this then congratulations, you now have all of them... Except for one...
You see, in his video, adreN (or adreN_TV) demonstrated 8 mins in that he could spawn in explosive barrels. (http://youtu.be/AXqsSs_VJAs?t=8m)
If you now look in the game files, they don't exist. Whether the files were deleted or never existed in the first place (and were modded in) I don't know. But what I do know is that people want this in the game and there's an easy way to get something like this.

If you try to spawn in props_junk/propanecanister001a.mdl, you'll see that it's impossible because it uses "Metal.PropaneTank" as a base and that it doesn't exist. Therefore, It's the perfect subject for experimenting.

Manual steps, if you want to skip, do the second tutorial.
1. get notepad++. If you didn't already have it. (Who doesn't have NP++?)
2. locate your steam folder and find the following: Steam\steamapps\common\Counter-Strike Global Offensive\csgo\scripts and open "Propdata.txt" in notepad.
3. locate "METAL" inside the file
4. scroll down to just above "PAPER" and type in the following:
"Metal.PropaneTank"
{
"base" "Metal.Base"
"physicsmode" "1"
"health" "1"
"explosive_damage" "100"
"explosive_radius" "150"
}

(Health is cs:go health without armor, explosive damage is damage dealt to the sorroundings and explosive radius is the radius in units that the explosion does damage. Note that there's a damage drop the further away you stand while still in the explosive radius).

It should now look something like this: http://gyazo.com/b6251c3195761a1cfa10aabdf310ea3c.

5. Save and exit.
6. Launch game in a private server with sv_cheats set to 1.
7. Type in: "prop_physics_create props_junk/propanecanister001a.mdl".
8. Shoot it.
9. Enjoy a soundless explosion. (I don't know how to add sounds, google it)

Second tutorial:
1. download: https://www.dropbox.com/s/d93xi6rb94pr9og/propdata.txt?dl=0
2. replace the existing propdata.txt in Steam\steamapps\common\Counter-Strike Global Offensive\csgo\scripts.
3. follow step 5, 6, 7,8 and 9.

------------------------------------------------------------------------------------------------------------------------------

Leave a comment if you ran into any issues, I'll respond with more than a bot comment like steam support.
Excuse my english, I'm Swedish.
Комментариев: 8
Schtekare  [создатель] 19 фев. 2017 г. в 12:55 
@Kisley I really don't know tbh. I think there already is a table prop without physics but if you prefer with you will have to add a bunch of physmodel stuff which I can't remember.
kaz 18 фев. 2017 г. в 20:51 
How i make a Table?
Swifty 11 мая. 2016 г. в 7:08 
okey thank you.
Schtekare  [создатель] 8 мая. 2016 г. в 22:20 
@[TMC] Swifty (Trading) you'll need to mess around with the content game files. Long and hard process that inables you to play on official servers. Don't do it unless you have to.
Swifty 8 мая. 2016 г. в 3:06 
how to get a big chicken?
Tym will ♥♥♥... 1 мар. 2016 г. в 1:20 
hello madafaka
Schtekare  [создатель] 15 дек. 2015 г. в 0:52 
Steam-csgo-properties-locsl files-verify integrity of game cache.

MichaellorSensei 13 дек. 2015 г. в 23:55 
Help me please, how do you reset the propdata file to normal? I can't play anymore