public static CustomElite TestElite() { LoadAssets(); var eliteDef = new EliteDef { modifierToken = "Cloaky", color = new Color32(255, 105, 180, 255) }; var equipDef = new EquipmentDef { cooldown = 10f, pickupModelPath = "", pickupIconPath = "", nameToken = "Cloaky", pickupToken = "Cloaky", descriptionToken = "Cloaky", canDrop = false, enigmaCompatible = false }; var buffDef = new BuffDef { buffColor = eliteDef.color, canStack = false }; var equip = new CustomEquipment(equipDef, _prefab, _icon, _itemDisplayRules); var buff = new CustomBuff("Affix_Cloaky", buffDef, null); var elite = new CustomElite("Cloaky", eliteDef, equip, buff, 1); return(elite); }
public StormElitesManager() { var eliteDef = new EliteDef { modifierToken = EliteName, color = new Color32(162, 179, 241, 255) }; var equipDef = new EquipmentDef { cooldown = 10f, pickupModelPath = "", pickupIconPath = HailstormAssets.IconStormElite, nameToken = EquipName, pickupToken = "Storm Bringer", descriptionToken = "Storm Bringer", canDrop = false, enigmaCompatible = false }; var buffDef = new BuffDef { buffColor = eliteDef.color, iconPath = HailstormAssets.IconStormElite, canStack = false }; var equip = new CustomEquipment(equipDef, new ItemDisplayRule[0]); var buff = new CustomBuff(BuffName, buffDef); var elite = new CustomElite(EliteName, eliteDef, equip, buff, 1); EliteIndex = (EliteIndex)ItemAPI.AddCustomElite(elite); BuffIndex = (BuffIndex)ItemAPI.AddCustomBuff(buff); EquipIndex = (EquipmentIndex)ItemAPI.AddCustomEquipment(equip); eliteDef.eliteEquipmentIndex = EquipIndex; equipDef.passiveBuff = BuffIndex; buffDef.eliteIndex = EliteIndex; //Storm elites are immune to twisters TwisterProjectileController.ImmunityBuff = BuffIndex; TornadoLauncher.StormBuff = BuffIndex; //Storm elites are tier 2 elites, on the same order as malachites //They're a bit less tanky than malachites, but even more dangerous in terms of damage var card = new EliteAffixCard { spawnWeight = 1.0f, costMultiplier = 30.0f, damageBoostCoeff = 6.0f, healthBoostCoeff = 20.0f, eliteType = EliteIndex, isAvailable = () => Run.instance.loopClearCount > 0, onSpawned = OnSpawned }; //Register the card for spawning if ESO is enabled EsoLib.Cards.Add(card); Card = card; }
public BarrierElitesManager() { var eliteDef = new EliteDef { modifierToken = BarrierElitesManager.EliteName, color = new Color32(162, 179, 241, 255) }; var equipDef = new EquipmentDef { cooldown = 10f, pickupModelPath = "", pickupIconPath = HailstormAssets.IconBarrierElite, nameToken = EquipName, pickupToken = "Shield-Bearer", descriptionToken = "Shield-Bearer", canDrop = false, enigmaCompatible = false }; var buffDef = new BuffDef { buffColor = eliteDef.color, iconPath = HailstormAssets.IconBarrierElite, canStack = false }; var equip = new CustomEquipment(equipDef, new ItemDisplayRule[0]); var buff = new CustomBuff(BuffName, buffDef); var elite = new CustomElite(EliteName, eliteDef, equip, buff, 1); _eliteIndex = (EliteIndex)ItemAPI.AddCustomElite(elite); _buffIndex = (BuffIndex)ItemAPI.AddCustomBuff(buff); _equipIndex = (EquipmentIndex)ItemAPI.AddCustomEquipment(equip); eliteDef.eliteEquipmentIndex = _equipIndex; equipDef.passiveBuff = _buffIndex; buffDef.eliteIndex = _eliteIndex; //Barrier elites are a bit more uncommon than regular tier 1 elites //They're also a bit tankier than usual, but not more damaging var card = new EliteAffixCard { spawnWeight = 0.5f, costMultiplier = 10.0f, damageBoostCoeff = 1.0f, healthBoostCoeff = 10.0f, eliteType = _eliteIndex }; //Register the card for spawning if ESO is enabled EsoLib.Cards.Add(card); Card = card; }
public override void SetupAttributes() { base.SetupAttributes(); equipmentDef.canDrop = false; equipmentDef.enigmaCompatible = false; equipmentDef.cooldown = 40; var buffDef = new BuffDef { name = EliteBuffName, buffColor = new Color32(255, 255, 255, byte.MaxValue), iconPath = EliteBuffIconPath, canStack = false, }; buffDef.eliteIndex = EliteIndex; var buffIndex = new CustomBuff(buffDef); EliteBuffIndex = BuffAPI.Add(buffIndex); equipmentDef.passiveBuff = EliteBuffIndex; var eliteDef = new EliteDef { name = ElitePrefixName, modifierToken = EliteModifierString, color = buffDef.buffColor, }; eliteDef.eliteEquipmentIndex = equipmentDef.equipmentIndex; var eliteIndex = new CustomElite(eliteDef, EliteTier); EliteIndex = EliteAPI.Add(eliteIndex); var card = new EliteAffixCard { spawnWeight = 0.5f, costMultiplier = 30.0f, damageBoostCoeff = 2.0f, healthBoostCoeff = 4.5f, eliteOnlyScaling = 0.5f, eliteType = EliteIndex }; EsoLib.Cards.Add(card); EliteCard = card; LanguageAPI.Add(eliteDef.modifierToken, ElitePrefixName + " {0}"); //If we want to load our own, uncomment the one below. EliteMaterial = Resources.Load <Material>("@Aetherium:Assets/Textures/Materials/ApollosBrillianceMain.mat"); }
public override void SetupAttributes() { base.SetupAttributes(); if (KaliberWrath_Enable) { equipmentDef.canDrop = true; equipmentDef.enigmaCompatible = false; var jammedEliteDef = new CustomElite( new EliteDef { name = "Jammed", modifierToken = "ROB_ELITE_MODIFIER_JAMMED", color = new Color32(150, 10, 10, 255), eliteEquipmentIndex = equipmentDef.equipmentIndex }, 1); JammedEliteIndex = EliteAPI.Add(jammedEliteDef); LanguageAPI.Add(jammedEliteDef.EliteDef.modifierToken, "Jammed {0}"); var jammedBuffDef = new CustomBuff( new BuffDef { name = "Affix_Jammed", buffColor = new Color32(150, 10, 10, 255), iconPath = "", eliteIndex = JammedEliteIndex, canStack = false }); JammedBuffIndex = BuffAPI.Add(jammedBuffDef); equipmentDef.passiveBuff = JammedBuffIndex; JammedEliteCard = new EliteAffixCard { spawnWeight = 0.8f, costMultiplier = 15.0f, damageBoostCoeff = 1.0f, healthBoostCoeff = 4.0f, eliteOnlyScaling = 0.5f, eliteType = JammedEliteIndex, }; EsoLib.Cards.Add(JammedEliteCard); } }
public override void SetupAttributes() { base.SetupAttributes(); equipmentDef.canDrop = false; equipmentDef.enigmaCompatible = false; equipmentDef.cooldown = 60; var buffDef = new RoR2.BuffDef { name = EliteBuffName, buffColor = new Color32(255, 255, 255, byte.MaxValue), iconPath = EliteBuffIconPath, canStack = false, }; buffDef.eliteIndex = EliteIndex; var buffIndex = new CustomBuff(buffDef); EliteBuffIndex = BuffAPI.Add(buffIndex); equipmentDef.passiveBuff = EliteBuffIndex; var eliteDef = new RoR2.EliteDef { name = ElitePrefixName, modifierToken = EliteModifierString, color = buffDef.buffColor, }; eliteDef.eliteEquipmentIndex = equipmentDef.equipmentIndex; var eliteIndex = new CustomElite(eliteDef, EliteTier); EliteIndex = EliteAPI.Add(eliteIndex); var card = new EliteAffixCard { spawnWeight = 0.5f, costMultiplier = 30.0f, damageBoostCoeff = 2.0f, healthBoostCoeff = 4.5f, eliteOnlyScaling = 0.5f, eliteType = EliteIndex }; EsoLib.Cards.Add(card); EliteCard = card; LanguageAPI.Add(eliteDef.modifierToken, ElitePrefixName + " {0}"); //If we want to load a base game material, then we use this. /*GameObject worm = Resources.Load<GameObject>("Prefabs/characterbodies/ElectricWormBody"); * Debug.Log($"WORM: {worm}"); * var modelLocator = worm.GetComponent<ModelLocator>(); * Debug.Log($"MODEL LOCATOR: {modelLocator}"); * var model = modelLocator.modelTransform.GetComponent<CharacterModel>(); * Debug.Log($"MODEL: {model}"); * if (model) * { * var rendererInfos = model.baseRendererInfos; * foreach (CharacterModel.RendererInfo renderer in rendererInfos) * { * if (renderer.defaultMaterial.name == "matElectricWorm") * { * HyperchargedMaterial = renderer.defaultMaterial; * } * } * }*/ //If we want to load our own, uncomment the one below. EliteMaterial = Resources.Load <Material>("@Aetherium:Assets/Textures/Materials/TheirReminder.mat"); }
public static bool Init() { On.RoR2.GlobalEventManager.ServerDamageDealt += GlobalEventManager_ServerDamageDealt; var equipDef = new EquipmentDef { name = EquipName, cooldown = 10f, pickupModelPath = "", pickupIconPath = "", nameToken = EquipName, pickupToken = "Pickup_Blightborne", descriptionToken = "Description_Blightborne", canDrop = false, enigmaCompatible = false }; var equip = new CustomEquipment(equipDef, new ItemDisplayRule[0]); var buffDef = new BuffDef { name = BuffName, buffColor = new Color32(141, 51, 19, 255), iconPath = "", canStack = false }; var buff = new CustomBuff(buffDef); var eliteDef = new EliteDef { name = EliteName, modifierToken = "ELITE_MODIFIER_BLIGHTBORNE", color = buffDef.buffColor, eliteEquipmentIndex = _equipIndex }; var elite = new CustomElite(eliteDef, 1); _eliteIndex = EliteAPI.Add(elite); _buffIndex = BuffAPI.Add(buff); _equipIndex = ItemAPI.Add(equip); eliteDef.eliteEquipmentIndex = _equipIndex; equipDef.passiveBuff = _buffIndex; buffDef.eliteIndex = _eliteIndex; On.RoR2.CharacterBody.OnEquipmentLost += CharacterBody_OnEquipmentLost; On.RoR2.CharacterBody.OnEquipmentGained += CharacterBody_OnEquipmentGained; var card = new EliteAffixCard { spawnWeight = 0.5f, costMultiplier = 16f, damageBoostCoeff = 2.0f, healthBoostCoeff = 8.0f, eliteOnlyScaling = 1f, eliteType = _eliteIndex, onSpawned = OnSpawned, isAvailable = new Func <bool>(() => Run.instance.stageClearCount > 3 && Run.instance.selectedDifficulty != DifficultyIndex.Easy) }; //Register the card for spawning if ESO is enabled EsoLib.Cards.Add(card); Card = card; //Description of elite in UI when boss LanguageAPI.Add(eliteDef.modifierToken, "Blightborne {0}"); LanguageAPI.Add(equipDef.pickupToken, "Blight's Embrace"); LanguageAPI.Add(equipDef.descriptionToken, "Become an aspect of Blight"); return(true); }
public static bool Init() { On.RoR2.GlobalEventManager.OnCharacterDeath += GlobalEventManager_OnCharacterDeath; var equipDef = new EquipmentDef { name = EquipName, cooldown = 10f, pickupModelPath = "", pickupIconPath = "", nameToken = EquipName, pickupToken = "Pickup_Tarborne", descriptionToken = "Description_Tarborne", canDrop = false, enigmaCompatible = false }; On.RoR2.CharacterBody.OnEquipmentLost += CharacterBody_OnEquipmentLost; On.RoR2.CharacterBody.OnEquipmentGained += CharacterBody_OnEquipmentGained; var equip = new CustomEquipment(equipDef, new ItemDisplayRule[0]); var buffDef = new BuffDef { name = BuffName, buffColor = new Color32(41, 41, 41, 255), iconPath = "", canStack = false }; var buff = new CustomBuff(buffDef); var eliteDef = new EliteDef { name = EliteName, modifierToken = "ELITE_MODIFIER_TARBORNE", color = buffDef.buffColor, eliteEquipmentIndex = _equipIndex }; var elite = new CustomElite(eliteDef, 1); _eliteIndex = EliteAPI.Add(elite); _buffIndex = BuffAPI.Add(buff); _equipIndex = ItemAPI.Add(equip); eliteDef.eliteEquipmentIndex = _equipIndex; equipDef.passiveBuff = _buffIndex; buffDef.eliteIndex = _eliteIndex; var card = new EliteAffixCard { spawnWeight = 1f, costMultiplier = 6f, damageBoostCoeff = 2.0f, healthBoostCoeff = 4.0f, eliteOnlyScaling = 1f, eliteType = _eliteIndex, onSpawned = OnSpawned, isAvailable = new Func <bool>(() => true) }; //Register the card for spawning if ESO is enabled EsoLib.Cards.Add(card); Card = card; //Description of elite in UI when boss LanguageAPI.Add(eliteDef.modifierToken, "Tarborne {0}"); LanguageAPI.Add(equipDef.pickupToken, "Dunestrider's Dominion"); LanguageAPI.Add(equipDef.descriptionToken, "Become an aspect of Tar"); return(true); }
public override void SetupAttributes() { base.SetupAttributes(); equipmentDef.canDrop = false; equipmentDef.enigmaCompatible = false; equipmentDef.cooldown = 60; var buffDef = new RoR2.BuffDef { name = EliteBuffName, buffColor = new Color32(255, 255, 255, byte.MaxValue), iconPath = EliteBuffIconPath, canStack = false, }; buffDef.eliteIndex = EliteIndex; var buffIndex = new CustomBuff(buffDef); EliteBuffIndex = BuffAPI.Add(buffIndex); equipmentDef.passiveBuff = EliteBuffIndex; var eliteDef = new RoR2.EliteDef { name = ElitePrefixName, modifierToken = EliteModifierString, color = buffDef.buffColor, }; eliteDef.eliteEquipmentIndex = equipmentDef.equipmentIndex; var eliteIndex = new CustomElite(eliteDef, EliteTier); EliteIndex = EliteAPI.Add(eliteIndex); var card = new EliteAffixCard { spawnWeight = 0.5f, costMultiplier = 30.0f, damageBoostCoeff = 2.0f, healthBoostCoeff = 4.5f, eliteOnlyScaling = 0.5f, eliteType = EliteIndex }; EsoLib.Cards.Add(card); EliteCard = card; LanguageAPI.Add(eliteDef.modifierToken, ElitePrefixName + " {0}"); //If we want to load a base game material, then we use this. /*GameObject worm = Resources.Load<GameObject>("Prefabs/characterbodies/ElectricWormBody"); * Debug.Log($"WORM: {worm}"); * var modelLocator = worm.GetComponent<ModelLocator>(); * Debug.Log($"MODEL LOCATOR: {modelLocator}"); * var model = modelLocator.modelTransform.GetComponent<CharacterModel>(); * Debug.Log($"MODEL: {model}"); * if (model) * { * var rendererInfos = model.baseRendererInfos; * foreach (CharacterModel.RendererInfo renderer in rendererInfos) * { * if (renderer.defaultMaterial.name == "matElectricWorm") * { * HyperchargedMaterial = renderer.defaultMaterial; * } * } * }*/ //If we want to load our own, uncomment the one below. EliteMaterial = Resources.Load <Material>("@Aetherium:Assets/Textures/Materials/TheirReminder.mat"); HyperchargedProjectile = PrefabAPI.InstantiateClone(Resources.Load <GameObject>("Prefabs/Projectiles/LightningStake"), "HyperchargedProjectile", true); var controller = HyperchargedProjectile.GetComponent <ProjectileController>(); controller.startSound = "Play_titanboss_shift_shoot"; var impactExplosion = HyperchargedProjectile.GetComponent <RoR2.Projectile.ProjectileImpactExplosion>(); impactExplosion.lifetime = 0.5f; impactExplosion.impactEffect = Resources.Load <GameObject>("Prefabs/Effects/ImpactEffects/LightningStrikeImpact"); impactExplosion.blastRadius = 7f; impactExplosion.bonusBlastForce = new Vector3(0, 750, 0); // register it for networking if (HyperchargedProjectile) { PrefabAPI.RegisterNetworkPrefab(HyperchargedProjectile); } // add it to the projectile catalog or it won't work in multiplayer RoR2.ProjectileCatalog.getAdditionalEntries += list => { list.Add(HyperchargedProjectile); }; }
public override void SetupAttributes() { base.SetupAttributes(); equipmentDef.canDrop = false; equipmentDef.enigmaCompatible = false; equipmentDef.cooldown = 40; var buffDef = new RoR2.BuffDef { name = EliteBuffName, buffColor = new Color32(255, 255, 255, byte.MaxValue), iconPath = EliteBuffIconPath, canStack = false, }; buffDef.eliteIndex = EliteIndex; var buffIndex = new CustomBuff(buffDef); EliteBuffIndex = BuffAPI.Add(buffIndex); equipmentDef.passiveBuff = EliteBuffIndex; var eliteDef = new RoR2.EliteDef { name = ElitePrefixName, modifierToken = EliteModifierString, color = buffDef.buffColor, }; eliteDef.eliteEquipmentIndex = equipmentDef.equipmentIndex; var eliteIndex = new CustomElite(eliteDef, EliteTier); EliteIndex = EliteAPI.Add(eliteIndex); var card = new EliteAffixCard { spawnWeight = 0.5f, costMultiplier = 30.0f, damageBoostCoeff = 2.0f, healthBoostCoeff = 4.5f, eliteOnlyScaling = 0.5f, eliteType = EliteIndex }; EsoLib.Cards.Add(card); EliteCard = card; LanguageAPI.Add(eliteDef.modifierToken, ElitePrefixName + " {0}"); RadiantProjectile = PrefabAPI.InstantiateClone(Resources.Load <GameObject>("Prefabs/Projectiles/Thermite"), "RadiantProjectile", true); var damage = RadiantProjectile.GetComponent <RoR2.Projectile.ProjectileDamage>(); damage.damageType = DamageType.IgniteOnHit; var simpleProjectile = RadiantProjectile.GetComponent <ProjectileSimple>(); simpleProjectile.velocity = 100; simpleProjectile.oscillateMagnitude = 0; if (RadiantProjectile) { PrefabAPI.RegisterNetworkPrefab(RadiantProjectile); } RoR2.ProjectileCatalog.getAdditionalEntries += list => { list.Add(RadiantProjectile); }; //If we want to load a base game material, then we use this. /*GameObject worm = Resources.Load<GameObject>("Prefabs/characterbodies/ElectricWormBody"); * Debug.Log($"WORM: {worm}"); * var modelLocator = worm.GetComponent<ModelLocator>(); * Debug.Log($"MODEL LOCATOR: {modelLocator}"); * var model = modelLocator.modelTransform.GetComponent<CharacterModel>(); * Debug.Log($"MODEL: {model}"); * if (model) * { * var rendererInfos = model.baseRendererInfos; * foreach (CharacterModel.RendererInfo renderer in rendererInfos) * { * if (renderer.defaultMaterial.name == "matElectricWorm") * { * HyperchargedMaterial = renderer.defaultMaterial; * } * } * }*/ //If we want to load our own, uncomment the one below. EliteMaterial = Resources.Load <Material>("@Aetherium:Assets/Textures/Materials/ApollosBrillianceMain.mat"); //Shader hotpoo = Resources.Load<Shader>("Shaders/Deferred/hgstandard"); }
public DarkElitesManager() { _rng = new Xoroshiro128Plus((ulong)DateTime.Now.Ticks); var eliteDef = new EliteDef { modifierToken = EliteName, color = new Color32(0, 0, 0, 255), }; var equipDef = new EquipmentDef { cooldown = 10f, pickupModelPath = "", pickupIconPath = HailstormAssets.IconDarkElite, nameToken = EquipName, pickupToken = "Darkness", descriptionToken = "Night-bringer", canDrop = false, enigmaCompatible = false }; var buffDef = new BuffDef { buffColor = new Color32(255, 255, 255, 255), iconPath = HailstormAssets.IconDarkElite, canStack = false }; var equip = new CustomEquipment(equipDef, new ItemDisplayRule[0]); var buff = new CustomBuff(BuffName, buffDef); var elite = new CustomElite(EliteName, eliteDef, equip, buff, 1); _eliteIndex = (EliteIndex)ItemAPI.AddCustomElite(elite); _buffIndex = (BuffIndex)ItemAPI.AddCustomBuff(buff); _equipIndex = (EquipmentIndex)ItemAPI.AddCustomEquipment(equip); eliteDef.eliteEquipmentIndex = _equipIndex; equipDef.passiveBuff = _buffIndex; buffDef.eliteIndex = _eliteIndex; //When the camera starts up, hook in our darkness effect On.RoR2.CameraRigController.Start += CameraRigControllerOnStart; //Update elite materials On.RoR2.CharacterModel.InstanceUpdate += CharacterModelOnInstanceUpdate; //Dark elites spawn much less frequently, but are only slightly stronger/costlier than tier 1s var card = new EliteAffixCard { spawnWeight = 0.3f, costMultiplier = 10.0f, damageBoostCoeff = 2.0f, healthBoostCoeff = 6.0f, eliteType = _eliteIndex }; //Register the card for spawning if ESO is enabled EsoLib.Cards.Add(card); Card = card; //Create random walk trackers for dark elite material texture animation _walkerU = new AnimatedFloat { Accel = 0.3f, MaxSpeed = 0.6f }; _walkerV = new AnimatedFloat { Accel = 0.3f, MaxSpeed = 0.6f }; //Whenever scene changes, stop the breathing sound SceneManager.sceneUnloaded += s => AkSoundEngine.PostEvent(SoundEvents.StopLargeBreathing, null); }
public override void SetupAttributes() { if (ItemBodyModelPrefab == null) { ItemBodyModelPrefab = Resources.Load <GameObject>("@Aetherium:Assets/Models/Prefabs/HisVengeanceDisplay.prefab"); SecondaryItemBodyModelPrefab = Resources.Load <GameObject>("@Aetherium:Assets/Models/Prefabs/HisVengeanceCluster.prefab"); displayRules = GenerateItemDisplayRules(); } base.SetupAttributes(); equipmentDef.canDrop = false; equipmentDef.enigmaCompatible = false; var buffDef = new RoR2.BuffDef { name = EliteBuffName, buffColor = new Color32(255, 255, 255, byte.MaxValue), iconPath = EliteBuffIconPath, canStack = false, }; buffDef.eliteIndex = EliteIndex; var buffIndex = new CustomBuff(buffDef); EliteBuffIndex = BuffAPI.Add(buffIndex); equipmentDef.passiveBuff = EliteBuffIndex; var eliteDef = new RoR2.EliteDef { name = ElitePrefixName, modifierToken = EliteModifierString, color = buffDef.buffColor, }; eliteDef.eliteEquipmentIndex = equipmentDef.equipmentIndex; var eliteIndex = new CustomElite(eliteDef, EliteTier); EliteIndex = EliteAPI.Add(eliteIndex); var card = new EliteAffixCard { spawnWeight = 0.5f, costMultiplier = 15.0f, damageBoostCoeff = 2.0f, healthBoostCoeff = 2.0f, eliteOnlyScaling = 0.5f, eliteType = EliteIndex }; EsoLib.Cards.Add(card); EliteCard = card; LanguageAPI.Add(eliteDef.modifierToken, ElitePrefixName + " {0}"); EliteMaterial = Resources.Load <Material>("@Aetherium:Assets/Textures/Materials/HisVengeanceBody.mat"); SplinteringProjectile = PrefabAPI.InstantiateClone(Resources.Load <GameObject>("Prefabs/Projectiles/ImpVoidspikeProjectile"), "SplinteringProjectile", true); var model = Resources.Load <GameObject>("@Aetherium:Assets/Models/Prefabs/HisVengeanceProjectile.prefab"); model.AddComponent <NetworkIdentity>(); var ghost = model.AddComponent <RoR2.Projectile.ProjectileGhostController>(); var controller = SplinteringProjectile.GetComponent <RoR2.Projectile.ProjectileController>(); controller.procCoefficient = 0.25f; controller.ghostPrefab = model; var damage = SplinteringProjectile.GetComponent <RoR2.Projectile.ProjectileDamage>(); damage.damageType = DamageType.Generic; var impactExplosion = SplinteringProjectile.GetComponent <ProjectileImpactExplosion>(); impactExplosion.impactEffect = Resources.Load <GameObject>("Prefabs/Effects/ImpactEffects/ImpactCrowbar"); var stickOnImpact = SplinteringProjectile.GetComponent <RoR2.Projectile.ProjectileStickOnImpact>(); stickOnImpact.stickSoundString = "Play_bellBody_attackLand"; if (SplinteringProjectile) { PrefabAPI.RegisterNetworkPrefab(SplinteringProjectile); } RoR2.ProjectileCatalog.getAdditionalEntries += list => { list.Add(SplinteringProjectile); }; }