This mod adjusts all of the weights and velocities of the player weapon projectiles to be physically correct according to popular online sources. It also adjusts ammo items to match their models (e.g. 4 grenades actually give 4 grenades) and adds a few missing light sources to weapon projectiles. Just copy the pk4 file into your base directory and load a new game. Made with and tested on vanilla Doom 3.
I reduced the clip size of the plasma gun to 25. After all these years I never realized doomguy was only shoving in one little glowy canister at a time when you reload, so 25 is technically correct and matches the small cell ammo item count (large is still 50). I left the ammo you receive on weapon pickup at 25 because that was already reduced from 50 and I thought that was punishing enough on plasma ammo.
Machine gun weapon pickup ammo was reduced from 15 back to the original default 10 because there's just too much damn machine gun ammo. The rest of the guns follow the regular formula of 1/2 a clip for the normal guns (that can be dropped by enemies) but the exotic weapons (rocket launcher, plasma gun, bfg) give a full clip.
Also fixed a bug in the pistol script fire code to allow the correct empty idle animation to be shown when out of ammo while the trigger is being held.
I played around with giving the zsec soldiers the same exact weapon stats (because that would be technically correct) and it was fun, but the damage is way too brutal. I'd like to modify the default armor protection amount the game gives on veteran (.20 is pathetic) but so far, I haven't figured out a good way that will persist between game restarts.
I'm going to give a summary of all of the changes from the base game in this version for reference below and archive the others as I think I am done working on this mod for now (unless I can figure out rocket thrust or an armor protection mod that sticks).
Thank you to everyone who tried it out.
moodguy
ammo.def vs pak005
- "inv_ammo_clip" "45"
+ "inv_ammo_clip" "60"
- "inv_ammo_grenades" "5"
+ "inv_ammo_grenades" "4"
- "inv_ammo_rockets" "5"
+ "inv_ammo_rockets" "4"
- "inv_ammo_rockets" "10"
+ "inv_ammo_rockets" "8"
player.def vs pak000
- "max_ammo_grenades" "50"
+ "max_ammo_grenades" "48"
- "ammo_bullets" "48"
+ "ammo_bullets" "0"
weapon_chaingun.def vs pak000
- "spread" "5"
+ "spread" "2"
- "velocity" "2000 0 0" // .38 Special 600 fps. Source: Petzal, David E. "How fast is a speeding bullet." Field and Stream. 97 (1992): 23
+ "velocity" "42500 0 0" // 50 u/m * 850 m/s (2,800 ft/s) https://en.wikipedia.org/wiki/7.62%C3%9751mm_NATO
- "bounce" "0.6"
- "mass" "8"
- "push" "2000"
+ "bounce" "1"
+ "mass" "0.336" // 147 gr (10 g) M80 FMJ = 0.336 oz https://en.wikipedia.org/wiki/7.62%C3%9751mm_NATO
+ "push" "0" // extra physics impulse not needed with correct mass and velocity
- "impact_gib" "1"
+ "impact_gib" "0"
- "damage" "20"
+ "damage" "25"
- "gib" "1"
+ "gib" "0"
weapon_handgrenade.def vs pak000
- "inv_ammo_grenades" "5"
+ "inv_ammo_grenades" "4"
- "health" "0" // amount of damage projectile can take if damaged (0 means it can't be destroyed)
- "velocity" "300 0 40" // how fast the projectile leaves the gun (or distance if fuse is 0)
+ "health" "5" // same as rocket, allows grenades to detonate each other
+ "velocity" "500 0 50" // doomguy can throw
- "contact_friction" "0.1"
- "bounce" "0.9" // how much speed a projectile retains when it bounces off of objects (coefficient of restitution). 0 means no bounce.
- "mass" "10"
- "gravity" "1066" // how much gravity affects the trajectory. gravity direction is same as the entity that fired it.
- "fuse" "3" // how long before the projectile is removed or self-detonates. Use 0 for beam weapons (velocity == distance).
+ "contact_friction" "0.7" // appropriate levels of friction
+ "bounce" "0.3" // appropriate levels of bounce
+ "mass" "14" // 14 oz (400 g) https://en.wikipedia.org/wiki/M67_grenade
+ "gravity" "490" // 50 u/m * 9.8 m/s
+ "fuse" "4.5" // "between 4 and 5 seconds" https://en.wikipedia.org/wiki/M67_grenade
- "detonate_on_death" "0" // whether projectile should detonate when it's "killed" (health runs out)
+ "detonate_on_death" "1" // whether projectile should detonate when it's "killed" (health runs out)
- "detonate_on_actor" "1" // whether projectile should detonate when it hits a character in the game
- "detonate_on_trigger" "1" // whether projectile should detonate when triggered by a character in the game
+ "detonate_on_actor" "0" // whether projectile should detonate when it hits a character in the game
+ "detonate_on_trigger" "0" // whether projectile should detonate when triggered by a character in the game
- "smoke_fly" "grenadetrail.prt" // particle effect while in the air
+ "smoke_fly" "" // particle effect while in the air
- "mtr_light_shader" ""
- "light_color" ""
- "light_radius" ""
- "light_offset" ""
+ "mtr_light_shader" "lights/roundfire"
+ "light_color" "1 0.5 0.1"
+ "light_radius" "150"
+ "light_offset" "0 0 15"
weapon_machinegun.def vs pak000
- "clipSize" "60"
+ "clipSize" "30"
- "damage" "9"
+ "damage" "12"
- "gib" "1"
+ "gib" "0"
- "velocity" "7200 0 0" // .38 Special 600 fps. Source: Petzal, David E. "How fast is a speeding bullet." Field and Stream. 97 (1992): 23
+ "velocity" "38850 0 0" // 50 u/m * 777 m/s (2,550 ft/s) https://en.wikipedia.org/wiki/FN_5.7%C3%9728mm
- "bounce" "0.6"
- "mass" "1"
+ "bounce" "1"
+ "mass" "0.06" // 27 gr (1.7 g) SS195LF JHP = 0.06 oz https://en.wikipedia.org/wiki/FN_5.7%C3%9728mm
- "impact_gib" "1"
+ "impact_gib" "0"
weapon_pistol.def vs pak000
- "inv_ammo_bullets" "12"
+ "inv_ammo_bullets" "6"
- "damage" "14"
+ "damage" "15"
- "gib" "1"
+ "gib" "0"
- "velocity" "7200 0 0" // .38 Special 600 fps. Source: Petzal, David E. "How fast is a speeding bullet." Field and Stream. 97 (1992): 23
+ "velocity" "18000 0 0" // 50 u/m * 360 m/s (1,180 ft/s) https://en.wikipedia.org/wiki/9%C3%9719mm_Parabellum
- "bounce" "0.6"
- "mass" "2"
+ "bounce" "1"
+ "mass" "0.26" // 7.45 g (115 gr) = 0.26 oz Federal FMJ https://en.wikipedia.org/wiki/9%C3%9719mm_Parabellum
- "impact_gib" "1"
+ "impact_gib" "0"
weapon_plasmagun.def vs pak000
- "inv_ammo_cells" "50"
+ "inv_ammo_cells" "25"
- "clipSize" "50"
+ "clipSize" "25"
- "nozzleGlowRadius" "8"
+ "nozzleGlowRadius" "16"
+ "snd_lowammo" "player_machinegun_lowammo"
- "damage" "16"
+ "damage" "40"
- "velocity" "700 0 0" // how fast the projectile leaves the gun (or distance if fuse is 0)
+ "velocity" "1093.75 0 0" // 50 u/m * 21.875 m/s (875 d1 map units per second / ~40 u/m) https://doomwiki.org/wiki/Plasma_gun
- "bounce" "0.6" // how much speed a projectile retains when it bounces off of objects (coefficient of restitution). 0 means no bounce.
- "mass" "50"
- "push" "4000" // additional impulse when projectile collides
+ "bounce" "1" // how much speed a projectile retains when it bounces off of objects (coefficient of restitution). 0 means no bounce.
+ "mass" "21" // 21 oz at 21 m/s is enough
+ "push" "0" // additional impulse when projectile collides
-// "mtr_light_shader" ""
-// "light_color" "0 0 0.8"
-// "light_radius" "160"
-// "light_offset" "-8 0 0"
+ "mtr_light_shader" "lights/plasmaglow"
+ "light_color" "0.18 0.70 0.82"
+ "light_radius" "160"
+ "light_offset" "0 0 0"
weapon_rocketlauncher.def vs pak000
- "inv_ammo_rockets" "5"
+ "inv_ammo_rockets" "4"
- "clipSize" "5"
+ "clipSize" "4"
- "mtr_light_shader" ""
+ "mtr_light_shader" "lights/impflash"
weapon_shotgun.def vs pak000
- "spread" "22"
+ "spread" "3"
- "damage" "14"
+ "damage" "13"
- "gib" "1"
+ "gib" "0"
- "velocity" "7200 0 0" // .38 Special 600 fps. Source: Petzal, David E. "How fast is a speeding bullet." Field and Stream. 97 (1992): 23
+ "velocity" "24000 0 0" // 50 u/m * 480 m/s (1,560 ft/s) 12-gauge 1 oz slug https://en.wikipedia.org/wiki/Shotgun_slug
- "bounce" "0.6"
- "mass" "1.0"
+ "bounce" "1"
+ "mass" "0.125" // 12-gauge #00 Buck 8 Pellets/oz https://en.wikipedia.org/wiki/Shotgun_shell
- "impact_gib" "1"
+ "impact_gib" "0"
lights.mtr vs pak000
- noshadows
+ //noshadows https://www.pcgamingwiki.com/wiki/Doom_3#Enable_plasma_gun_projectile_shadows
weapon_machinegun.script vs pak006
-#define MACHINEGUN_FIRERATE 0.1 // ~10 per second
- float next_attack;
- next_attack = 0;
- float currentTime;
- float avail;
- currentTime = sys.getTime();
- if ( ( currentTime >= next_attack ) && ( WEAPON_ATTACK || WEAPON_NETFIRING ) ) {
+ if ( WEAPON_ATTACK || WEAPON_NETFIRING ) {
void weapon_machinegun::Fire() {
- float ammoClip;
- float currentTime;
-
- next_attack = sys.getTime() + MACHINEGUN_FIRERATE;
-
- ammoClip = ammoInClip();
- if ( ammoClip == MACHINEGUN_LOWAMMO ) {
+ launchProjectiles( MACHINEGUN_NUMPROJECTILES, spread, 0, 1.0, 1.0 );
+ playAnim( ANIMCHANNEL_ALL, "fire" );
+
+ if ( ammoInClip() == MACHINEGUN_LOWAMMO ) {
startSound( "snd_lowammo", SND_CHANNEL_ITEM, true );
}
-
- launchProjectiles( MACHINEGUN_NUMPROJECTILES, spread, 0, 1.0, 1.0 );
- playAnim( ANIMCHANNEL_ALL, "fire" );
- while( !animDone( ANIMCHANNEL_ALL, MACHINEGUN_FIRE_TO_IDLE ) ) {
- currentTime = sys.getTime();
- ammoClip = ammoInClip();
- if ( ( currentTime >= next_attack ) && ( WEAPON_NETFIRING || ( WEAPON_ATTACK && ( ammoClip > 0 ) ) ) ) {
- weaponState( "Fire", 0 );
- }
- waitFrame();
- }
+ waitUntil( animDone( ANIMCHANNEL_ALL, MACHINEGUN_FIRE_TO_IDLE ) );
weaponState( "Idle", MACHINEGUN_FIRE_TO_IDLE );
}
- next_attack = 0;
weapon_pistol.script vs pak006
-#define PISTOL_FIRERATE 0.4
-#define PISTOL_LOWAMMO 4
- float next_attack;
- next_attack = 0;
- float currentTime;
- float avail;
- weaponReady();
if ( !ammoInClip() ) {
+ weaponOutOfAmmo();
playCycle( ANIMCHANNEL_ALL, "idle_empty" );
+ waitUntil( !WEAPON_ATTACK );
} else {
+ weaponReady();
playCycle( ANIMCHANNEL_ALL, "idle" );
}
- currentTime = sys.getTime();
- if ( ( currentTime >= next_attack ) && ( WEAPON_ATTACK || WEAPON_NETFIRING ) ) {
+ if ( WEAPON_ATTACK || WEAPON_NETFIRING ) {
void weapon_pistol::Fire() {
- float ammoClip;
-
- next_attack = sys.getTime() + PISTOL_FIRERATE;
+ launchProjectiles( PISTOL_NUMPROJECTILES, spread, 0, 1.0, 1.0 );
+ playAnim( ANIMCHANNEL_ALL, "fire" );
- ammoClip = ammoInClip();
- if ( ammoClip == PISTOL_LOWAMMO ) {
- startSound( "snd_lowammo", SND_CHANNEL_ITEM, true );
+ if ( ammoInClip() ) {
+ waitUntil( !WEAPON_ATTACK );
}
- launchProjectiles( PISTOL_NUMPROJECTILES, spread, 0, 1.0, 1.0 );
- playAnim( ANIMCHANNEL_ALL, "fire" );
waitUntil( animDone( ANIMCHANNEL_ALL, PISTOL_FIRE_TO_IDLE ) );
weaponState( "Idle", PISTOL_FIRE_TO_IDLE );
}
- next_attack = 0;
weapon_plasmagun.script vs pak006
-#define PLASMAGUN_FIRERATE 0.125 //changed by Tim
+#define PLASMAGUN_FIRERATE 0.0857 // 60 seconds / 700 shots per minute https://doomwiki.org/wiki/Plasma_gun
- float next_attack;
- next_attack = 0;
- float currentTime;
- float avail;
- currentTime = sys.getTime();
- if ( ( currentTime >= next_attack ) && ( WEAPON_NETFIRING || WEAPON_ATTACK ) ) {
+ if ( WEAPON_ATTACK || WEAPON_NETFIRING ) {
void weapon_plasmagun::Fire() {
- float ammoClip;
- float currentTime;
-
- next_attack = sys.getTime() + PLASMAGUN_FIRERATE;
-
- ammoClip = ammoInClip();
- if ( ammoClip == PLASMAGUN_LOWAMMO ) {
- startSound( "snd_lowammo", SND_CHANNEL_ITEM, true );
- }
+ float next_attack = sys.getTime() + PLASMAGUN_FIRERATE;
launchProjectiles( PLASMAGUN_NUMPROJECTILES, spread, 0, 1.0, 1.0 );
playAnim( ANIMCHANNEL_ALL, "fire" );
- while( !animDone( ANIMCHANNEL_ALL, PLASMAGUN_FIRE_TO_IDLE ) ) {
- currentTime = sys.getTime();
- ammoClip = ammoInClip();
- if ( ( currentTime >= next_attack ) && ( WEAPON_NETFIRING || ( WEAPON_ATTACK && ( ammoClip > 0 ) ) ) ) {
- weaponState( "Fire", 0 );
- }
- waitFrame();
+
+ if ( ammoInClip() == PLASMAGUN_LOWAMMO ) {
+ startSound( "snd_lowammo", SND_CHANNEL_ITEM, true );
}
+ waitUntil( sys.getTime() >= next_attack );
weaponState( "Idle", PLASMAGUN_FIRE_TO_IDLE );
}
- next_attack = 0;
weapon_rocketlauncher.script vs pak006
-#define ROCKETLAUNCHER_LOWAMMO 1
-#define ROCKETLAUNCHER_FIREDELAY 1 // was .75 changed again by Tim to 1
- float next_attack;
- next_attack = 0;
- float avail;
- float currentTime;
- currentTime = sys.getTime();
- if ( ( currentTime >= next_attack ) && ( WEAPON_ATTACK || WEAPON_NETFIRING ) ) {
+ if ( WEAPON_ATTACK || WEAPON_NETFIRING ) {
void weapon_rocketlauncher::Fire() {
- float ammoClip;
-
- next_attack = sys.getTime() + ROCKETLAUNCHER_FIREDELAY;
-
- ammoClip = ammoInClip();
- if ( ammoClip == ROCKETLAUNCHER_LOWAMMO ) {
- startSound( "snd_lowammo", SND_CHANNEL_ITEM, true );
- }
-
launchProjectiles( ROCKETLAUNCHER_NUMPROJECTILES, spread, 0, 1.0, 1.0 );
playAnim( ANIMCHANNEL_ALL, "fire" );
+ waitUntil( !WEAPON_ATTACK );
waitUntil( animDone( ANIMCHANNEL_ALL, ROCKETLAUNCHER_FIRE_TO_IDLE ) );
UpdateSkin();
weaponState( "Idle", ROCKETLAUNCHER_FIRE_TO_IDLE );
}
- next_attack = 0;
weapon_shotgun.script vs pak006
-#define SHOTGUN_FIRERATE 1.333
-#define SHOTGUN_LOWAMMO 2
-#define SHOTGUN_RELOADRATE 2
-#define SHOTGUN_NUMPROJECTILES 13
+#define SHOTGUN_RELOADRATE 1
+#define SHOTGUN_NUMPROJECTILES 8
- float next_attack;
- next_attack = 0;
- float currentTime;
- float avail;
- currentTime = sys.getTime();
- if ( ( currentTime >= next_attack ) && ( WEAPON_ATTACK || WEAPON_NETFIRING ) ) {
+ if ( WEAPON_ATTACK || WEAPON_NETFIRING ) {
void weapon_shotgun::Fire() {
- float ammoClip;
-
if ( WEAPON_NETRELOAD ) {
WEAPON_NETRELOAD = false;
weaponState( "Reload", SHOTGUN_IDLE_TO_RELOAD );
}
-
- next_attack = sys.getTime() + SHOTGUN_FIRERATE;
-
- ammoClip = ammoInClip();
- if ( ammoClip == SHOTGUN_LOWAMMO ) {
- startSound( "snd_lowammo", SND_CHANNEL_ITEM, true );
- }
launchProjectiles( SHOTGUN_NUMPROJECTILES, spread, 0, 1.0, 1.0 );
playAnim( ANIMCHANNEL_ALL, "fire" );
+ waitUntil( !WEAPON_ATTACK );
waitUntil( animDone( ANIMCHANNEL_ALL, SHOTGUN_FIRE_TO_IDLE ) );
weaponState( "Idle", SHOTGUN_FIRE_TO_IDLE );
}
- next_attack = 0;