Mbch Weapon Overrides

Class-specific weapon overrides for Full Authentic are handled by blocks of text between braces pasted after the ClassInfo block in a class's .mbch file.

## Using such overrides

Again, you might want to look at another map's files to see how it's been used there.

Here is an example weapon block of text that goes at the end of a file, with only the required fields:

```
WeaponInfo0
{
    WeaponToReplace    WP\_BLASTER   //Required: Weapon Slot of weapon you're replacing

    WeaponBasedOff     WP\_BOWCASTER //Required: For future use, should be the same as WeaponToReplace

    NewWorldModel      "models/weapons2/dh-17/dh-17\_w.glm" //Required: New 3rd person/dropped weapon model

    NewViewModel       "models/weapons2/dh-17/dh-17.md3"   //Required: New 1st person weapon model

    Icon               "gfx/hud/w\_icon\_dh-17" //Required: Weapon change icon

    WeaponName         "DH-17"                //Required: Weapon change display name

}

```

Here's a somewhat more complex example of an override:

```
WeaponInfo0
{
    WeaponToReplace     WP\_BRYAR\_OLD      //Required: Weapon Slot of weapon you're replacing

    WeaponBasedOff      WP\_BLASTER\_PISTOL //Required: For future use, should be the same as WeaponToReplace

    NewWorldModel       "models/weapons2/blaster\_two/blaster\_pistol\_w.glm"       //Required: New 3rd person/dropped weapon model

    CorrectedWorldModel "models/weapons2/blaster\_pistol/blaster\_pistol\_corrected.glm"
    NewViewModel        "models/weapons2/blaster\_pistol/blaster\_pistol\_dual.md3" //Required: New 1st person weapon model

    MuzzleEffect        "blaster/MuzzleFlash01R" //Optional: New muzzle effect

    AltMuzzleEffect     "blaster/MuzzleFlash01R" //Optional: New alt muzzle effect

    MissileEffect       "blaster/Shot02R" //Optional: New effect to be displayed on the projectile

    customAmmo          750
    AltMissileEffect    "blaster/Shot02R" //Optional: Ditto for the alt fire

    FlashSound0         "sound/weapons/bryar/fire.mp3" //Optional: Sound played when the weapon fires

    AltFlashSound0      "sound/weapons/bryar/alt\_fire.mp3"
    ChargeEffect        "gfx/effects/bryarfrontflash"
    ChargeSound         "sound/weapons/bryar/altcharge.mp3"
    Icon                "models/weapons2/blaster\_pistol/w\_icon\_bryar\_duals" //Required: Weapon change icon

    WeaponName          "Dual DL-44's" //Required: Weapon change display name

    //altFireEnabled 0

}

```

If you want to have more than one override for a class, call the second block WeaponInfo1, the third WeaponInfo2, and so on. Example:

```
WeaponInfo0
{
    WeaponToReplace     WP\_STUN\_BATON
    WeaponBasedOff      WP\_STUN\_BATON
    NewWorldModel       "models/weapons2/droidblaster/bd\_blaster\_w.glm"
    NewViewModel        "models/weapons2/droidblaster/padme\_blaster.md3"
    CorrectedWorldModel "models/weapons2/droidblaster/bd\_blaster\_w.glm"

    MissileEffect "blaster/shot"
        AltMissileEffect "blaster/shot"

    Missile3Effect "blaster/shot"
        FlashSound0    "sound/weapons/westar/fire.mp3"
        AltFlashSound0 "sound/weapons/westar/alt\_fire.mp3"
        ChargeEffect   "gfx/effects/bryarfrontflash"
        ChargeSound    "sound/weapons/bryar/altcharge.mp3"

    Icon       "gfx/hud/w\_icon\_droidblaster.tga"
    WeaponName "Not so useful sniper rifle"

    ReloadTimeModifier 0.25
    ProjSpeedModifier  0.01
}

WeaponInfo1
{
    WeaponToReplace     WP\_ROCKET\_LAUNCHER
    WeaponBasedOff      WP\_ROCKET\_LAUNCHER
    NewWorldModel       "models/weapons2/droidblaster/bd\_blaster\_w.glm"
    NewViewModel        "models/weapons2/droidblaster/padme\_blaster.md3"
    CorrectedWorldModel "models/weapons2/droidblaster/bd\_blaster\_w.glm"

    MissileEffect "blaster/shot"
        AltMissileEffect "blaster/shot"

    Missile3Effect "blaster/shot"
        FlashSound0    "sound/weapons/westar/fire.mp3"
        AltFlashSound0 "sound/weapons/westar/alt\_fire.mp3"
        ChargeEffect   "gfx/effects/bryarfrontflash"
        ChargeSound    "sound/weapons/bryar/altcharge.mp3"

    Icon       "gfx/hud/w\_icon\_droidblaster.tga"
    WeaponName "Super-fast Rocket Launcher"

    ReloadTimeModifier 0.25
    ProjSpeedModifier  5.0
}

```

## Override block values

### General Values

#### WeaponToReplace

This is the weapon you want to be overriding.

#### WeaponBasedOff

This weapon's hand .md3 is the default hand .md3 that is loaded if you don't specify a NewHandsModel.

#### altFireEnabled

Whether or not the class can use alternate fire with this weapon. If left out, set to 1 (alt fire is enabled). If set to 0, class can't use alternate fire with this weapon.

