Sareus

Member
Im slowly bring over my custom scripts from an old Repo to the new Repo and and while bring over my StatsGump for players to quickly check their stats. I can't find any of this information to fix the OSI values to my liking.

int SDICap = 100; (PVM) - Possibly not capped unless manually capped?

------------------------------------------------------------------------------------------------------------------------------------------

I Already Found these:

int LRCCap = 100;
Default Value.


int LMCCap = 50;
Line 892 of: Scripts/Spells/Base/Spell.cs

Code:
// Lower Mana Cost = 40%
            int lmc = AosAttributes.GetValue(m_Caster, AosAttribute.LowerManaCost);

            if (lmc > 40)
            {
                lmc = 40;
            }


int SDICap = 100;
PVP SDICap : Line 105 of: Scripts/Spells/Base/SpellHelper.cs
Code:
public static int PvPSpellDamageCap(Mobile m, SkillName castskill)
        {
            if (!Core.SA)
                return 15;

            if (HasSpellFocus(m, castskill))
            {
                return 30;
            }
            else
            {
                return Core.TOL ? 20 : 15;
            }
        }


int FCCap = 8;
int FCRCap = 10;

Line 973 of: Scripts/Spells/Base/Spell.cs
Code:
// Faster casting cap of 2 (if not using the protection spell)
            // Faster casting cap of 0 (if using the protection spell)
            // Paladin spells are subject to a faster casting cap of 4
            // Paladins with magery of 70.0 or above are subject to a faster casting cap of 2
            int fcMax = 6;

            if (CastSkill == SkillName.Magery || CastSkill == SkillName.Necromancy || CastSkill == SkillName.Mysticism ||
                (CastSkill == SkillName.Chivalry && (m_Caster.Skills[SkillName.Magery].Value >= 70.0 || m_Caster.Skills[SkillName.Mysticism].Value >= 70.0)))
            {
                fcMax = 2;
            }

int SwingSpeedCap = 100;
Line 1459 of: Scripts/Items/Equipment/Weapons/BaseWeapons.cs
Code:
int bonus = AosAttributes.GetValue(m, AosAttribute.WeaponSpeed);

                if (bonus > 50)
                {
                    bonus = 50;
                }


int DamageIncreaseCap = 200;
Line 3525 of: Scripts/Items/Equipment/Weapons/BaseWeapons.cs
Code:
#region Modifiers
			/*
            * The following are damage modifiers whose effect shows on the status bar.
            * Capped at 100% total.
            */
			int damageBonus = AosAttributes.GetValue(attacker, AosAttribute.WeaponDamage);

			if (damageBonus > 100)
			{
				damageBonus = 100;
			}
			#endregion


int DCICap = 50;
Line 1399 of: Scripts/Items/Equipment/Weapons/BaseWeapons.cs
Code:
int max = 45 + BaseArmor.GetRefinedDefenseChance(defender);

                // Defense Chance Increase = 45%
                if (bonus > max)
                    bonus = max;

                theirValue = (defValue + 20.0) * (100 + bonus);

                bonus = 0;

int HCICap = 100;
Line 1396 of: Scripts/Items/Equipment/Weapons/BaseWeapons.cs
Code:
#region SA
                // this value will not be shown on the status bar
                if (hciMod > 0)
                    bonus -= (int)(((double)bonus * ((double)hciMod / 100)));
                #endregion

                //SA Gargoyle cap is 50, else 45
                bonus = Math.Min(attacker.Race == Race.Gargoyle ? 50 : 45, bonus);

                ourValue = (atkValue + 20.0) * (100 + bonus);


double BandageSpeedCap = 2.0;
Line 672 of: Scripts/Items/Resources/Bandages.cs
Code:
if (onSelf)
                {
                    if (Core.AOS)
                    {
                        seconds = Math.Min(8, Math.Ceiling(11.0 - healer.Dex / 20));
                        seconds = Math.Max(seconds, 4);
                    }
                    else
                    {
                        seconds = 9.4 + (0.6 * ((double)(120 - dex) / 10));
                    }
                }
                else
                {
                    if (Core.AOS && GetPrimarySkill(patient) == SkillName.Veterinary)
                    {
                        seconds = 2.0;
                    }
                    else if (Core.AOS)
                    {
                        seconds = Math.Ceiling((double)4 - healer.Dex / 60);
                        seconds = Math.Max(seconds, 2);
                    }
                    else
                    {
                        if (dex >= 100)
                        {
                            seconds = 3.0 + resDelay;
                        }
                        else if (dex >= 40)
                        {
                            seconds = 4.0 + resDelay;
                        }
                        else
                        {
                            seconds = 5.0 + resDelay;
                        }
                    }
                }


