// Token: 0x0600013F RID: 319 RVA: 0x0000D468 File Offset: 0x0000B668 public static void Add() { Gun gun = ETGMod.Databases.Items.NewGun("Broken Gun", "brokengun"); Game.Items.Rename("outdated_gun_mods:broken_gun", "bny:broken_gun"); gun.gameObject.AddComponent <BrokenGunParts>(); GunExt.SetShortDescription(gun, "Uh oh."); GunExt.SetLongDescription(gun, "A gun that has fallen apart completely. The parts seem to be compatible with other guns though, so I guess its got that going for it."); GunExt.SetupSprite(gun, null, "brokengun_idle_001", 8); GunExt.SetAnimationFPS(gun, gun.shootAnimation, 16); GunExt.SetAnimationFPS(gun, gun.reloadAnimation, 2); GunExt.AddProjectileModuleFrom(gun, "magnum", true, false); gun.DefaultModule.ammoCost = 1; gun.DefaultModule.shootStyle = ProjectileModule.ShootStyle.SemiAutomatic; gun.DefaultModule.sequenceStyle = ProjectileModule.ProjectileSequenceStyle.Random; gun.reloadTime = 0f; gun.DefaultModule.angleVariance = 0f; gun.DefaultModule.cooldownTime = 0f; gun.DefaultModule.numberOfShotsInClip = 0; gun.SetBaseMaxAmmo(0); gun.ammo = 0; gun.AddPassiveStatModifier(PlayerStats.StatType.Damage, .1f, StatModifier.ModifyMethod.ADDITIVE); gun.AddPassiveStatModifier(PlayerStats.StatType.ProjectileSpeed, .2f, StatModifier.ModifyMethod.ADDITIVE); gun.AddPassiveStatModifier(PlayerStats.StatType.ReloadSpeed, .875f, StatModifier.ModifyMethod.MULTIPLICATIVE); gun.AddPassiveStatModifier(PlayerStats.StatType.RangeMultiplier, 2f, StatModifier.ModifyMethod.MULTIPLICATIVE); gun.InfiniteAmmo = false; gun.quality = PickupObject.ItemQuality.C; gun.encounterTrackable.EncounterGuid = "pARtapartspartsppartshahgGAHAHAHAHAAHhPARTSPATRp[stypoapatrs."; gun.sprite.IsPerpendicular = true; gun.gunClass = GunClass.PISTOL; gun.CanGainAmmo = false; gun.IgnoredByRat = true; gun.encounterTrackable.m_doNotificationOnEncounter = false; 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 *= 0f; projectile.baseData.speed *= 1f; projectile.baseData.force *= 0f; projectile.baseData.range *= 0f; ETGMod.Databases.Items.Add(gun, null, "ANY"); }
public static void Add() { Gun gun = ETGMod.Databases.Items.NewGun("Barcode Scanner", "barcodescanner"); Game.Items.Rename("outdated_gun_mods:barcode_scanner", "nn:barcode_scanner"); var behav = gun.gameObject.AddComponent <BarcodeScanner>(); behav.overrideNormalReloadAudio = "Play_OBJ_mine_beep_01"; behav.overrideNormalFireAudio = "Play_OBJ_mine_beep_01"; behav.preventNormalFireAudio = true; behav.preventNormalReloadAudio = true; gun.SetShortDescription("Beep"); gun.SetLongDescription("Often used in more technologically adept shops to scan items for purchase, but Bello has no idea how to use a computer."); gun.SetupSprite(null, "barcodescanner_idle_001", 8); gun.SetAnimationFPS(gun.shootAnimation, 5); gun.AddProjectileModuleFrom(PickupObjectDatabase.GetById(56) as Gun, true, false); //GUN STATS gun.DefaultModule.ammoCost = 1; gun.DefaultModule.shootStyle = ProjectileModule.ShootStyle.SemiAutomatic; gun.DefaultModule.sequenceStyle = ProjectileModule.ProjectileSequenceStyle.Random; gun.reloadTime = 0.5f; gun.muzzleFlashEffects.type = VFXPoolType.None; gun.DefaultModule.cooldownTime = 0.35f; gun.DefaultModule.numberOfShotsInClip = 500; gun.barrelOffset.transform.localPosition = new Vector3(0.43f, 0.56f, 0f); gun.SetBaseMaxAmmo(500); gun.ammo = 500; gun.gunClass = GunClass.SHITTY; //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 = 6f; projectile.SetProjectileSpriteRight("barcodescanner_projectile", 4, 14, false, tk2dBaseSprite.Anchor.MiddleCenter, 2, 12); projectile.hitEffects.alwaysUseMidair = true; projectile.hitEffects.overrideMidairDeathVFX = EasyVFXDatabase.RedLaserCircleVFX; projectile.transform.parent = gun.barrelOffset; projectile.gameObject.AddComponent <BarcodeScannerProjectile>(); gun.AddPassiveStatModifier(PlayerStats.StatType.GlobalPriceMultiplier, 0.9f, StatModifier.ModifyMethod.MULTIPLICATIVE); gun.DefaultModule.ammoType = GameUIAmmoType.AmmoType.CUSTOM; gun.DefaultModule.customAmmoType = CustomClipAmmoTypeToolbox.AddCustomAmmoType("Barcode Scanner Bullets", "NevernamedsItems/Resources/CustomGunAmmoTypes/barcodescanner_clipfull", "NevernamedsItems/Resources/CustomGunAmmoTypes/barcodescanner_clipempty"); gun.DefaultModule.projectiles[0] = projectile; gun.quality = PickupObject.ItemQuality.D; ETGMod.Databases.Items.Add(gun, null, "ANY"); BarcodeScannerID = gun.PickupObjectId; }
public static void Add() { Gun gun = ETGMod.Databases.Items.NewGun("Blankannon", "blankannon"); Game.Items.Rename("outdated_gun_mods:blankannon", "nn:blankannon"); gun.gameObject.AddComponent <Blankannon>(); gun.SetShortDescription("Fires Blanks"); gun.SetLongDescription("It takes a very delicate pin to fire blanks instead of simply destroying them." + "\n\nThis elaborate device was put together from the scrapped parts of a laser-accurate surgical machine."); gun.SetupSprite(null, "blankannon_idle_001", 8); gun.SetAnimationFPS(gun.shootAnimation, 12); gun.AddPassiveStatModifier(PlayerStats.StatType.AdditionalBlanksPerFloor, 2f, StatModifier.ModifyMethod.ADDITIVE); gun.AddProjectileModuleFrom(PickupObjectDatabase.GetById(56) as Gun, true, false); //GUN STATS gun.DefaultModule.ammoCost = 0; gun.DefaultModule.shootStyle = ProjectileModule.ShootStyle.SemiAutomatic; gun.DefaultModule.sequenceStyle = ProjectileModule.ProjectileSequenceStyle.Random; gun.reloadTime = 0.8f; gun.DefaultModule.angleVariance = 0f; gun.DefaultModule.cooldownTime = 0.5f; gun.DefaultModule.numberOfShotsInClip = 10; gun.barrelOffset.transform.localPosition = new Vector3(1.98f, 0.75f, 0f); gun.SetBaseMaxAmmo(0); gun.gunClass = GunClass.SHITTY; //HEART 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 *= 20f; projectile.pierceMinorBreakables = true; projectile.baseData.speed *= 1f; projectile.ignoreDamageCaps = true; projectile.baseData.range *= 10f; BlankOnHitModifier blankingArmour = projectile.gameObject.GetOrAddComponent <BlankOnHitModifier>(); blankingArmour.useTinyBlank = false; projectile.SetProjectileSpriteRight("blankannon_projectile", 10, 7, false, tk2dBaseSprite.Anchor.MiddleCenter, 10, 7); gun.DefaultModule.ammoType = GameUIAmmoType.AmmoType.CUSTOM; gun.DefaultModule.customAmmoType = CustomClipAmmoTypeToolbox.AddCustomAmmoType("Blank UI Bullets", "NevernamedsItems/Resources/CustomGunAmmoTypes/blankannon_clipfull", "NevernamedsItems/Resources/CustomGunAmmoTypes/blankannon_clipempty"); projectile.transform.parent = gun.barrelOffset; gun.quality = PickupObject.ItemQuality.C; //C ETGMod.Databases.Items.Add(gun, null, "ANY"); BlankannonId = gun.PickupObjectId; }
public static void Add() { Gun pocketpistol = ETGMod.Databases.Items.NewGun("Pocket Pistol", "pocketpistol"); Game.Items.Rename("outdated_gun_mods:pocket_pistol", "bny:pocket_pistol"); pocketpistol.gameObject.AddComponent <PocketPistol>(); GunExt.SetShortDescription(pocketpistol, "Happy to see me?"); GunExt.SetLongDescription(pocketpistol, "An incredibly small firearm. How do bullets even fit in there?"); GunExt.SetupSprite(pocketpistol, null, "pocketpistol_idle_001", 19); GunExt.SetAnimationFPS(pocketpistol, pocketpistol.shootAnimation, 15); GunExt.SetAnimationFPS(pocketpistol, pocketpistol.reloadAnimation, 7); GunExt.SetAnimationFPS(pocketpistol, pocketpistol.idleAnimation, 1); GunExt.AddProjectileModuleFrom(pocketpistol, "magnum", true, false); pocketpistol.gunSwitchGroup = (PickupObjectDatabase.GetById(79) as Gun).gunSwitchGroup; pocketpistol.DefaultModule.ammoCost = 1; pocketpistol.DefaultModule.shootStyle = ProjectileModule.ShootStyle.SemiAutomatic; pocketpistol.DefaultModule.sequenceStyle = ProjectileModule.ProjectileSequenceStyle.Random; pocketpistol.reloadTime = 0.9f; pocketpistol.barrelOffset.transform.localPosition = new Vector3(.5f, 0.25f, 0f); pocketpistol.DefaultModule.cooldownTime = .3f; pocketpistol.DefaultModule.numberOfShotsInClip = 6; pocketpistol.SetBaseMaxAmmo(327); pocketpistol.quality = PickupObject.ItemQuality.D; pocketpistol.DefaultModule.angleVariance = 4f; pocketpistol.AddPassiveStatModifier(PlayerStats.StatType.AmmoCapacityMultiplier, .1f, StatModifier.ModifyMethod.ADDITIVE); pocketpistol.encounterTrackable.EncounterGuid = "The Small Gun Hell Yeah Brother"; Projectile projectile = UnityEngine.Object.Instantiate <Projectile>(pocketpistol.DefaultModule.projectiles[0]); projectile.gameObject.SetActive(false); FakePrefab.MarkAsFakePrefab(projectile.gameObject); UnityEngine.Object.DontDestroyOnLoad(projectile); pocketpistol.DefaultModule.projectiles[0] = projectile; projectile.shouldRotate = true; projectile.baseData.damage = 7.5f; projectile.baseData.speed *= 1.5f; projectile.AdditionalScaleMultiplier = 0.7f; projectile.transform.parent = pocketpistol.barrelOffset; ETGMod.Databases.Items.Add(pocketpistol, null, "ANY"); List <string> mandatoryConsoleIDs1 = new List <string> { "bny:pocket_pistol" }; List <string> optionalConsoleID1s = new List <string> { "stout_bullets", "fat_bullets", "+1_bullets", "flak_bullets" }; CustomSynergies.Add("How do these even fit in?", mandatoryConsoleIDs1, optionalConsoleID1s, true); pocketpistol.AddToSubShop(ItemBuilder.ShopType.Trorc, 1f); }
public static void Add() { Gun gun = ETGMod.Databases.Items.NewGun("Bullet Blade", "bulletblade"); Game.Items.Rename("outdated_gun_mods:bullet_blade", "nn:bullet_blade"); var behav = gun.gameObject.AddComponent <BulletBlade>(); behav.preventNormalFireAudio = true; behav.preventNormalReloadAudio = true; //behav.overrideNormalFireAudio = "Play_OBJ_gate_slam_01";//"Play_ENM_gunnut_swing_01"; gun.SetShortDescription("Forged of Pure Bullet"); gun.SetLongDescription("The hefty blade of the fearsome armoured sentinels that tread the Gungeon's Halls." + "\n\nHas claimed the life of many a careless gungeoneer with it's wide spread."); gun.SetupSprite(null, "bulletblade_idle_001", 8); gun.SetAnimationFPS(gun.shootAnimation, 12); gun.SetAnimationFPS(gun.chargeAnimation, 6); gun.AddPassiveStatModifier(PlayerStats.StatType.Curse, 1f, StatModifier.ModifyMethod.ADDITIVE); gun.GetComponent <tk2dSpriteAnimator>().GetClipByName(gun.shootAnimation).frames[0].eventAudio = "Play_ENM_gunnut_shockwave_01"; gun.GetComponent <tk2dSpriteAnimator>().GetClipByName(gun.shootAnimation).frames[0].triggerEvent = true; for (int i = 0; i < 45; i++) { gun.AddProjectileModuleFrom(PickupObjectDatabase.GetById(86) as Gun, true, false); } //GUN STATS foreach (ProjectileModule mod in gun.Volley.projectiles) { mod.ammoCost = 1; mod.shootStyle = ProjectileModule.ShootStyle.Charged; mod.sequenceStyle = ProjectileModule.ProjectileSequenceStyle.Random; mod.cooldownTime = 2.5f; mod.angleVariance = 70f; mod.numberOfShotsInClip = 1; Projectile projectile = UnityEngine.Object.Instantiate <Projectile>(mod.projectiles[0]); mod.projectiles[0] = projectile; projectile.gameObject.SetActive(false); FakePrefab.MarkAsFakePrefab(projectile.gameObject); UnityEngine.Object.DontDestroyOnLoad(projectile); projectile.baseData.damage *= 1.6f; projectile.baseData.speed *= 0.6f; projectile.baseData.range *= 1f; projectile.SetProjectileSpriteRight("enemystyle_projectile", 10, 10, true, tk2dBaseSprite.Anchor.MiddleCenter, 8, 8); if (mod != gun.DefaultModule) { mod.ammoCost = 0; } projectile.transform.parent = gun.barrelOffset; ProjectileModule.ChargeProjectile chargeProj = new ProjectileModule.ChargeProjectile { Projectile = projectile, ChargeTime = 1f, }; mod.chargeProjectiles = new List <ProjectileModule.ChargeProjectile> { chargeProj }; } gun.reloadTime = 1f; gun.SetBaseMaxAmmo(50); gun.quality = PickupObject.ItemQuality.B; gun.gunClass = GunClass.CHARGE; gun.GetComponent <tk2dSpriteAnimator>().GetClipByName(gun.chargeAnimation).wrapMode = tk2dSpriteAnimationClip.WrapMode.LoopSection; gun.GetComponent <tk2dSpriteAnimator>().GetClipByName(gun.chargeAnimation).loopStart = 4; tk2dSpriteAnimationClip chargeClip = gun.GetComponent <tk2dSpriteAnimator>().GetClipByName(gun.chargeAnimation); foreach (tk2dSpriteAnimationFrame frame in chargeClip.frames) { tk2dSpriteDefinition def = frame.spriteCollection.spriteDefinitions[frame.spriteId]; if (def != null) { def.MakeOffset(new Vector2(-0.56f, -2.31f)); } } tk2dSpriteAnimationClip fireClip = gun.GetComponent <tk2dSpriteAnimator>().GetClipByName(gun.shootAnimation); foreach (tk2dSpriteAnimationFrame frame in fireClip.frames) { tk2dSpriteDefinition def = frame.spriteCollection.spriteDefinitions[frame.spriteId]; if (def != null) { def.MakeOffset(new Vector2(-0.56f, -2.31f)); } } gun.encounterTrackable.EncounterGuid = "this is the Bullet Blade"; ETGMod.Databases.Items.Add(gun, null, "ANY"); gun.barrelOffset.transform.localPosition = new Vector3(3.18f, -0.31f, 0f); BulletBladeID = gun.PickupObjectId; gun.SetupUnlockOnCustomFlag(CustomDungeonFlags.JAMMEDGUNNUT_QUEST_REWARDED, true); }
public static void Add() { Gun gun = ETGMod.Databases.Items.NewGun("Mini Monger", "minimonger"); Game.Items.Rename("outdated_gun_mods:mini_monger", "nn:mini_monger"); var behav = gun.gameObject.AddComponent <MiniMonger>(); behav.preventNormalFireAudio = true; behav.overrideNormalFireAudio = "Play_ENM_demonwall_barf_01"; behav.preventNormalReloadAudio = true; behav.overrideNormalReloadAudio = "Play_ENM_demonwall_intro_01"; gun.SetShortDescription("Great Wall"); gun.SetLongDescription("A scale model of the fearsome Wallmonger, used as a mock-up during it's original construction." + "\n\nWhile the Wallmonger contains hundreds of tortured souls, this only contains two or three."); gun.AddPassiveStatModifier(PlayerStats.StatType.Curse, 1f, StatModifier.ModifyMethod.ADDITIVE); gun.SetupSprite(null, "minimonger_idle_001", 8); gun.GetComponent <tk2dSpriteAnimator>().GetClipByName(gun.shootAnimation).frames[0].eventAudio = "Play_ENM_demonwall_barf_01"; gun.GetComponent <tk2dSpriteAnimator>().GetClipByName(gun.shootAnimation).frames[0].triggerEvent = true; gun.SetAnimationFPS(gun.shootAnimation, 10); gun.SetAnimationFPS(gun.chargeAnimation, 5); for (int i = 0; i < 5; i++) { gun.AddProjectileModuleFrom(PickupObjectDatabase.GetById(86) as Gun, true, false); } //GUN STATS foreach (ProjectileModule mod in gun.Volley.projectiles) { mod.ammoCost = 1; mod.shootStyle = ProjectileModule.ShootStyle.Charged; mod.sequenceStyle = ProjectileModule.ProjectileSequenceStyle.Random; mod.cooldownTime = 2f; mod.angleVariance = 15f; mod.numberOfShotsInClip = 4; Projectile projectile = UnityEngine.Object.Instantiate <Projectile>(mod.projectiles[0]); mod.projectiles[0] = projectile; projectile.gameObject.SetActive(false); FakePrefab.MarkAsFakePrefab(projectile.gameObject); UnityEngine.Object.DontDestroyOnLoad(projectile); projectile.baseData.speed *= 0.5f; projectile.baseData.damage *= 1.6f; AutoDoShadowChainOnSpawn chain = projectile.gameObject.GetOrAddComponent <AutoDoShadowChainOnSpawn>(); chain.NumberInChain = 5; chain.pauseLength = 0.1f; projectile.SetProjectileSpriteRight("pillarocket_subprojectile", 5, 5, true, tk2dBaseSprite.Anchor.MiddleCenter, 3, 3); if (mod != gun.DefaultModule) { mod.ammoCost = 0; } ProjectileModule.ChargeProjectile chargeProj = new ProjectileModule.ChargeProjectile { Projectile = projectile, ChargeTime = 1f, }; mod.chargeProjectiles = new List <ProjectileModule.ChargeProjectile> { chargeProj }; } gun.reloadTime = 2f; gun.SetBaseMaxAmmo(50); gun.gunClass = GunClass.SHOTGUN; gun.GetComponent <tk2dSpriteAnimator>().GetClipByName(gun.chargeAnimation).wrapMode = tk2dSpriteAnimationClip.WrapMode.LoopSection; gun.GetComponent <tk2dSpriteAnimator>().GetClipByName(gun.chargeAnimation).loopStart = 3; gun.DefaultModule.ammoType = GameUIAmmoType.AmmoType.CUSTOM; gun.DefaultModule.customAmmoType = "Punishment Ray Lasers"; gun.quality = PickupObject.ItemQuality.A; ETGMod.Databases.Items.Add(gun, null, "ANY"); MiniMongerID = gun.PickupObjectId; }
public static void Add() { Gun gun = ETGMod.Databases.Items.NewGun("Orgun", "orgun"); Game.Items.Rename("outdated_gun_mods:orgun", "nn:orgun"); gun.gameObject.AddComponent <Orgun>(); gun.SetShortDescription("My Heart Will Go On"); gun.SetLongDescription("Hespera, the Pride of Venus, always wished that her fighting spirit, her courage... her heart, if you will, would go on to inspire and aid others." + "\n\nShe never realised how literal that would be."); gun.SetupSprite(null, "orgun_idle_001", 8); //ItemBuilder.AddPassiveStatModifier(gun, PlayerStats.StatType.GlobalPriceMultiplier, 0.925f, StatModifier.ModifyMethod.MULTIPLICATIVE); gun.SetAnimationFPS(gun.shootAnimation, 8); gun.SetAnimationFPS(gun.idleAnimation, 5); gun.AddPassiveStatModifier(PlayerStats.StatType.Health, 1f, StatModifier.ModifyMethod.ADDITIVE); for (int i = 0; i < 6; i++) { gun.AddProjectileModuleFrom(PickupObjectDatabase.GetById(56) as Gun, true, false); } //GUN STATS foreach (ProjectileModule mod in gun.Volley.projectiles) { mod.ammoCost = 1; mod.shootStyle = ProjectileModule.ShootStyle.Burst; mod.burstShotCount = 2; mod.burstCooldownTime = 0.2f; mod.sequenceStyle = ProjectileModule.ProjectileSequenceStyle.Random; mod.cooldownTime = 0.5f; mod.angleVariance = 20f; mod.numberOfShotsInClip = 6; Projectile projectile = UnityEngine.Object.Instantiate <Projectile>(mod.projectiles[0]); mod.projectiles[0] = projectile; projectile.gameObject.SetActive(false); FakePrefab.MarkAsFakePrefab(projectile.gameObject); UnityEngine.Object.DontDestroyOnLoad(projectile); projectile.hitEffects.overrideMidairDeathVFX = (PickupObjectDatabase.GetById(369) as Gun).DefaultModule.chargeProjectiles[0].Projectile.hitEffects.tileMapVertical.effects[0].effects[0].effect; projectile.hitEffects.alwaysUseMidair = true; projectile.baseData.damage *= 1.4f; projectile.baseData.speed *= 1.2f; GoopModifier blood = projectile.gameObject.AddComponent <GoopModifier>(); blood.goopDefinition = EasyGoopDefinitions.BlobulonGoopDef; blood.SpawnGoopInFlight = true; blood.InFlightSpawnFrequency = 0.05f; blood.InFlightSpawnRadius = 1f; blood.SpawnGoopOnCollision = true; blood.CollisionSpawnRadius = 2f; projectile.SetProjectileSpriteRight("orgun_projectile", 12, 7, true, tk2dBaseSprite.Anchor.MiddleCenter, 7, 7); if (mod != gun.DefaultModule) { mod.ammoCost = 0; } projectile.transform.parent = gun.barrelOffset; } gun.reloadTime = 1.3f; gun.barrelOffset.transform.localPosition = new Vector3(2.62f, 0.81f, 0f); gun.SetBaseMaxAmmo(80); gun.gunClass = GunClass.SHOTGUN; //BULLET STATS gun.DefaultModule.ammoType = GameUIAmmoType.AmmoType.CUSTOM; gun.DefaultModule.customAmmoType = CustomClipAmmoTypeToolbox.AddCustomAmmoType("Orgun Bullets", "NevernamedsItems/Resources/CustomGunAmmoTypes/orgun_clipfull", "NevernamedsItems/Resources/CustomGunAmmoTypes/orgun_clipempty"); // 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.A; gun.encounterTrackable.EncounterGuid = "this is the Orgun"; ETGMod.Databases.Items.Add(gun, null, "ANY"); OrgunID = gun.PickupObjectId; gun.SetupUnlockOnCustomMaximum(CustomTrackedMaximums.MAX_HEART_CONTAINERS_EVER, 7, DungeonPrerequisite.PrerequisiteOperation.GREATER_THAN); }
public static void Add() { Gun gun = ETGMod.Databases.Items.NewGun("Butchers Knife", "butchersknife"); Game.Items.Rename("outdated_gun_mods:butchers_knife", "nn:butchers_knife"); var behav = gun.gameObject.AddComponent <ButchersKnife>(); behav.preventNormalReloadAudio = true; behav.preventNormalFireAudio = true; behav.overrideNormalFireAudio = "Play_WPN_blasphemy_shot_01"; gun.gunSwitchGroup = (PickupObjectDatabase.GetById(417) as Gun).gunSwitchGroup; gun.SetShortDescription("Word of Kaliber"); gun.SetLongDescription("Cuts enemies to bits." + "\n\nForged and sharpened by a Gun Cultist who believed she heard the voice of Kaliber speaking to her... asking her for a sacrifice... her son."); gun.SetupSprite(null, "butchersknife_idle_001", 8); gun.SetAnimationFPS(gun.shootAnimation, 16); gun.SetAnimationFPS(gun.chargeAnimation, 8); gun.SetAnimationFPS(gun.reloadAnimation, 1); gun.AddProjectileModuleFrom(PickupObjectDatabase.GetById(56) as Gun, true, false); gun.AddPassiveStatModifier(PlayerStats.StatType.Curse, 2f, StatModifier.ModifyMethod.ADDITIVE); //GUN STATS gun.DefaultModule.ammoCost = 1; gun.DefaultModule.shootStyle = ProjectileModule.ShootStyle.Charged; gun.DefaultModule.sequenceStyle = ProjectileModule.ProjectileSequenceStyle.Random; gun.DefaultModule.cooldownTime = 1f; gun.gunClass = GunClass.CHARGE; gun.DefaultModule.angleVariance = 1f; gun.DefaultModule.numberOfShotsInClip = 1; Projectile projectile = DataCloners.CopyFields <SuperPierceProjectile>(Instantiate(gun.DefaultModule.projectiles[0])); gun.DefaultModule.projectiles[0] = projectile; projectile.gameObject.SetActive(false); FakePrefab.MarkAsFakePrefab(projectile.gameObject); UnityEngine.Object.DontDestroyOnLoad(projectile); projectile.baseData.damage *= 0.2f; projectile.baseData.speed *= 0.7f; projectile.pierceMinorBreakables = true; projectile.AdditionalScaleMultiplier *= 1f; projectile.baseData.range *= 1000f; projectile.SetProjectileSpriteRight("butchersknife_projectile", 29, 7, false, tk2dBaseSprite.Anchor.MiddleCenter, 35, 14); projectile.specRigidbody.CollideWithTileMap = false; NoCollideBehaviour nocollide = projectile.gameObject.GetOrAddComponent <NoCollideBehaviour>(); nocollide.worksOnEnemies = false; nocollide.worksOnProjectiles = true; PierceProjModifier pierce = projectile.gameObject.GetOrAddComponent <PierceProjModifier>(); pierce.penetration = 1000; TickDamageBehaviour tickdmg = projectile.gameObject.GetOrAddComponent <TickDamageBehaviour>(); tickdmg.damageSource = "Butchers Knife"; tickdmg.starterDamage = 3f; ProjectileModule.ChargeProjectile chargeProj = new ProjectileModule.ChargeProjectile { Projectile = projectile, ChargeTime = 0f, }; gun.DefaultModule.chargeProjectiles = new List <ProjectileModule.ChargeProjectile> { chargeProj }; gun.DefaultModule.ammoType = GameUIAmmoType.AmmoType.CUSTOM; gun.DefaultModule.customAmmoType = CustomClipAmmoTypeToolbox.AddCustomAmmoType("ButchersKnife Clip", "NevernamedsItems/Resources/CustomGunAmmoTypes/butchersknife_clipfull", "NevernamedsItems/Resources/CustomGunAmmoTypes/butchersknife_clipempty"); gun.reloadTime = 5f; gun.SetBaseMaxAmmo(35); gun.quality = PickupObject.ItemQuality.S; gun.GetComponent <tk2dSpriteAnimator>().GetClipByName(gun.chargeAnimation).wrapMode = tk2dSpriteAnimationClip.WrapMode.LoopSection; gun.GetComponent <tk2dSpriteAnimator>().GetClipByName(gun.chargeAnimation).loopStart = 0; ETGMod.Databases.Items.Add(gun, null, "ANY"); gun.barrelOffset.transform.localPosition = new Vector3(0.87f, 0.25f, 0f); ButchersKnifeID = gun.PickupObjectId; }
public static void Add() { Gun gun = ETGMod.Databases.Items.NewGun("Head of the Order", "headoftheorder"); Game.Items.Rename("outdated_gun_mods:head_of_the_order", "nn:head_of_the_order"); var behav = gun.gameObject.AddComponent <HeadOfTheOrder>(); behav.preventNormalFireAudio = true; behav.overrideNormalFireAudio = "Play_ENM_highpriest_blast_01"; gun.SetShortDescription("Guns, Immortal"); gun.SetLongDescription("Though torn from the rest of it's corporeal form, the immortal soul of the High Priest remains bound to this weapon."); gun.AddPassiveStatModifier(PlayerStats.StatType.Curse, 1f, StatModifier.ModifyMethod.ADDITIVE); gun.SetupSprite(null, "headoftheorder_idle_001", 8); gun.SetAnimationFPS(gun.shootAnimation, 10); gun.gunSwitchGroup = (PickupObjectDatabase.GetById(79) as Gun).gunSwitchGroup; gun.AddProjectileModuleFrom(PickupObjectDatabase.GetById(86) as Gun, true, false); //GUN STATS gun.DefaultModule.ammoCost = 1; gun.DefaultModule.shootStyle = ProjectileModule.ShootStyle.SemiAutomatic; gun.DefaultModule.sequenceStyle = ProjectileModule.ProjectileSequenceStyle.Ordered; gun.reloadTime = 2f; gun.DefaultModule.cooldownTime = 0.65f; gun.DefaultModule.numberOfShotsInClip = 6; gun.muzzleFlashEffects = (PickupObjectDatabase.GetById(79) as Gun).muzzleFlashEffects; gun.barrelOffset.transform.localPosition = new Vector3(1.62f, 0.75f, 0f); gun.SetBaseMaxAmmo(100); gun.ammo = 100; gun.gunClass = GunClass.PISTOL; //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 *= 6f; projectile.baseData.force *= 2f; projectile.baseData.speed *= 2f; projectile.pierceMinorBreakables = true; HomingModifier homing = projectile.gameObject.GetOrAddComponent <HomingModifier>(); homing.HomingRadius = 20f; homing.AngularVelocity = 400; projectile.AnimateProjectile(new List <string> { "atomic_projectile_001", "atomic_projectile_002", "atomic_projectile_003", "atomic_projectile_004", "atomic_projectile_005", "atomic_projectile_006", "atomic_projectile_007", "atomic_projectile_008", "atomic_projectile_009", "atomic_projectile_010", }, 15, true, AnimateBullet.ConstructListOfSameValues <IntVector2>(new IntVector2(24, 20), 10), AnimateBullet.ConstructListOfSameValues(true, 10), AnimateBullet.ConstructListOfSameValues(tk2dBaseSprite.Anchor.MiddleCenter, 10), AnimateBullet.ConstructListOfSameValues(true, 10), AnimateBullet.ConstructListOfSameValues(false, 10), AnimateBullet.ConstructListOfSameValues <Vector3?>(null, 10), AnimateBullet.ConstructListOfSameValues <IntVector2?>(new IntVector2(8, 8), 10), AnimateBullet.ConstructListOfSameValues <IntVector2?>(null, 10), AnimateBullet.ConstructListOfSameValues <Projectile>(null, 10)); gun.DefaultModule.projectiles[0] = projectile; gun.quality = PickupObject.ItemQuality.S; ETGMod.Databases.Items.Add(gun, null, "ANY"); HeadOfTheOrderID = gun.PickupObjectId; }
public static void Add() { Gun gun = ETGMod.Databases.Items.NewGun("Mantid Augment", "mantidaugment"); Game.Items.Rename("outdated_gun_mods:mantid_augment", "nn:mantid_augment"); var behav = gun.gameObject.AddComponent <MantidAugment>(); behav.preventNormalFireAudio = true; gun.SetShortDescription("Flashy and Lethal"); gun.SetLongDescription("A cybernetic augment concealed in the forearm, this cruel blade extends to slash at your enemies with inhuman speed."); gun.SetupSprite(null, "mantidaugment_idle_001", 8); gun.AddPassiveStatModifier(PlayerStats.StatType.Curse, 1f, StatModifier.ModifyMethod.ADDITIVE); gun.AddCurrentGunStatModifier(PlayerStats.StatType.MovementSpeed, 1f, StatModifier.ModifyMethod.ADDITIVE); gun.SetAnimationFPS(gun.shootAnimation, 20); gun.SetAnimationFPS(gun.reloadAnimation, 12); gun.AddProjectileModuleFrom(PickupObjectDatabase.GetById(86) as Gun, true, false); //GUN STATS gun.gunHandedness = GunHandedness.HiddenOneHanded; gun.DefaultModule.ammoCost = 1; gun.DefaultModule.shootStyle = ProjectileModule.ShootStyle.Automatic; gun.DefaultModule.sequenceStyle = ProjectileModule.ProjectileSequenceStyle.Random; gun.DefaultModule.ammoType = GameUIAmmoType.AmmoType.BEAM; gun.reloadTime = 1f; gun.muzzleFlashEffects.type = VFXPoolType.None; gun.DefaultModule.cooldownTime = 0.01f; gun.DefaultModule.numberOfShotsInClip = 100; gun.barrelOffset.transform.localPosition = new Vector3(1.56f, 0.56f, 0f); gun.SetBaseMaxAmmo(2077); gun.ammo = 2077; 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); projectile.baseData.damage *= 2f; projectile.baseData.force *= 0.5f; projectile.sprite.renderer.enabled = false; NoCollideBehaviour nocollide = projectile.gameObject.AddComponent <NoCollideBehaviour>(); nocollide.worksOnEnemies = true; nocollide.worksOnProjectiles = true; projectile.specRigidbody.CollideWithTileMap = false; ProjectileSlashingBehaviour slashing = projectile.gameObject.AddComponent <ProjectileSlashingBehaviour>(); slashing.DestroyBaseAfterFirstSlash = true; slashing.SlashDamageUsesBaseProjectileDamage = true; slashing.slashParameters = new SlashData(); slashing.slashParameters.hitVFX = (PickupObjectDatabase.GetById(369) as Gun).DefaultModule.chargeProjectiles[0].Projectile.hitEffects.tileMapVertical; gun.DefaultModule.projectiles[0] = projectile; gun.DefaultModule.ammoType = GameUIAmmoType.AmmoType.CUSTOM; gun.DefaultModule.customAmmoType = "red_beam"; gun.quality = PickupObject.ItemQuality.A; ETGMod.Databases.Items.Add(gun, null, "ANY"); MantidAugmentID = gun.PickupObjectId; }
public static void Add() { Gun gun = ETGMod.Databases.Items.NewGun("Diamond Cutter", "diamondcutter"); Game.Items.Rename("outdated_gun_mods:diamond_cutter", "nn:diamond_cutter"); var behav = gun.gameObject.AddComponent <DiamondCutter>(); behav.preventNormalReloadAudio = true; behav.preventNormalFireAudio = true; behav.overrideNormalFireAudio = "Play_WPN_blasphemy_shot_01"; gun.SetShortDescription("Face It!"); gun.SetLongDescription("Fires piercing gemstones." + "\n\nLeft in a chest by a powerful warrior of shimmering crystal... who didn't show up to work today."); gun.SetupSprite(null, "diamondcutter_idle_001", 8); gun.SetAnimationFPS(gun.reloadAnimation, 1); gun.muzzleFlashEffects = (PickupObjectDatabase.GetById(97) as Gun).muzzleFlashEffects; gun.AddProjectileModuleFrom(PickupObjectDatabase.GetById(56) as Gun, true, false); //GUN STATS gun.DefaultModule.ammoCost = 1; gun.DefaultModule.shootStyle = ProjectileModule.ShootStyle.SemiAutomatic; gun.DefaultModule.sequenceStyle = ProjectileModule.ProjectileSequenceStyle.Random; gun.reloadTime = 0.8f; gun.DefaultModule.cooldownTime = 0.2f; gun.DefaultModule.numberOfShotsInClip = 3; gun.barrelOffset.transform.localPosition = new Vector3(1.81f, 1.43f, 0f); gun.SetBaseMaxAmmo(100); gun.ammo = 100; gun.gunClass = GunClass.SILLY; gun.AddPassiveStatModifier(PlayerStats.StatType.Curse, 1f, StatModifier.ModifyMethod.ADDITIVE); //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 = 10f; projectile.baseData.speed *= 1.5f; projectile.hitEffects.alwaysUseMidair = true; projectile.hitEffects.overrideMidairDeathVFX = (PickupObjectDatabase.GetById(506) as Gun).DefaultModule.projectiles[0].hitEffects.overrideMidairDeathVFX; PierceProjModifier pierce = projectile.gameObject.AddComponent <PierceProjModifier>(); pierce.penetration = 10; MaintainDamageOnPierce maintain = projectile.gameObject.AddComponent <MaintainDamageOnPierce>(); maintain.damageMultOnPierce = 2f; projectile.pierceMinorBreakables = true; projectile.SetProjectileSpriteRight("diamondcutter_proj", 23, 13, false, tk2dBaseSprite.Anchor.MiddleCenter, 17, 5); gun.DefaultModule.projectiles[0] = projectile; gun.DefaultModule.ammoType = GameUIAmmoType.AmmoType.CUSTOM; gun.DefaultModule.customAmmoType = CustomClipAmmoTypeToolbox.AddCustomAmmoType("DiamondCutter Bullets", "NevernamedsItems/Resources/CustomGunAmmoTypes/diamondcutter_clipfull", "NevernamedsItems/Resources/CustomGunAmmoTypes/diamondcutter_clipempty"); gun.quality = PickupObject.ItemQuality.B; ETGMod.Databases.Items.Add(gun, null, "ANY"); DiamondCutterID = gun.PickupObjectId; }
public static void Add() { Gun gun = ETGMod.Databases.Items.NewGun("Justice", "justice"); Game.Items.Rename("outdated_gun_mods:justice", "nn:justice"); gun.gameObject.AddComponent <JusticeGun>(); gun.SetShortDescription("Served"); gun.SetLongDescription("Bello's trusty shotgun, custom made for his big, burly hands."); gun.SetupSprite(null, "justice_idle_001", 8); //ItemBuilder.AddPassiveStatModifier(gun, PlayerStats.StatType.GlobalPriceMultiplier, 0.925f, StatModifier.ModifyMethod.MULTIPLICATIVE); gun.SetAnimationFPS(gun.shootAnimation, 8); gun.SetAnimationFPS(gun.reloadAnimation, 8); gun.AddPassiveStatModifier(PlayerStats.StatType.GlobalPriceMultiplier, 0.8f, StatModifier.ModifyMethod.MULTIPLICATIVE); for (int i = 0; i < 6; i++) { gun.AddProjectileModuleFrom(PickupObjectDatabase.GetById(86) as Gun, true, false); } //GUN STATS foreach (ProjectileModule mod in gun.Volley.projectiles) { mod.ammoCost = 1; mod.shootStyle = ProjectileModule.ShootStyle.SemiAutomatic; mod.sequenceStyle = ProjectileModule.ProjectileSequenceStyle.Random; mod.cooldownTime = 0.6f; mod.angleVariance = 45f; mod.numberOfShotsInClip = 5; Projectile projectile = UnityEngine.Object.Instantiate <Projectile>(mod.projectiles[0]); mod.projectiles[0] = projectile; projectile.gameObject.SetActive(false); FakePrefab.MarkAsFakePrefab(projectile.gameObject); UnityEngine.Object.DontDestroyOnLoad(projectile); projectile.baseData.damage *= 3f; projectile.baseData.speed *= 1.2f; projectile.pierceMinorBreakables = true; JusticeBurstHandler BurstPop = projectile.gameObject.AddComponent <JusticeBurstHandler>(); projectile.SetProjectileSpriteRight("justice_projectile", 12, 12, true, tk2dBaseSprite.Anchor.MiddleCenter, 10, 10); if (mod != gun.DefaultModule) { mod.ammoCost = 0; } projectile.transform.parent = gun.barrelOffset; } gun.reloadTime = 2f; gun.muzzleFlashEffects.type = VFXPoolType.None; gun.barrelOffset.transform.localPosition = new Vector3(3.12f, 0.93f, 0f); gun.SetBaseMaxAmmo(80); gun.gunClass = GunClass.SHOTGUN; //BULLET STATS gun.DefaultModule.ammoType = GameUIAmmoType.AmmoType.CUSTOM; gun.DefaultModule.customAmmoType = CustomClipAmmoTypeToolbox.AddCustomAmmoType("Justice Bullets", "NevernamedsItems/Resources/CustomGunAmmoTypes/justice_clipfull", "NevernamedsItems/Resources/CustomGunAmmoTypes/justice_clipempty"); // 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.A; gun.encounterTrackable.EncounterGuid = "this is Justice"; ETGMod.Databases.Items.Add(gun, null, "ANY"); JusticeID = gun.PickupObjectId; gun.SetupUnlockOnCustomFlag(CustomDungeonFlags.ANGERED_BELLO, true); }
public static void Add() { Gun gun = ETGMod.Databases.Items.NewGun("Icicle", "icicle"); Game.Items.Rename("outdated_gun_mods:icicle", "nn:icicle"); gun.gameObject.AddComponent <Icicle>(); gun.SetShortDescription("Begins Anew"); gun.SetLongDescription("Becomes more powerful the cooler it's owner is." + "\n\nSnapped off of the ceiling of the Hollow's deepest catacomb, and somehow hasn't thawed ever since."); gun.SetupSprite(null, "icicle_idle_001", 8); gun.gunSwitchGroup = (PickupObjectDatabase.GetById(199) as Gun).gunSwitchGroup; gun.SetAnimationFPS(gun.shootAnimation, 14); gun.muzzleFlashEffects = (PickupObjectDatabase.GetById(97) as Gun).muzzleFlashEffects; gun.AddPassiveStatModifier(PlayerStats.StatType.Coolness, 1, StatModifier.ModifyMethod.ADDITIVE); gun.AddProjectileModuleFrom(PickupObjectDatabase.GetById(56) as Gun, true, false); //GUN STATS gun.DefaultModule.ammoCost = 1; gun.DefaultModule.shootStyle = ProjectileModule.ShootStyle.SemiAutomatic; gun.DefaultModule.sequenceStyle = ProjectileModule.ProjectileSequenceStyle.Random; gun.reloadTime = 1f; gun.DefaultModule.cooldownTime = 0.5f; gun.DefaultModule.numberOfShotsInClip = 10; gun.barrelOffset.transform.localPosition = new Vector3(1.62f, 0.56f, 0f); gun.SetBaseMaxAmmo(220); gun.ammo = 220; gun.gunClass = GunClass.ICE; //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 *= 1.6f; projectile.baseData.speed *= 1f; projectile.damageTypes |= CoreDamageTypes.Ice; ScaleProjectileStatOffPlayerStat coolnessScaling = projectile.gameObject.AddComponent <ScaleProjectileStatOffPlayerStat>(); coolnessScaling.multiplierPerLevelOfStat = 0.2f; coolnessScaling.projstat = ScaleProjectileStatOffPlayerStat.ProjectileStatType.DAMAGE; coolnessScaling.playerstat = PlayerStats.StatType.Coolness; SimpleFreezingBulletBehaviour freezing = projectile.gameObject.AddComponent <SimpleFreezingBulletBehaviour>(); freezing.freezeAmount = 40; freezing.useSpecialTint = false; freezing.freezeAmountForBosses = 40; GoopModifier watering = projectile.gameObject.AddComponent <GoopModifier>(); watering.CollisionSpawnRadius = 0.8f; watering.SpawnGoopOnCollision = true; watering.SpawnGoopInFlight = false; watering.goopDefinition = EasyGoopDefinitions.WaterGoop; projectile.SetProjectileSpriteRight("icicle_projectile", 13, 5, false, tk2dBaseSprite.Anchor.MiddleCenter, 13, 5); gun.DefaultModule.projectiles[0] = projectile; gun.quality = PickupObject.ItemQuality.B; ETGMod.Databases.Items.Add(gun, null, "ANY"); IcicleID = gun.PickupObjectId; }
public static void Add() { Gun gun = ETGMod.Databases.Items.NewGun("Beamblade", "beamblade"); Game.Items.Rename("outdated_gun_mods:beamblade", "nn:beamblade"); var behav = gun.gameObject.AddComponent <BeamBlade>(); behav.preventNormalFireAudio = true; gun.SetShortDescription("Elegant"); gun.SetLongDescription("An artful weapon with a blade made of pure beam." + "\n\nRelic of an ancient order of Gun Knights, whose arcane religions have since fallen into obscurity."); gun.SetupSprite(null, "beamblade_idle_001", 8); gun.SetAnimationFPS(gun.shootAnimation, 8); gun.isAudioLoop = true; gun.AddProjectileModuleFrom(PickupObjectDatabase.GetById(86) as Gun, true, false); gun.AddPassiveStatModifier(PlayerStats.StatType.Curse, 2f, StatModifier.ModifyMethod.ADDITIVE); //GUN STATS gun.doesScreenShake = false; gun.DefaultModule.ammoCost = 10; gun.DefaultModule.angleVariance = 0; 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 = 3000; gun.DefaultModule.ammoType = GameUIAmmoType.AmmoType.BEAM; gun.barrelOffset.transform.localPosition = new Vector3(0.93f, 0.18f, 0f); gun.SetBaseMaxAmmo(3000); gun.ammo = 3000; gun.gunClass = GunClass.BEAM; gun.GetComponent <tk2dSpriteAnimator>().GetClipByName(gun.shootAnimation).wrapMode = tk2dSpriteAnimationClip.WrapMode.LoopSection; gun.GetComponent <tk2dSpriteAnimator>().GetClipByName(gun.shootAnimation).loopStart = 1; List <string> BeamAnimPaths = new List <string>() { "NevernamedsItems/Resources/BeamSprites/beamblade_mid_001", "NevernamedsItems/Resources/BeamSprites/beamblade_mid_002", "NevernamedsItems/Resources/BeamSprites/beamblade_mid_003", "NevernamedsItems/Resources/BeamSprites/beamblade_mid_004", "NevernamedsItems/Resources/BeamSprites/beamblade_mid_005", "NevernamedsItems/Resources/BeamSprites/beamblade_mid_006", }; List <string> BeamEndPaths = new List <string>() { "NevernamedsItems/Resources/BeamSprites/beamblade_end_001", "NevernamedsItems/Resources/BeamSprites/beamblade_end_002", "NevernamedsItems/Resources/BeamSprites/beamblade_end_003", "NevernamedsItems/Resources/BeamSprites/beamblade_end_004", "NevernamedsItems/Resources/BeamSprites/beamblade_end_005", "NevernamedsItems/Resources/BeamSprites/beamblade_end_006", }; //BULLET STATS Projectile projectile = UnityEngine.Object.Instantiate <Projectile>((PickupObjectDatabase.GetById(86) as Gun).DefaultModule.projectiles[0]); BasicBeamController beamComp = projectile.GenerateBeamPrefab( "NevernamedsItems/Resources/BeamSprites/beamblade_mid_001", new Vector2(5, 3), new Vector2(0, 1), BeamAnimPaths, 9, //Impact null, -1, null, null, //End BeamEndPaths, 9, new Vector2(5, 3), new Vector2(0, 1), //Beginning null, -1, null, null ); projectile.gameObject.SetActive(false); FakePrefab.MarkAsFakePrefab(projectile.gameObject); UnityEngine.Object.DontDestroyOnLoad(projectile); projectile.baseData.damage = 70f; projectile.baseData.force *= 0.1f; projectile.baseData.range = 3.5f; projectile.baseData.speed *= 1f; beamComp.penetration = 100; beamComp.boneType = BasicBeamController.BeamBoneType.Straight; beamComp.interpolateStretchedBones = false; beamComp.endAudioEvent = "Stop_WPN_All"; beamComp.startAudioEvent = "Play_WPN_moonscraperLaser_shot_01"; gun.DefaultModule.projectiles[0] = projectile; gun.quality = PickupObject.ItemQuality.C; //D ETGMod.Databases.Items.Add(gun, null, "ANY"); }
public static void Add() { Gun gun = ETGMod.Databases.Items.NewGun("Carnwennan", "carnwennan"); Game.Items.Rename("outdated_gun_mods:carnwennan", "nn:carnwennan"); var behav = gun.gameObject.AddComponent <Carnwennan>(); gun.gunSwitchGroup = (PickupObjectDatabase.GetById(417) as Gun).gunSwitchGroup; gun.SetShortDescription("Prosper"); gun.SetLongDescription("This ancient magical dagger was stolen from the ruins of Castle Blamalot." + "\n\nWhile both it's range and power are lacking, you sense a strange, bountiful energy in the blade."); gun.SetupSprite(null, "carnwennan_idle_001", 8); gun.SetAnimationFPS(gun.shootAnimation, 12); gun.AddPassiveStatModifier(PlayerStats.StatType.Curse, 1f, StatModifier.ModifyMethod.ADDITIVE); gun.AddProjectileModuleFrom(PickupObjectDatabase.GetById(86) as Gun, true, false); gun.DefaultModule.ammoCost = 1; gun.DefaultModule.shootStyle = ProjectileModule.ShootStyle.SemiAutomatic; gun.DefaultModule.sequenceStyle = ProjectileModule.ProjectileSequenceStyle.Random; gun.reloadTime = 1.05f; gun.DefaultModule.cooldownTime = 0.3f; gun.muzzleFlashEffects.type = VFXPoolType.None; gun.DefaultModule.numberOfShotsInClip = 5; gun.barrelOffset.transform.localPosition = new Vector3(9f / 16f, 4f / 16f, 0f); gun.SetBaseMaxAmmo(50); gun.quality = PickupObject.ItemQuality.D; gun.gunClass = GunClass.SILLY; //BULLET STATS Projectile projectile = (PickupObjectDatabase.GetById(86) as Gun).DefaultModule.projectiles[0].gameObject.InstantiateAndFakeprefab().GetComponent <Projectile>(); gun.DefaultModule.projectiles[0] = projectile; gun.InfiniteAmmo = true; projectile.baseData.damage = 4f; projectile.baseData.speed *= 1.2f; projectile.sprite.renderer.enabled = false; CarnwennanSlashModifier slash = projectile.gameObject.AddComponent <CarnwennanSlashModifier>(); slash.DestroyBaseAfterFirstSlash = true; slash.slashParameters = new SlashData(); slash.slashParameters.soundEvent = null; slash.slashParameters.projInteractMode = SlashDoer.ProjInteractMode.IGNORE; slash.slashParameters.playerKnockbackForce = 0; slash.SlashDamageUsesBaseProjectileDamage = true; slash.slashParameters.enemyKnockbackForce = 10; slash.slashParameters.doVFX = false; slash.slashParameters.doHitVFX = true; slash.slashParameters.slashRange = 2f; gun.DefaultModule.ammoType = GameUIAmmoType.AmmoType.BEAM; tk2dSpriteAnimationClip reloadClip = gun.GetComponent <tk2dSpriteAnimator>().GetClipByName(gun.reloadAnimation); foreach (tk2dSpriteAnimationFrame frame in reloadClip.frames) { tk2dSpriteDefinition def = frame.spriteCollection.spriteDefinitions[frame.spriteId]; if (def != null) { def.MakeOffset(new Vector2(-0.81f, -2.18f)); } } tk2dSpriteAnimationClip fireClip = gun.GetComponent <tk2dSpriteAnimator>().GetClipByName(gun.shootAnimation); foreach (tk2dSpriteAnimationFrame frame in fireClip.frames) { tk2dSpriteDefinition def = frame.spriteCollection.spriteDefinitions[frame.spriteId]; if (def != null) { def.MakeOffset(new Vector2(-0.81f, -2.18f)); } } ETGMod.Databases.Items.Add(gun, null, "ANY"); ID = gun.PickupObjectId; gun.SetupUnlockOnCustomFlag(CustomDungeonFlags.BOSSRUSH_BULLET, true); }
public static void Add() { Gun gun = ETGMod.Databases.Items.NewGun("Gun of a Thousand Sins", "gunofathousandsins"); Game.Items.Rename("outdated_gun_mods:gun_of_a_thousand_sins", "nn:gun_of_a_thousand_sins"); gun.gameObject.AddComponent <GunOfAThousandSins>(); gun.SetShortDescription("Evisceration"); gun.SetLongDescription("This sidearm was once carried by an accursed sorcerer who put countless innocents to death in order to secure his grab at penultimate power."); gun.SetupSprite(null, "gunofathousandsins_idle_001", 8); gun.SetAnimationFPS(gun.shootAnimation, 12); gun.gunSwitchGroup = (PickupObjectDatabase.GetById(198) as Gun).gunSwitchGroup; gun.AddProjectileModuleFrom(PickupObjectDatabase.GetById(56) as Gun, true, false); gun.AddPassiveStatModifier(PlayerStats.StatType.Curse, 1f, StatModifier.ModifyMethod.ADDITIVE); //GUN STATS gun.DefaultModule.ammoCost = 1; gun.DefaultModule.shootStyle = ProjectileModule.ShootStyle.SemiAutomatic; gun.DefaultModule.sequenceStyle = ProjectileModule.ProjectileSequenceStyle.Random; gun.reloadTime = 1f; gun.muzzleFlashEffects = (PickupObjectDatabase.GetById(83) as Gun).muzzleFlashEffects; gun.DefaultModule.cooldownTime = 0.11f; gun.DefaultModule.numberOfShotsInClip = 7; gun.barrelOffset.transform.localPosition = new Vector3(2.37f, 0.81f, 0f); gun.SetBaseMaxAmmo(200); gun.ammo = 200; gun.gunClass = GunClass.PISTOL; //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 = 20f; projectile.baseData.speed *= 1f; projectile.baseData.range *= 2f; PierceProjModifier piercing = projectile.gameObject.GetOrAddComponent <PierceProjModifier>(); ThousandSinsProjectileModifier sins = projectile.gameObject.GetOrAddComponent <ThousandSinsProjectileModifier>(); projectile.hitEffects.alwaysUseMidair = true; projectile.hitEffects.overrideMidairDeathVFX = EasyVFXDatabase.BloodiedScarfPoofVFX; //ANIMATE BULLET projectile.AnimateProjectile(new List <string> { "gunofathousandsins_projectile_001", "gunofathousandsins_projectile_002", "gunofathousandsins_projectile_003", "gunofathousandsins_projectile_004", }, 12, true, new List <IntVector2> { new IntVector2(23, 22), //1 new IntVector2(23, 22), //2 new IntVector2(23, 22), //3 new IntVector2(23, 22), //4 }, AnimateBullet.ConstructListOfSameValues(true, 4), //Lightened AnimateBullet.ConstructListOfSameValues(tk2dBaseSprite.Anchor.MiddleCenter, 4), //Anchors AnimateBullet.ConstructListOfSameValues(true, 4), //Anchors Change Colliders AnimateBullet.ConstructListOfSameValues(false, 4), //Fixes Scales AnimateBullet.ConstructListOfSameValues <Vector3?>(null, 4), //Offsets AnimateBullet.ConstructListOfSameValues <IntVector2?>(new IntVector2(20, 11), 4), //Override Collider Sizes AnimateBullet.ConstructListOfSameValues <IntVector2?>(new IntVector2(2, 5), 4), //Override Collider Offsets AnimateBullet.ConstructListOfSameValues <Projectile>(null, 4)); projectile.SetProjectileSpriteRight("gunofathousandsins_projectile_001", 23, 22, true, tk2dBaseSprite.Anchor.MiddleCenter, 20, 11); projectile.transform.parent = gun.barrelOffset; gun.DefaultModule.ammoType = GameUIAmmoType.AmmoType.CUSTOM; gun.DefaultModule.customAmmoType = CustomClipAmmoTypeToolbox.AddCustomAmmoType("Thousand Sins Bullets", "NevernamedsItems/Resources/CustomGunAmmoTypes/thousandsins_clipfull", "NevernamedsItems/Resources/CustomGunAmmoTypes/thousandsins_clipempty"); gun.quality = PickupObject.ItemQuality.S; ETGMod.Databases.Items.Add(gun, null, "ANY"); GunOfAThousandSinsID = gun.PickupObjectId; gun.SetupUnlockOnCustomFlag(CustomDungeonFlags.ALLJAMMED_BEATEN_HELL, true); }