#### primFireEnabled

Whether or not the class can use primary fire with this weapon. If left out, set to 1 (primary fire is enabled). If set to 0, class can't use primary fire with this weapon.

#### customAmmo

Sets how much ammo you have for this gun (in addition to the first clip).

#### Icon

The icon that shows up in team overlay and when switching weapons.

#### WeaponName

Name of weapon - shows up when changing weapons.

#### clipSize

Sets the size of the weapon's clip. If clipSize is -1, the weapon doesn't have a clip (similar to grenades).

#### ReloadTimeModifier

Changes the speed that the weapon reloads. Default = 1, higher numbers result in slower numbers, e.g. a value of 1.25 is 25% slower reload.

#### ProjSpeedModifier

Changes the travel time of the weapon's projectile shots.

### Effects Values

*Note that all paths should be to a .efx file in quotes excluding the effects folder or the .efx extension - e.g., "greenblaster/rifle\_shot" if nothing else is specified.*

#### MuzzleEffect

The fire effect that is used for primary fire.

#### AltMuzzleEffect

The fire effect that is used for secondary fire.

#### MissileEffect

The effect that is used for primary bullets/blaster bolts.

*The SBD arm blaster, the T21, and the DLT-20a all use blaster effects for their shots. This means that you will have to set up a dummy WeaponInfo block for them with the desired MissileEffect in (the rest shouldn't matter).*

#### AltMissileEffect

The effect that is used for secondary bullets/blaster bolts.

#### PowerupShotEffect

The effect used for charged up bullets/blaster bolts.

#### altMissileMissEffect

The impact effect of the secondary shot/grenade.

#### MissileMissEffectEnhanced

The impact effect of the primary shot/grenade when enhanced effects is set to 1 (high). If this is not set, it will use the one specified with MissileMissEffect.

#### altMissileMissEffectEnhanced

The impact effect of the secondary shot/grenade when enhanced effects is set to 1 (high). If this is not set, it will use the one specified with altMissileMissEffect.

#### MissileHitHumanEffect

The impact effect of the primary shot if it hits an enemy.

#### AltMissileHitHumanEffect

The impact effect of the secondary shot if it hits an enemy.

#### MissileHitDroidEffect

The impact effect of the primary shot if it hits a droid, vehicle, or vehicle-based character.

#### AltMissileHitDroidEffect

The impact effect of the secondary shot if it hits a droid, vehicle, or vehicle-based character.

#### ChargeEffect

The effect played when the weapon is being charged.

#### disruptorBeam1

This will change the image of the normal disruptor beam. The path should lead to an image file or shader.

#### disruptorBeam2

This will change the image of the charged disruptor beam. The path should lead to an image file or shader.

### Sound Values

#### FlashSound<n>

Sound used when firing primary. You can have up to four flash sounds, from FlashSound0 to FlashSound3. If you have more than one FlashSound, the one used is randomised. The value should be the path to the sound (including extensions) in quotes. However, sounds are usually governed by the efx.

#### AltFlashSound<n>

Sound used when firing secondary. You can have up to four flash sounds, from AltFlashSound0 to AltFlashSound3. If you have more than one altFlashSound, the one used is randomised. The value should be the path to the sound (including extensions) in quotes. However, sounds are usually governed by the efx.

#### ChargeSound

The sound played when the weapon is being charged.

#### SelectSound

The sound played when the weapon is switched to.

### Model Values

#### NewViewModel

The md3 first person model that the weapon uses. If you don't want to use a FPV model (if you're replacing a saber), use the model models/weapons2/dummy/dummy.md3.

#### NewHandsModel

Path to the \_hand.md3 the model should be using.

#### NewBarrelModel

Path to the barrel .md3 the model should be using.

#### CorrectedWorldModel

Path to the .glm model used for the second pistol (for westars or arc pistols) - defaults to the NewWorldModel if not specified.

#### missileModel

Path to the missile .md3 model that the weapon should be using.

#### altMissileModel

Path to the secondary fire missile .md3 model that the weapon should be using.

#### primHitscanShot

Convert the primary fire of this weapon to an instant-hit hitscan trace instead of a physical projectile. This does not work for all types of weapons, and does not always retain all the properties of the existing weapon. (Generally, explosive weapons won't convert to hitscan, and hitscan shots don't bounce off much of anything.)

#### altHitscanShot

Convert the secondary fire of this weapon to an instant-hit hitscan trace instead of a physical projectile. This does not work for all types of weapons, and does not always retain all the properties of the existing weapon. (Generally, explosive weapons won't convert to hitscan, and hitscan shots don't bounce off much of anything.)

#### primHitscanTracer

Valid values: 0 through 10. Percent change in 10% increments, of a visible tracer occurring with hitscan weaponfire of this weapon. 0 is never, 5 is 50% chance per hitscan trace, 10 is 100% chance.

#### altHitscanShot

Valid values: 0 through 10. Percent change in 10% increments, of a visible tracer occurring with hitscan weaponfire of this weapon. 0 is never, 5 is 50% chance per hitscan trace, 10 is 100% chance.

#### primGore

Will this weapon's primary fire upon striking someone or something, draw blood?

#### altGore

Will this weapon's secondary fire upon striking someone or something, draw blood?