kikco

Member
i ahve my stats cap at 450 os sats can go to 150 now how do i make my stats go to 200 with the dex on amor or likewep or sometihng
 
to go above 150 look for the following in playermobile.cs

Code:
        #region Stat Getters/Setters
        [CommandProperty(AccessLevel.GameMaster)]
        public override int Str
        {
            get
            {
                if (Core.ML && IsPlayer())
                {
                    return Math.Min(base.Str, 150);
                }

                return base.Str;
            }
            set { base.Str = value; }
        }

        [CommandProperty(AccessLevel.GameMaster)]
        public override int Int
        {
            get
            {
                if (Core.ML && IsPlayer())
                {
                    return Math.Min(base.Int, 150);
                }

                return base.Int;
            }
            set { base.Int = value; }
        }

        [CommandProperty(AccessLevel.GameMaster)]
        public override int Dex
        {
            get
            {
                if (Core.ML && IsPlayer())
                {
                    return Math.Min(base.Dex, 150);
                }

                return base.Dex;
            }
            set { base.Dex = value; }
        }
        #endregion
 
here is my playermobile scripted i dont see that in there
 

Attachments

  • PlayerMobile.cs
    141.2 KB · Views: 14
what I posted starts at line 1570 in the PlayerMobile.cs you posted

you may also want to look at Skillcheck.cs
near the top you should find
StatCap = Config.Get("PlayerCaps.StatCap", 125);

you can change that to to modify the cap for gaining a stat via skills
 
what I posted starts at line 1570 in the PlayerMobile.cs you posted

you may also want to look at Skillcheck.cs
near the top you should find
StatCap = Config.Get("PlayerCaps.StatCap", 125);

you can change that to to modify the cap for gaining a stat via skills

Or you could change it in the config
 
Hello, I am thinking you are wanting your players to be able to have higher stats even past the 150 with clothing armor or jewelry right? Go into your Playermobile.cs and go to line 1566 or search for this phrase

public override int Str

in the getters/setters region and look for the 3 settings with 150. Change your base stats to what you want your players to be able to have.


public override int Str
{
get
{
if (Core.ML && IsPlayer())
{
return Math.Min(base.Str, 150); <--- Change the 150 to what you want them to be able to max out too.
}

return base.Str;
}
set { base.Str = value; }
}

Do the same for intelligence and Dexterity. If you make them all 450 your players will still only be able to use their regular stats up to 450 like this, 150,150,150 or say 400,25,25. But since you changed their all together max then if they use magic items which raise any of these stats they could possibly has 450,450,450 with magic items maxing out all stats.
 
Ok i am a bit dense. I've read this thread and tried altering scripts but can't seem to come up with the right bent on it. I want my stat cap per category i.e str , int, or dex to cap at 150 without equipment. So my PlayerConfig.cfg is set to 450 statcap. I want players to be able to use equipment to go over that to a max of say 225 or 250 per str, int, or dex.

Scripts I think that are in play to set these stats are: PlayerCaps,cfg, and PlayerMobile.cs and maybe CharacterCreation.cs and perhaps skillcheck.cs?


Posting I think the relevant portions of each script.

Here is my PlayerMobile.cs portion

return Math.Min(base.Str, 150);

}


return base.Str;

}

set { base.Str = value; }

}


[CommandProperty(AccessLevel.GameMaster)]

public override int Int

{

get

{

if (Core.ML && IsPlayer())

{

return Math.Min(base.Int, 150);

}


return base.Int;

}

set { base.Int = value; }

}


[CommandProperty(AccessLevel.GameMaster)]

public override int Dex

