Quote:
Originally Posted by za_bullet
Is it possible to "insert" weapons on the ground/on the map for players to pick up? If so, how?
D.
|
You can insert weapons and do a whole lot more then that.
The map files (bsp format) have a large plain text section in them that defines nearly everything in the map you interact with like doors, crates, ladders, etc. You can see this text if you open a map in a hex editor. These items are called entities. There are two types.Point based, the ones you can change, and brush based ones you cannot change but you still can remove the brush based one too.
The great thing about entities is you can change them without having the map source code. You can change them without recompiling the map!
If you modify a map and put it on your server, when someone connects that already has the map they will not have to dl the modified map (in fact it won’t dl) BUT they WILL get your changes, because all of the entities are handled server side and sent to the client.
You can add in guns, grenades, kevlar.
You can add in any model anywhere in the map!
You can take out doors or
what I do is change all of the doors that swing open (func_door_rotating)
to the type of door that slides into the wall (func_door).
I do this because I play a lot of bots on the server and the bots handle these types of doors way better.
You can also remove items for the maps like take out crates and stuff.
For - CS 1/5 / 1.6 / condition zero maps.
---------------------------------------------------
Zoner’s hl tools for cs 1.5/.16 shipped with a dos tool called ripent.exe.
You could dump the entities to a text file, modify the text file and import your changed /added/removed entities back to the map. This utility was poorly written (imho) , had fixed memory sizes and would crash on a lot of maps.
I wrote a Windows application, BSPEdit to do this and you can dl it and the source code for it here:
http://filebase.bots-united.com/inde...on=file&id=177
I also wrote a Metamod utility that lets you simply start a LAN game and walk around in the map adding in guns nades, Kevlar and spawnpoints! You can dl it here:
http://filebase.bots-united.com/inde...on=file&id=297
But this is for cs 1.5/1.6/cz only. I will add support for hl2 bsp files and it is trivial to do for BSPEdit but I don’t have any time right now but will get to it asap.
Porting BSPEdit_mm to Metamod Source would take some doing since I don’t’ know the hl2 sdk or Metamod Source. The source code is in the dl if some one is interested!
Take a look at this thread where the person adds in a helicopter to his map.
http://forums.bots-united.com/showthread.php?t=4661
For more information on entity hacking go here:
http://forums.bots-united.com/forumdisplay.php?f=3
You can check out my server here:
Source:
68.165.128.15:27015 AustinBots! Source!
CZ:
68.165.128.15:27016 AustinBots! 1
When you join you will see guns in the spawn area and a number of other changes to the maps.
HL2 / Source mapping
----------------------------
Someone wrote a tool that lets you modify HL2 map entities.
You can dl it here:
http://ented.mybigspoon.com/
Ok how is this done?
-----------------------------
You asked about adding in guns. Here are some examples for SOURCE (HL2 format bsp files)
An entity starts and ends with {}
Here is an m4.
{
"origin" "1376 3168 -112"
"angles" "0 0 0"
"classname" "weapon_m4a1"
}
So to add in an m4 all you got to do is.
1) run ented and open up a map
2) Scroll down to the very end of the entities and paste in the above 4 lines. (the above example will only work with de_dust because of the origin line, more on this later..)
3) Save it.
The next time you load de_dust it will have an m4 in the ts spawn area and you can pick it up!
Here is the tricky part and why I wrote BSPEdit_mm.
Notice the origin line in the entity.
This specifies where in the map the gun is going to be created.
So lets say you are standing around at the ts spawn area in dust and you want to add in some guns. How would you know where you are in the map?
You can start a LAN game and go to the console and type:
Status
This will give you your x,y,z cords in the maps where you are currently standing.
This is tedious and what we will have to live with until I port BSPEdit_mm over to Metamod Source…..
Here are 6 entities for de_dust.
I put the 3 main t guns at the ct spawn area and I put the 3 main ct guns at the ts spawn area. I like to be able to pick any gun I want when I play!
So just open up de_dust with ented
Paste in these lines at the end and save it.
For all the other maps you will have to get the cords from the console status command and then add them in by hand.
Make SURE you don't add in any blank line between the ents.
{
"origin" "1376 3168 -112"
"angles" "0 0 0"
"classname" "weapon_m4a1"
}
{
"origin" "1200 3504 -96"
"angles" "0 0 0"
"classname" "weapon_aug"
}
{
"origin" "1504 3264 -112"
"angles" "0 0 0"
"classname" "weapon_famas"
}
{
"origin" "160 -1712 90"
"angles" "0 0 0"
"classname" "weapon_ak47"
}
{
"origin" "176 -1600 90"
"angles" "0 0 0"
"classname" "weapon_sg552"
}
{
"origin" "16 -1584 90"
"angles" "0 0 0"
"classname" "weapon_galil"
}
If people are interested I can post my changes to all the default cs source maps.
I also add in more spawn points so you can have more then 20 players per side.
Here is a list of weapons for Cs Source maps.
weapon_galil
weapon_ak47
weapon_sg552
weapon_famas
weapon_m4a1
weapon_aug
weapon_deagle
weapon_flashbang
weapon_hegrenade
weapon_smokegrenade
item_defuser
weapon_c4
weapon_glock
weapon_usp
weapon_p228
weapon_fiveseven
weapon_elite
weapon_m3
weapon_xm1014
weapon_tmp
weapon_mp5navy
weapon_ump45
weapon_p90
weapon_mac10
weapon_scout
weapon_g3sg1
weapon_sg550
weapon_awp
weapon_m249
One other thing…..
When I add in guns nades and kevlar I give them a z coord that is high off the ground. That puts them in the air. When the rounds restarts the guns spawn in the air and drop to the ground or if you put them above a player spawn and a player /bot is there they will drop into their hands, both of which are nice effects.
The best thing to do to learn about all the entities is to install hammer and learn how to create a basic map. A simple box is fine. Then you can use the entity map tool to put in guns and a (whole lot of other things), compile the map and then look at the entity text in the bsp to see what hammer adds in. This is exactly what I did to get guns into source maps. The format of the weapon items changed from cs 1.6 and I could not get them to work until I did this.
Hope this help!
LOL!