int ReflectDamageCap = 50;
Line 269 of: Scripts/Misc/AOS.cs

Replace
Code:
int reflectPhys = AosAttributes.GetValue(m, AosAttribute.ReflectPhysical);

With
Code:
int reflectPhysCap = 50;
				//int reflectPhys = AosAttributes.GetValue(m, AosAttribute.ReflectPhysical);
				int reflectPhys = Math.Min( AosAttributes.GetValue( m, AosAttribute.ReflectPhysical ), reflectPhysCap); 
				// math.min( a, b ) will use the lower of the two values, so if it's over the cap, then the cap is the min - else it's the actual value.
 
Last edited:
Also found this buried in CircletBearingTheCrestOfBlackthorn.cs
Extremely useful if you want to add a weapon ability to a piece of armor.

You'd have to dig through CircletBearingTheCrestOfBlackthorn.cs yourself and grab the other pieces of the code to allow a piece of armor to read a weapon ability but its all in there.

Code:
public override void AppendChildNameProperties(ObjectPropertyList list)
        {
            base.AppendChildNameProperties(list);

            int prop;

            if ((prop = this.m_AosWeaponAttributes.HitColdArea) != 0)
                list.Add(1060416, prop.ToString()); // hit cold area ~1_val~%

            if ((prop = this.m_AosWeaponAttributes.HitDispel) != 0)
                list.Add(1060417, prop.ToString()); // hit dispel ~1_val~%

            if ((prop = this.m_AosWeaponAttributes.HitEnergyArea) != 0)
                list.Add(1060418, prop.ToString()); // hit energy area ~1_val~%

            if ((prop = this.m_AosWeaponAttributes.HitFireArea) != 0)
                list.Add(1060419, prop.ToString()); // hit fire area ~1_val~%

            if ((prop = this.m_AosWeaponAttributes.HitFireball) != 0)
                list.Add(1060420, prop.ToString()); // hit fireball ~1_val~%

            if ((prop = this.m_AosWeaponAttributes.HitHarm) != 0)
                list.Add(1060421, prop.ToString()); // hit harm ~1_val~%

            if ((prop = this.m_AosWeaponAttributes.HitLeechHits) != 0)
                list.Add(1060422, prop.ToString()); // hit life leech ~1_val~%

            if ((prop = this.m_AosWeaponAttributes.HitLightning) != 0)
                list.Add(1060423, prop.ToString()); // hit lightning ~1_val~%

            if ((prop = this.m_AosWeaponAttributes.HitLowerAttack) != 0)
                list.Add(1060424, prop.ToString()); // hit lower attack ~1_val~%

            if ((prop = this.m_AosWeaponAttributes.HitLowerDefend) != 0)
                list.Add(1060425, prop.ToString()); // hit lower defense ~1_val~%

            if ((prop = this.m_AosWeaponAttributes.HitMagicArrow) != 0)
                list.Add(1060426, prop.ToString()); // hit magic arrow ~1_val~%

            if ((prop = this.m_AosWeaponAttributes.HitLeechMana) != 0)
                list.Add(1060427, prop.ToString()); // hit mana leech ~1_val~%

            if ((prop = this.m_AosWeaponAttributes.HitPhysicalArea) != 0)
                list.Add(1060428, prop.ToString()); // hit physical area ~1_val~%

            if ((prop = this.m_AosWeaponAttributes.HitPoisonArea) != 0)
                list.Add(1060429, prop.ToString()); // hit poison area ~1_val~%

            if ((prop = this.m_AosWeaponAttributes.HitLeechStam) != 0)
                list.Add(1060430, prop.ToString()); // hit stamina leech ~1_val~%
        }
 
Necroing old post, but it's still useful and wanted to add another:
Total percentage damage bonus from melee attacks cap is capped at 300% in OSI

Line 2136, BaseWeapon.cs:
if (m_ExtendedWeaponAttributes.Focus > 0)
    {
        percentageBonus += Focus.GetBonus(attacker, defender);
        Focus.OnHit(attacker, defender);
    }

percentageBonus = Math.Min(percentageBonus, 300);
 
Necroing old post, but it's still useful and wanted to add another:
Total percentage damage bonus from melee attacks cap is capped at 300% in OSI

Line 2136, BaseWeapon.cs:
if (m_ExtendedWeaponAttributes.Focus > 0)
    {
        percentageBonus += Focus.GetBonus(attacker, defender);
        Focus.OnHit(attacker, defender);
    }

percentageBonus = Math.Min(percentageBonus, 300);
Nice,did you know where are SA habilities caps?like damage eater?Not using the latest repo.
 

Active Shards

Donations

Total amount
$80.00
Goal
$1,000.00
Back