{

get

{

if (Core.ML && IsPlayer())

{

return Math.Min(base.Dex, 150);


Here is my PlayerCaps.cfg portion

# Configuratoin file for the Player Caps and related things

#------------
# New Char Only
#-----------------------

# Sets the default individual skill cap. Since skills have a decimal value
# they also need to have a decimal value added to their skillcap
SkillCap=5000

# Sets the default total skill cap. Since skills have a decimal value
# they also need to have a decimal value added to their skillcap
TotalSkillCap=500000

# The total stat cap
TotalStatCap=450

#------------
# Exisitng chars too
#-----------------------

# The individual stat cap
StatCap=150

# If true, limit the player's ability to gain stats within a certain time
# window. This was disabled by OSI Publish 45.
EnablePlayerStatTimeDelay=false

# Time delay between player stat gains
# Default: 15 minutes
# Format: dd:hh:mm:ss
PlayerStatTimeDelay=00:00:15:00

# If true, limit a pet's ability to gain stats within a certain time window.
# I think this was disabled by OSI Publish 45 as well, but no certain.
EnablePetStatTimeDelay=false

# Time delay between player stat gains
# Default: 5 minutes
# Format: dd:hh:mm:ss
PetStatTimeDelay=00:00:05:00

# If true, enables some anti-macro code
# If left to default value, this will be true if the ML era flag is not on.
@EnableAntiMacro=false

# The percentage chance for a player to gain in a stat. Default is 5% from OSI
# publish 45 notes.
PlayerChanceToGainStats=5.0

# The percentage chance for a pet to gain in a stat. Default is 5% infered from
# OSI publish 45 notes.
PetChanceToGainStats=5.0



Here is my skillcheck.cs portion

using System;

using Server.Accounting;

using Server.Factions;

using Server.Mobiles;


namespace Server.Misc

{

public class SkillCheck

{

private static int StatCap;

private static bool m_StatGainDelayEnabled;

private static TimeSpan m_StatGainDelay;

private static bool m_PetStatGainDelayEnabled;

private static TimeSpan m_PetStatGainDelay;

private static bool AntiMacroCode;

private static double PlayerChanceToGainStats;

private static double PetChanceToGainStats;


public static void Configure()

{

StatCap = Config.Get("PlayerCaps.StatCap", 450);

m_StatGainDelayEnabled =
 
each of the stats have a hardcoded limit, wich should get revised imo, but lets look at it.
This is for dex.
Code:
Math.Min(base.Dex, 150);
So we always the the lesser value therefor its capped at 150 even with items and all that. since you want it to go higher than that.
Code:
Math.Min(base.Dex, 225);
with that you would get a hard cap at 225
 
Ah so the PlayerMobile.cs Math.Min(base.Dex,XXX); is the limit for cap plus equipment. Then I take it that the cap for stat without equipment is set in PlayerCaps.cfg?

And thank you for your response!
 
the cap you set there is how far you can gain, so yes its basically the limit, just the hardcap doesnt adjust to the cfg value (yet)
 
So sorry, I know I'm bumping this thread but directly related question...

So my UOserver doesn't have a PlayerCaps.cfg file or this line "StatCap = Config.Get("PlayerCaps.StatCap", 125);" in PlayerMobile.cs.

Does anyone know another way to increase player stat cap above 125 through normal skills? Thanks
 
This is more so a family/friend server. Mostly to increase strength to increase hit points. I believe the game can still be a good challenge above 150.
 
that's strange. here's what I did for my playermobile.cs:
PlayerMobile.cs:
        #region Stat Getters/Setters
        [CommandProperty(AccessLevel.GameMaster)]
        public override int Str
        {
            get
            {
                if (IsPlayer())
                {
                    return Math.Min(base.Str, StrMaxCap);
                }

                return base.Str;
            }
            set { base.Str = value; }
        }

        [CommandProperty(AccessLevel.GameMaster)]
        public override int Int
        {
            get
            {
                if (IsPlayer())
                {
                    return Math.Min(base.Int, IntMaxCap);
                }

                return base.Int;
            }
            set { base.Int = value; }
        }

        [CommandProperty(AccessLevel.GameMaster)]
        public override int Dex
        {
            get
            {
                if (IsPlayer())
                {
                    int dex = base.Dex;

                    return Math.Min(dex, DexMaxCap);
                }

                return base.Dex;
            }
            set { base.Dex = value; }
        }
        #endregion
it doesn't show 150, shows "stat"MaxCap instead. and I have my stats set high on my offline server at 550.
 
So I did already update my playermobile.cs file... mine did have 150 as default, you will see now at 300. Looks my code is different then yours but we will see if this will work.

C#:
        #region Stat Getters/Setters

        [CommandProperty( AccessLevel.GameMaster )]
        public override int Str
        {
            get
            {
                if( Core.ML && this.AccessLevel == AccessLevel.Player )
                    return Math.Min( base.Str, 300 );

                return base.Str;
            }
            set
            {
                base.Str = value;
            }
        }

        [CommandProperty( AccessLevel.GameMaster )]
        public override int Int
        {
            get
            {
                if( Core.ML && this.AccessLevel == AccessLevel.Player )
                    return Math.Min( base.Int, 300 );

                return base.Int;
            }
            set
            {
                base.Int = value;
            }
        }

        [CommandProperty( AccessLevel.GameMaster )]
        public override int Dex
        {
            get
            {
                if( Core.ML && this.AccessLevel == AccessLevel.Player )
                    return Math.Min( base.Dex, 300 );

                return base.Dex;
            }
            set
            {
                base.Dex = value;
            }
        }

        #endregion



The code I couldn't find before and just found was this below in the closer to the bottom of my SkillCheck.cs file.
This is what I was struggling to find before as my code is different then others it looks. But changed these values from 125 to 200. Should work! Thanks for the input!

C#:
        public static bool CanRaise( Mobile from, Stat stat )
        {
            if ( !(from is BaseCreature && ((BaseCreature)from).Controlled) )
            {
                if ( from.RawStatTotal >= from.StatCap )
                    return false;
            }

            switch ( stat )
            {
                case Stat.Str: return ( from.StrLock == StatLockType.Up && from.RawStr < 125 );
                case Stat.Dex: return ( from.DexLock == StatLockType.Up && from.RawDex < 125 );
                case Stat.Int: return ( from.IntLock == StatLockType.Up && from.RawInt < 125 );
            }

            return false;
        }
 

Active Shards

Donations

Total amount
$0.00
Goal
$1,000.00
Back