Ads keep us online. Without them, we wouldn't exist. We don't have paywalls or sell mods - we never will. But every month we have large bills and running ads is our only way to cover them. Please consider unblocking us. Thank you from GameBanana <3

Entity Stripper:Source - A Modding Tool for Counter-Strike: Source

Stripper:Source


  1. Introduction
  2. Installation
  3. Configuration
  4. New! - Advanced Filtering/Modification
  5. Entity Properties
  6. Stripper from Other Plugins
  7. Screenshots
  8. Credits, License, Acknowledgements
  9. Changelog

1. Introduction

This is a small but flexible plugin which lets you filter and add entities to a map before it loads, much like Stripper2 for Half-Life 1, by botman. You can filter out entities with specific values or regular expressions, or declare new entities to be added. You can also specify per-map configuration options.

2. Installation

First, make sure you have the proper tools installed. You need Metamod:Source 1.4 or 1.6 or higher.
  1. Download Stripper:Source (current version - 1.1b, requires Metamod:Source 1.4 or 1.6, it will work on both).
  2. Extract the zip file into your server's mod folder.
  3. Add the following line to your addons/metamod/metaplugins.ini file:
    addons/stripper/bin/stripper_mm
  4. You're done!
Note! If you require older versions of Stripper:Source, for example, if you must use an older Metamod:Source version, you can find them by clicking here.

3. Configuration

There are two main configuration files for Stripper:Source. The first is addons/stripper/global_filters.cfg, which is run on every map change. You can also configure per-map files in addons/stripper/maps/.cfg (for example, addons/stripper/maps/de_dust.cfg). These will only be run when that specific map is used.

Stripper:Source configuration files are stored in the following format:
filter:
{
"prop1" "val1"
"prop2" "/val2/"
}
{
"prop3" "val3"
}
add:
{
"prop4" "val4"
"prop5" "val5"
}

Note that the syntax is not flexible - you must declare each item or token on a separate line as shown above. Each block, denoted between the { and } tokens declares an entity. Each line in the block declares a property of the entity. The properties are two quoted strings per line, separated by a space. The first quote is the key, the second quote is the value. For example, this block describes a hostage:
{
"origin" "1376 3168 -112"
"HostageType" "0"
"angles" "0 111 0"
"classname" "hostage_entity"
}

To add an entity, use the "add:" token. Note that you do not need to specify this token for each block -- it will continue until you use another operation token (such as "filter:"). The example below will add the hostage to the map:
add:
{
"origin" "1376 3168 -112"
"HostageType" "0"
"classname" "hostage_entity"
}

To filter an entity from the map, each entity block contains properties that you wish to match against. For example, the following block will remove any entity that is a hostage:
filter:
{
"classname" "hostage_entity"
}

You can also get very specific, for example, this will only filter out the hostage we added earler:
filter:
{
"origin" "1376 3168 -112"
"HostageType" "0"
"classname" "hostage_entity"
}

Lastly, you can also use regular expressions to match entities. To learn more about regular expressions, visit Perl Regex. These let you define patterns to match against. For example, this will remove any entity that is any type of physics prop:
filter:
{
"classname" "/prop_phys.*/"
}

Note that rules are read in order - if add a rule a future rule can filter it out.

4. New! - Advanced Filtering/Modification

Version 1.1 of Stripper:Source adds a powerful new method of filtering entity property blocks. This adds a new directive called "modify." Modification blocks have four sub-blocks: Match, Replace, Delete, Insert. The Match sub-block lets you specify which property blocks to search for. For each matched block, the replace, delete, and insert sub-blocks are processed.

