Raised This Month: $12 Target: $400
 3% 

What are the L4D2 Reload Speed Values?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
FruityGum
Junior Member
Join Date: Aug 2022
Old 08-05-2022 , 11:23   What are the L4D2 Reload Speed Values?
Reply With Quote #1

I want to compare the reload speed of all the guns in Left 4 Dead 2, but do not have the know-how to obtain this data.

My L4D2 modding ability is limited to Hammer and simple addons that change weapon script files. These script files do not list any information about the reload speed of non-shotgun weapons, which is why I am asking if someone may kindly provide me with this data.

I checked to see if this topic was asked before, but I could not find it. If this was asked before, my apologies.
FruityGum is offline
Marttt
Veteran Member
Join Date: Jan 2019
Location: Brazil
Old 08-05-2022 , 11:38   Re: What are the L4D2 Reload Speed Values?
Reply With Quote #2

You can try outputting the information with https://forums.alliedmods.net/showthread.php?t=319947
__________________
Marttt is offline
FruityGum
Junior Member
Join Date: Aug 2022
Old 08-05-2022 , 11:58   Re: What are the L4D2 Reload Speed Values?
Reply With Quote #3

I downloaded it, and searched all contained files for reload data. I looked over files myself then again with a find tool set for the word "Reload", and couldn't find what I needed. It has values to set a reload modifier, but nothing that lists the actual reload speed for weapons.
FruityGum is offline
Silvers
SourceMod Plugin Approver
Join Date: Aug 2010
Location: SpaceX
Old 08-05-2022 , 13:25   Re: What are the L4D2 Reload Speed Values?
Reply With Quote #4

You can find them in the Mission and Weapons - Info Editor weapons config.
__________________
Silvers is offline
FruityGum
Junior Member
Join Date: Aug 2022
Old 08-05-2022 , 14:33   Re: What are the L4D2 Reload Speed Values?
Reply With Quote #5

Assuming these values are accurate, then I have found what I was looking for. Thank you kindly for your assistance.

I am somewhat tentative of the validity of these values, as it lists all assault rifles and sniper/hunting rifles as having an identical reload speed of 2.0 seconds, as well as the SMG reloading 0.5 seconds faster than the Silenced SMG and MP5.

Last edited by FruityGum; 08-05-2022 at 14:42.
FruityGum is offline
Silvers
SourceMod Plugin Approver
Join Date: Aug 2010
Location: SpaceX
Old 08-05-2022 , 14:46   Re: What are the L4D2 Reload Speed Values?
Reply With Quote #6

The forum thread and weapons config explains how to find the files to extract their values.
__________________

Last edited by Silvers; 08-05-2022 at 14:47.
Silvers is offline
FruityGum
Junior Member
Join Date: Aug 2022
Old 08-05-2022 , 14:54   Re: What are the L4D2 Reload Speed Values?
Reply With Quote #7

Are you referring to this line?

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.


I've been messing with those files before I posted, and with the exception of the shotguns, there is no line that lists the reload speed.

Last edited by FruityGum; 08-05-2022 at 14:57.
FruityGum is offline
BRU7US
Member
Join Date: Jul 2020
Location: Tatarstan, Kazan
Old 08-05-2022 , 15:14   Re: What are the L4D2 Reload Speed Values?
Reply With Quote #8

Maybe this will help you better, idk...

Code:
int g_iNextPAttO = FindSendPropInfo("CBaseCombatWeapon","m_flNextPrimaryAttack");
float flGameTime = GetGameTime();
float flNextTime_ret = GetEntDataFloat(weaponID, g_iNextPAttO); //weaponID - entityID of your weapon, g_iNextPAttO - value of "m_flNextPrimaryAttack" prop.
float flNextTime_calc;
flNextTime_calc = (flNextTime_ret - flGameTime) * 0.900 //(0.900 as I remember is a default value of reload speed modifier).
flNextTime_calc - this will be your final value of time of your reload speed (float value).

For shotguns:

const float g_fl_AutoS = 0.666666;
const float g_fl_AutoI = 0.4;
const float g_fl_AutoE = 0.675;

const float g_fl_SpasS = 0.5;
const float g_fl_SpasI = 0.375;
const float g_fl_SpasE = 0.699999;

const float g_fl_PumpS = 0.5;
const float g_fl_PumpI = 0.5;
const float g_fl_PumpE = 0.6;

All shotguns has a 3-stage reloading (Start, Insert, End)

Autoshotgun (M1014):
Start: g_fl_AutoS * 0.900
Insert: g_fl_AutoI * 0.900
End: g_fl_AutoE * 0.900

SPAS-12:
Start: g_fl_SpasS* * 0.900
Insert: g_fl_SpasI * 0.900
End: g_fl_SpasE * 0.900

Pump / Chrome Shotguns:
Start: g_fl_PumpS* * 0.900
Insert: g_fl_PumpI * 0.900
End: g_fl_PumpE * 0.900

Last edited by BRU7US; 08-05-2022 at 15:26.
BRU7US is offline
Silvers
SourceMod Plugin Approver
Join Date: Aug 2010
Location: SpaceX
Old 08-05-2022 , 15:38   Re: What are the L4D2 Reload Speed Values?
Reply With Quote #9

Code:
The key "ReloadDuration" is missing from many weapons, the game uses "2.0" as default value (it seems).
You can time them if you want and report back the correct values.
__________________
Silvers is offline
FruityGum
Junior Member
Join Date: Aug 2022
Old 08-05-2022 , 18:12   Re: What are the L4D2 Reload Speed Values?
Reply With Quote #10

Quote:
Originally Posted by Silvers View Post
Code:
The key "ReloadDuration" is missing from many weapons, the game uses "2.0" as default value (it seems).
You can time them if you want and report back the correct values.
That's probably what I'll have to end up doing. Confusing enough is how every source I've checked (including the L4D wiki, which has no numbers but ambiguously states certain reloads to be "long" or "short") conflicts with all the others, so I guess I'll need to work it out myself.

From adding a reload speed value of 5 (seconds) to the rifle_desert's file, I know I can "overwrite" the default reload speed. Also turns out that reload animations conform to the weapon's reload length, so I could make it 1 for inhumanly fast reload or 5 to really drag out the animation.

I imagine the best chance I have to figure out the reload speed is to insert a value of my own and appraise it by eye to see if it appears faster or slower than that weapon's vanilla reload speed. I can probably do it with some accuracy up to .5 seconds, but doubt I'll ever figure out of a weapon's actual reload is something like 2.476 or the like. Perhaps the animation files themselves hold the truth to the actual duration, though some of the reload animations already appear slightly slowed/quickened in vanilla L4D2, probably for weapon balance purposes.

For now, all I can give is the ReloadDuration located in the script file for each shotgun, which are the only ones to even list reloads (yet ironically are also the ones you cannot change the reload speed of).
FruityGum is offline
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 09:53.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode