Info .txt scripts can be found in your games \left4dead2\pak01_dir.vpk, navigate to /missions/, /scripts/ and /scripts/melee/ folders.
Weapon Info examples can be found in the "weapon_*" .txt files in the /scripts/ folder.
The provided configs do not show all possible key values to edit, you'll have to search the internet.
Some key values will have no affect since they are client side.
Plugin version convar l4d_info_editor_version.
Please share your changes or configs with others.
Mission Info: Features: (saved to \sourcemod\data\l4d_info_editor_mission.cfg)
Add female Boomers
Change tank model
Boss spawning chance per chapter
Specify melee weapons allowed (replaces Melee Spawn Control extension)
Automatically adds 3rd party melee weapons on maps that provide.
+ more
Weapon Info: Features: (saved to \sourcemod\data\l4d_info_editor_weapons.cfg)
Change shooting sounds and first person view models
Change damage value, damage type, reload time, clip size and various values for each weapon
Possibly replace infected team claws with guns and vice versa?
Possibly allow bots to pickup and use chainsaws (currently untested)
(requires extra vscripts not provided here, search for the Chainsaw Bots VPK addon)
+ more
Game Mode overrides:
The plugin will attempt to load "l4d_info_editor_weapons.versus.cfg" or other game mode named config. If that file does not exist it will load the default "l4d_info_editor_weapons.cfg" data config file.
When loading the default "l4d_info_editor_weapons.cfg" file, if it contains it's own "versus" or other game mode sections they will overwrite any duplicate data already read from the "all" or map specific sections, unless the map specific section is placed after the game mode specific section.
This also applies to the "l4d_info_editor_mission.cfg" data config.
Works for all game modes, any value the "mp_gamemode" cvar accepts.
Natives and Forwards for developers:
Spoiler
PHP Code:
/**
* Retrieves the value of a specified key from the games mission info keyvalue system. "N/A" is returned when not found.
*
* @param pThis Enter the pThis value from OnGetMissionInfo/OnGetWeaponsInfo. Can specify 0 when reading Mission data.
* @param keyname Key name to check.
* @param dest Destination string buffer to copy to.
* @param destLen Destination buffer length (includes null terminator).
*
* @noreturn
*/
native void InfoEditor_GetString(int pThis, const char[] keyname, char[] dest, int destLen);
/**
* Sets the value of a specified key from the games mission info keyvalue system.
*
* @param pThis Enter the pThis value from OnGetMissionInfo/OnGetWeaponsInfo. Can specify 0 when writing Mission data.
* @param keyname Key name to set.
* @param value Value to set.
* @param create Optionally create the keyvalue if it doesn't exist.
*
* @noreturn
*/
native void InfoEditor_SetString(int pThis, const char[] keyname, const char[] value, bool create = false);
/**
* Reloads the mission and weapons data configs and forces the game to reload them.
*
* @noreturn
*/
native void InfoEditor_ReloadData();
/**
* @brief Fired multiple times when the mission info data is parsed.
*
* @param pThis This pointer used for InfoEditor_GetString/InfoEditor_SetString.
*/
forward void OnGetMissionInfo(int pThis);
/**
* Fired multiple times when the weapon info data is parsed for a specific weapon classname.
*
* @param pThis This pointer used for InfoEditor_GetString/InfoEditor_SetString.
* @param classname Classname of the weapon being parsed.
*/
forward void OnGetWeaponsInfo(int pThis, const char[] classname);
Admin Commands: (requires "z" flag)
PHP Code:
sm_info_weapons_list // Show weapons config tree of modified data for this map.
sm_info_mission_list // Show mission config tree of modified data for this map.
sm_info_mission // Get or set the value of a mission keyname. Usage: sm_info_mission <keyname> [value].
sm_info_reload // Reloads the mission and weapons configs. Weapons info data is re-parsed allowing changes to be made live without changing level.
sm_info_melee // (L4D2 only) Lists the maps current melee weapons allowed and report any issues.
Thanks:
Lux
Dragokas
Crasher_3637
JKing
Iizuka07
Yabi
ProjectSky
Mi.Cura
Changes:
Code:
1.26 (15-May-2024)
- Updated L4D2 GameData for the 2.2.3.8 game update.
1.25 (07-Nov-2023)
- Fixed missing "data/l4d_info_editor_mission.cfg" config in the archive. Thanks to "HarryPotter" for reporting.
1.25 (25-Oct-2023)
- Test plugins will now throw an error if running, to notify server owners they should only be used for testing and as an example.
1.24 (19-Sep-2023)
- Update for L4D2:
- Fixed not precaching the Knife model. Thanks to "S.A.S" for reporting.
- Fixed not loading melee weapons on some 3rd party maps that are missing the "meleeweapons" key value. Thanks to "Iizuka07" for reporting.
1.23 (10-Sep-2023)
- Fixed mistake with the last update not reading the weapons config. Thanks to "ProjectSky" for reporting.
1.22 (10-Sep-2023)
- Fixed not loading the map specific sections. Thanks to "KadabraZz" for reporting.
- The config data load order slightly changed:
- 1. Attempt to load "all" section.
- 2. Attempt to load custom maps section.
- 3. Attempt to load game mode specific configs.
- 4. Attempt to load game mode specific sections within a config.
- 5. Game mode specific sections can be overwritten by map specific sections when the map specific section is below the game mode specific section.
- The default config files have been cleaned up, and example config files provided instead.
1.21 (09-Sep-2023)
- Update for L4D2 to precache melee weapon models to prevent crashes. Wrongly was OnMapEnd instead of OnMapStart.
1.20 (05-Sep-2023)
- Update for L4D2 to precache melee weapon models to prevent crashes. Thanks to "S.A.S" for reporting.
1.19 (16-Dec-2022)
- Fixed not loading melee weapons on certain maps under certain conditions. Thanks to "Mi.Cura" for reporting.
- Feature added: plugin can load mode specific sections that overwrite previous data loaded from the "l4d_info_editor_mission.cfg" config. Requested by "ProjectSky".
- Feature added: plugin can load mode specific configs, e.g. "l4d_info_editor_mission.versus.cfg" or "l4d_info_editor_mission.mutation3.cfg" for "Versus" or "Bleedout" modes etc.
- These features also apply to the "l4d_info_editor_weapons.cfg" data config.
1.18 (15-Dec-2022)
- Fixed duplicating custom melee weapons in the mission keyvalue string. Thanks to "ProjectSky" for reporting.
- Fixed not loading melee weapons if the "Info Editor" config is missing a "meleeweapons" key to use.
1.17 (12-Dec-2022)
- Forgot to turn off debug printing values.
1.16 (11-Dec-2022)
- Fixed error in command "sm_info_melee" causing it to not display everything correctly.
1.15 (11-Dec-2022)
- L4D2: Now supports 3rd party melee weapons where the mission.txt file does not contain a "meleeweapons" key. Thanks to "Yabi" for reporting and testing.
- L4D2: Added command "sm_info_melee" to list the maps currently allowed melee weapons and report any issues.
- L4D2: GameData file has updated to support these changes.
1.14 (21-Oct-2022)
- Fixed plugins not loading with the updated include file.
- Include file updated.
1.13 (20-Oct-2022)
- L4D2: Plugin now prevents setting over 16 melee weapons. Thanks to "gabuch2" for reporting.
- Compiled .smx plugin is now compiled with SourceMod version 1.11.
1.12 (01-Oct-2020)
- Fixed not properly adding both melee weapons causing potential issues.
1.11 (24-Sep-2020)
- Compatibility update for L4D2's "The Last Stand" update.
- Added support for the 2 new melee weapons.
- GameData .txt file updated.
1.10 (02-Jul-2020)
- Fixed not always loading the correct map section data in the config for the current map.
- Fixed not adding 3rd party melee weapons on all 3rd party maps. Thanks to "Shao" for reporting.
1.9 (10-May-2020)
- Added better error log message when gamedata file is missing.
- Now supports setting strings to "" when using the "InfoEditor_SetString" native.
- Various changes to tidy up code.
- Various optimizations and fixes.
1.8 (29-Apr-2020)
- Changed "InfoEditor_GetString" and "InfoEditor_SetString" natives to not require the mission pointer.
- Specifying 0 when calling will make Info Editor use the last known mission pointer value.
- A valid pointer will still be required to read weapons data.
1.7 (12-Apr-2020)
- Fixed breaking some melee entries when adding 3rd party melee names containing similar classnames.
- Thanks to "Marttt" for reporting.
1.6 (10-Apr-2020)
- Added support to match multiple map names using comma separation in the data configs, as requested by "Lux".
- Added "clip_size", "ReloadDuration", "CycleTime", "Damage", "Range" and "RangeModifier" to "l4d_info_editor_weapons.cfg" config.
- Values shown are default from L4D2 weapon scripts.
- Fixed not creating keys for weapons and accidentally creating them on the mission file instead.
1.5 (01-Apr-2020)
- Changed command block to allow listen servers to operate the reload command.
- Changed .inc file to remove args from copy paste error of "InfoEditor_ReloadData" native.
1.4 (18-Mar-2020)
- Added native "InfoEditor_ReloadData" for external plugins to reload the mission and weapon configs.
- Fixed crashing with "CTerrorWeaponInfo::Reload" error. Finally!
1.3 (25-Feb-2020)
- Now dynamically generates "meleeweapons" string for any map using custom melee weapons.
- Set the string to the default game weapons you want to include, and the custom ones will be added.
- Mission config "l4d_info_editor_mission.cfg" updated with changes for "Helms Deep" map.
1.2 (17-Sep-2019)
- No longer removing cheat flags from "sb_all_bot_game" command, was never deleted from testing.
1.1.1a (25-Aug-2019) re-upload
- Added "helms_deep" section in the mission config to enable all melee weapons on that map.
1.1.1 (09-Jun-2019)
- Added FORCE_VALUES define to force create missing keys.
- Slightly optimized fixing single line mistake.
- Slight code cleaning.
1.1 (01-Jun-2019)
- Fixed reading incorrect data for map specific sections.
- Added support to load map specific weapon and melee data.
- Added commands to display mission and weapon changes applied to the current map.
- Added a command to get and set keyname values from the mission info.
- Added a command to reload the mission and weapons configs. Live changes can be made!
- Added natives to read and write mission and weapon data from third party plugins.
- Added test plugin to demonstrate natives and forwards for developers.
- Gamedata .txt changed.
1.0 (10-Sep-2018)
- Initial release.
Custom melee weapons are automatically added on top of your "meleeweapons" string from the "all" or map section.
Maximum 16 melee weapons so create a section for that map and omit some default melee weapons if the maps custom + default melee weapons exceed the limit.