public static void Add() { Gun gun = ETGMod.Databases.Items.NewGun("Galaxy Crusher", "galaxycrusher"); Game.Items.Rename("outdated_gun_mods:galaxy_crusher", "nn:galaxy_crusher"); var behav = gun.gameObject.AddComponent <GalaxyCrusher>(); behav.preventNormalReloadAudio = true; behav.overrideNormalReloadAudio = "Play_ENV_water_splash_01"; gun.SetShortDescription("Cosmic Crunch"); gun.SetLongDescription("Tears apart the fabric of space time and good game design, allowing for ridiculous gun effects and fourth wall breaking Ammonomicon descriptions."); gun.SetupSprite(null, "galaxycrusher_idle_001", 8); gun.SetAnimationFPS(gun.chargeAnimation, 13); gun.SetAnimationFPS(gun.shootAnimation, 12); gun.SetAnimationFPS(gun.reloadAnimation, 9); gun.AddProjectileModuleFrom(PickupObjectDatabase.GetById(86) as Gun, true, false); //GUN STATS gun.GetComponent <tk2dSpriteAnimator>().GetClipByName(gun.shootAnimation).frames[0].eventAudio = "Play_WPN_blackhole_shot_01"; gun.GetComponent <tk2dSpriteAnimator>().GetClipByName(gun.shootAnimation).frames[0].triggerEvent = true; gun.GetComponent <tk2dSpriteAnimator>().GetClipByName(gun.chargeAnimation).frames[0].eventAudio = "Play_WPN_blackhole_charge_01"; gun.GetComponent <tk2dSpriteAnimator>().GetClipByName(gun.chargeAnimation).frames[0].triggerEvent = true; gun.GetComponent <tk2dSpriteAnimator>().GetClipByName(gun.chargeAnimation).frames[22].eventAudio = "Play_WPN_stdissuelaser_shot_01"; gun.GetComponent <tk2dSpriteAnimator>().GetClipByName(gun.chargeAnimation).frames[22].triggerEvent = true; gun.GetComponent <tk2dSpriteAnimator>().GetClipByName(gun.chargeAnimation).frames[24].eventAudio = "Play_WPN_stdissuelaser_shot_01"; gun.GetComponent <tk2dSpriteAnimator>().GetClipByName(gun.chargeAnimation).frames[24].triggerEvent = true; gun.muzzleFlashEffects = (PickupObjectDatabase.GetById(228) as Gun).muzzleFlashEffects; gun.DefaultModule.ammoCost = 1; gun.DefaultModule.shootStyle = ProjectileModule.ShootStyle.Charged; gun.DefaultModule.sequenceStyle = ProjectileModule.ProjectileSequenceStyle.Random; gun.reloadTime = 2f; gun.DefaultModule.cooldownTime = 0.5f; gun.DefaultModule.numberOfShotsInClip = 1; gun.barrelOffset.transform.localPosition = new Vector3(4.18f, 1.56f, 0f); gun.SetBaseMaxAmmo(10); gun.gunClass = GunClass.CHARGE; gun.GetComponent <tk2dSpriteAnimator>().GetClipByName(gun.chargeAnimation).wrapMode = tk2dSpriteAnimationClip.WrapMode.LoopSection; gun.GetComponent <tk2dSpriteAnimator>().GetClipByName(gun.chargeAnimation).loopStart = 21; //BULLET STATS Projectile projectile = UnityEngine.Object.Instantiate <Projectile>((PickupObjectDatabase.GetById(169) as Gun).DefaultModule.projectiles[0]); projectile.gameObject.SetActive(false); FakePrefab.MarkAsFakePrefab(projectile.gameObject); UnityEngine.Object.DontDestroyOnLoad(projectile); gun.DefaultModule.projectiles[0] = projectile; projectile.baseData.damage = 20f; projectile.baseData.speed *= 10f; projectile.AdditionalScaleMultiplier = 2f; //SmallerHole Projectile smallhole = UnityEngine.Object.Instantiate <Projectile>((PickupObjectDatabase.GetById(169) as Gun).DefaultModule.projectiles[0]); smallhole.gameObject.SetActive(false); FakePrefab.MarkAsFakePrefab(smallhole.gameObject); UnityEngine.Object.DontDestroyOnLoad(smallhole); gun.DefaultModule.projectiles[0] = smallhole; smallhole.baseData.damage = 5f; smallhole.baseData.speed = 5f; smallhole.AdditionalScaleMultiplier = 0.9f; BounceProjModifier bounce = smallhole.gameObject.AddComponent <BounceProjModifier>(); bounce.numberOfBounces = 1; EasyTrailBullet trail4 = smallhole.gameObject.AddComponent <EasyTrailBullet>(); trail4.TrailPos = smallhole.transform.position; trail4.StartWidth = 1.56f; trail4.EndWidth = 0f; trail4.LifeTime = 1.5f; trail4.BaseColor = Color.black; trail4.EndColor = Color.black; SpawnProjModifier spawn = projectile.gameObject.AddComponent <SpawnProjModifier>(); spawn.spawnProjecitlesOnDieInAir = true; spawn.spawnProjectilesOnCollision = true; spawn.spawnProjectilesInFlight = false; spawn.spawnOnObjectCollisions = true; spawn.collisionSpawnStyle = SpawnProjModifier.CollisionSpawnStyle.RADIAL; spawn.numberToSpawnOnCollison = 30; spawn.PostprocessSpawnedProjectiles = true; spawn.projectileToSpawnOnCollision = smallhole; spawn.spawnCollisionProjectilesOnBounce = false; ProjectileModule.ChargeProjectile chargeProj = new ProjectileModule.ChargeProjectile { Projectile = projectile, ChargeTime = 2f, }; gun.DefaultModule.chargeProjectiles = new List <ProjectileModule.ChargeProjectile> { chargeProj }; gun.DefaultModule.ammoType = GameUIAmmoType.AmmoType.CUSTOM; gun.DefaultModule.customAmmoType = "black_hole"; // Here we just set the quality of the gun and the "EncounterGuid", which is used by Gungeon to identify the gun. gun.quality = PickupObject.ItemQuality.S; ETGMod.Databases.Items.Add(gun, null, "ANY"); ID = gun.PickupObjectId; }
public static void Add() { Gun gun = ETGMod.Databases.Items.NewGun("Tau Cannon", "taucannon"); Game.Items.Rename("outdated_gun_mods:tau_cannon", "nn:tau_cannon"); gun.gameObject.AddComponent <TauCannon>(); gun.SetShortDescription("Questionable Ethics"); gun.SetLongDescription("An ingenious way devised by scientists in the field of materials handling to dispose of spent uranium." + "\n\nWill violently overcharge if powered up for too long."); gun.SetupSprite(null, "taucannon_idle_001", 8); gun.SetAnimationFPS(gun.shootAnimation, 15); gun.SetAnimationFPS(gun.chargeAnimation, 6); gun.gunSwitchGroup = (PickupObjectDatabase.GetById(593) as Gun).gunSwitchGroup; gun.AddProjectileModuleFrom(PickupObjectDatabase.GetById(56) as Gun, true, false); gun.GetComponent <tk2dSpriteAnimator>().GetClipByName(gun.chargeAnimation).wrapMode = tk2dSpriteAnimationClip.WrapMode.LoopSection; gun.GetComponent <tk2dSpriteAnimator>().GetClipByName(gun.chargeAnimation).loopStart = 12; //GUN STATS gun.doesScreenShake = true; gun.gunScreenShake = (PickupObjectDatabase.GetById(37) as Gun).gunScreenShake; gun.DefaultModule.ammoCost = 1; gun.DefaultModule.shootStyle = ProjectileModule.ShootStyle.Charged; gun.DefaultModule.sequenceStyle = ProjectileModule.ProjectileSequenceStyle.Random; gun.reloadTime = 1f; gun.muzzleFlashEffects = (PickupObjectDatabase.GetById(5) as Gun).muzzleFlashEffects; gun.DefaultModule.angleVariance = 2f; gun.DefaultModule.cooldownTime = 0.2f; gun.DefaultModule.numberOfShotsInClip = -1; gun.barrelOffset.transform.localPosition = new Vector3(3.18f, 0.75f, 0f); gun.SetBaseMaxAmmo(100); gun.ammo = 100; gun.gunClass = GunClass.CHARGE; //BULLET STATS Projectile projectile = UnityEngine.Object.Instantiate <Projectile>(gun.DefaultModule.projectiles[0]); projectile.gameObject.SetActive(false); FakePrefab.MarkAsFakePrefab(projectile.gameObject); UnityEngine.Object.DontDestroyOnLoad(projectile); projectile.baseData.damage = 15; projectile.baseData.speed = 50; projectile.hitEffects.alwaysUseMidair = true; projectile.hitEffects.overrideMidairDeathVFX = EasyVFXDatabase.YellowLaserCircleVFX; projectile.SetProjectileSpriteRight("tau_projectile1", 4, 2, false, tk2dBaseSprite.Anchor.MiddleCenter, 4, 2); EasyTrailBullet trail1 = projectile.gameObject.AddComponent <EasyTrailBullet>(); trail1.TrailPos = projectile.transform.position; trail1.StartWidth = 0.12f; trail1.EndWidth = 0.12f; trail1.LifeTime = 100f; trail1.BaseColor = ExtendedColours.honeyYellow; trail1.EndColor = ExtendedColours.honeyYellow; //CHARGE BULLET STATS Projectile chargeprojectile = UnityEngine.Object.Instantiate <Projectile>((PickupObjectDatabase.GetById(56) as Gun).DefaultModule.projectiles[0]); chargeprojectile.gameObject.SetActive(false); FakePrefab.MarkAsFakePrefab(chargeprojectile.gameObject); UnityEngine.Object.DontDestroyOnLoad(chargeprojectile); chargeprojectile.baseData.speed = 50; chargeprojectile.baseData.damage = 25; chargeprojectile.baseData.force *= 2; chargeprojectile.hitEffects.alwaysUseMidair = true; chargeprojectile.hitEffects.overrideMidairDeathVFX = EasyVFXDatabase.YellowLaserCircleVFX; chargeprojectile.SetProjectileSpriteRight("tau_projectile2", 4, 2, false, tk2dBaseSprite.Anchor.MiddleCenter, 4, 2); EasyTrailBullet trail2 = chargeprojectile.gameObject.AddComponent <EasyTrailBullet>(); trail2.TrailPos = chargeprojectile.transform.position; trail2.StartWidth = 0.12f; trail2.EndWidth = 0.12f; trail2.LifeTime = 100f; trail2.BaseColor = ExtendedColours.paleYellow; trail2.EndColor = ExtendedColours.paleYellow; //Charge 2 Projectile chargeprojectile2 = UnityEngine.Object.Instantiate <Projectile>((PickupObjectDatabase.GetById(56) as Gun).DefaultModule.projectiles[0]); chargeprojectile2.gameObject.SetActive(false); FakePrefab.MarkAsFakePrefab(chargeprojectile2.gameObject); UnityEngine.Object.DontDestroyOnLoad(chargeprojectile2); chargeprojectile2.baseData.speed = 50; chargeprojectile2.baseData.force *= 10; chargeprojectile2.baseData.damage = 50; chargeprojectile2.hitEffects.alwaysUseMidair = true; chargeprojectile2.hitEffects.overrideMidairDeathVFX = EasyVFXDatabase.YellowLaserCircleVFX; chargeprojectile2.SetProjectileSpriteRight("tau_projectile3", 4, 2, false, tk2dBaseSprite.Anchor.MiddleCenter, 4, 2); EasyTrailBullet trail3 = chargeprojectile2.gameObject.AddComponent <EasyTrailBullet>(); trail3.TrailPos = chargeprojectile2.transform.position; trail3.StartWidth = 0.12f; trail3.EndWidth = 0.12f; trail3.LifeTime = 100f; trail3.BaseColor = Color.white; trail3.EndColor = Color.white; ProjectileModule.ChargeProjectile chargeProj1 = new ProjectileModule.ChargeProjectile { Projectile = projectile, ChargeTime = 0f, VfxPool = null, }; ProjectileModule.ChargeProjectile chargeProj2 = new ProjectileModule.ChargeProjectile { Projectile = chargeprojectile, ChargeTime = 1f, }; ProjectileModule.ChargeProjectile chargeProj3 = new ProjectileModule.ChargeProjectile { Projectile = chargeprojectile2, ChargeTime = 2f, }; gun.DefaultModule.chargeProjectiles = new List <ProjectileModule.ChargeProjectile> { chargeProj1, chargeProj2, chargeProj3 }; gun.DefaultModule.ammoType = GameUIAmmoType.AmmoType.CUSTOM; gun.DefaultModule.customAmmoType = CustomClipAmmoTypeToolbox.AddCustomAmmoType("TauCannon Bullets", "NevernamedsItems/Resources/CustomGunAmmoTypes/taucannon_clipfull", "NevernamedsItems/Resources/CustomGunAmmoTypes/taucannon_clipempty"); gun.quality = PickupObject.ItemQuality.B; ETGMod.Databases.Items.Add(gun, null, "ANY"); TauCannonID = gun.PickupObjectId; }
public static void Add() { Gun gun = ETGMod.Databases.Items.NewGun("Rebondir", "rebondir"); Game.Items.Rename("outdated_gun_mods:rebondir", "nn:rebondir"); gun.gameObject.AddComponent <Rebondir>(); gun.SetShortDescription("Mort Indirecte"); gun.SetLongDescription("Fires bouncy bolts of energy that only get stronger with each ricochet." + "\n\nUsed by Hegemony of Man soldiers to clear hostile structures without setting foot inside."); gun.SetupSprite(null, "rebondir_idle_001", 8); gun.SetAnimationFPS(gun.shootAnimation, 12); gun.gunSwitchGroup = (PickupObjectDatabase.GetById(89) as Gun).gunSwitchGroup; gun.AddProjectileModuleFrom(PickupObjectDatabase.GetById(86) as Gun, true, false); gun.gunHandedness = GunHandedness.TwoHanded; gun.muzzleFlashEffects = (PickupObjectDatabase.GetById(89) as Gun).muzzleFlashEffects; //GUN STATS gun.DefaultModule.ammoCost = 1; gun.DefaultModule.shootStyle = ProjectileModule.ShootStyle.Automatic; gun.DefaultModule.sequenceStyle = ProjectileModule.ProjectileSequenceStyle.Random; gun.reloadTime = 1.1f; gun.DefaultModule.cooldownTime = 0.11f; gun.DefaultModule.numberOfShotsInClip = 20; gun.barrelOffset.transform.localPosition = new Vector3(1.56f, 0.31f, 0f); gun.SetBaseMaxAmmo(450); gun.ammo = 450; gun.gunClass = GunClass.FULLAUTO; //BULLET STATS Projectile projectile = UnityEngine.Object.Instantiate <Projectile>(gun.DefaultModule.projectiles[0]); projectile.gameObject.SetActive(false); FakePrefab.MarkAsFakePrefab(projectile.gameObject); UnityEngine.Object.DontDestroyOnLoad(projectile); gun.DefaultModule.projectiles[0] = projectile; projectile.baseData.damage = 5.5f; projectile.baseData.speed *= 3f; projectile.baseData.range *= 10f; BounceProjModifier bounce = projectile.gameObject.GetOrAddComponent <BounceProjModifier>(); bounce.numberOfBounces = 3; bounce.damageMultiplierOnBounce = 1.3f; projectile.SetProjectileSpriteRight("initiatewand_bouncer", 4, 4, true, tk2dBaseSprite.Anchor.MiddleCenter, 4, 4); EasyTrailBullet trail4 = projectile.gameObject.AddComponent <EasyTrailBullet>(); trail4.TrailPos = projectile.transform.position; trail4.StartWidth = 0.125f; trail4.EndWidth = 0f; trail4.LifeTime = 0.5f; trail4.BaseColor = ExtendedColours.poisonGreen; trail4.EndColor = ExtendedColours.poisonGreen; projectile.hitEffects.alwaysUseMidair = true; projectile.hitEffects.overrideMidairDeathVFX = (PickupObjectDatabase.GetById(89) as Gun).DefaultModule.projectiles[0].hitEffects.overrideMidairDeathVFX; projectile.transform.parent = gun.barrelOffset; gun.DefaultModule.ammoType = GameUIAmmoType.AmmoType.CUSTOM; gun.DefaultModule.customAmmoType = "green_small"; gun.quality = PickupObject.ItemQuality.B; ETGMod.Databases.Items.Add(gun, null, "ANY"); gun.SetupUnlockOnCustomFlag(CustomDungeonFlags.PURCHASED_REBONDIR, true); gun.AddToSubShop(ItemBuilder.ShopType.Trorc); RebondirID = gun.PickupObjectId; }
public static void Add() { Gun gun = ETGMod.Databases.Items.NewGun("Flipflop", "flipflop"); Game.Items.Rename("outdated_gun_mods:flipflop", "nn:flipflop"); gun.gameObject.AddComponent <FlipFlop>(); gun.SetShortDescription(""); gun.SetLongDescription(""); gun.SetupSprite(null, "flipflop_idle_001", 8); gun.SetAnimationFPS(gun.shootAnimation, 12); gun.AddProjectileModuleFrom(PickupObjectDatabase.GetById(56) as Gun, true, false); gun.muzzleFlashEffects = (PickupObjectDatabase.GetById(5) as Gun).muzzleFlashEffects; //GUN STATS gun.DefaultModule.ammoCost = 1; gun.DefaultModule.shootStyle = ProjectileModule.ShootStyle.Burst; gun.DefaultModule.sequenceStyle = ProjectileModule.ProjectileSequenceStyle.Random; gun.reloadTime = 1.2f; gun.DefaultModule.burstShotCount = 4; gun.DefaultModule.burstCooldownTime = 0.1f; gun.DefaultModule.cooldownTime = 0.25f; gun.DefaultModule.numberOfShotsInClip = 8; gun.DefaultModule.angleVariance = 3.5f; gun.barrelOffset.transform.localPosition = new Vector3(2.68f, 0.87f, 0f); gun.SetBaseMaxAmmo(240); gun.ammo = 240; gun.gunClass = GunClass.RIFLE; //BULLET STATS Projectile projectile = UnityEngine.Object.Instantiate <Projectile>(gun.DefaultModule.projectiles[0]); projectile.gameObject.SetActive(false); FakePrefab.MarkAsFakePrefab(projectile.gameObject); UnityEngine.Object.DontDestroyOnLoad(projectile); gun.DefaultModule.projectiles[0] = projectile; projectile.baseData.damage = 10f; projectile.baseData.speed *= 3f; projectile.baseData.range *= 10f; PierceDeadActors piercedead = projectile.gameObject.AddComponent <PierceDeadActors>(); projectile.SetProjectileSpriteRight("burstrifle_proj", 7, 4, true, tk2dBaseSprite.Anchor.MiddleCenter, 7, 4); EasyTrailBullet trail4 = projectile.gameObject.AddComponent <EasyTrailBullet>(); trail4.TrailPos = projectile.transform.position; trail4.StartWidth = 0.25f; trail4.EndWidth = 0f; trail4.LifeTime = 0.1f; trail4.BaseColor = ExtendedColours.honeyYellow; trail4.EndColor = ExtendedColours.honeyYellow; projectile.hitEffects.alwaysUseMidair = true; projectile.hitEffects.overrideMidairDeathVFX = (PickupObjectDatabase.GetById(647) as Gun).DefaultModule.projectiles[0].hitEffects.tileMapVertical.effects[0].effects[0].effect; projectile.transform.parent = gun.barrelOffset; gun.DefaultModule.ammoType = GameUIAmmoType.AmmoType.CUSTOM; gun.DefaultModule.customAmmoType = "Rifle"; gun.quality = PickupObject.ItemQuality.A; ETGMod.Databases.Items.Add(gun, null, "ANY"); gun.AddToSubShop(ItemBuilder.ShopType.Trorc); ID = gun.PickupObjectId; }
public static void Add() { Gun gun = ETGMod.Databases.Items.NewGun("CARRION", "carrion2"); Game.Items.Rename("outdated_gun_mods:carrion", "nn:carrion"); var behav = gun.gameObject.AddComponent <Carrion>(); behav.preventNormalFireAudio = true; gun.SetShortDescription("Fresh Meat"); gun.SetLongDescription("A wormlike colony of bizarre organisms. Unknown origin." + "\n\nIt has three base desires. \nTo grow. \nTo Spread. \nTo Feed."); gun.SetupSprite(null, "carrion2_idle_001", 8); gun.SetAnimationFPS(gun.shootAnimation, 13); gun.SetAnimationFPS(gun.idleAnimation, 13); gun.isAudioLoop = true; gun.AddProjectileModuleFrom(PickupObjectDatabase.GetById(86) as Gun, true, false); //GUN STATS gun.doesScreenShake = false; gun.DefaultModule.ammoCost = 5; gun.DefaultModule.shootStyle = ProjectileModule.ShootStyle.Beam; gun.DefaultModule.sequenceStyle = ProjectileModule.ProjectileSequenceStyle.Random; gun.reloadTime = 1f; gun.muzzleFlashEffects.type = VFXPoolType.None; gun.DefaultModule.cooldownTime = 0.001f; gun.DefaultModule.numberOfShotsInClip = 600; gun.DefaultModule.ammoType = GameUIAmmoType.AmmoType.BEAM; gun.barrelOffset.transform.localPosition = new Vector3(0.75f, 0.56f, 0f); gun.SetBaseMaxAmmo(600); gun.ammo = 600; gun.gunClass = GunClass.SILLY; gun.GetComponent <tk2dSpriteAnimator>().GetClipByName(gun.shootAnimation).wrapMode = tk2dSpriteAnimationClip.WrapMode.LoopSection; gun.GetComponent <tk2dSpriteAnimator>().GetClipByName(gun.shootAnimation).loopStart = 0; //SUB TENTACLE #region subtentacle Projectile subTendrilProj = UnityEngine.Object.Instantiate <Projectile>((PickupObjectDatabase.GetById(86) as Gun).DefaultModule.projectiles[0]); BasicBeamController subTendrilComp = subTendrilProj.GenerateBeamPrefab( "NevernamedsItems/Resources/BeamSprites/carrionsubtendril_mid_001", new Vector2(4, 2), new Vector2(0, 1), new List <string>() { "NevernamedsItems/Resources/BeamSprites/carrionsubtendril_mid_001" }, 13, //Impact null, -1, null, null, //End new List <string>() { "NevernamedsItems/Resources/BeamSprites/carrionsubtendril_end_001" }, 13, new Vector2(6, 2), new Vector2(0, 1), //Beginning new List <string>() { "NevernamedsItems/Resources/BeamSprites/carrionsubtendril_start_001" }, 13, new Vector2(7, 2), new Vector2(0, 1), //Other Variables 0 ); subTendrilProj.gameObject.SetActive(false); FakePrefab.MarkAsFakePrefab(subTendrilProj.gameObject); UnityEngine.Object.DontDestroyOnLoad(subTendrilProj); subTendrilProj.baseData.damage = 10f; subTendrilProj.baseData.force *= 1f; subTendrilProj.baseData.range = 3.5f; subTendrilComp.ProjectileAndBeamMotionModule = new HelixProjectileMotionModule(); subTendrilComp.boneType = BasicBeamController.BeamBoneType.Projectile; subTendrilComp.penetration = 1; subTendrilComp.homingRadius = 10; subTendrilComp.homingAngularVelocity = 1000; CarrionSubTendrilController subtendril = subTendrilProj.gameObject.AddComponent <CarrionSubTendrilController>(); #endregion //MAIN TENTACLE #region maintentacle List <string> BeamAnimPaths = new List <string>() { "NevernamedsItems/Resources/BeamSprites/carrion2_mid_001", "NevernamedsItems/Resources/BeamSprites/carrion2_mid_002", "NevernamedsItems/Resources/BeamSprites/carrion2_mid_003", "NevernamedsItems/Resources/BeamSprites/carrion2_mid_004", "NevernamedsItems/Resources/BeamSprites/carrion2_mid_005", }; List <string> BeamEndPaths = new List <string>() { "NevernamedsItems/Resources/BeamSprites/carrion2_end_001", "NevernamedsItems/Resources/BeamSprites/carrion2_end_002", "NevernamedsItems/Resources/BeamSprites/carrion2_end_003", "NevernamedsItems/Resources/BeamSprites/carrion2_end_004", "NevernamedsItems/Resources/BeamSprites/carrion2_end_005", }; //BULLET STATS Projectile projectile = UnityEngine.Object.Instantiate <Projectile>((PickupObjectDatabase.GetById(86) as Gun).DefaultModule.projectiles[0]); BasicBeamController beamComp = projectile.GenerateBeamPrefab( "NevernamedsItems/Resources/BeamSprites/carrion2_mid_001", new Vector2(16, 5), new Vector2(0, 6), BeamAnimPaths, 13, //Impact null, -1, null, null, //End BeamEndPaths, 13, new Vector2(10, 5), new Vector2(0, 6), //Beginning null, -1, null, null, //Other Variables 0 ); projectile.gameObject.SetActive(false); FakePrefab.MarkAsFakePrefab(projectile.gameObject); UnityEngine.Object.DontDestroyOnLoad(projectile); projectile.baseData.damage = 30f; projectile.baseData.force *= 1f; projectile.baseData.range = 8; projectile.baseData.speed *= 3; beamComp.boneType = BasicBeamController.BeamBoneType.Projectile; beamComp.startAudioEvent = "Play_WPN_demonhead_shot_01"; beamComp.endAudioEvent = "Stop_WPN_All"; beamComp.penetration = 1; beamComp.homingRadius = 5; beamComp.homingAngularVelocity = 300; CarrionMainTendrilController mainTendril = projectile.gameObject.AddComponent <CarrionMainTendrilController>(); mainTendril.subTendrilPrefab = subTendrilProj.gameObject; gun.DefaultModule.projectiles[0] = projectile; #endregion //ESCAPING WIGGLER #region escapingwiggler Projectile wiggler = DataCloners.CopyFields <HelixProjectile>(Instantiate((PickupObjectDatabase.GetById(56) as Gun).DefaultModule.projectiles[0])); wiggler.gameObject.SetActive(false); FakePrefab.MarkAsFakePrefab(wiggler.gameObject); UnityEngine.Object.DontDestroyOnLoad(wiggler); wiggler.baseData.speed *= 1f; wiggler.baseData.damage = 20; wiggler.baseData.range *= 10f; HomingModifier homing = wiggler.gameObject.GetOrAddComponent <HomingModifier>(); homing.HomingRadius = 10; homing.AngularVelocity = 200; PierceProjModifier piercing = wiggler.gameObject.GetOrAddComponent <PierceProjModifier>(); piercing.penetratesBreakables = true; piercing.penetration++; wiggler.SetProjectileSpriteRight("carrion_wiggler", 5, 5, true, tk2dBaseSprite.Anchor.MiddleCenter, 5, 5); EasyTrailBullet trail = wiggler.gameObject.AddComponent <EasyTrailBullet>(); trail.TrailPos = projectile.transform.position; trail.StartWidth = 0.31f; trail.EndWidth = 0; trail.LifeTime = 0.3f; trail.BaseColor = ExtendedColours.carrionRed; trail.EndColor = ExtendedColours.carrionRed; EscapingWigglerProjectile = wiggler; #endregion gun.DefaultModule.ammoType = GameUIAmmoType.AmmoType.CUSTOM; gun.DefaultModule.customAmmoType = "Carrion Clip"; gun.quality = PickupObject.ItemQuality.S; //S ETGMod.Databases.Items.Add(gun, null, "ANY"); CarrionForme1ID = gun.PickupObjectId; }
public static void Add() { Gun gun = ETGMod.Databases.Items.NewGun("Initiate Wand", "initiatewand"); Game.Items.Rename("outdated_gun_mods:initiate_wand", "nn:initiate_wand"); gun.gameObject.AddComponent <InitiateWand>(); gun.SetShortDescription("You Just Got Witch'd"); gun.SetLongDescription("Adopts one of four random spell types each time it is encountered." + "\n\nCrafted (poorly) by an Apprentice Gunjurer."); gun.SetupSprite(null, "initiatewand_idle_001", 8); gun.SetAnimationFPS(gun.shootAnimation, 15); gun.AddProjectileModuleFrom(PickupObjectDatabase.GetById(86) as Gun, true, false); gun.gunSwitchGroup = (PickupObjectDatabase.GetById(145) as Gun).gunSwitchGroup; gun.muzzleFlashEffects = (PickupObjectDatabase.GetById(33) as Gun).muzzleFlashEffects; //GUN STATS gun.DefaultModule.ammoCost = 1; gun.DefaultModule.shootStyle = ProjectileModule.ShootStyle.SemiAutomatic; gun.DefaultModule.sequenceStyle = ProjectileModule.ProjectileSequenceStyle.Random; gun.reloadTime = 0.7f; gun.DefaultModule.cooldownTime = 0.25f; gun.DefaultModule.numberOfShotsInClip = 4; gun.barrelOffset.transform.localPosition = new Vector3(0.93f, 0.5f, 0f); gun.SetBaseMaxAmmo(180); gun.gunClass = GunClass.SILLY; gun.GetComponent <tk2dSpriteAnimator>().GetClipByName(gun.reloadAnimation).wrapMode = tk2dSpriteAnimationClip.WrapMode.Loop; //BULLET STATS Projectile projectile = UnityEngine.Object.Instantiate <Projectile>(gun.DefaultModule.projectiles[0]); projectile.gameObject.SetActive(false); FakePrefab.MarkAsFakePrefab(projectile.gameObject); UnityEngine.Object.DontDestroyOnLoad(projectile); gun.DefaultModule.projectiles[0] = projectile; projectile.baseData.damage = 8; projectile.baseData.range *= 2; projectile.baseData.speed *= 2; EasyTrailBullet trail = projectile.gameObject.AddComponent <EasyTrailBullet>(); trail.TrailPos = projectile.transform.position; trail.StartWidth = 0.25f; trail.EndWidth = 0f; trail.LifeTime = 0.5f; trail.BaseColor = ExtendedColours.pink; trail.EndColor = ExtendedColours.pink; projectile.hitEffects.alwaysUseMidair = true; projectile.hitEffects.overrideMidairDeathVFX = (PickupObjectDatabase.GetById(145) as Gun).DefaultModule.projectiles[0].hitEffects.enemy.effects[0].effects[0].effect; projectile.SetProjectileSpriteRight("initiatewand_sparkbolt", 7, 7, true, tk2dBaseSprite.Anchor.MiddleCenter, 7, 7); SpecialProjectileIdentifier ID1 = projectile.gameObject.AddComponent <SpecialProjectileIdentifier>(); ID1.SpecialIdentifier = "INITIATE_WAND"; //Energy Ball Projectile energyball = UnityEngine.Object.Instantiate <Projectile>((PickupObjectDatabase.GetById(86) as Gun).DefaultModule.projectiles[0]); energyball.gameObject.SetActive(false); FakePrefab.MarkAsFakePrefab(energyball.gameObject); UnityEngine.Object.DontDestroyOnLoad(energyball); energyball.baseData.damage = 17; energyball.baseData.speed *= 0.6f; energyball.baseData.range *= 0.5f; EasyTrailBullet trail3 = energyball.gameObject.AddComponent <EasyTrailBullet>(); trail3.TrailPos = energyball.transform.position; trail3.StartWidth = 0.5f; trail3.EndWidth = 0f; trail3.LifeTime = 0.2f; trail3.BaseColor = ExtendedColours.freezeBlue; trail3.EndColor = ExtendedColours.freezeBlue; energyball.hitEffects.alwaysUseMidair = true; energyball.hitEffects.overrideMidairDeathVFX = (PickupObjectDatabase.GetById(18) as Gun).DefaultModule.projectiles[0].hitEffects.overrideMidairDeathVFX; energyball.SetProjectileSpriteRight("initiatewand_energyball", 8, 8, true, tk2dBaseSprite.Anchor.MiddleCenter, 7, 7); SpecialProjectileIdentifier ID2 = energyball.gameObject.AddComponent <SpecialProjectileIdentifier>(); ID2.SpecialIdentifier = "INITIATE_WAND"; EnergyBall = energyball; //Bouncer Projectile bouncer = UnityEngine.Object.Instantiate <Projectile>((PickupObjectDatabase.GetById(86) as Gun).DefaultModule.projectiles[0]); bouncer.gameObject.SetActive(false); FakePrefab.MarkAsFakePrefab(bouncer.gameObject); UnityEngine.Object.DontDestroyOnLoad(bouncer); bouncer.baseData.damage = 5.5f; bouncer.baseData.speed *= 3f; bouncer.baseData.range *= 10f; bouncer.hitEffects.alwaysUseMidair = true; EasyTrailBullet trail4 = bouncer.gameObject.AddComponent <EasyTrailBullet>(); trail4.TrailPos = bouncer.transform.position; trail4.StartWidth = 0.125f; trail4.EndWidth = 0f; trail4.LifeTime = 0.5f; trail4.BaseColor = ExtendedColours.poisonGreen; trail4.EndColor = ExtendedColours.poisonGreen; BounceProjModifier bouncing = bouncer.gameObject.GetOrAddComponent <BounceProjModifier>(); bouncing.numberOfBounces = 3; bouncing.damageMultiplierOnBounce = 2; bouncer.hitEffects.overrideMidairDeathVFX = (PickupObjectDatabase.GetById(89) as Gun).DefaultModule.projectiles[0].hitEffects.overrideMidairDeathVFX; bouncer.SetProjectileSpriteRight("initiatewand_bouncer", 4, 4, true, tk2dBaseSprite.Anchor.MiddleCenter, 4, 4); SpecialProjectileIdentifier ID3 = bouncer.gameObject.AddComponent <SpecialProjectileIdentifier>(); ID3.SpecialIdentifier = "INITIATE_WAND"; GreenBouncyProj = bouncer; //Pink Shitty Projectile pinkshitty = UnityEngine.Object.Instantiate <Projectile>((PickupObjectDatabase.GetById(86) as Gun).DefaultModule.projectiles[0]); pinkshitty.gameObject.SetActive(false); FakePrefab.MarkAsFakePrefab(pinkshitty.gameObject); UnityEngine.Object.DontDestroyOnLoad(pinkshitty); pinkshitty.baseData.damage = 22f; pinkshitty.baseData.speed *= 1.5f; pinkshitty.hitEffects.alwaysUseMidair = true; ScaleChangeOverTimeModifier scaler = pinkshitty.gameObject.GetOrAddComponent <ScaleChangeOverTimeModifier>(); scaler.destroyAfterChange = true; scaler.timeToChangeOver = 0.3f; scaler.ScaleToChangeTo = 0.01f; scaler.suppressDeathFXIfdestroyed = true; BounceProjModifier pinkshittybonce = pinkshitty.gameObject.GetOrAddComponent <BounceProjModifier>(); pinkshittybonce.numberOfBounces = 1; pinkshittybonce.damageMultiplierOnBounce = 1; pinkshitty.hitEffects.overrideMidairDeathVFX = RainbowGuonStone.RedGuonTransitionVFX; pinkshitty.SetProjectileSpriteRight("initiatewand_pinkshitty", 8, 8, true, tk2dBaseSprite.Anchor.MiddleCenter, 6, 6); SpecialProjectileIdentifier ID4 = pinkshitty.gameObject.AddComponent <SpecialProjectileIdentifier>(); ID4.SpecialIdentifier = "INITIATE_WAND"; PinkBouncer = pinkshitty; gun.DefaultModule.ammoType = GameUIAmmoType.AmmoType.CUSTOM; gun.DefaultModule.customAmmoType = CustomClipAmmoTypeToolbox.AddCustomAmmoType("Initiate Wand Bullets", "NevernamedsItems/Resources/CustomGunAmmoTypes/initiatewand_clipfull", "NevernamedsItems/Resources/CustomGunAmmoTypes/initiatewand_clipempty"); gun.quality = PickupObject.ItemQuality.C; ETGMod.Databases.Items.Add(gun, null, "ANY"); InitiateWandID = gun.PickupObjectId; }
public static void Add() { Gun gun = ETGMod.Databases.Items.NewGun("Burst Rifle", "burstrifle"); Game.Items.Rename("outdated_gun_mods:burst_rifle", "nn:burst_rifle"); gun.gameObject.AddComponent <BurstRifle>(); gun.SetShortDescription("Trifling Matters"); gun.SetLongDescription("Designed by famous gunsmith Algernon Burst, this classic weapon features a stylish leather grip." + "\n\nPuts the tat-tat in 'ratta tat-tat'. Whatever the hell that means."); gun.SetupSprite(null, "burstrifle_idle_001", 8); gun.SetAnimationFPS(gun.shootAnimation, 12); gun.SetAnimationFPS(gun.reloadAnimation, 0); gun.gunSwitchGroup = (PickupObjectDatabase.GetById(5) as Gun).gunSwitchGroup; gun.AddCurrentGunStatModifier(PlayerStats.StatType.Coolness, 2f, StatModifier.ModifyMethod.ADDITIVE); gun.AddProjectileModuleFrom(PickupObjectDatabase.GetById(56) as Gun, true, false); gun.gunHandedness = GunHandedness.TwoHanded; gun.muzzleFlashEffects = (PickupObjectDatabase.GetById(5) as Gun).muzzleFlashEffects; //GUN STATS gun.DefaultModule.ammoCost = 1; gun.DefaultModule.shootStyle = ProjectileModule.ShootStyle.Burst; gun.DefaultModule.sequenceStyle = ProjectileModule.ProjectileSequenceStyle.Random; gun.reloadTime = 1.2f; gun.DefaultModule.burstShotCount = 4; gun.DefaultModule.burstCooldownTime = 0.1f; gun.DefaultModule.cooldownTime = 0.25f; gun.DefaultModule.numberOfShotsInClip = 8; gun.DefaultModule.angleVariance = 3.5f; gun.barrelOffset.transform.localPosition = new Vector3(2.68f, 0.87f, 0f); gun.SetBaseMaxAmmo(240); gun.ammo = 240; gun.gunClass = GunClass.RIFLE; //BULLET STATS Projectile projectile = UnityEngine.Object.Instantiate <Projectile>(gun.DefaultModule.projectiles[0]); projectile.gameObject.SetActive(false); FakePrefab.MarkAsFakePrefab(projectile.gameObject); UnityEngine.Object.DontDestroyOnLoad(projectile); gun.DefaultModule.projectiles[0] = projectile; projectile.baseData.damage = 10f; projectile.baseData.speed *= 3f; projectile.baseData.range *= 10f; PierceDeadActors piercedead = projectile.gameObject.AddComponent <PierceDeadActors>(); projectile.SetProjectileSpriteRight("burstrifle_proj", 7, 4, true, tk2dBaseSprite.Anchor.MiddleCenter, 7, 4); EasyTrailBullet trail4 = projectile.gameObject.AddComponent <EasyTrailBullet>(); trail4.TrailPos = projectile.transform.position; trail4.StartWidth = 0.25f; trail4.EndWidth = 0f; trail4.LifeTime = 0.1f; trail4.BaseColor = ExtendedColours.honeyYellow; trail4.EndColor = ExtendedColours.honeyYellow; projectile.hitEffects.alwaysUseMidair = true; projectile.hitEffects.overrideMidairDeathVFX = (PickupObjectDatabase.GetById(647) as Gun).DefaultModule.projectiles[0].hitEffects.tileMapVertical.effects[0].effects[0].effect; projectile.transform.parent = gun.barrelOffset; gun.DefaultModule.ammoType = GameUIAmmoType.AmmoType.CUSTOM; gun.DefaultModule.customAmmoType = "Rifle"; gun.quality = PickupObject.ItemQuality.A; ETGMod.Databases.Items.Add(gun, null, "ANY"); gun.AddToSubShop(ItemBuilder.ShopType.Trorc); ID = gun.PickupObjectId; }
public static void Add() { Gun gun = ETGMod.Databases.Items.NewGun("Rebondissement", "redrebondir"); Game.Items.Rename("outdated_gun_mods:rebondissement", "nn:rebondir+rebondissement"); gun.gameObject.AddComponent <RedRebondir>(); gun.SetShortDescription(""); gun.SetLongDescription(""); gun.SetupSprite(null, "redrebondir_idle_001", 8); gun.SetAnimationFPS(gun.shootAnimation, 12); gun.gunSwitchGroup = (PickupObjectDatabase.GetById(89) as Gun).gunSwitchGroup; gun.AddProjectileModuleFrom(PickupObjectDatabase.GetById(86) as Gun, true, false); gun.gunHandedness = GunHandedness.TwoHanded; gun.muzzleFlashEffects = (PickupObjectDatabase.GetById(32) as Gun).muzzleFlashEffects; //GUN STATS gun.DefaultModule.ammoCost = 1; gun.DefaultModule.shootStyle = ProjectileModule.ShootStyle.Automatic; gun.DefaultModule.sequenceStyle = ProjectileModule.ProjectileSequenceStyle.Random; gun.reloadTime = 1.1f; gun.DefaultModule.cooldownTime = 0.11f; gun.DefaultModule.numberOfShotsInClip = 20; gun.barrelOffset.transform.localPosition = new Vector3(1.56f, 0.31f, 0f); gun.SetBaseMaxAmmo(650); gun.ammo = 650; gun.gunClass = GunClass.FULLAUTO; //BULLET STATS Projectile projectile = UnityEngine.Object.Instantiate <Projectile>(gun.DefaultModule.projectiles[0]); projectile.gameObject.SetActive(false); FakePrefab.MarkAsFakePrefab(projectile.gameObject); UnityEngine.Object.DontDestroyOnLoad(projectile); gun.DefaultModule.projectiles[0] = projectile; projectile.baseData.damage = 5.5f; projectile.baseData.speed *= 3f; projectile.baseData.range *= 10f; BounceProjModifier bounce = projectile.gameObject.GetOrAddComponent <BounceProjModifier>(); bounce.numberOfBounces = 6; bounce.damageMultiplierOnBounce = 1.6f; projectile.SetProjectileSpriteRight("redrebondir_proj", 4, 4, true, tk2dBaseSprite.Anchor.MiddleCenter, 4, 4); EasyTrailBullet trail4 = projectile.gameObject.AddComponent <EasyTrailBullet>(); trail4.TrailPos = projectile.transform.position; trail4.StartWidth = 0.125f; trail4.EndWidth = 0f; trail4.LifeTime = 0.5f; trail4.BaseColor = ExtendedColours.carrionRed; trail4.EndColor = ExtendedColours.carrionRed; projectile.hitEffects.alwaysUseMidair = true; projectile.hitEffects.overrideMidairDeathVFX = (PickupObjectDatabase.GetById(32) as Gun).DefaultModule.projectiles[0].hitEffects.overrideMidairDeathVFX; projectile.transform.parent = gun.barrelOffset; gun.DefaultModule.ammoType = GameUIAmmoType.AmmoType.SMALL_BLASTER; gun.quality = PickupObject.ItemQuality.EXCLUDED; ETGMod.Databases.Items.Add(gun, null, "ANY"); RedRebondirID = gun.PickupObjectId; }
public static void Add() { Gun gun = ETGMod.Databases.Items.NewGun("Autogun", "autogun"); Game.Items.Rename("outdated_gun_mods:autogun", "nn:autogun"); var behav = gun.gameObject.AddComponent <Autogun>(); behav.preventNormalFireAudio = true; gun.SetShortDescription("Fully Fully Automatic"); gun.SetLongDescription("Fires weak energy bolts programmed to seek and destroy." + "\n\nBrought to the Gungeon by an incompetent spacefarer who couldn't hit the broad side of a barn... from inside the barn."); gun.doesScreenShake = false; gun.SetupSprite(null, "autogun_idle_001", 8); gun.SetAnimationFPS(gun.shootAnimation, 12); gun.gunSwitchGroup = (PickupObjectDatabase.GetById(89) as Gun).gunSwitchGroup; gun.AddProjectileModuleFrom(PickupObjectDatabase.GetById(86) as Gun, true, false); gun.gunHandedness = GunHandedness.TwoHanded; gun.muzzleFlashEffects = (PickupObjectDatabase.GetById(36) as Gun).muzzleFlashEffects; //GUN STATS gun.DefaultModule.ammoCost = 1; gun.DefaultModule.shootStyle = ProjectileModule.ShootStyle.Automatic; gun.DefaultModule.sequenceStyle = ProjectileModule.ProjectileSequenceStyle.Random; gun.reloadTime = 2f; gun.DefaultModule.cooldownTime = 0.02f; gun.DefaultModule.numberOfShotsInClip = -1; gun.barrelOffset.transform.localPosition = new Vector3(1.43f, 0.31f, 0f); gun.SetBaseMaxAmmo(2500); gun.ammo = 2500; gun.gunClass = GunClass.FULLAUTO; gun.GetComponent <tk2dSpriteAnimator>().GetClipByName(gun.shootAnimation).frames[0].eventAudio = "Play_MouthPopSound"; gun.GetComponent <tk2dSpriteAnimator>().GetClipByName(gun.shootAnimation).frames[0].triggerEvent = true; //BULLET STATS Projectile projectile = UnityEngine.Object.Instantiate <Projectile>((PickupObjectDatabase.GetById(445) as Gun).DefaultModule.projectiles[0].GetComponent <SpawnProjModifier>().projectileToSpawnOnCollision); projectile.gameObject.SetActive(false); FakePrefab.MarkAsFakePrefab(projectile.gameObject); UnityEngine.Object.DontDestroyOnLoad(projectile); gun.DefaultModule.projectiles[0] = projectile; projectile.baseData.damage = 1f; projectile.baseData.range *= 10f; projectile.baseData.force *= 0.05f; BounceProjModifier bounce = projectile.gameObject.GetOrAddComponent <BounceProjModifier>(); bounce.numberOfBounces = 1; projectile.SetProjectileSpriteRight("autogun_proj", 2, 2, true, tk2dBaseSprite.Anchor.MiddleCenter, 2, 2); EasyTrailBullet trail4 = projectile.gameObject.AddComponent <EasyTrailBullet>(); trail4.TrailPos = projectile.transform.position; trail4.StartWidth = 0.2f; trail4.EndWidth = 0f; trail4.LifeTime = 0.1f; trail4.BaseColor = ExtendedColours.freezeBlue; trail4.EndColor = ExtendedColours.freezeBlue; projectile.hitEffects.alwaysUseMidair = true; projectile.hitEffects.overrideMidairDeathVFX = (PickupObjectDatabase.GetById(18) as Gun).DefaultModule.projectiles[0].hitEffects.overrideMidairDeathVFX; projectile.transform.parent = gun.barrelOffset; gun.DefaultModule.ammoType = GameUIAmmoType.AmmoType.BEAM; gun.quality = PickupObject.ItemQuality.C; ETGMod.Databases.Items.Add(gun, null, "ANY"); gun.SetupUnlockOnCustomFlag(CustomDungeonFlags.PURCHASED_AUTOGUN, true); gun.AddToSubShop(ItemBuilder.ShopType.Trorc); AutogunID = gun.PickupObjectId; }