Left 4 Dead 2

Left 4 Dead 2

Left 4 Fun
Yoovy 21 Aug, 2023 @ 9:05pm
Convert to Weapon Issue
Dead Center's gun store weapons, ammo pile, and laser sights aren't replaced despite the replacements working on other spawns. I don't know how you'd find a fix for it but yeah.
< >
Showing 1-6 of 6 comments
Yoovy 21 Aug, 2023 @ 9:35pm 
While I'm at it: Laser Sights, Ammo Piles, Incendiary/Explosive Rounds (not placed) all seem to not be able to be replaced either regardless if they're in the gun store or not.

I've tried the following and it doesn't work on any map.

l4f_weapontoconvert weapon_ammo,weapon_defibrillator
l4f_weapontoconvert weapon_ammo_spawn,weapon_defibrillator
l4f_weapontoconvert upgrade,weapon_defibrillator
l4f_weapontoconvert upgrade_spawn,weapon_defibrillator
smilzo  [developer] 22 Aug, 2023 @ 3:12am 
Yes i know. Unfortunately i never managed to figure out why some items are not converted. The l4f_weapontoconvert uses the ConvertWeaponSpawn Director hook, so probably it has something to do with they way such items are placed on the map that aren't seen by the director or something like that. Idk honestly.
Yoovy 25 Aug, 2023 @ 8:12pm 
Originally posted by smilzo:
Yes i know. Unfortunately i never managed to figure out why some items are not converted. The l4f_weapontoconvert uses the ConvertWeaponSpawn Director hook, so probably it has something to do with they way such items are placed on the map that aren't seen by the director or something like that. Idk honestly.

After working on actual mutations it needs this:

function OnGameEvent_round_start_post_nav( params ) { foreach( wep, val in DirectorOptions.weaponsToConvert ) { for ( local wep_spawner; wep_spawner = Entities.FindByClassname( wep_spawner, wep + "_spawn" ); ) { local spawnTable = { origin = wep_spawner.GetOrigin(), angles = wep_spawner.GetAngles().ToKVString(), targetname = wep_spawner.GetName(), count = NetProps.GetPropInt( wep_spawner, "m_itemCount" ), spawnflags = NetProps.GetPropInt( wep_spawner, "m_spawnflags" ) } wep_spawner.Kill(); SpawnEntityFromTable(val, spawnTable); } } }

I don't know what you can do with this information but it's what I figured out.
Last edited by Yoovy; 25 Aug, 2023 @ 8:12pm
CtrlAltCuteness 23 Feb, 2024 @ 10:43am 
This will replace all defibs with first aid kits. Without these two cvars I also supplied, you will still find defibs lying around.

In your mod:
director_defibrillator_density 0 director_convert_pills_to_defib_health 0 l4f_weapontoconvert defibrillator,first_aid_kit // -- utilizing L4F money system -- l4f_money true l4f_money_hud false l4f_money_reset true l4f_money_replacepickups true
In file: money/pickupstoreplace.txt
weapon_defibrillator = 0 weapon_defibrillator_spawn = 0
Last edited by CtrlAltCuteness; 23 Feb, 2024 @ 10:49am
Yoovy 23 Feb, 2024 @ 12:17pm 
Oh this isn't relevant for me anymore, I just decided to make my own Mutations, but thanks anyways. :steamthumbsup:
CtrlAltCuteness 23 Feb, 2024 @ 1:32pm 
Originally posted by Yoovy:
Oh this isn't relevant for me anymore, I just decided to make my own Mutations, but thanks anyways. :steamthumbsup:
I totally understand. I was adding what I knew worked for anyone looking at this post these days.
< >
Showing 1-6 of 6 comments
Per page: 1530 50