RunUO Community

This is a sample guest message. Register a free account today to become a member! Once signed in, you'll be able to participate on this site by adding your own topics and posts, as well as connect with other members through your own private inbox!

Faster Skill Gains

uofmownz1

Wanderer
Faster Skill Gains

What would I need to edit to make my server have faster skill gains? I've already gotten rid of the anti macro code just need to know how to speed them up. Thanks.
 

Skarth

Wanderer
Look in your SkillCheck.cs in the Misc folder. Around line 81 or so, you should see a line that says this.....

Code:
//*********EDIT THESE LINES TO SET THE BASE PERCENT CHANCE TO GAIN FOR EACH INDIVIDUAL SKILL***********************//

Below that are gain factors for each skill. It explains how to modify this. For example, putting .15 after the GainFactor = line for each skill will give a player a 15% chance of gaining each time the skill is used/checked. This is the "base" skill gain when the skill level is between 40 and 70.

You also need to be aware of something else when modifying the skill gain. If you look further down, around line 184, you'll see this line.....

Code:
//**********EDIT THESE LINES FOR MODIFICATIONS TO BASE PERCENTAGE AT DIFFERENT SKILL LEVELS************************//

You have double LowSkillMod, BaseSkillGain (the above section), HighSkillMod, and AboveGmSkillMod.

If the LowSkillMod is set to .10, and your base skill gain for the skill is .15, then the .10 is added to the .15 for .25 (or 25% chance to gain in that skill). This happens if the skill level for a particular skill is between 0 and 40.

The BaseSkillGain is the 15% as normal, if the skill is between 40 and 70.

The HighSkillMod, if set at 0.8 for example, means that the .15 Base is reduced by that 0.8 to give you 0.7 (.15 minus .08), or a 7% chance to gain. This occurs from 70 to 100 skill level.

AboveGmSkillMod, if set at .13 for example, reduces the base by this amount as well. If .15 is the base, then it would be .02 (or 2% chance to gain) if above 100.

Reason I told you all that, is so you know that if your BaseSkillGain in the first section is equal to or less than either your HighSkillMod or your AboveGmSkillMod (LowSkillMod not affected that much), then your players won't gain since the reductions in skill gain would be zero or less. So make sure if you drop them to below your AboveGmSkillMod amount, that you change the AboveGmSkillMod and etc.

But if you're wanting faster skill gains, as you said, then this shouldn't really be an issue.
 

uofmownz1

Wanderer
Wow, definatly more in depth than I expected. Makes it really easy for me. Thank you. I appreciate it that helped I've got it now :) Thanks.
 

uofmownz1

Wanderer
Wow, definatly more in depth than I expected. Makes it really easy for me. Thank you. I appreciate it that helped I've got it now :) Thanks.

*edit* I dont have it now. This is what my line 81 is.

public static bool Mobile_SkillCheckLocation( Mobile from, SkillName skillName, double minSkill, double maxSkill )
 

Skarth

Wanderer
Just above that you should see "SkillInfo.Table[51].GainFactor = .18;// Chivalry = 51".

Go to the top of that section and look for that line that I typed. It's in all caps. It should be around 60 lines above what your line 81 has.

If I had to guess, I'd say you lost around 60 lines by simply taking out all of the lines dealing with the skills in the AntiMacro section above that.....which would give you about 60 less lines than normal. So look around line 21.
 

Skarth

Wanderer
Hmm, I guess I do have that file modified (don't remember doing that). Just downloaded a fresh RunUO and you were right, it's not included. Not sure if RunUO team changed it up or I modified it.

Anyway, here's the SkillCheck.cs script that I use. I dropped it into a brand new RunUO server and it compiled just fine.

If you run into any problems with it, please let me know. (The skill gain modification are my custom lines, so change as you see fit).

A new version of RunUO is coming up soon anyway, so you may want to wait for that until you try to start heavily customizing a new RunUO 1.0 shard.

Anyway, sorry for the confusion I must have caused you. I hope this helps with what you're looking for.
 

Attachments

  • SkillCheck.cs
    14.9 KB · Views: 148
Change this:
private static TimeSpan m_StatGainDelay = TimeSpan.FromMinutes( 1.0);
to
private static TimeSpan m_StatGainDelay = TimeSpan.FromMinutes( 0.5);

But you also need to change the gain method:


SkillInfo info = skill.Info;

if ( from.StrLock == StatLockType.Up && (info.StrGain / 33.3) > Utility.RandomDouble() )
GainStat( from, Stat.Str );
else if ( from.DexLock == StatLockType.Up && (info.DexGain / 33.3) > Utility.RandomDouble() )
GainStat( from, Stat.Dex );
else if ( from.IntLock == StatLockType.Up && (info.IntGain / 33.3) > Utility.RandomDouble() )
GainStat( from, Stat.Int );
}

