Discarting weapon from a map withe editor

Discarting weapon from a map withe editor

Re: Discarting weapon from a map withe editor Posted by toni_101 on Sun Dec 17th 2006 at 8:41pm
toni_101
7 posts
Posted 2006-12-17 8:41pm
toni_101
member
7 posts 1 snarkmarks Registered: Dec 17th 2006
Hi there!

I was just asking how can i discart a weapon from a map!

For example how can I discart the egon gun from boot_camp

The editors I have are Hammer editor and Quark.
Re: Discarting weapon from a map withe editor Posted by Captain P on Sun Dec 17th 2006 at 9:58pm
Captain P
1370 posts
Posted 2006-12-17 9:58pm
1370 posts 1995 snarkmarks Registered: Nov 6th 2003 Occupation: Game-programmer Location: Netherlands
For what purpose would you want to do that?

Anyway, first, you should save the .bsp file under another name. You can't modify the original because that would cause inconsistencies with other players. Once you've done that, open the .bsp file with a text editor (Notepad or something) and scroll to the end. All the jibberish is binary data but the entity data, such as the spawn point locations, weapon placements and such, is stored in text format at the end of the file. The string you're looking for could look something like this: {"origin" "-224 1244 230" "pitch" "-90" "angles" "0 0 0" "classname" "weapon_egon"}, with some unrecognized characters in between. Just remove the block between the { and } where the classname is weapon_egon and the entity should then be removed from the .bsp file. Also remove the additional unrecognized character after the }, so there's only one left between the other two entities around the weapon_egon entity.

To be more secure, I'd suggest using a Hex editor instead of a text editor. XVI32 is a nice one.

Alternately, you can decompile the map, but that hardly ever results in a workable result, so in such cases it's faster to rebuild the level from scratch. :wink:
Create-ivity - a game development blog
Re: Discarting weapon from a map withe editor Posted by fishy on Sun Dec 17th 2006 at 10:43pm
fishy
2623 posts
Posted 2006-12-17 10:43pm
fishy
member
2623 posts 1476 snarkmarks Registered: Sep 7th 2003 Location: glasgow
You can hex edit the entities of a map and leave the mapname the same, without causing version problems. When a client connects, it takes all of the ent info from the server, not from the bsp. So even if I hex edited all of the resupply bags in 2fort to insta-gib people, the fun wouldn't start until my version was running as the server.

btw, it's 'discarding'
i eat paint
Re: Discarting weapon from a map withe editor Posted by Captain P on Sun Dec 17th 2006 at 11:12pm
Captain P
1370 posts
Posted 2006-12-17 11:12pm
1370 posts 1995 snarkmarks Registered: Nov 6th 2003 Occupation: Game-programmer Location: Netherlands
Hmm, good point there. I'd use another name though, just to let people know it's a modified version of the map.
Create-ivity - a game development blog
Re: Discarting weapon from a map withe editor Posted by toni_101 on Mon Dec 18th 2006 at 8:47am
toni_101
7 posts
Posted 2006-12-18 8:47am
toni_101
member
7 posts 1 snarkmarks Registered: Dec 17th 2006
Thanks to Both of You

Fishy sorry for my bad english-I'm Bulgarian :smile:

Edit: Hm pls could you bold what exactly I have to delete

[]{[]"origin" "644 -184 -232"[]"classname" "weapon_egon"[]}[]

And after I delete it I have to save it .BSP again and import it to my Map folder is that right?
Re: Discarting weapon from a map withe editor Posted by fishy on Mon Dec 18th 2006 at 12:58pm
fishy
2623 posts
Posted 2006-12-18 12:58pm
fishy
member
2623 posts 1476 snarkmarks Registered: Sep 7th 2003 Location: glasgow
deleting all of that line will completly remove the egon.

changing "weapon_egon" to " weapon_crossbow", or some other gun/item, is also something you could consider.
i eat paint
Re: Discarting weapon from a map withe editor Posted by Captain P on Mon Dec 18th 2006 at 3:35pm
Captain P
1370 posts
Posted 2006-12-18 3:35pm
1370 posts 1995 snarkmarks Registered: Nov 6th 2003 Occupation: Game-programmer Location: Netherlands
Yes, delete the whole line, but leave one of those [] characters around it intact. I'm not sure how strict HL is when parsing this data, but I assume it wants a [] between every entity, better take the safe bet.
Create-ivity - a game development blog
Re: Discarting weapon from a map withe editor Posted by toni_101 on Mon Dec 18th 2006 at 5:28pm
toni_101
7 posts
Posted 2006-12-18 5:28pm
toni_101
member
7 posts 1 snarkmarks Registered: Dec 17th 2006
Hm there is an error when I create server with the editted map

Is says:

Mod_LoadBrushModel: maps/logo.bsp Has wrong version number (538976286) should be 30
Re: Discarting weapon from a map withe editor Posted by Captain P on Mon Dec 18th 2006 at 6:08pm
Captain P
1370 posts
Posted 2006-12-18 6:08pm
1370 posts 1995 snarkmarks Registered: Nov 6th 2003 Occupation: Game-programmer Location: Netherlands
Hmm, as I feared. Try using a hex editor instead of Notepad, I guess Notepad can't handle binary files very well. As I said above, XVI32 is a good hex editor.
Create-ivity - a game development blog
Re: Discarting weapon from a map withe editor Posted by toni_101 on Mon Dec 18th 2006 at 7:44pm
toni_101
7 posts
Posted 2006-12-18 7:44pm
toni_101
member
7 posts 1 snarkmarks Registered: Dec 17th 2006
When I editted the map with XVI32 i created a server and this time it says:

FATAL ERROR:


Func_alloc: bad size: -2147483648
Re: Discarting weapon from a map withe editor Posted by Captain P on Mon Dec 18th 2006 at 9:33pm
Captain P
1370 posts
Posted 2006-12-18 9:33pm
1370 posts 1995 snarkmarks Registered: Nov 6th 2003 Occupation: Game-programmer Location: Netherlands
Hmm, I guess there's another data chunk that comes after the entities then and the adress offsets mess up. Try changing "weapon_egon" with "weapon_aaaa" to keep the exact same filesize?
Create-ivity - a game development blog
Re: Discarting weapon from a map withe editor Posted by toni_101 on Mon Dec 18th 2006 at 10:23pm
toni_101
7 posts
Posted 2006-12-18 10:23pm
toni_101
member
7 posts 1 snarkmarks Registered: Dec 17th 2006
Million thanks!!!

Changing EGON with AAAA = success :smile: