[How-To] Weapon Modifying

I tried that for 3 days straight, testing every possible way until I gave up, I don’t think we can do that yet since there isn’t a Cocking info file mounter yet. You can check them out here: Data files - Cfx.re Docs

And there isn’t a way to add new weapon information files/entries (generally speaking), since the current method is patching pre existing entries, I think we must upload weapons.ymt file in order to be able to do that, and that isn’t possible with RedM yet.

1 Like

Although I haven’t found a method to mess with the cocking infos I found a few methods to work around that, let me know what your goal is and I’ll try and help you achieve it.

Here’s what I was able to achieve

1 Like

How’d you manage this? That’s wild :eyes:

Do you plan to post a tutorial for streaming custom weapons? Would be great to finally have the option made public!

Do you plan to release a step-by-step for how to do this?

Cause that’s fuckin awesome and I would love to give that a go :exploding_head:

Soon, my knowledge is still pretty limited, I’m still learning but once I get there I will be sharing what I learned.

Are you using VORP framework?

Here’s where I got, this is a showcase for the guns I’ve replaced so far, Tommy Gun for Springfield rifle, and gambler double action with 38 special snub nose:

the problem with those guns is that they share the same gun model/fram but they have different grips and textures. And also they are not included in the files in the common version of RedM.

This looks really promising! Have you worked out at all how to apply these changes on a server? So the damage sounds and customization all sticks and doesn’t desync.

We have been looking into finding a way to have the Mauser pistol fully automatic, and adding or replacing some weapons. Only downside is that fire rate changes don’t seem to be doable without restarting a script over and over, meaning everything will desync.

Oh yeah these are core game modifications, and not a script, it replaces all gun functionality. If you could share your current weapon info .meta files I could help you out.

Also for magazine size all you need is this:

    <ClipInfos>
        <Item>
            <Type>Magazine</Type>
            <Size value="8" />
            <BulletsPerAnimLoop value="8" />
        </Item>
    </ClipInfos>

started the models, but the gun shows up invisible with a sling. any ideas?
script works fine i can see the recoil acting automatic


the gun model is in the game on the customization area, but invisible in hand

If that’s the model from nexus mods, then I think he’s either streaming the gun as the grip or the sight if I remember correctly. Not the actual weapon, try using spooner or an object loader and check, your inventory/gun script might be loading the weapon without a grip or such.

Hey everyone!
I am trying to make a shotgun function like a rifle, has anyone found a way to manipulte it in such way so things like spread and the range the bullets go?
Greetings!

Found it:

<WeaponRanges>
			<LockOnRange value="75.00000000"/>
			<LockOnRangeInVehicle value="75.00000000"/>
			<IdleLockOnRangeModifier value="1.00000000"/>
			<SoftLockDurationOverride value="-1.00000000"/>
			<WeaponRange value="300.00000000"/>
			<WeaponRangeInVehicle value="300.00000000"/>
			<MeleeWeaponRangeMin value="1.50000000"/>
			<MeleeWeaponRangeMax value="2.00000000"/>
			<MeleeWeaponRangeMaxRun value="4.00000000"/>
			<MeleeWeaponRangeMinToRun value="20.00000000"/>
			<DesiredRange value="50.00000000"/>
			<ProjectileRangeMin value="-1.00000000"/>
			<ProjectileRangeMax value="-1.00000000"/>
			<AiSoundRange value="-1.00000000"/>
			<AiPotentialBlastEventRange value="-1.00000000"/>
</WeaponRanges>
2 Likes

Hey sorry I didn’t reply in time, let me know if you need more help.
I believe you can also alter the weapons bullet type (shotgun/bullets) and which bullets it uses.

M1899 inverted holstering placement and animation fix

I’m posting this here because more people will come across this and more people will be of interest and use it.

(I’m using my m1911 model in this screenshot)

Before:

After:

With this you can also add more entries for other different side-arms and alter how deep you want to have them be seated within the holster:

<mosquito>
    <CWeaponInfo>
        <Name>weapon_pistol_m1899</Name>
        <ShortArmHolsterDOF value="2" />
    </CWeaponInfo>
    <CWeaponInfo>
        <Name>weapon_pistol_mauser</Name> <!-- Extra Example -->
        <ShortArmHolsterDOF value="1" />
    </CWeaponInfo>
    <CWeaponInfo>
        <Name>weapon_pistol_volcanic</Name> <!-- Extra Example -->
        <ShortArmHolsterDOF value="3" />
    </CWeaponInfo>
</mosquito>

I don’t know if someone has come out with a fix for this before but here you go.
Download the ready to use asset from my tebex:
https://erebus-scripts.tebex.io/category/mosquito-weapons
No keymaster needed.

1 Like

Hey! It would be cool to know, how to change bullet type actually. The rest worked fine. Just digging through singeplayer mods helps quite good :smiley:

          <DamageModes>
            <Item>
              <AmmoInfo>AMMO_PISTOL</AmmoInfo>
              <Name>DM_PISTOL</Name>
              <ClipIndex value="0" />
              <Damage value="65.00000000" />
              <DamageType>BULLET</DamageType>
              <Penetration value="1.20000000" />
              <Explosion>
                <Default>EXP_TAG_DONTCARE</Default>
                <HitCar>EXP_TAG_DONTCARE</HitCar>
                <HitTruck>EXP_TAG_DONTCARE</HitTruck>
                <HitBike>EXP_TAG_DONTCARE</HitBike>
                <HitBoat>EXP_TAG_DONTCARE</HitBoat>
                <HitPlane>EXP_TAG_DONTCARE</HitPlane>
              </Explosion>
              <AccuracyInfo />
              <DamageFallOffInfo />
              <MeleeExecutionDismemberment value="-1.00000000" />
              <DismembermentRanges />
              <ImpulseMultiplier value="-1.00000000" />
              <NmShotTuningSet />
              <RecoilShakeHash />
              <RecoilShakeHashFirstPerson />
              <RecoilShakeAmplitude value="-1.00000000" />
              <RecoilShakeAmplitudeFirstPerson value="-1.00000000" />
              <PlayerDamagedByPlayerModifier value="-1.00000000" />
            </Item>
            <Item>
              <AmmoInfo>AMMO_PISTOL_HIGH_VELOCITY</AmmoInfo>
              <Name>DM_AMMO_HIGH_VELOCITY</Name>
              <ClipIndex value="0" />
              <Damage value="75.00000000" />
              <DamageType>BULLET</DamageType>
              <Penetration value="1.20000000" />
              <Explosion>
                <Default>EXP_TAG_DONTCARE</Default>
                <HitCar>EXP_TAG_DONTCARE</HitCar>
                <HitTruck>EXP_TAG_DONTCARE</HitTruck>
                <HitBike>EXP_TAG_DONTCARE</HitBike>
                <HitBoat>EXP_TAG_DONTCARE</HitBoat>
                <HitPlane>EXP_TAG_DONTCARE</HitPlane>
              </Explosion>
              <AccuracyInfo />
              <DamageFallOffInfo>0xD092CE2C</DamageFallOffInfo>
              <MeleeExecutionDismemberment value="-1.00000000" />
              <DismembermentRanges />
              <ImpulseMultiplier value="-1.00000000" />
              <NmShotTuningSet />
              <RecoilShakeHash />
              <RecoilShakeHashFirstPerson />
              <RecoilShakeAmplitude value="-1.00000000" />
              <RecoilShakeAmplitudeFirstPerson value="-1.00000000" />
              <PlayerDamagedByPlayerModifier value="-1.00000000" />
            </Item>
            <Item>
              <AmmoInfo>AMMO_PISTOL_SPLIT_POINT</AmmoInfo>
              <Name>DM_AMMO_SPLIT_POINT</Name>
              <ClipIndex value="0" />
              <Damage value="70.50000000" />
              <DamageType>BULLET</DamageType>
              <Penetration value="1.20000000" />
              <Explosion>
                <Default>EXP_TAG_DONTCARE</Default>
                <HitCar>EXP_TAG_DONTCARE</HitCar>
                <HitTruck>EXP_TAG_DONTCARE</HitTruck>
                <HitBike>EXP_TAG_DONTCARE</HitBike>
                <HitBoat>EXP_TAG_DONTCARE</HitBoat>
                <HitPlane>EXP_TAG_DONTCARE</HitPlane>
              </Explosion>
              <AccuracyInfo />
              <DamageFallOffInfo />
              <MeleeExecutionDismemberment value="-1.00000000" />
              <DismembermentRanges />
              <ImpulseMultiplier value="-1.00000000" />
              <NmShotTuningSet />
              <RecoilShakeHash />
              <RecoilShakeHashFirstPerson />
              <RecoilShakeAmplitude value="-1.00000000" />
              <RecoilShakeAmplitudeFirstPerson value="-1.00000000" />
              <PlayerDamagedByPlayerModifier value="-1.00000000" />
            </Item>
            <Item>
              <AmmoInfo>AMMO_PISTOL_EXPRESS</AmmoInfo>
              <Name>DM_AMMO_EXPRESS</Name>
              <ClipIndex value="0" />
              <Damage value="85.00000000" />
              <DamageType>BULLET</DamageType>
              <Penetration value="1.00000000" />
              <Explosion>
                <Default>EXP_TAG_DONTCARE</Default>
                <HitCar>EXP_TAG_DONTCARE</HitCar>
                <HitTruck>EXP_TAG_DONTCARE</HitTruck>
                <HitBike>EXP_TAG_DONTCARE</HitBike>
                <HitBoat>EXP_TAG_DONTCARE</HitBoat>
                <HitPlane>EXP_TAG_DONTCARE</HitPlane>
              </Explosion>
              <AccuracyInfo />
              <DamageFallOffInfo />
              <MeleeExecutionDismemberment value="-1.00000000" />
              <DismembermentRanges />
              <ImpulseMultiplier value="-1.00000000" />
              <NmShotTuningSet />
              <RecoilShakeHash />
              <RecoilShakeHashFirstPerson />
              <RecoilShakeAmplitude value="-1.00000000" />
              <RecoilShakeAmplitudeFirstPerson value="-1.00000000" />
              <PlayerDamagedByPlayerModifier value="-1.00000000" />
            </Item>
            <Item>
              <AmmoInfo>AMMO_PISTOL_EXPRESS_EXPLOSIVE</AmmoInfo>
              <Name>DM_AMMO_EXPRESS_EXPLOSIVE</Name>
              <ClipIndex value="0" />
              <Damage value="120.00000000" />
              <DamageType>EXPLOSIVE</DamageType>
              <Penetration value="0.00000000" />
              <Explosion>
                <Default>EXP_TAG_BULLET</Default>
                <HitCar>EXP_TAG_DONTCARE</HitCar>
                <HitTruck>EXP_TAG_DONTCARE</HitTruck>
                <HitBike>EXP_TAG_DONTCARE</HitBike>
                <HitBoat>EXP_TAG_DONTCARE</HitBoat>
                <HitPlane>EXP_TAG_DONTCARE</HitPlane>
              </Explosion>
              <AccuracyInfo />
              <DamageFallOffInfo />
              <MeleeExecutionDismemberment value="-1.00000000" />
              <DismembermentRanges />
              <ImpulseMultiplier value="-1.00000000" />
              <NmShotTuningSet />
              <RecoilShakeHash />
              <RecoilShakeHashFirstPerson />
              <RecoilShakeAmplitude value="-1.00000000" />
              <RecoilShakeAmplitudeFirstPerson value="-1.00000000" />
              <PlayerDamagedByPlayerModifier value="-1.00000000" />
            </Item>
          </DamageModes>

You can change the names of the entries AmmInfo to what ever ammo type you want in each item, you can find reference weapons.ymt files, and it actually changes what ammo type it gets fed, which is awesome, you can have it take as much ammo as you want too, just include this inside your CWeaponInfo <>

1 Like