// Token: 0x06000415 RID: 1045 RVA: 0x0000FFDB File Offset: 0x0000E1DB private static void RegisterBuff(BuffIndex buffIndex, BuffDef buffDef) { if (buffIndex < BuffIndex.Count) { buffDef.name = buffIndex.ToString(); } buffDef.buffIndex = buffIndex; BuffCatalog.buffDefs[(int)buffIndex] = buffDef; BuffCatalog.nameToBuffIndex[buffDef.name] = buffIndex; }
public override void SetupAttributes() { 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/HisCourage.mat"); }
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"); }
// Token: 0x06000A35 RID: 2613 RVA: 0x000083B3 File Offset: 0x000065B3 private static void RegisterBuff(BuffIndex buffIndex, BuffDef buffDef) { buffDef.buffIndex = buffIndex; BuffCatalog.buffDefs[(int)buffIndex] = buffDef; }
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 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); }; }