protected void AffectEnemy(AIActor randomActiveEnemy) { if (randomActiveEnemy && randomActiveEnemy.behaviorSpeculator) { randomActiveEnemy.Transmogrify(EnemyDatabase.GetOrLoadByName("chicken"), (GameObject)ResourceCache.Acquire("Global VFX/VFX_Item_Spawn_Poof")); } }
public void Start() { PlayerController player = m_owner as PlayerController; Material mat = new Material(EnemyDatabase.GetOrLoadByName("GunNut").sprite.renderer.material); mat.mainTexture = base.aiActor.sprite.renderer.material.mainTexture; mat.SetColor("_EmissiveColor", new Color32(67, 225, 240, 255)); mat.SetFloat("_EmissiveColorPower", 1.55f); mat.SetFloat("_EmissivePower", 100); aiActor.sprite.renderer.material = mat; this.Owner = this.m_owner; }
public static string LocalShaderNameGetHook(Func <PlayerController, string> orig, PlayerController self) { if (!GameOptions.SupportsStencil) { return("Brave/PlayerShaderNoStencil"); } if (self.name == "PlayerModular(Clone)") { Material mat = new Material(EnemyDatabase.GetOrLoadByName("GunNut").sprite.renderer.material); mat.SetTexture("_MainTexture", self.sprite.renderer.material.GetTexture("_MainTex")); mat.SetColor("_EmissiveColor", new Color32(67, 225, 240, 255)); mat.SetFloat("_EmissiveColorPower", 1.55f); mat.SetFloat("_EmissivePower", 80); self.sprite.renderer.material = mat; return(mat.shader.name); } return(orig(self)); }
public static string LocalShaderNameGetHook(Func <PlayerController, string> orig, PlayerController self) { // rollin glow stuffs if (!GameOptions.SupportsStencil) { return("Brave/PlayerShaderNoStencil"); } if (self.name == "PlayerRollin(Clone)") { Material mat = new Material(EnemyDatabase.GetOrLoadByName("GunNut").sprite.renderer.material); mat.SetTexture("_MainTexture", self.sprite.renderer.material.GetTexture("_MainTex")); mat.SetColor("_EmissiveColor", new Color32(225, 225, 225, 225)); //this is the color you want to make glow! mat.SetFloat("_EmissiveThresholdSensitivity", .25f); // sensitivity mat.SetFloat("_EmissiveColorPower", 0f); //this makes the color brighter mat.SetFloat("_EmissivePower", 50); // this is how much glow there is, 150 is usually high but when its only the eyes and eyes are 1 or 2 pixels, its not that high. anyway, you should play around with is. self.sprite.renderer.material = mat; return(mat.shader.name); } return(orig(self)); }
private void SpawnRaccoon(PlayerController player) { AIActor orLoadByName = EnemyDatabase.GetOrLoadByName("raccoon"); Vector3 vector = player.transform.position; if (GameManager.Instance.CurrentLevelOverrideState == GameManager.LevelOverrideState.FOYER) { vector += new Vector3(1.125f, -0.3125f, 0f); } GameObject extantCompanion2 = UnityEngine.Object.Instantiate <GameObject>(orLoadByName.gameObject, vector, Quaternion.identity); this.m_extantCompanion = extantCompanion2; CompanionController orAddComponent = this.m_extantCompanion.GetOrAddComponent <CompanionController>(); orAddComponent.Initialize(player); if (orAddComponent.specRigidbody) { PhysicsEngine.Instance.RegisterOverlappingGhostCollisionExceptions(orAddComponent.specRigidbody, null, false); } }
private static void InitCustomEnemyTypes() { customTypesEnemies.Add("genie", new List <string> { "43426a2e39584871b287ac31df04b544" }); customTypesEnemies.Add("Rifle", new List <string> { "31a3ea0c54a745e182e22ea54844a82d", "c5b11bfc065d417b9c4d03a5e385fe2c" }); customTypesEnemies.Add("ghost_small", new List <string> { "4db03291a12144d69fe940d5a01de376" }); customTypesEnemies.Add("burning_hand", new List <string> { "d8a445ea4d944cc1b55a40f22821ae69", "ffdc8680bdaa487f8f31995539f74265" }); customTypesEnemies.Add("hate", new List <string> { "af84951206324e349e1f13f9b7b60c1a", "336190e29e8a4f75ab7486595b700d4a", "95ec774b5a75467a9ab05fa230c0c143", "c2f902b7cbe745efb3db4399927eab34", "1cec0cdf383e42b19920787798353e46" }); customTypesEnemies.Add("poison_blob", new List <string> { "e61cab252cfb435db9172adc96ded75f", "fe3fe59d867347839824d5d9ae87f244", "b8103805af174924b578c98e95313074" }); customTypesEnemies.Add("urn", new List <string> { "4db03291a12144d69fe940d5a01de376" }); customTypesEnemies.Add("big_shotgun", new List <string> { "128db2f0781141bcb505d8f00f9e4d47", "b54d89f9e802455cbb2b8a96a31e8259", "2752019b770f473193b08b4005dc781f", "7f665bd7151347e298e4d366f8818284", "b1770e0f1c744d9d887cc16122882b4f", "1bd8e49f93614e76b140077ff2e33f2b", "044a9f39712f456597b9762893fbc19c", "37340393f97f41b2822bc02d14654172", "2d4f8b5404614e7d8b235006acde427a" }); customTypesEnemies.Add("bomb", new List <string> { "4d37ce3d666b4ddda8039929225b7ede", "19b420dec96d4e9ea4aebc3398c0ba7a", "b4666cb6ef4f4b038ba8924fd8adf38f", "566ecca5f3b04945ac6ce1f26dedbf4f", "c0260c286c8d4538a697c5bf24976ccf" }); customTypesEnemies.Add("feather", new List <string> { "76bc43539fc24648bff4568c75c686d1" }); customTypesEnemies.Add("slow_arrow", new List <string> { "05891b158cd542b1a5f3df30fb67a7ff" }); customTypesEnemies.Add("rock", new List <string> { "9d50684ce2c044e880878e86dbada919" }); customTypesEnemies.Add("duck", new List <string> { "8b43a5c59b854eb780f9ab669ec26b7a" }); customTypesEnemies.Add("kirkcannon", new List <string> { EnemyDatabase.GetOrLoadByName("BulletmanTitan_Boss").EnemyGuid, EnemyDatabase.GetOrLoadByName("BulletmanTitan").EnemyGuid, EnemyDatabase.GetOrLoadByName("BulletgalTitan_Boss").EnemyGuid, }); customTypesEnemies.Add("tachyon", new List <string> { "0239c0680f9f467dbe5c4aab7dd1eca6", "042edb1dfb614dc385d5ad1b010f2ee3", "42be66373a3d4d89b91a35c9ff8adfec", "e61cab252cfb435db9172adc96ded75f", "fe3fe59d867347839824d5d9ae87f244", "b8103805af174924b578c98e95313074", "022d7c822bc146b58fe3b0287568aaa2", "8a9e9bedac014a829a48735da6daf3da", "116d09c26e624bca8cca09fc69c714b3", "062b9b64371e46e195de17b6f10e47c8", "d1c9781fdac54d9e8498ed89210a0238" }); customTypesEnemies.Add("burning hand green", new List <string> { "d8a445ea4d944cc1b55a40f22821ae69", "ffdc8680bdaa487f8f31995539f74265" }); customTypesEnemies.Add("bomb gold", new List <string> { "4d37ce3d666b4ddda8039929225b7ede", "19b420dec96d4e9ea4aebc3398c0ba7a", "b4666cb6ef4f4b038ba8924fd8adf38f", "566ecca5f3b04945ac6ce1f26dedbf4f", "c0260c286c8d4538a697c5bf24976ccf" }); customTypesEnemies.Add("finished small", new List <string> { "db35531e66ce41cbb81d507a34366dfe", "01972dee89fc4404a5c408d50007dad5", "70216cae6c1346309d86d4a0b4603045", "88b6b6a93d4b4234a67844ef4728382c", "df7fb62405dc4697b7721862c7b6b3cd", "47bdfec22e8e4568a619130a267eab5b", "3cadf10c489b461f9fb8814abc1a09c1", "8bb5578fba374e8aae8e10b754e61d62", "e5cffcfabfae489da61062ea20539887", "1a78cfb776f54641b832e92c44021cf2", "d4a9836f8ab14f3fadd0f597438b1f1f", "5f3abc2d561b4b9c9e72b879c6f10c7e", "844657ad68894a4facb1b8e1aef1abf9", "2feb50a6a40f4f50982e89fd276f6f15" }); customTypesEnemies.Add("golden_gun", new List <string> { "72d2f44431da43b8a3bae7d8a114a46d", "b70cbd875fea498aa7fd14b970248920" }); customTypesEnemies.Add("rail", new List <string> { "72d2f44431da43b8a3bae7d8a114a46d", "b70cbd875fea498aa7fd14b970248920" }); }
private static void InitEnemyTypes() { typesEnemies.Add(GameUIAmmoType.AmmoType.SMALL_BULLET, new List <string> { "db35531e66ce41cbb81d507a34366dfe", "01972dee89fc4404a5c408d50007dad5", "70216cae6c1346309d86d4a0b4603045", "88b6b6a93d4b4234a67844ef4728382c", "df7fb62405dc4697b7721862c7b6b3cd", "47bdfec22e8e4568a619130a267eab5b", "3cadf10c489b461f9fb8814abc1a09c1", "8bb5578fba374e8aae8e10b754e61d62", "e5cffcfabfae489da61062ea20539887", "1a78cfb776f54641b832e92c44021cf2", "d4a9836f8ab14f3fadd0f597438b1f1f", "5f3abc2d561b4b9c9e72b879c6f10c7e", "844657ad68894a4facb1b8e1aef1abf9", "2feb50a6a40f4f50982e89fd276f6f15" }); typesEnemies.Add(GameUIAmmoType.AmmoType.MEDIUM_BULLET, new List <string> { "db35531e66ce41cbb81d507a34366dfe", "01972dee89fc4404a5c408d50007dad5", "70216cae6c1346309d86d4a0b4603045", "88b6b6a93d4b4234a67844ef4728382c", "df7fb62405dc4697b7721862c7b6b3cd", "47bdfec22e8e4568a619130a267eab5b", "3cadf10c489b461f9fb8814abc1a09c1", "8bb5578fba374e8aae8e10b754e61d62", "e5cffcfabfae489da61062ea20539887", "1a78cfb776f54641b832e92c44021cf2", "d4a9836f8ab14f3fadd0f597438b1f1f", "5f3abc2d561b4b9c9e72b879c6f10c7e", "844657ad68894a4facb1b8e1aef1abf9", "2feb50a6a40f4f50982e89fd276f6f15" }); typesEnemies.Add(GameUIAmmoType.AmmoType.GRENADE, new List <string> { "4d37ce3d666b4ddda8039929225b7ede", "19b420dec96d4e9ea4aebc3398c0ba7a", "b4666cb6ef4f4b038ba8924fd8adf38f", "566ecca5f3b04945ac6ce1f26dedbf4f", "c0260c286c8d4538a697c5bf24976ccf" }); typesEnemies.Add(GameUIAmmoType.AmmoType.SHOTGUN, new List <string> { "128db2f0781141bcb505d8f00f9e4d47", "b54d89f9e802455cbb2b8a96a31e8259", "2752019b770f473193b08b4005dc781f", "7f665bd7151347e298e4d366f8818284", "b1770e0f1c744d9d887cc16122882b4f", "1bd8e49f93614e76b140077ff2e33f2b", "044a9f39712f456597b9762893fbc19c", "37340393f97f41b2822bc02d14654172", "2d4f8b5404614e7d8b235006acde427a" }); typesEnemies.Add(GameUIAmmoType.AmmoType.MUSKETBALL, new List <string> { EnemyDatabase.GetOrLoadByName("Musketball_Man").EnemyGuid }); typesEnemies.Add(GameUIAmmoType.AmmoType.ARROW, new List <string> { "05891b158cd542b1a5f3df30fb67a7ff" }); typesEnemies.Add(GameUIAmmoType.AmmoType.MAGIC, new List <string> { "8bb5578fba374e8aae8e10b754e61d62", "43426a2e39584871b287ac31df04b544" }); typesEnemies.Add(GameUIAmmoType.AmmoType.BLUE_SHOTGUN, new List <string> { "128db2f0781141bcb505d8f00f9e4d47", "b54d89f9e802455cbb2b8a96a31e8259", "2752019b770f473193b08b4005dc781f", "7f665bd7151347e298e4d366f8818284", "b1770e0f1c744d9d887cc16122882b4f", "1bd8e49f93614e76b140077ff2e33f2b", "044a9f39712f456597b9762893fbc19c", "37340393f97f41b2822bc02d14654172", "2d4f8b5404614e7d8b235006acde427a" }); typesEnemies.Add(GameUIAmmoType.AmmoType.SKULL, new List <string> { "af84951206324e349e1f13f9b7b60c1a", "336190e29e8a4f75ab7486595b700d4a", "95ec774b5a75467a9ab05fa230c0c143", "c2f902b7cbe745efb3db4399927eab34", "1cec0cdf383e42b19920787798353e46" }); typesEnemies.Add(GameUIAmmoType.AmmoType.FISH, new List <string> { EnemyDatabase.GetOrLoadByName("BulletMan_Fish").EnemyGuid, EnemyDatabase.GetOrLoadByName("BulletMan_Fish_Blue").EnemyGuid }); }
public static void Add() { // Get yourself a new gun "base" first. // Let's just call it "Basic Gun", and use "jpxfrd" for all sprites and as "codename" All sprites must begin with the same word as the codename. For example, your firing sprite would be named "jpxfrd_fire_001". Gun gun = ETGMod.Databases.Items.NewGun("Neon Desimator", "Neon_desimator"); // "kp:basic_gun determines how you spawn in your gun through the console. You can change this command to whatever you want, as long as it follows the "name:itemname" template. Game.Items.Rename("outdated_gun_mods:neon_desimator", "ski:neon_desimator"); gun.gameObject.AddComponent <Neon>(); //These two lines determines the description of your gun, ".SetShortDescription" being the description that appears when you pick up the gun and ".SetLongDescription" being the description in the Ammonomicon entry. gun.SetShortDescription("High voltage!"); gun.SetLongDescription("Crits against wet enemies! Some enemies are wet naturally others will need to be forced into it." + "\n\n\n - Knife_to_a_Gunfight"); // This is required, unless you want to use the sprites of the base gun. // That, by default, is the pea shooter. // SetupSprite sets up the default gun sprite for the ammonomicon and the "gun get" popup. // WARNING: Add a copy of your default sprite to Ammonomicon Encounter Icon Collection! // That means, "sprites/Ammonomicon Encounter Icon Collection/defaultsprite.png" in your mod .zip. You can see an example of this with inside the mod folder. gun.SetupSprite(null, "Neon_desimator_idle_001", 3); gun.SetAnimationFPS(gun.shootAnimation, 15); gun.SetAnimationFPS(gun.reloadAnimation, 9); gun.AddProjectileModuleFrom("dl45", true, true); gun.DefaultModule.ammoCost = 1; gun.DefaultModule.angleVariance = 1; gun.gunClass = GunClass.SILLY; gun.gunHandedness = GunHandedness.OneHanded; gun.DefaultModule.shootStyle = ProjectileModule.ShootStyle.SemiAutomatic; gun.DefaultModule.sequenceStyle = ProjectileModule.ProjectileSequenceStyle.Random; gun.reloadTime = 2f; gun.DefaultModule.numberOfShotsInClip = 9; gun.DefaultModule.cooldownTime = .25f; gun.SetBaseMaxAmmo(300); gun.quality = PickupObject.ItemQuality.C; gun.encounterTrackable.EncounterGuid = "*Krzirrrrt!"; //swipe Projectile projectile = UnityEngine.Object.Instantiate <Projectile>(gun.DefaultModule.projectiles[0]); gun.DefaultModule.ammoType = GameUIAmmoType.AmmoType.CUSTOM; gun.DefaultModule.customAmmoType = "samus"; Gun flash = (Gun)PickupObjectDatabase.GetByEncounterName("Void Core Assault Rifle"); gun.barrelOffset.transform.localPosition = new Vector3(2f, .7f, 0f); gun.muzzleFlashEffects = flash.muzzleFlashEffects; projectile.gameObject.SetActive(false); FakePrefab.MarkAsFakePrefab(projectile.gameObject); UnityEngine.Object.DontDestroyOnLoad(projectile); gun.DefaultModule.projectiles[0] = projectile; projectile.baseData.damage = 5f; projectile.baseData.speed = 15f; projectile.baseData.range = 20f; projectile.baseData.force = 5; gun.sprite.usesOverrideMaterial = true; Material mat = new Material(EnemyDatabase.GetOrLoadByName("GunNut").sprite.renderer.material); mat.SetColor("_EmissiveColor", new Color32(255, 5, 5, 255)); mat.SetFloat("_EmissiveColorPower", 6f); mat.SetFloat("_EmissivePower", 4); MeshRenderer component = gun.GetComponent <MeshRenderer>(); if (!component) { ETGModConsole.Log("nope"); return; } Material[] sharedMaterials = component.sharedMaterials; for (int i = 0; i < sharedMaterials.Length; i++) { if (sharedMaterials[i].shader == mat) { return; } } Array.Resize <Material>(ref sharedMaterials, sharedMaterials.Length + 1); Material material = new Material(mat); material.SetTexture("_MainTex", sharedMaterials[0].GetTexture("_MainTex")); sharedMaterials[sharedMaterials.Length - 1] = material; component.sharedMaterials = sharedMaterials; projectile.transform.parent = gun.barrelOffset; ETGMod.Databases.Items.Add(gun, null, "ANY"); }
public static void InitVFX() { VFXScapeGoat = new GameObject(); UnityEngine.Object.DontDestroyOnLoad(VFXScapeGoat); PrivateVFXCollection = SpriteBuilder.ConstructCollection(VFXScapeGoat, "OMITBVFXCollection"); GameObject errorshellsvfx = SpriteBuilder.SpriteFromResource("NevernamedsItems/Resources/MiscVFX/errorshellsoverhead_vfx", new GameObject("ErrorShellsIcon")); errorshellsvfx.SetActive(false); tk2dBaseSprite vfxSprite = errorshellsvfx.GetComponent <tk2dBaseSprite>(); vfxSprite.GetCurrentSpriteDef().ConstructOffsetsFromAnchor(tk2dBaseSprite.Anchor.LowerCenter, vfxSprite.GetCurrentSpriteDef().position3); FakePrefab.MarkAsFakePrefab(errorshellsvfx); UnityEngine.Object.DontDestroyOnLoad(errorshellsvfx); EasyVFXDatabase.ERRORShellsOverheadVFX = errorshellsvfx; List <string> SpareVFXPaths = new List <string>() { "NevernamedsItems/Resources/MiscVFX/spared_vfx_001", "NevernamedsItems/Resources/MiscVFX/spared_vfx_002", "NevernamedsItems/Resources/MiscVFX/spared_vfx_003", "NevernamedsItems/Resources/MiscVFX/spared_vfx_004", "NevernamedsItems/Resources/MiscVFX/spared_vfx_005", "NevernamedsItems/Resources/MiscVFX/spared_vfx_006", "NevernamedsItems/Resources/MiscVFX/spared_vfx_007", "NevernamedsItems/Resources/MiscVFX/spared_vfx_008", "NevernamedsItems/Resources/MiscVFX/spared_vfx_009", "NevernamedsItems/Resources/MiscVFX/spared_vfx_010", "NevernamedsItems/Resources/MiscVFX/spared_vfx_011", }; GameObject spareVFX = CreateVFX("GundertaleSpare", SpareVFXPaths, 16, new IntVector2(34, 14), tk2dBaseSprite.Anchor.LowerCenter, true, 0.18f, 100, Color.yellow); EasyVFXDatabase.GundetaleSpareVFX = spareVFX; List <string> SpeedUpVFX = new List <string>() { "NevernamedsItems/Resources/StatVFX/speedup_vfx_001", "NevernamedsItems/Resources/StatVFX/speedup_vfx_002", "NevernamedsItems/Resources/StatVFX/speedup_vfx_003", "NevernamedsItems/Resources/StatVFX/speedup_vfx_004", "NevernamedsItems/Resources/StatVFX/speedup_vfx_005", "NevernamedsItems/Resources/StatVFX/speedup_vfx_006", "NevernamedsItems/Resources/StatVFX/speedup_vfx_007", }; GameObject SpeedUpVFXObj = CreateVFX("Speed Up VFX", SpeedUpVFX, 16, new IntVector2(27, 17), tk2dBaseSprite.Anchor.LowerCenter, true, 0.18f, 100, Color.yellow); EasyVFXDatabase.SpeedUpVFX = SpeedUpVFXObj; EasyVFXDatabase.BigWhitePoofVFX = CreateVFX("Big White Poof", new List <string>() { "NevernamedsItems/Resources/MiscVFX/bigwhitepoof_001", "NevernamedsItems/Resources/MiscVFX/bigwhitepoof_002", "NevernamedsItems/Resources/MiscVFX/bigwhitepoof_003", "NevernamedsItems/Resources/MiscVFX/bigwhitepoof_004", }, 10, //FPS new IntVector2(36, 36), //Dimensions tk2dBaseSprite.Anchor.MiddleCenter, //Anchor false, //Uses a Z height off the ground 0 //The Z height, if used ); EasyVFXDatabase.BloodExplosion = CreateVFX("Blood Explosion VFX", new List <string>() { "NevernamedsItems/Resources/MiscVFX/Explosions/bloodexplosion_001", "NevernamedsItems/Resources/MiscVFX/Explosions/bloodexplosion_002", "NevernamedsItems/Resources/MiscVFX/Explosions/bloodexplosion_003", "NevernamedsItems/Resources/MiscVFX/Explosions/bloodexplosion_004", "NevernamedsItems/Resources/MiscVFX/Explosions/bloodexplosion_005", "NevernamedsItems/Resources/MiscVFX/Explosions/bloodexplosion_006", "NevernamedsItems/Resources/MiscVFX/Explosions/bloodexplosion_007", "NevernamedsItems/Resources/MiscVFX/Explosions/bloodexplosion_008", "NevernamedsItems/Resources/MiscVFX/Explosions/bloodexplosion_009", "NevernamedsItems/Resources/MiscVFX/Explosions/bloodexplosion_010", }, 10, //FPS new IntVector2(71, 71), //Dimensions tk2dBaseSprite.Anchor.MiddleCenter, //Anchor false, //Uses a Z height off the ground 0 //The Z height, if used ); GameObject debrislauncher = new GameObject(); debrislauncher.MakeFakePrefab(); debrislauncher.transform.parent = EasyVFXDatabase.BloodExplosion.transform; debrislauncher.AddComponent <ExplosionDebrisLauncher>(); #region ArcExplosion GameObject indevArcExplosion = CreateVFX("ARC Explosion", new List <string>() { "NevernamedsItems/Resources/MiscVFX/shittyarcsplosion_001", "NevernamedsItems/Resources/MiscVFX/shittyarcsplosion_002", "NevernamedsItems/Resources/MiscVFX/shittyarcsplosion_003", "NevernamedsItems/Resources/MiscVFX/shittyarcsplosion_004", "NevernamedsItems/Resources/MiscVFX/shittyarcsplosion_005", "NevernamedsItems/Resources/MiscVFX/shittyarcsplosion_006", }, 10, //FPS new IntVector2(66, 64), //Dimensions tk2dBaseSprite.Anchor.MiddleCenter, //Anchor false, //Uses a Z height off the ground 0 //The Z height, if used ); indevArcExplosion.GetComponent <tk2dBaseSprite>().sprite.usesOverrideMaterial = true; Material mat = new Material(EnemyDatabase.GetOrLoadByName("GunNut").sprite.renderer.material); mat.mainTexture = indevArcExplosion.GetComponent <tk2dBaseSprite>().sprite.renderer.material.mainTexture; mat.SetColor("_EmissiveColor", ExtendedColours.skyblue); mat.SetFloat("_EmissiveColorPower", 1.55f); mat.SetFloat("_EmissivePower", 100); indevArcExplosion.GetComponent <tk2dBaseSprite>().sprite.renderer.material = mat; EasyVFXDatabase.ShittyElectricExplosion = indevArcExplosion; #endregion #region RainbowGuonPoofs //RED List <string> RedPoofPaths = new List <string>() { "NevernamedsItems/Resources/MiscVFX/RainbowGuonPoofs/redpoof_001", "NevernamedsItems/Resources/MiscVFX/RainbowGuonPoofs/redpoof_002", "NevernamedsItems/Resources/MiscVFX/RainbowGuonPoofs/redpoof_003", "NevernamedsItems/Resources/MiscVFX/RainbowGuonPoofs/redpoof_004", "NevernamedsItems/Resources/MiscVFX/RainbowGuonPoofs/redpoof_005", }; RainbowGuonStone.RedGuonTransitionVFX = CreateVFX("RedGuonPoof", RedPoofPaths, 14, new IntVector2(21, 22), tk2dBaseSprite.Anchor.MiddleCenter, false, 0); //ORANGE List <string> OrangePoofPaths = new List <string>() { "NevernamedsItems/Resources/MiscVFX/RainbowGuonPoofs/orangepoof_001", "NevernamedsItems/Resources/MiscVFX/RainbowGuonPoofs/orangepoof_002", "NevernamedsItems/Resources/MiscVFX/RainbowGuonPoofs/orangepoof_003", "NevernamedsItems/Resources/MiscVFX/RainbowGuonPoofs/orangepoof_004", "NevernamedsItems/Resources/MiscVFX/RainbowGuonPoofs/orangepoof_005", }; RainbowGuonStone.OrangeGuonTransitionVFX = CreateVFX("OrangeGuonPoof", OrangePoofPaths, 14, new IntVector2(21, 22), tk2dBaseSprite.Anchor.MiddleCenter, false, 0); //YELLOW List <string> YellowPoofPaths = new List <string>() { "NevernamedsItems/Resources/MiscVFX/RainbowGuonPoofs/yellowpoof_001", "NevernamedsItems/Resources/MiscVFX/RainbowGuonPoofs/yellowpoof_002", "NevernamedsItems/Resources/MiscVFX/RainbowGuonPoofs/yellowpoof_003", "NevernamedsItems/Resources/MiscVFX/RainbowGuonPoofs/yellowpoof_004", "NevernamedsItems/Resources/MiscVFX/RainbowGuonPoofs/yellowpoof_005", }; RainbowGuonStone.YellowGuonTransitionVFX = CreateVFX("YellowGuonPoof", YellowPoofPaths, 14, new IntVector2(21, 22), tk2dBaseSprite.Anchor.MiddleCenter, false, 0); //GREEN List <string> GreenPoofPaths = new List <string>() { "NevernamedsItems/Resources/MiscVFX/RainbowGuonPoofs/greenpoof_001", "NevernamedsItems/Resources/MiscVFX/RainbowGuonPoofs/greenpoof_002", "NevernamedsItems/Resources/MiscVFX/RainbowGuonPoofs/greenpoof_003", "NevernamedsItems/Resources/MiscVFX/RainbowGuonPoofs/greenpoof_004", "NevernamedsItems/Resources/MiscVFX/RainbowGuonPoofs/greenpoof_005", }; RainbowGuonStone.GreenGuonTransitionVFX = CreateVFX("GreenGuonPoof", GreenPoofPaths, 14, new IntVector2(21, 22), tk2dBaseSprite.Anchor.MiddleCenter, false, 0); //BLUE List <string> BluePoofPaths = new List <string>() { "NevernamedsItems/Resources/MiscVFX/RainbowGuonPoofs/bluepoof_001", "NevernamedsItems/Resources/MiscVFX/RainbowGuonPoofs/bluepoof_002", "NevernamedsItems/Resources/MiscVFX/RainbowGuonPoofs/bluepoof_003", "NevernamedsItems/Resources/MiscVFX/RainbowGuonPoofs/bluepoof_004", "NevernamedsItems/Resources/MiscVFX/RainbowGuonPoofs/bluepoof_005", }; RainbowGuonStone.BlueGuonTransitionVFX = CreateVFX("BlueGuonPoof", BluePoofPaths, 14, new IntVector2(21, 22), tk2dBaseSprite.Anchor.MiddleCenter, false, 0); //WHITE List <string> WhitePoofPaths = new List <string>() { "NevernamedsItems/Resources/MiscVFX/RainbowGuonPoofs/whitepoof_001", "NevernamedsItems/Resources/MiscVFX/RainbowGuonPoofs/whitepoof_002", "NevernamedsItems/Resources/MiscVFX/RainbowGuonPoofs/whitepoof_003", "NevernamedsItems/Resources/MiscVFX/RainbowGuonPoofs/whitepoof_004", "NevernamedsItems/Resources/MiscVFX/RainbowGuonPoofs/whitepoof_005", }; RainbowGuonStone.WhiteGuonTransitionVFX = CreateVFX("WhiteGuonPoof", WhitePoofPaths, 14, new IntVector2(21, 22), tk2dBaseSprite.Anchor.MiddleCenter, false, 0); //CYAN List <string> CyanPoofPaths = new List <string>() { "NevernamedsItems/Resources/MiscVFX/RainbowGuonPoofs/cyanpoof_001", "NevernamedsItems/Resources/MiscVFX/RainbowGuonPoofs/cyanpoof_002", "NevernamedsItems/Resources/MiscVFX/RainbowGuonPoofs/cyanpoof_003", "NevernamedsItems/Resources/MiscVFX/RainbowGuonPoofs/cyanpoof_004", "NevernamedsItems/Resources/MiscVFX/RainbowGuonPoofs/cyanpoof_005", }; RainbowGuonStone.CyanGuonTransitionVFX = CreateVFX("CyanGuonPoof", CyanPoofPaths, 14, new IntVector2(21, 22), tk2dBaseSprite.Anchor.MiddleCenter, false, 0); //GOLD List <string> GoldPoofPaths = new List <string>() { "NevernamedsItems/Resources/MiscVFX/RainbowGuonPoofs/goldpoof_001", "NevernamedsItems/Resources/MiscVFX/RainbowGuonPoofs/goldpoof_002", "NevernamedsItems/Resources/MiscVFX/RainbowGuonPoofs/goldpoof_003", "NevernamedsItems/Resources/MiscVFX/RainbowGuonPoofs/goldpoof_004", "NevernamedsItems/Resources/MiscVFX/RainbowGuonPoofs/goldpoof_005", }; RainbowGuonStone.GoldGuonTransitionVFX = CreateVFX("GoldGuonPoof", GoldPoofPaths, 14, new IntVector2(21, 22), tk2dBaseSprite.Anchor.MiddleCenter, false, 0); //GREY List <string> GreyPoofPaths = new List <string>() { "NevernamedsItems/Resources/MiscVFX/RainbowGuonPoofs/greypoof_001", "NevernamedsItems/Resources/MiscVFX/RainbowGuonPoofs/greypoof_002", "NevernamedsItems/Resources/MiscVFX/RainbowGuonPoofs/greypoof_003", "NevernamedsItems/Resources/MiscVFX/RainbowGuonPoofs/greypoof_004", "NevernamedsItems/Resources/MiscVFX/RainbowGuonPoofs/greypoof_005", }; RainbowGuonStone.GreyGuonTransitionVFX = CreateVFX("GreyGuonPoof", GreyPoofPaths, 14, new IntVector2(21, 22), tk2dBaseSprite.Anchor.MiddleCenter, false, 0); //BROWN List <string> BrownPoofPaths = new List <string>() { "NevernamedsItems/Resources/MiscVFX/RainbowGuonPoofs/brownpoof_001", "NevernamedsItems/Resources/MiscVFX/RainbowGuonPoofs/brownpoof_002", "NevernamedsItems/Resources/MiscVFX/RainbowGuonPoofs/brownpoof_003", "NevernamedsItems/Resources/MiscVFX/RainbowGuonPoofs/brownpoof_004", "NevernamedsItems/Resources/MiscVFX/RainbowGuonPoofs/brownpoof_005", }; RainbowGuonStone.BrownGuonTransitionVFX = CreateVFX("BrownGuonPoof", BrownPoofPaths, 14, new IntVector2(21, 22), tk2dBaseSprite.Anchor.MiddleCenter, false, 0); //INDIGO List <string> IndigoPoofPaths = new List <string>() { "NevernamedsItems/Resources/MiscVFX/RainbowGuonPoofs/indigopoof_001", "NevernamedsItems/Resources/MiscVFX/RainbowGuonPoofs/indigopoof_002", "NevernamedsItems/Resources/MiscVFX/RainbowGuonPoofs/indigopoof_003", "NevernamedsItems/Resources/MiscVFX/RainbowGuonPoofs/indigopoof_004", "NevernamedsItems/Resources/MiscVFX/RainbowGuonPoofs/indigopoof_005", }; RainbowGuonStone.IndigoGuonTransitionVFX = CreateVFX("IndigoGuonPoof", IndigoPoofPaths, 14, new IntVector2(21, 22), tk2dBaseSprite.Anchor.MiddleCenter, false, 0); #endregion laserSightPrefab = LoadHelper.LoadAssetFromAnywhere("assets/resourcesbundle/global vfx/vfx_lasersight.prefab") as GameObject; }
public static void BuildCharacter(CustomCharacterData data, bool hasAltSkin, bool paradoxUsesSprites, bool removeFoyerExtras, bool hasArmourlessAnimations = false, bool usesArmourNotHealth = false, bool hasCustomPast = false, string customPast = "", int metaCost = 0, bool useGlow = false, GlowMatDoer glowVars = null, GlowMatDoer altGlowVars = null) { var basePrefab = GetPlayerPrefab(data.baseCharacter); if (basePrefab == null) { ToolsCharApi.PrintError("Could not find prefab for: " + data.baseCharacter.ToString()); return; } ToolsCharApi.Print(""); ToolsCharApi.Print("--Building Character: " + data.nameShort + "--", "0000FF"); PlayerController playerController; GameObject gameObject = GameObject.Instantiate(basePrefab); playerController = gameObject.GetComponent <PlayerController>(); var customCharacter = gameObject.AddComponent <CustomCharacter>(); customCharacter.data = data; data.characterID = storedCharacters.Count; playerController.AllowZeroHealthState = usesArmourNotHealth; playerController.ForceZeroHealthState = usesArmourNotHealth; playerController.hasArmorlessAnimations = hasArmourlessAnimations; playerController.altHandName = "hand_alt"; playerController.SwapHandsOnAltCostume = true; GameObject.DontDestroyOnLoad(gameObject); CustomizeCharacter(playerController, data, paradoxUsesSprites); data.useGlow = useGlow; if (useGlow) { data.emissiveColor = glowVars.emissiveColor; data.emissiveColorPower = glowVars.emissiveColorPower; data.emissivePower = glowVars.emissivePower; } data.removeFoyerExtras = removeFoyerExtras; data.metaCost = metaCost; if (useGlow) { var material = new Material(EnemyDatabase.GetOrLoadByName("GunNut").sprite.renderer.material); //var material = new Material(ShaderCache.Acquire("Brave/UnlitTintableCutoutEmissive")); material.DisableKeyword("BRIGHTNESS_CLAMP_ON"); material.EnableKeyword("BRIGHTNESS_CLAMP_OFF"); material.SetTexture("_MainTexture", material.GetTexture("_MainTex")); material.SetColor("_EmissiveColor", glowVars.emissiveColor); material.SetFloat("_EmissiveColorPower", glowVars.emissiveColorPower); material.SetFloat("_EmissivePower", glowVars.emissivePower); material.SetFloat("_EmissiveThresholdSensitivity", 0.5f); data.glowMaterial = material; } if (useGlow && hasAltSkin) { var material = new Material(EnemyDatabase.GetOrLoadByName("GunNut").sprite.renderer.material); //var material = new Material(ShaderCache.Acquire("Brave/UnlitTintableCutoutEmissive")); material.DisableKeyword("BRIGHTNESS_CLAMP_ON"); material.EnableKeyword("BRIGHTNESS_CLAMP_OFF"); material.SetTexture("_MainTexture", material.GetTexture("_MainTex")); material.SetColor("_EmissiveColor", altGlowVars.emissiveColor); material.SetFloat("_EmissiveColorPower", altGlowVars.emissiveColorPower); material.SetFloat("_EmissivePower", altGlowVars.emissivePower); material.SetFloat("_EmissiveThresholdSensitivity", 0.5f); data.altGlowMaterial = material; } data.normalMaterial = new Material(ShaderCache.Acquire("Brave/PlayerShader")); basePrefab = null; storedCharacters.Add(data.nameInternal.ToLower(), new Tuple <CustomCharacterData, GameObject>(data, gameObject)); //BotsModule.Log("nameInternal: " + data.nameInternal, BotsModule.TEXT_COLOR); customCharacter.past = customPast; customCharacter.hasPast = hasCustomPast; gameObject.SetActive(false); FakePrefab.MarkAsFakePrefab(gameObject); }
public static string GetRnGEnemyGuid(RnGEnemyDatabase.RnGEnemyType type) { return(EnemyDatabase.GetOrLoadByName(type.ToString()).EnemyGuid); }