Left 4 Dead 2

Left 4 Dead 2

27 ratings
Item Conversion (Vscript)
   
Award
Favorite
Favorited
Unfavorite
Game Content: Scripts, Miscellaneous
Game Modes: Single Player, Co-op
File Size
Posted
Updated
30.617 KB
21 Mar, 2024 @ 5:44am
8 Apr, 2024 @ 5:08am
3 Change Notes ( view )

Subscribe to download
Item Conversion (Vscript)

In 1 collection by kurochama
Useful "Side-Dish" Mods (Especially for Bots)
46 items
Description
I think everyone is familiar with this feature. Yes, this feature is often used on mutation modes. & probably some questions pop up, like?
"What makes it different from that on mutation modes?"
"Why did you make this mod when it's already available on mutation modes?"

Well, there are few differences on this mod, like for example, item conversion can be used during play without having to wait until the next round by modifying the cfg file. Another difference is, this mod can also convert junk items to weapons/ usable items (junk items = plastic chairs, tables etc). & this mod can be used on any modes, as long as the modes allow vscript mods (you'll need to host a local server, or the server needs to have this installed).

Ok, let's start from the available files in "ems" folder.
List of available files in "ems" folder:
  1. "- (important info, read first) how to register items on cfg files.txt": This contains some guides to configure the "item conversion.txt". Remember to read this first, at least only on the first point as the first point contains the list of item model names for weapons & usable items.

  2. "item conversion.txt": It contains names of item models to convert & what items will convert the listed item models.

Here are some simple mechanisms & guides of how it works:
  • In "item conversion.txt" cfg file, you'll see default contents like this:
    pistol = weapon_pistol_magnum_spawn sniper_scout = weapon_hunting_rifle_spawn awp = weapon_hunting_rifle_spawn
  • Texts in the front represent item model name. You can write this in full name (examples:"w_sniper_scout.mdl", "w_pumpshotgun_A.mdl"), or just few parts of its model name (examples: "desert_eagle" or just "_eagle" instead of the full name "w_desert_eagle.mdl", "ak47" instead of "w_rifle_ak47.mdl").

  • Texts in the front can use any item models, not limited only on weapons/ usable items (examples: if you write "round_table" or "plastic_chair", that item will be converted into either weapon/ usable item). But to avoid problems/ bugs, only convert movable objects & try not to convert static objects.

  • Texts in the back after equal symbol represent the weapon/ item spawn classname. The weapon/ item spawn classname must use "_spawn", just like the examples on the default texts. Otherwise, they will be bugged.

  • Texts in the back can only spawn weapons & usable items, but can't be used to spawn carriable items (propane tank, gascan, gnome, cola etc). If you write carriable items there, they will be bugged.

  • Special case for texts in the back, "upgrade_spawn" can't be registered there so you can't spawn laser upgrade. But you can spawn upgrade ammo packs (incendiary/ explosive) as they have "_spawn" classnames.

  • Item Conversion is triggered automatically in the beginning of each round, & there's a clientprint notification for that.

  • Item Conversion can also be triggered during play by pressing "TAB + R" (reloading by holding TAB button). This alternative method will trigger "Item Conversion" in 1 second after reloading.

  • There's an alternative method to trigger Item Conversion immediately. In case if the Item Conversion notification takes too long to appear, you can trigger the conversion process immediately by shoving any objects with classname or movable medium/ big objects (examples: Weapons, medkits, pills, ammo, saferoom door, normal doors, common infected, some tables & chairs can trigger the conversion process when shoved. But small objects like bottles, small boxes etc that you can walk through can't trigger it).

  • The replaced item only has 1 pcs/ count.

Bonus Features:
  1. A chat command to detect model name: Type "check entity model" while pointing your crosshair to an object to detect the object's model name.
  2. Special Shove Mechanism to detect model name: Press "TAB + CTRL + SHOVE" & shove an object to detect the object's model name.

Q: Can this mod remove certain items?
A: No, at least for now. Alternatively, you can convert certain items to some less powerful/ useful weapons/ items instead, like changing them to pistols, adrenaline shot, or random melee.

Q: Can I convert gascans, propane tanks & oxygen tanks?
A: Yes, you can. But don't do that on campaigns with scavenge finale or campaigns that have gascan, propane tank or oxygen tank model on certain events to burn/ destroy barricades by shooting the packed gascans/ propane tanks.So to play safe, don't convert these items.

So, with this mod, you don't have to play certain mutation modes in order to convert some items.

Notes:
  • If a bug happens, let me know along with the details of when this happens & what items you try to convert before this happens. But as long as you write the correct format, bug won't be triggered).
  • It's not recommended to convert carriable items as some campaigns use them for certain events. & avoid converting static objects (static objects are detected as map name when using the chat command feature above), as it might trigger a bug as I haven't tested it yet.
    Popular Discussions View All (1)
    0
    27 Jun, 2024 @ 11:32am
    What are the prop names for the frying pan props
    I STAPLE TAPEWORMS ON MY
    26 Comments
    Mowetern 19 Jul @ 11:00pm 
    @kurochama thank you!!
    kurochama  [author] 17 Jul @ 7:11am 
    @Mowetern , play Singleplayer or host a local server with this mod first. The cfg file is created after playing with this mod for the first time.
    Mowetern 17 Jul @ 2:36am 
    I'm a year too late but may i ask, i cant find the item conversion.txt in the ems folder
    kurochama  [author] 5 Nov, 2024 @ 10:31pm 
    @Léa ♥ , no problem. Feel free to put anything on forum if you want some helps. Usually some modders will also show up to help there.
    Dvpweb (FR) 5 Nov, 2024 @ 10:10pm 
    @kurochama Thanks for your help on the forum!!
    kurochama  [author] 5 Nov, 2024 @ 2:33am 
    @Léa ♥ , if you make a timer to replace every second, then probably that "ReplaceItem" function would be what you need.
    kurochama  [author] 5 Nov, 2024 @ 2:31am 
    @Léa ♥ , if you want to check the scripts, search something named "ConvertItem". You'll find a function named "ReplaceItem". That function is the one to spawn item & at the same time remove the existing item/ object.
    Dvpweb (FR) 5 Nov, 2024 @ 2:25am 
    @kurochama Thanks for your quick reply. I'm trying to make a simple script that replaces every second, but it doesn't seem to work. I'll dig deeper ^^
    kurochama  [author] 5 Nov, 2024 @ 1:52am 
    @Léa ♥ , I think it should be possible, if you add tank & jockey model into the "item conversion.txt". But, you might need to press "TAB + RELOAD" & then wait for 1-2 seconds each time tank or jockey shows up to convert them manually, as the item conversion normally only converts items in the beginning of map. "TAB + RELOAD" is a manual conversion method in case if you change the item list on the cfg file & want to convert items again right away.
    Dvpweb (FR) 5 Nov, 2024 @ 1:22am 
    Hello. Can I replace the jockeys with tanks with this addon? If so, how? Thank you