Change 33.3 to 1.0 to see what happens then. You may have to adjust your numbers to suit your needs.
 

Skarth

Wanderer
Almrac Avanti said:
Change this:
private static TimeSpan m_StatGainDelay = TimeSpan.FromMinutes( 1.0);
to
private static TimeSpan m_StatGainDelay = TimeSpan.FromMinutes( 0.5);

But you also need to change the gain method:


SkillInfo info = skill.Info;

if ( from.StrLock == StatLockType.Up && (info.StrGain / 33.3) > Utility.RandomDouble() )
GainStat( from, Stat.Str );
else if ( from.DexLock == StatLockType.Up && (info.DexGain / 33.3) > Utility.RandomDouble() )
GainStat( from, Stat.Dex );
else if ( from.IntLock == StatLockType.Up && (info.IntGain / 33.3) > Utility.RandomDouble() )
GainStat( from, Stat.Int );
}

Change 33.3 to 1.0 to see what happens then. You may have to adjust your numbers to suit your needs.

I think that's just dealing with Stat gain rate, not Skill gain rate, isn't it?
 
Skarth said:
I think that's just dealing with Stat gain rate, not Skill gain rate, isn't it?

Yes it was, so sorry was kind of answering 2 posts at once.

goto Runuo/scripts/Misc/SkillCheck.cs and turn all to faulse or just copy and paste these over yours.

// true if this skill uses the anti-macro code, false if it does not
false,// Alchemy = 0,
false,// Anatomy = 1,
false,// AnimalLore = 2,
false,// ItemID = 3,
false,// ArmsLore = 4,
false,// Parry = 5,
false,// Begging = 6,
false,// Blacksmith = 7,
false,// Fletching = 8,
false,// Peacemaking = 9,
false,// Camping = 10,
false,// Carpentry = 11,
false,// Cartography = 12,
false,// Cooking = 13,
false,// DetectHidden = 14,
false,// Discordance = 15,
false,// EvalInt = 16,
false,// Healing = 17,
false,// Fishing = 18,
false,// Forensics = 19,
false,// Herding = 20,
false,// Hiding = 21,
false,// Provocation = 22,
false,// Inscribe = 23,
false,// Lockpicking = 24,
false,// Magery = 25,
false,// MagicResist = 26,
false,// Tactics = 27,
false,// Snooping = 28,
false,// Musicianship = 29,
false,// Poisoning = 30,
false,// Archery = 31,
false,// SpiritSpeak = 32,
false,// Stealing = 33,
false,// Tailoring = 34,
false,// AnimalTaming = 35,
false,// TasteID = 36,
false,// Tinkering = 37,
false,// Tracking = 38,
false,// Veterinary = 39,
false,// Swords = 40,
false,// Macing = 41,
false,// Fencing = 42,
false,// Wrestling = 43,
false,// Lumberjacking = 44,
false,// Mining = 45,
false,// Meditation = 46,
false,// Stealth = 47,
false,// RemoveTrap = 48,
false,// Necromancy = 49,
false,// Focus = 50,
false,// Chivalry = 51
false,// Bushido = 52
false,//Ninjitsu = 53

Now futher down the script find the two lines I have made bold. And replace everything inbetween with the normal text in the middle.

public static bool CheckSkill( Mobile from, Skill skill, object amobj, double chance )
{
if ( from.Skills.Cap == 0 )
return false;


/*
bool success = ( chance >= Utility.RandomDouble() );
double gc = (double)(from.Skills.Cap - from.Skills.Total) / from.Skills.Cap;
gc += ( skill.Cap - skill.Base ) / skill.Cap;
gc /= 2;

gc += ( 1.0 - chance ) * ( success ? 0.5 : 0.2 );
gc /= 2;

gc *= skill.Info.GainFactor;

if ( gc < 0.01 )
gc = 0.01;

if ( from is BaseCreature && ((BaseCreature)from).Controled )
gc *= 2;

if ( from.Alive && ( ( gc >= Utility.RandomDouble() && AllowGain( from, skill, amObj ) ) || skill.Base < 10.0 ) )
Gain( from, skill );
*/

bool success = false;
if (from.Alive && AllowGain(from, skill, amObj) || skill.Base < 10.0)
{
Gain(from, skill);
success = true;
}

return success;
}


Hope that does it for you
 

uofmownz1

Wanderer
Thanks guys. Sorry for the late response, was on vacation in florida :). Anyway, I'm going to download your skillcheck file and see how that works. Thanks again.
 
Top