I don't see spread in the example config provided so maybe it doesn't work with this method, although lots of other keyvalues are missing too. I would suggest making a plugin using left4dhooks to modify spread, I remember it was working with that.
Yes, I noticed that l4d2_weapon_attributes can be modified via dhook,I modified with it and got these in the console,I modified it with this plugin and showed success in the console, but the game did not take effect, the funny is:When I uploaded the VPK while installing these two plugins, and carried the VPK into the game, the "spread" modification succeeded, and I felt that there was some setting on my server that blocked it.
Sorry for the late reply, but I found out how to change the viewmodels and such. The only issue I have now is editing the sound. I have it formatted as
Sorry for the late reply, but I found out how to change the viewmodels and such. The only issue I have now is editing the sound. I have it formatted as
Hey silver, I found out after several modifications,The accuracy of the weapons on my server depends entirely on the first player to enter the server,even if I don't modify any data on the server, as long as that player modifies his "Spread" data, it can affect the entire server, Perhaps this is a bug from the server,Have you ever seen a similar error?
Hey silver, I found out after several modifications,The accuracy of the weapons on my server depends entirely on the first player to enter the server,even if I don't modify any data on the server, as long as that player modifies his "Spread" data, it can affect the entire server, Perhaps this is a bug from the server,Have you ever seen a similar error?
How are you modifying it? Both Info Editor and Left4DHooks methods are global, affecting all players, you would have to set it before each shot if you wanted it player specific.
It's my fault, I think I know why, it's just a visual effect, when you change the local "Spread", you get the corresponding shooting visual, which does not actually affect the bullet hit.
It's my fault, I think I know why, it's just a visual effect, when you change the local "Spread", you get the corresponding shooting visual, which does not actually affect the bullet hit.
If you change server side "spread" values, client will see impact decals as usual yet, as if nothing had changed, while in fact spread changed... To fix this, client and server both should have the modified script.
I want to report a bug, which makes my model wrong in some three-party maps, the details are as follows:
ALL my cfg is default, I just installed it and never changed them.
l4d_info_editor_mission.cfg
Spoiler
Code:
// These examples are from L4D2. Extract the mission.txt and weapon.txt files from your games VPK archives to find keynames and what's possible.
"mission_info"
{
// The "all" section must be above map specific sections. Any partial matching map names will overwrite duplicate data from the "all" section.
"all"
{
// Allowed melee weapons for all maps - Replaces: [EXTENSION] [L4D2] Melee Spawn Control https://forums.alliedmods.net/showthread.php?t=222535
"meleeweapons" "fireaxe;frying_pan;machete;baseball_bat;crowbar;cricket_bat;tonfa;katana;electric_guitar;knife;golfclub;pitchfork;shovel"
// Can't have female Boomers because there's no audio support
// WORKS
// "no_female_boomers" "0"
// no Germany / CS weapons, preserve the weapons in the gun shop
// Doesn't work. Use Crimson_Fox's the [L4D2] Weapon Unlock plugin instead: https://forums.alliedmods.net/showthread.php?t=114296
// "no_cs_weapons" "0"
// Which set of survivors should be used. 1=L4D1, 2=L4D2
// Works but shows incorrect names above head. Use Lux's Character Manager: https://forums.alliedmods.net/showthread.php?t=309601
// "survivor_set" "1"
// Tank model in coop and versus
// WORKING
// "modes/coop/1/TankVariant" "models/infected/hulk_dlc3.mdl"
// "modes/coop/2/TankVariant" "models/infected/hulk_dlc3.mdl"
// "modes/coop/3/TankVariant" "models/infected/hulk_dlc3.mdl"
// "modes/coop/4/TankVariant" "models/infected/hulk_dlc3.mdl"
// "modes/coop/5/TankVariant" "models/infected/hulk_dlc3.mdl"
// "modes/versus/1/TankVariant" "models/infected/hulk_dlc3.mdl"
// "modes/versus/2/TankVariant" "models/infected/hulk_dlc3.mdl"
// "modes/versus/3/TankVariant" "models/infected/hulk_dlc3.mdl"
// "modes/versus/4/TankVariant" "models/infected/hulk_dlc3.mdl"
// "modes/versus/5/TankVariant" "models/infected/hulk_dlc3.mdl"
// Versus round score
// ERROR: HAS NO AFFECT
// "modes/versus/1/VersusCompletionScore" "1400"
// "modes/versus/2/VersusCompletionScore" "1500"
// "modes/versus/3/VersusCompletionScore" "1600"
// "modes/versus/4/VersusCompletionScore" "1700"
// "modes/versus/5/VersusCompletionScore" "1800"
// Versus stuff - untested
// https://developer.valvesoftware.com/wiki/L4D2_Level_Design/Boss_Prohibition
// Numbers relate to chapter, 1,2,3,4,5 and more for some custom maps
// "modes/versus/1/versus_boss_spawning/spawn_pos_min" "0.50" // Flow distance
// "modes/versus/1/versus_boss_spawning/spawn_pos_max" "1.0" // Flow distance
// "modes/versus/1/versus_boss_spawning/tank_chance" "0" // 1.0 = Full chance.
// "modes/versus/1/versus_boss_spawning/witch_chance" "0.6" // 1.0 = Full chance.
// "modes/versus/1/versus_boss_spawning/witch_and_tank" "0" // Can both spawn on the same map
// "modes/versus/1/versus_boss_spawning/spawn_pos_min" "0.50"
// "modes/versus/1/versus_boss_spawning/spawn_pos_max" "1.0"
// "modes/coop/1/coop_boss_spawning/tank_chance" "0"
// "modes/coop/1/coop_boss_spawning/witch_chance" "0.6"
// "modes/coop/1/coop_boss_spawning/witch_and_tank" "0"
// Various - untested
// "allow_cola" "1"
// "allow_diesel" "1"
// ERROR: HAS NO AFFECT
// "l4d2_names" "0"
// "character_order" "biker;namvet;teengirl;manager"
}
// Supporting the addition of custom melee weapons.
// You only need to set the default weapons you want for Helms Deep, the maps own melee weapons will be automatically added.
"helms_deep"
{
// Helms Deep has 6 melee weapons. The total maximum allowed is 16. So we have to remove some from the default list, I omitted: "electric_guitar;cricket_bat;shovel"
// "small_knife;helms_sword_and_shield;helms_hatchet;helms_sting;helms_anduril;helms_orcrist"
"meleeweapons" "fireaxe;frying_pan;machete;baseball_bat;crowbar;tonfa;katana;knife;golfclub;pitchfork"
}
// ====================================================================================================
// Partial map name matching
// ====================================================================================================
// Supports matching partial map names, or multiple map names using comma separation
/*
// Matches all chapters from Dead Center.
"c1m"
{
}
// Matches "c1m3_mall" (Dead Center - Mall chapter)
"c1m3"
{
}
// Matches "c1m2_streets" and "c1m3_mall" maps
"c1m2,c1m3"
{
}
// Matches L4D1 - No Mercy campaign
"l4d_hospital"
{
}
// */
// ====================================================================================================
// Game mode specific
// ====================================================================================================
// SUpports loading game mode specific sections matching the mp_gamemode cvar value, these will overwrite duplicate data loaded from the "all" or map specific sections
// The game mode must be set before the map ends or loads
// /*
/*
"coop"
{
}
"versus"
{
}
// */
}
l4d_info_editor_weapons.cfg
Spoiler
Code:
// These examples are from L4D2. Extract the mission.txt and weapon.txt files from your games VPK archives to find keynames and what's possible.
"weapon_info"
{
// The "all" section must be above map specific sections. Any partial matching map names will overwrite duplicate data from the "all" section.
"all"
{
// ====================================================================================================
// MELEE WEAPONS DATA EDITING
// ====================================================================================================
/*
// Makes the knife ignite zombies with fire instead of using the default damage type of "4" - slash.
"knife"
{
"damage_flags" "8"
}
"fireaxe"
{
}
"frying_pan"
{
}
"machete"
{
}
"baseball_bat"
{
}
"crowbar"
{
}
"cricket_bat"
{
}
"tonfa"
{
}
"katana"
{
}
"electric_guitar"
{
}
"golfclub"
{
}
"pitchfork"
{
}
"shovel"
{
}
// */
// ====================================================================================================
// WEAPONS DATA EDITING
// ====================================================================================================
/* Ammo count example:
"weapon_pistol"
{
"clip_size" "20"
}
"weapon_pistol_magnum"
{
"clip_size" "10"
}
// */
// ====================================================================================================
// L4D2 DATA:
// ====================================================================================================
// Games default values are shown.
// Clip size, reload duration, interval between shots, damage, damage range and damage range drop off.
// The key "ReloadDuration" is missing from many weapons, the game uses "2.0" as default value (it seems).
/*
// Melee:
"weapon_chainsaw"
{
"clip_size" "30"
"ReloadDuration" "2.0"
"CycleTime" "0.175"
"Damage" "36"
}
"weapon_melee"
{
"ReloadDuration" "2.0"
"CycleTime" "0.175"
"Damage" "36"
}
// Pistols:
"weapon_pistol"
{
"clip_size" "15"
"ReloadDuration" "2.0"
"CycleTime" "0.175"
"Damage" "36"
"Range" "2500"
"RangeModifier" "0.75"
}
"weapon_pistol_magnum"
{
"clip_size" "8"
"ReloadDuration" "2.0"
"CycleTime" "0.3"
"Damage" "80"
"Range" "3500"
"RangeModifier" "0.75"
}
// Shotguns:
"weapon_autoshotgun"
{
"clip_size" "10"
"ReloadDuration" "0.396"
"CycleTime" "0.15"
"Damage" "23"
"Range" "3000"
"RangeModifier" "0.7"
}
"weapon_pumpshotgun"
{
"clip_size" "8"
"ReloadDuration" "0.473"
"CycleTime" "0.5"
"Damage" "25"
"Range" "3000"
"RangeModifier" "0.7"
}
"weapon_shotgun_chrome"
{
"clip_size" "8"
"ReloadDuration" "0.473"
"CycleTime" "0.5"
"Damage" "31"
"Range" "3000"
"RangeModifier" "0.7"
}
"weapon_shotgun_spas"
{
"clip_size" "10"
"ReloadDuration" "0.396"
"CycleTime" "0.15"
"Damage" "28"
"Range" "3000"
"RangeModifier" "0.7"
}
// SMG:
"weapon_smg"
{
"clip_size" "50"
"ReloadDuration" "1.5"
"CycleTime" "0.0625"
"Damage" "20"
"Range" "2500"
"RangeModifier" "0.84"
}
"weapon_smg_mp5"
{
"clip_size" "50"
"ReloadDuration" "2.0"
"CycleTime" "0.075"
"Damage" "24"
"Range" "2500"
"RangeModifier" "0.84"
}
"weapon_smg_silenced"
{
"clip_size" "50"
"ReloadDuration" "2.0"
"CycleTime" "0.0625"
"Damage" "25"
"GainRange" "900"
"Range" "2200"
}
// Rifles:
"weapon_rifle"
{
"clip_size" "50"
"ReloadDuration" "2.0"
"CycleTime" "0.0875"
"Damage" "33"
"Range" "3000"
"RangeModifier" "0.97"
}
"weapon_rifle_ak47"
{
"clip_size" "40"
"ReloadDuration" "2.0"
"CycleTime" "0.13"
"Damage" "58"
"Range" "3000"
"RangeModifier" "0.97"
}
"weapon_rifle_desert"
{
"clip_size" "60"
"ReloadDuration" "2.0"
"CycleTime" "0.07"
"Damage" "44"
"Range" "3000"
"RangeModifier" "0.97"
}
"weapon_rifle_sg552"
{
"clip_size" "50"
"ReloadDuration" "2.0"
"CycleTime" "0.0825"
"Damage" "33"
"Range" "3000"
"RangeModifier" "0.97"
}
// Snipers:
"weapon_hunting_rifle"
{
"clip_size" "15"
"ReloadDuration" "2.0"
"CycleTime" "0.25"
"Damage" "90"
"Range" "8192"
"RangeModifier" "1.0"
}
"weapon_sniper_awp"
{
"clip_size" "20"
"ReloadDuration" "2.0"
"CycleTime" "1.05"
"Damage" "115"
"Range" "8192"
"RangeModifier" "1.0"
}
"weapon_sniper_military"
{
"clip_size" "30"
"ReloadDuration" "2.0"
"CycleTime" "0.25"
"Damage" "90"
"Range" "8192"
"RangeModifier" "1.0"
}
"weapon_sniper_scout"
{
"clip_size" "15"
"ReloadDuration" "2.0"
"CycleTime" "0.9"
"Damage" "90"
"Range" "8192"
"RangeModifier" "1.0"
}
// Big guns:
"weapon_grenade_launcher"
{
"clip_size" "1"
"ReloadDuration" "-1"
"CycleTime" "0.5"
"Damage" "33"
"Range" "3000"
"RangeModifier" "0.97"
}
"weapon_rifle_m60"
{
"clip_size" "150"
"ReloadDuration" "2.0"
"CycleTime" "0.11"
}
// */
// ====================================================================================================
// CHAINSAW BOTS:
// ====================================================================================================
// Requirements: Chainsaw vScripts needs to be added?
// Allow bots to carry and use chainsaws? Untested.
/*
"weapon_chainsaw"
{
"WeaponType" "pistol"
"Tier" "2" // valid entries are 0, 1, 2
"primary_ammo" "None"
"secondary_ammo" "AMMO_TYPE_CHAINSAW"
// Not required?
"CharacterViewmodelAddon/Manager" "models/weapons/arms/v_arms_louis.mdl"
"CharacterViewmodelAddon/Biker" "models/weapons/arms/v_arms_francis.mdl"
"CharacterViewmodelAddon/TeenGirl" "models/weapons/arms/v_arms_zoey.mdl"
"CharacterViewmodelAddon/NamVet" "models/weapons/arms/v_arms_bill.mdl"
}
// */
}
// ====================================================================================================
// Partial map name matching
// ====================================================================================================
// Supports matching partial map names, or multiple map names using comma separation
/* // This line is commenting out this section, shown here for an example. Remove this line to use this section
// Matches all chapters from Dead Center.
"c1m"
{
}
// Matches "c1m3_mall" (Dead Center - Mall chapter)
"c1m3"
{
}
// Matches "c1m2_streets" and "c1m3_mall" maps
"c1m2,c1m3"
{
}
// Matches L4D1 - No Mercy campaign
"l4d_hospital"
{
}
// */
// ====================================================================================================
// Game mode specific
// ====================================================================================================
// SUpports loading game mode specific sections matching the mp_gamemode cvar value, these will overwrite duplicate data loaded from the "all" or map specific sections
// The game mode must be set before the map ends or loads
/*
"coop"
{
"weapon_rifle"
{
"clip_size" "75"
}
}
"versus"
{
"weapon_rifle"
{
"clip_size" "55"
}
}
// */
}
And I can create them by other plugin:
Please see the attachment for details: PIC4.
And at the same time, the console of the client will frantically list errors like this:
Code:
Material models/error/new light1 has bad reference count -254 when being bound
Material models/error/new light1 has bad reference count -254 when being bound
Material models/error/new light1 has bad reference count -254 when being bound
Material models/error/new light1 has bad reference count -254 when being bound
Material models/error/new light1 has bad reference count -254 when being bound
Material models/error/new light1 has bad reference count -254 when being bound
Material models/error/new light1 has bad reference count -254 when being bound
Material models/error/new light1 has bad reference count -254 when being bound
Please see the attachment for details: PIC2.
MAP2
And when I play another third-party map, strange thing happened, I was able to generate another map's melee weapons which does not exist at all in this map.
Map:https://steamcommunity.com/sharedfil...?id=1817763184.
Please see the attachment for details: PIC3.
And when I create those melees, it comes out with ERROR model, and use the animation of their own map's animation.