public static void Add() { Gun gun = ETGMod.Databases.Items.NewGun("W3irdstar", "w3irdstar"); Game.Items.Rename("outdated_gun_mods:w3irdstar", "nn:w3irdstar"); var behav = gun.gameObject.AddComponent <W3irdstar>(); behav.overrideNormalFireAudio = "Play_WPN_seriouscannon_shot_01"; behav.preventNormalFireAudio = true; gun.SetShortDescription("Weird Champion"); gun.SetLongDescription("This wiggly weapon proves that we are all made of... star... squooge."); gun.SetupSprite(null, "w3irdstar_idle_001", 8); gun.SetAnimationFPS(gun.shootAnimation, 10); gun.SetAnimationFPS(gun.idleAnimation, 10); gun.SetAnimationFPS(gun.reloadAnimation, 1); gun.SetAnimationFPS(gun.chargeAnimation, 6); gun.AddProjectileModuleFrom(PickupObjectDatabase.GetById(56) as Gun, true, false); GameObject bulletDeath = VFXToolbox.CreateVFX("W3irdstar MidairDeath", new List <string>() { "NevernamedsItems/Resources/MiscVFX/GunVFX/W3irdstar/w3irdstar_impact_001", "NevernamedsItems/Resources/MiscVFX/GunVFX/W3irdstar/w3irdstar_impact_002", "NevernamedsItems/Resources/MiscVFX/GunVFX/W3irdstar/w3irdstar_impact_003", "NevernamedsItems/Resources/MiscVFX/GunVFX/W3irdstar/w3irdstar_impact_004", }, 15, //FPS new IntVector2(20, 20), //Dimensions tk2dBaseSprite.Anchor.MiddleCenter, //Anchor false, //Uses a Z height off the ground 0 //The Z height, if used ); gun.GetComponent <tk2dSpriteAnimator>().GetClipByName(gun.chargeAnimation).wrapMode = tk2dSpriteAnimationClip.WrapMode.LoopSection; gun.GetComponent <tk2dSpriteAnimator>().GetClipByName(gun.chargeAnimation).loopStart = 2; //GUN STATS gun.DefaultModule.ammoCost = 1; gun.DefaultModule.shootStyle = ProjectileModule.ShootStyle.Charged; gun.DefaultModule.sequenceStyle = ProjectileModule.ProjectileSequenceStyle.Random; gun.reloadTime = 1f; gun.DefaultModule.cooldownTime = 0.45f; gun.DefaultModule.angleVariance = 0; gun.DefaultModule.numberOfShotsInClip = 2; gun.barrelOffset.transform.localPosition = new Vector3(35f / 16f, 12f / 16f, 0f); gun.SetBaseMaxAmmo(80); gun.ammo = 80; gun.gunClass = GunClass.SILLY; GameObject baseproj = gun.DefaultModule.projectiles[0].gameObject.InstantiateAndFakeprefab(); gun.DefaultModule.projectiles[0] = baseproj.GetComponent <Projectile>(); //BULLET STATS HelixProjectileButLessShit projectile = DataCloners.CopyFields <HelixProjectileButLessShit>(Instantiate(gun.DefaultModule.projectiles[0])); projectile.SpawnShadowBulletsOnSpawn = false; projectile.gameObject.SetActive(false); FakePrefab.MarkAsFakePrefab(projectile.gameObject); UnityEngine.Object.DontDestroyOnLoad(projectile); projectile.baseData.damage = 20f; projectile.baseData.force *= 2f; projectile.baseData.speed *= 0.5f; projectile.baseData.range = 12f; projectile.hitEffects.overrideMidairDeathVFX = bulletDeath; projectile.hitEffects.alwaysUseMidair = true; projectile.SetProjectileSpriteRight("w3irdstar_largeproj", 20, 20, true, tk2dBaseSprite.Anchor.MiddleCenter, 10, 10); EvenRadialBurstHandler burst = projectile.gameObject.AddComponent <EvenRadialBurstHandler>(); burst.numberToSpawn = 40; burst.PostProcess = false; //MINI BULLETS GameObject split = (PickupObjectDatabase.GetById(56) as Gun).DefaultModule.projectiles[0].gameObject.InstantiateAndFakeprefab(); HelixProjectileButLessShit projectile2 = DataCloners.CopyFields <HelixProjectileButLessShit>(split.GetComponent <Projectile>()); projectile2.SpawnShadowBulletsOnSpawn = false; projectile2.gameObject.SetActive(false); FakePrefab.MarkAsFakePrefab(projectile2.gameObject); UnityEngine.Object.DontDestroyOnLoad(projectile2); projectile2.baseData.damage = 5f; projectile2.baseData.range = 20f; projectile2.hitEffects.overrideMidairDeathVFX = bulletDeath; projectile2.hitEffects.alwaysUseMidair = true; projectile2.SetProjectileSpriteRight("w3irdstar_smallproj", 12, 12, true, tk2dBaseSprite.Anchor.MiddleCenter, 6, 6); burst.projectileToSpawn = projectile2; ProjectileModule.ChargeProjectile chargeproj = new ProjectileModule.ChargeProjectile { Projectile = projectile, ChargeTime = 0.5f, }; gun.DefaultModule.chargeProjectiles = new List <ProjectileModule.ChargeProjectile> { chargeproj }; gun.DefaultModule.ammoType = GameUIAmmoType.AmmoType.CUSTOM; gun.DefaultModule.customAmmoType = CustomClipAmmoTypeToolbox.AddCustomAmmoType("W3irdstar Bullets", "NevernamedsItems/Resources/CustomGunAmmoTypes/w3irdstar_clipfull", "NevernamedsItems/Resources/CustomGunAmmoTypes/w3irdstar_clipempty"); gun.quality = PickupObject.ItemQuality.A; ETGMod.Databases.Items.Add(gun, null, "ANY"); W3irdstarID = gun.PickupObjectId; }
public static void Add() { Gun gun = ETGMod.Databases.Items.NewGun("Stick Gun", "stickgun"); Game.Items.Rename("outdated_gun_mods:stick_gun", "nn:stick_gun"); var behav = gun.gameObject.AddComponent <StickGun>(); behav.preventNormalReloadAudio = true; behav.preventNormalFireAudio = true; behav.overrideNormalFireAudio = "Play_PencilScratch"; gun.SetShortDescription("Scribble"); gun.SetLongDescription("Carried by a brave stickman as he ventured through the pages of a bored child's homework." + "\n\nHe may be long erased, but his legacy lives on."); gun.SetupSprite(null, "stickgun_idle_001", 8); 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.7f; gun.DefaultModule.cooldownTime = 0.1f; gun.DefaultModule.numberOfShotsInClip = 3; gun.barrelOffset.transform.localPosition = new Vector3(0.93f, 0.68f, 0f); gun.SetBaseMaxAmmo(222); gun.ammo = 222; gun.gunClass = GunClass.SHITTY; gun.gunHandedness = GunHandedness.OneHanded; //VFX gun.muzzleFlashEffects = VFXToolbox.CreateVFXPool("Stick Gun Muzzleflash", new List <string>() { "NevernamedsItems/Resources/MiscVFX/GunVFX/StickGun/stickgun_muzzleflash_001", "NevernamedsItems/Resources/MiscVFX/GunVFX/StickGun/stickgun_muzzleflash_002", "NevernamedsItems/Resources/MiscVFX/GunVFX/StickGun/stickgun_muzzleflash_003", }, 6, //FPS new IntVector2(12, 13), //Dimensions tk2dBaseSprite.Anchor.MiddleLeft, //Anchor false, //Uses a Z height off the ground 0, //The Z height, if used false, VFXAlignment.Fixed ); //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.speed *= 1.5f; PierceProjModifier pierce = projectile.gameObject.AddComponent <PierceProjModifier>(); pierce.penetration = 1; projectile.SetProjectileSpriteRight("stickgun_projectile", 12, 2, false, tk2dBaseSprite.Anchor.MiddleCenter, 12, 2); gun.DefaultModule.projectiles[0] = projectile; //Projectile VFX projectile.hitEffects.overrideMidairDeathVFX = VFXToolbox.CreateVFX("Stick Gun MidairDeath", new List <string>() { "NevernamedsItems/Resources/MiscVFX/GunVFX/StickGun/stickgun_impact_001", "NevernamedsItems/Resources/MiscVFX/GunVFX/StickGun/stickgun_impact_002", "NevernamedsItems/Resources/MiscVFX/GunVFX/StickGun/stickgun_impact_003", "NevernamedsItems/Resources/MiscVFX/GunVFX/StickGun/stickgun_impact_004", }, 6, //FPS new IntVector2(16, 15), //Dimensions tk2dBaseSprite.Anchor.MiddleCenter, //Anchor false, //Uses a Z height off the ground 0 //The Z height, if used ); projectile.hitEffects.tileMapHorizontal = VFXToolbox.CreateVFXPool("Stick Gun TileMapHoriz", new List <string>() { "NevernamedsItems/Resources/MiscVFX/GunVFX/StickGun/stickgun_tilemaphoriz_001", "NevernamedsItems/Resources/MiscVFX/GunVFX/StickGun/stickgun_tilemaphoriz_002", "NevernamedsItems/Resources/MiscVFX/GunVFX/StickGun/stickgun_tilemaphoriz_003" }, 6, //FPS new IntVector2(12, 21), //Dimensions tk2dBaseSprite.Anchor.MiddleLeft, //Anchor false, //Uses a Z height off the ground 0 //The Z height, if used ); projectile.hitEffects.tileMapVertical = VFXToolbox.CreateVFXPool("Stick Gun TileMapVert", new List <string>() { "NevernamedsItems/Resources/MiscVFX/GunVFX/StickGun/stickgun_tilemapvert_001", "NevernamedsItems/Resources/MiscVFX/GunVFX/StickGun/stickgun_tilemapvert_002", "NevernamedsItems/Resources/MiscVFX/GunVFX/StickGun/stickgun_tilemapvert_003" }, 6, //FPS new IntVector2(18, 21), //Dimensions tk2dBaseSprite.Anchor.MiddleLeft, //Anchor false, //Uses a Z height off the ground 0 //The Z height, if used ); projectile.hitEffects.enemy = VFXToolbox.CreateVFXPool("Stick Gun EnemyImpact", new List <string>() { "NevernamedsItems/Resources/MiscVFX/GunVFX/StickGun/stickgun_enemyimpact_001", "NevernamedsItems/Resources/MiscVFX/GunVFX/StickGun/stickgun_enemyimpact_002", "NevernamedsItems/Resources/MiscVFX/GunVFX/StickGun/stickgun_enemyimpact_003", "NevernamedsItems/Resources/MiscVFX/GunVFX/StickGun/stickgun_enemyimpact_004" }, 6, //FPS new IntVector2(15, 16), //Dimensions tk2dBaseSprite.Anchor.MiddleCenter, //Anchor false, //Uses a Z height off the ground 0, //The Z height, if used false, VFXAlignment.Fixed ); gun.DefaultModule.ammoType = GameUIAmmoType.AmmoType.CUSTOM; gun.DefaultModule.customAmmoType = CustomClipAmmoTypeToolbox.AddCustomAmmoType("StickGun Bullets", "NevernamedsItems/Resources/CustomGunAmmoTypes/stickgun_clipfull", "NevernamedsItems/Resources/CustomGunAmmoTypes/stickgun_clipempty"); gun.quality = PickupObject.ItemQuality.D; ETGMod.Databases.Items.Add(gun, null, "ANY"); StickGunID = gun.PickupObjectId; }
public static void Add() { Gun gun = ETGMod.Databases.Items.NewGun("ARC Pistol", "arcpistol"); Game.Items.Rename("outdated_gun_mods:arc_pistol", "nn:arc_pistol"); gun.gameObject.AddComponent <ARCPistol>(); gun.SetShortDescription("Shocked And Loaded"); gun.SetLongDescription("Developed by the ARC Private Security company for easy manufacture and deployment, this electrotech blaster is the epittome of the ARC brand."); gun.SetupSprite(null, "arcpistol_idle_001", 8); gun.SetAnimationFPS(gun.shootAnimation, 15); gun.AddProjectileModuleFrom(PickupObjectDatabase.GetById(56) as Gun, true, false); gun.gunSwitchGroup = (PickupObjectDatabase.GetById(153) as Gun).gunSwitchGroup; //GUN STATS gun.muzzleFlashEffects = (PickupObjectDatabase.GetById(41) as Gun).muzzleFlashEffects; gun.DefaultModule.ammoCost = 1; gun.DefaultModule.shootStyle = ProjectileModule.ShootStyle.SemiAutomatic; gun.DefaultModule.sequenceStyle = ProjectileModule.ProjectileSequenceStyle.Random; gun.reloadTime = 0.7f; gun.DefaultModule.cooldownTime = 0.15f; gun.DefaultModule.numberOfShotsInClip = 5; gun.barrelOffset.transform.localPosition = new Vector3(22f / 16f, 11f / 16f, 0f); gun.SetBaseMaxAmmo(300); 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.speed *= 5f; projectile.baseData.damage = 6f; projectile.SetProjectileSpriteRight("arc_proj", 8, 2, false, tk2dBaseSprite.Anchor.MiddleCenter, 8, 2); LightningProjectileComp lightning = projectile.gameObject.GetOrAddComponent <LightningProjectileComp>(); projectile.gameObject.AddComponent <PierceDeadActors>(); projectile.hitEffects.overrideMidairDeathVFX = VFXToolbox.CreateVFX("ARC Impact", new List <string>() { "NevernamedsItems/Resources/MiscVFX/GunVFX/electricImpact1", "NevernamedsItems/Resources/MiscVFX/GunVFX/electricImpact2", "NevernamedsItems/Resources/MiscVFX/GunVFX/electricImpact3", }, 10, //FPS new IntVector2(44, 43), //Dimensions tk2dBaseSprite.Anchor.MiddleCenter, //Anchor false, //Uses a Z height off the ground 0 //The Z height, if used ); projectile.hitEffects.alwaysUseMidair = true; gun.DefaultModule.ammoType = GameUIAmmoType.AmmoType.CUSTOM; gun.DefaultModule.customAmmoType = CustomClipAmmoTypeToolbox.AddCustomAmmoType("ARC Bullets", "NevernamedsItems/Resources/CustomGunAmmoTypes/arcweapon_clipfull", "NevernamedsItems/Resources/CustomGunAmmoTypes/arcweapon_clipempty"); gun.quality = PickupObject.ItemQuality.C; ETGMod.Databases.Items.Add(gun, null, "ANY"); ID = gun.PickupObjectId; }
public static void Add() { Gun gun = ETGMod.Databases.Items.NewGun("Square Peg", "squarepeg"); Game.Items.Rename("outdated_gun_mods:square_peg", "nn:square_peg"); gun.gameObject.AddComponent <SquarePeg>(); gun.SetShortDescription("In A Round Chamber"); gun.SetLongDescription("[] A perfect example of the art of cubism."); gun.SetupSprite(null, "squarepeg_idle_001", 8); gun.SetAnimationFPS(gun.shootAnimation, 15); gun.AddProjectileModuleFrom(PickupObjectDatabase.GetById(86) as Gun, true, false); gun.gunSwitchGroup = (PickupObjectDatabase.GetById(475) as Gun).gunSwitchGroup; //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.12f; gun.DefaultModule.numberOfShotsInClip = 6; gun.barrelOffset.transform.localPosition = new Vector3((26f / 16f), (14f / 16f), 0f); gun.SetBaseMaxAmmo(150); gun.gunClass = GunClass.PISTOL; gun.muzzleFlashEffects = VFXToolbox.CreateVFXPool("SquarePeg Muzzleflash", new List <string>() { "NevernamedsItems/Resources/MiscVFX/GunVFX/SquarePeg/squarepeg_muzzleflash_001", "NevernamedsItems/Resources/MiscVFX/GunVFX/SquarePeg/squarepeg_muzzleflash_002", "NevernamedsItems/Resources/MiscVFX/GunVFX/SquarePeg/squarepeg_muzzleflash_003", "NevernamedsItems/Resources/MiscVFX/GunVFX/SquarePeg/squarepeg_muzzleflash_004", "NevernamedsItems/Resources/MiscVFX/GunVFX/SquarePeg/squarepeg_muzzleflash_005", }, 12, //FPS new IntVector2(23, 14), //Dimensions tk2dBaseSprite.Anchor.MiddleLeft, //Anchor false, //Uses a Z height off the ground 0, //The Z height, if used false, VFXAlignment.Fixed ); //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.transform.parent = gun.barrelOffset; projectile.baseData.damage = 8f; projectile.hitEffects.overrideMidairDeathVFX = VFXToolbox.CreateVFX("SquarePeg MidairDeath", new List <string>() { "NevernamedsItems/Resources/MiscVFX/GunVFX/SquarePeg/squarepeg_impact_001", "NevernamedsItems/Resources/MiscVFX/GunVFX/SquarePeg/squarepeg_impact_002", "NevernamedsItems/Resources/MiscVFX/GunVFX/SquarePeg/squarepeg_impact_003", "NevernamedsItems/Resources/MiscVFX/GunVFX/SquarePeg/squarepeg_impact_004", }, 12, //FPS new IntVector2(14, 14), //Dimensions tk2dBaseSprite.Anchor.MiddleCenter, //Anchor false, //Uses a Z height off the ground 0 //The Z height, if used ); projectile.hitEffects.alwaysUseMidair = true; projectile.SetProjectileSpriteRight("squarepeg_proj", 8, 8, false, tk2dBaseSprite.Anchor.MiddleCenter, 8, 8); gun.DefaultModule.ammoType = GameUIAmmoType.AmmoType.CUSTOM; gun.DefaultModule.customAmmoType = CustomClipAmmoTypeToolbox.AddCustomAmmoType("SquarePegSquares", "NevernamedsItems/Resources/CustomGunAmmoTypes/squarepeg_clipfull", "NevernamedsItems/Resources/CustomGunAmmoTypes/squarepeg_clipempty"); gun.quality = PickupObject.ItemQuality.C; ETGMod.Databases.Items.Add(gun, null, "ANY"); ID = gun.PickupObjectId; }