For example:
modify:
{
	match:
	{	
	"model" "models/props_junk/garbage_metalcan002a.mdl"
	"classname" "prop_physics_multiplayer"
	}
	replace:
	{
	"classname" "hostage_entity"
	}
	delete:
	{
	"model" "models/props_junk/garbage_metalcan002a.mdl"
	}
	insert:
	{
	"scale" "0.99"
	}
}
This configuration entry will replace all garbage cans with hostages. How does it work?
  • match: Matches all entities that have the listed model and classname. You can use regular expressions (//) for any key values here.
  • replace: Replaces the values of any properties that have the same key name. In this example, "prop_physics_multiplayer" will become "hostage_entity."
  • delete: Deletes any properties matching both the key name and the value string. The value string may have regular expressions (//). In this example, the model property of the trash can is being removed.
  • insert: Specifies any additional key value pairs to insert. Here, an arbitrary scaling value is added to the entity.
Although "match" is a required sub-block, replace, delete, and insert are all optional. You can specify the sub-blocks in any order, although they are always processed the same way. Match first, then replace, then delete, and insert last.

5. Entity Properties

Unfortunately, I don't know all of the entity properties. So to help users out, you can use the "stripper_dump" console command (requires rcon or server console access). This will dump a file in addons/stripper/dumps named after your map which contains every single entity and all of its properties that the map initializes on load. This file will be roughly 120-200KB and will provide everything you need for stripping/adding entities.

6. Using Stripper:Source from Other Plugins

You can use Stripper:Source from other plugins! Simply download the source code, #include <IStripper.h>, and use engineFactory or ISmmAPI::MetaFactory() to request STRIPPER_INTERFACE (of type IStripper).

Look in IStripper.h for the full interface definition. You can hook when Stripper:Source is about to reparse the map entities and inject your own configuration files.

7. Screenshots

(click to enlarge)

-- Hostage in de_dust spawn.

-- No more props!

-- No more props, part 2!

-- Garbage can replaced by hostage. Spot two more in the background.

8. Credits, License, Acknowledgements

This software was made by David "BAILOPAN" Anderson. [ http://www.bailopan.net ]

The idea came from Botman's stripper2 (link in Introduction). I got the initial idea of this plugin from Mani, who discovered that by forcing a new entity string through LevelInit, you could change the map list.

Regular Expressions are implemented with PCRE (Perl Compatible Regular Expression Library). Thanks to Freecode for the screenshots, and PM OnoTo for making SourceHook so awesome.

9. Changelog

2007/10/07 - Version 1.1b
	- Now runs on Metamod:Source 1.6 and 1.4, as well as TF2/Orange Box.
2006/10/05 - Version 1.1a
	- Fixed old filters not working correctly.
2006/08/15 - Version 1.1
	- Now requires Metamod:Source 1.3.
	- Added new syntax for more flexible entity modification.
	- Improved load-time performance.
	- Fixed long paths being chopped off.
	- Cleaned up source code and updated to PCRE 6.7.

2006/01/07 - Version 1.01
	- Now requires Metamod:Source 1.2.
	- Supports other stripper-style plugins modifying the map state.

2005/12/10 - Version 1.00
	- Initial Release 
1-10 of 17
1
Pages
  • 1
  • 2
Go to page:
  • Spl@tt3R avatar
    Spl@tt3R Joined 12y ago
    Offline
    993 points Ranked 43,563rd
    7 medals 1 rare
    • 6 years a member Medal icon
    • One month a member Medal icon
    • 6 months a member Medal icon
    • 1 year a member Medal icon
    • 2 years a member Medal icon
    • 4 years a member Medal icon
    8y
    Would this also be working with custom content? If so, I see this as a way of adding a Banner to ones server, by using a custom decal?
    Bananite avatar
    Mantra
    Bananite
    URL to post:
  • tastetherainbow12 avatar
    tastetherainbow12 Joined 14y ago
    Offline
    155 points Ranked 73,566th
    13y
    Thats fine too lol
    The ¤S¦A¦D¦R¤ [cI] Clan
    URL to post:
  • Logan Dougall avatar
    Logan Dougall username pic Joined 15y ago
    Admin
    Offline
    Half Life Storm Flag Affiliation: Half Life Storm
    21,461 points Ranked 291st
    47 medals 3 legendary 13 rare
    • Achieved Admin clearance Medal icon
    • 500 posts awarded Exemplary Feedback Medal icon
    • 10 years a member Medal icon
    • 50 posts awarded Exemplary Feedback Medal icon
    • 100 posts awarded Exemplary Feedback Medal icon
    • 200 posts awarded Exemplary Feedback Medal icon
    Logan Dougall avatar
    Logan Dougall
    Half Life Storm Flag
    Affiliation
    Half Life Storm
    Admin
    13y
    Posted by tastetherainbow12 How do i use this in game??
    You don't, its a server plugin, not some skin download pack :P
    Structural Designer / Dad :)
    URL to post:
  • tastetherainbow12 avatar
    tastetherainbow12 Joined 14y ago
    Offline
    155 points Ranked 73,566th
    13y
    How do i use this in game??
    The ¤S¦A¦D¦R¤ [cI] Clan
    URL to post:
  • KjaerBjaer avatar
    KjaerBjaer Joined 13y ago
    Offline
    213 points Ranked 65,589th
    13y
    Sourcemm.net never loads for me. Is there any other link or person for me to download the latest version of MetaMod:Source from?
    Server Technician
    URL to post:
  • BennoTheDutch avatar
    BennoTheDutch Joined 14y ago
    Offline
    269 points Ranked 60,589th
    6 medals 1 rare
    • 6 years a member Medal icon
    • One month a member Medal icon
    • 6 months a member Medal icon
    • 1 year a member Medal icon
    • 2 years a member Medal icon
    • 4 years a member Medal icon
    14y
    GJ, I've been looking for something like that for ages.
    Pretend I'm not here.
    URL to post:
  • Phant0m avatar
    Phant0m Joined 15y ago
    Offline
    2,256 points Ranked 21,537th
    14y
    How do i use it ingame?
    Gaming should not be taken too avatar
    Mantra
    Gaming should not be taken too
    URL to post:
  • Phant0m avatar
    Phant0m Joined 15y ago
    Offline
    2,256 points Ranked 21,537th
    14y
    Omg ill go donwload and then abuse with it :P
    Gaming should not be taken too avatar
    Mantra
    Gaming should not be taken too
    URL to post:
  • Mirlen avatar
    Mirlen Joined 14y ago
    Offline
    14y
    Posted by Silent Ricochet I don't like the whole idea of this. People can remove props and stuff that may provide cover or block off pathways and this would change the game drastically.
    The server operators can, yes. but it's their server and their choice to run it the way they want, nobody is forcing you to join that particular server. I'm all for flexibility for server admins to do what they want on their servers and applaud this mod.
    Geek
    URL to post:
  • Doberman avatar
    Doberman Joined 14y ago
    Offline
    256 points Ranked 61,606th
    14y
    Really nice :)
    d0g
    URL to post: