Modding Weapon Damage

I seem to remember someone asking about how to adjust the damage
that weapons do when used.

Note:Before you begin: It is very important to back the weapons.xtbl up
before you mod it, as well as starting a new save file. If you mess these
numbers up then you can have all kinds of trouble with your weapons

Here is the weapons.xtbl entry for the magnum:

Code:
<Weapon>
        <Name>magnum</Name>
        <Weapon_Class>pistol</Weapon_Class>
        <Trigger_Type>single</Trigger_Type>
        <Magazine_Size>6</Magazine_Size>
        <Range_Max>150</Range_Max>
        <Sound_Radius>50</Sound_Radius>
                <Damage_Max>
            <NPC_Damage>275</NPC_Damage>
            <Player_Damage>90</Player_Damage>
            </Damage_Max>
        <_Editor>
            <Category>Entries:Ranged</Category>
            </_Editor>
        <Ragdoll_Force_Shoot>300</Ragdoll_Force_Shoot>
        <MeleeAttacks>
            <StandingSecondary>pistol_stand_ns</StandingSecondary>
            <MovingSecondary>pistol_move_ns</MovingSecondary>
            <ProneAttackSecondary>pistol_prone_kick</ProneAttackSecondary>
            <Melee_Range>1.4</Melee_Range>
            <StandingSynced>pistol_stand</StandingSynced>
            <MovingSynced>pistol_move</MovingSynced>
            </MeleeAttacks>
        <Animation_Group>Revolver</Animation_Group>
        <AI_Range_Max>50</AI_Range_Max>
        <Brass>Handgun</Brass>
        <Muzzle_Effect>muzz_handgun_nl</Muzzle_Effect>
        <Flags>
            <Flag>brass during reload only</Flag>
            <Flag>clip separate</Flag>
            <Flag>dual wieldable</Flag>
            </Flags>
        <Clip_Mesh>
            <Filename>p_colt_mag.smeshx</Filename>
            <Preload>true</Preload>
            </Clip_Mesh>
        <Reload_Clip_Mesh>
            <Filename>p_colt_magout.smeshx</Filename>
            <Preload>true</Preload>
            </Reload_Clip_Mesh>
        <Category>WPNCAT_PISTOL</Category>
        <PlayerWeaponSpread>
            <SpreadMinMax>
                <SpreadMovementMultipliers>
                    <Movement_Multiplier_Walk>1.0</Movement_Multiplier_Walk>
                    <Movement_Multiplier_Crouch>0.8</Movement_Multiplier_Crouch>
                    <Movement_Multiplier_Run>1.1</Movement_Multiplier_Run>
                    <Movement_Multiplier_Sprint>1.5</Movement_Multiplier_Sprint>
                    <Movement_Multiplier_Vehicle>0.8</Movement_Multiplier_Vehicle>
                    <Movement_Multiplier_Fine_Aim>0.5</Movement_Multiplier_Fine_Aim>
                    </SpreadMovementMultipliers>
                <Player_Spread_Max>2</Player_Spread_Max>
                <Player_Spread_Min>0.1</Player_Spread_Min>
                <Movement_Multiplier_Vehicle>1.0</Movement_Multiplier_Vehicle>
                </SpreadMinMax>
            <SpreadDynamics>
                <SpreadDynamicMultipliers>
                    <Movement_Multiplier_Crouch>1.0</Movement_Multiplier_Crouch>
                    <Movement_Multiplier_Walk>1.0</Movement_Multiplier_Walk>
                    <Movement_Multiplier_Run>1.0</Movement_Multiplier_Run>
                    <Movement_Multiplier_Sprint>1.0</Movement_Multiplier_Sprint>
                    <Movement_Multiplier_Vehicle>1.0</Movement_Multiplier_Vehicle>
                    </SpreadDynamicMultipliers>
                <Player_To_Spread_Max>3</Player_To_Spread_Max>
                <Player_To_Spread_Min>500</Player_To_Spread_Min>
                </SpreadDynamics>
            <Movement_Multiplier_Vehicle>1.0</Movement_Multiplier_Vehicle>
            </PlayerWeaponSpread>
        <NPCWeaponSpread>
            <SpreadMinMax>
                <NPC_Spread_Max>2</NPC_Spread_Max>
                <NPC_Spread_Min>0.1</NPC_Spread_Min>
                <SpreadMovementMultipliers>
                    <Movement_Multiplier_Crouch>0.8</Movement_Multiplier_Crouch>
                    <Movement_Multiplier_Walk>1.0</Movement_Multiplier_Walk>
                    <Movement_Multiplier_Run>1.1</Movement_Multiplier_Run>
                    <Movement_Multiplier_Sprint>1.5</Movement_Multiplier_Sprint>
                    <Movement_Multiplier_Vehicle>1.75</Movement_Multiplier_Vehicle>
                    </SpreadMovementMultipliers>
                <SpreadTargetMovementMultipliers>
                    <Target_Movement_Multiplier_Walk>1.15</Target_Movement_Multiplier_Walk>
                    <Target_Movement_Multiplier_Run>1.5</Target_Movement_Multiplier_Run>
                    <Target_Movement_Multiplier_Sprint>2.0</Target_Movement_Multiplier_Sprint>
                    <Target_Movement_Multiplier_Vehicle>2.5</Target_Movement_Multiplier_Vehicle>
                    </SpreadTargetMovementMultipliers>
                </SpreadMinMax>
            <SpreadDynamics>
                <NPC_To_Spread_Max>3</NPC_To_Spread_Max>
                <NPC_To_Spread_Min>400</NPC_To_Spread_Min>
                <SpreadDynamicMultipliers>
                    <Movement_Multiplier_Crouch>1.0</Movement_Multiplier_Crouch>
                    <Movement_Multiplier_Walk>1.0</Movement_Multiplier_Walk>
                    <Movement_Multiplier_Run>1.0</Movement_Multiplier_Run>
                    <Movement_Multiplier_Sprint>1.0</Movement_Multiplier_Sprint>
                    <Movement_Multiplier_Vehicle>1.0</Movement_Multiplier_Vehicle>
                    </SpreadDynamicMultipliers>
                </SpreadDynamics>
            </NPCWeaponSpread>
        <feedback_name_shot_in_vehicle>IV_WF_PS_Magnum</feedback_name_shot_in_vehicle>
        <feedback_name_shot_on_foot>OF_WF_PS_Magnum</feedback_name_shot_on_foot>
        <feedback_name_melee_soft>OF_WF_BS__Default_Soft</feedback_name_melee_soft>
        <feedback_name_melee_hard>OF_WF_BS__Default_Hard</feedback_name_melee_hard>
        <pickup_info>
            <min_ammo_given>5</min_ammo_given>
            <max_ammo_given>15</max_ammo_given>
            </pickup_info>
        <Time_Management>
            <Refire_Delay>500</Refire_Delay>
            <npc_refire_delay>
                <min>2300</min>
                <max>2900</max>
                </npc_refire_delay>
            </Time_Management>
        <feedback_name_spinup>Null_Feedback</feedback_name_spinup>
        <Ammo>Bullet Pistol</Ammo>
        <Inv_Slot>pistol</Inv_Slot>
        <Ammo_per_Shot>0</Ammo_per_Shot>
        <Audio>
            <Fire_Sound>92F_FIRE</Fire_Sound>
            <NPC_Fire_Sound>92F_FIRE_NPC</NPC_Fire_Sound>
            <Secondary_Fire_Sound>RFL_MELEE</Secondary_Fire_Sound>
            <Reload_Sound>MAGNUM_RELOAD</Reload_Sound>
            <No_Ammo_Sound>MAGNUM_DRY</No_Ammo_Sound>
            <Hit_Wall_Sound>IMP_METAL_HIT</Hit_Wall_Sound>
            <Spinning_Snd_Pitch_End>1</Spinning_Snd_Pitch_End>
            <MeleeSound>
                <ImpactFoleyFlesh>IMP_METAL_HIT_FLESH</ImpactFoleyFlesh>
                </MeleeSound>
            </Audio>
        <Constant_Effects></Constant_Effects>
        <Alt_Trigger_Type>single</Alt_Trigger_Type>
        <Spinebend_Limits>Pistol</Spinebend_Limits>
        <Strafe_Angles>Pistol</Strafe_Angles>
        <Player_Combat_Ready_MS>3000</Player_Combat_Ready_MS>
        <NPC_Combat_Ready_MS>2000</NPC_Combat_Ready_MS>
        <Tracer_Effect>gun_tracer</Tracer_Effect>
        </Weapon>

As you can see there is all kinds of information listed here, but I
am only going to adjust the weapon damage. First here are the original
numbers.

The NPC_Damage is the damage done to an NPC when they are attacked
with this weapon

The Player_Damage is the damage done to the player when they are attacked
with this weapon.

<Damage_Max>
<NPC_Damage>275</NPC_Damage>
<Player_Damage>90</Player_Damage>
</Damage_Max>

(modded)
<Damage_Max>
<NPC_Damage>1000</NPC_Damage>
<Player_Damage>0</Player_Damage>
</Damage_Max>

So this means that the NPC takes 1000 damage (which is a kill shot.
(the McManus number is only 500) and the player number is 0 which means that
they are invulnerable to the shots fired from this gun.

The same settings will work for melee weapons as well.

Something to be aware of. The flashbangs won't hurt you but will still
make you cough, and weapons like the bat will still make you fall down.

This will not change your vulnerability to fire or vehicles. Those are
controlled by bonuses in the unlockables file. I do not recommend
changing those numbers unless you know what you are doing.

Also do not change the accuracy bonus in the unlockables file either. If you set that
number too high it will break your game, and even if you change the number back afterwards
any games that you have saved while it was active will be messed up. IE the smg and rifles
will misbehave badly. Their shots will be all over the place. (there is information
about changing the accuracy bonus elsewhere on this forum.)

Note: This is the GOTR version of the unlockables file. I am not certain whether it will work in vanilla.

I am including a modded weapons.xtbl for study. If you want to use it in game go ahead
however you do so at the risk of your save files.

Just drop the file into your mods directory and recompile the patch.
 

Attachments

Last edited:
Back
Top