New weapon Beam Rifle, have an interesting idea

Started by MightyMonte88, December 22, 2020, 10:07:03 AM


Hey Ai_Enabled, i'm adding a new weapon i've dubbed the "Beam Rifle" It expands off a tech tier within my modpack that adds uranium (hence it will have a green LaserTrace effect haha) I'm setting it up to have such a high rate of fire that it appears to be a solid continuous beam. The damage it will deal will be half heat, half radiation.

The backstory of the weapon, is that it has an onboard micro reactor, and fires a super concentrated beam of ionizing radiation in gamma wave form, so intense that it can be seen on the visible spectrum (blue/green tint, im referencing the fuel mixing accident that happened in japan haha)

The question i have, is there a way i can apply a small amount of radiation to the USER of the weapon, while they are firing it? I'm also going to source out a sound file that has more of a hum too it, should be a good fit i think..

Also,i'm having trouble with the correct syntax to manipulate PrepareProtoWeaponRangedEnergy() to apply two types of damage instead of one, i'm unable to do it how i've done it with ammunition types.
        protected override void PrepareProtoWeaponRangedEnergy(
            ref DamageDescription damageDescription)
            damageDescription = new DamageDescription(
                damageValue: 18,
                armorPiercingCoef: 0.4,
                finalDamageMultiplier: 1.1,
                rangeMax: 13,
                damageDistribution: new DamageDistribution(DamageType.Heat, 1));
How can i set the damagedistribution.DamageType to be both Heat and Radiation (0.5/0.5) ?


Sounds like you might need to create a custom damage type...