AtomicTorch Studio Forums

CryoFall => Modding info => Topic started by: MightyMonte88 on December 22, 2020, 10:07:03 am

Title: New weapon Beam Rifle, have an interesting idea
Post by: MightyMonte88 on 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 PrepareProtoWeaponRangedEnerg y() 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 PrepareProtoWeaponRangedEnerg y(
            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) ?
Title: Re: New weapon Beam Rifle, have an interesting idea
Post by: D4LK0S on December 27, 2020, 08:19:34 pm
Sounds like you might need to create a custom damage type...