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!

Setting starting skills

either modify character creation.cs and add it in there

or make a "gate", stone or something else that when they use it it sets them
 

Hemectu

Wanderer
For Character Creation to elaborate a bit further if you look at lines 927-1014 you will see the default characters for the player selection type "warrior" "mage" ect..

You can change the skills there, however if players use Advanced they will not get the changes, unless you make a skill gate or stone like Greywolf said.
 

Alvin D.

Sorceror
Instead of adding a gate that a player would need to find. Is there a way to ditch the selection gump and have them just go directly to the world with skills all at 100 after name creation?

You could also just make it so no matter what button someone clicked for char creation it would give them all 60% in all skills it would take some time to do but then you could just copy and paste from there. This will not work if someone uses advanced button. I know I missed some skills but you get the idea. I also realize a just necro'd this thread from 2008 but I figured it would be helpful if someone else was searching the forums on how to do this without an advanced player gate.

Code:
    case 1: // Warrior
                {
                    skills = new SkillNameValue[]
                        {
                            new SkillNameValue( SkillName.Anatomy, 100 ),
                            new SkillNameValue( SkillName.Healing, 100 ),
                            new SkillNameValue( SkillName.Swords, 100 ),
                            new SkillNameValue( SkillName.Tactics, 100 )
                            new SkillNameValue( SkillName.EvalInt, 60 ),
                            new SkillNameValue( SkillName.Wrestling, 60 ),
                            new SkillNameValue( SkillName.Magery, 60 ),
                            new SkillNameValue( SkillName.Meditation, 50 )
                            new SkillNameValue( SkillName.Mining, 30 ),
                            new SkillNameValue( SkillName.ArmsLore, 30 ),
                            new SkillNameValue( SkillName.Blacksmith, 50 ),
                            new SkillNameValue( SkillName.Tinkering, 50 )
                            new SkillNameValue( SkillName.Necromancy, 50 ),
                            new SkillNameValue( SkillName.Focus, 30 ),
                            new SkillNameValue( SkillName.SpiritSpeak, 30 ),
                            new SkillNameValue( SkillName.Chivalry, 51 ),
                            new SkillNameValue( SkillName.Bushido, 50 ),
                            new SkillNameValue( SkillName.Ninjitsu, 50 ),
                            new SkillNameValue( SkillName.Hiding, 50 ),
                            new SkillNameValue( SkillName.Fencing, 30 ),
                            new SkillNameValue( SkillName.Stealth, 30 )
 
             
                }
 

Mikey

Sorceror
You could do something like this:
Code:
            for (int i = 0; i < newChar.Skills.Length; ++i)
            {
                newChar.Skills[i].Base = 100;
            }
 

Mikey

Sorceror
You could just add it under:
Code:
private static void EventSink_CharacterCreated( CharacterCreatedEventArgs args )

That should take care of all the player's skills when they are created. It's a lot more compact as well.
 

Alvin D.

Sorceror
I guess I messed it up and didnt paste it the right way I'm missing a } somewhere?
Code:
private static void EventSink_CharacterCreated( CharacterCreatedEventArgs args )
        for (int i = 0; i < newChar.Skills.Length; ++i)
                {
                newChar.Skills[i].Base = 100;
                }
 

Mikey

Sorceror
There is already a method inside CharacterCreation.cs that handles that, all you need to do is find the block, add it after the character is created.
so..
Code:
        private static void EventSink_CharacterCreated(CharacterCreatedEventArgs args)
        {
            if (!VerifyProfession(args.Profession))
                args.Profession = 0;
 
            Mobile newChar = CreateMobile(args.Account as Account);
 
            if (newChar == null)
            {
                Console.WriteLine("Login: {0}: Character creation failed, account full", args.State);
                return;
            }
 
            args.Mobile = newChar;
            m_Mobile = newChar;
 
            newChar.Player = true;
            newChar.AccessLevel = args.Account.AccessLevel;
            newChar.Female = args.Female;
            //newChar.Body = newChar.Female ? 0x191 : 0x190;
 
            if (Core.Expansion >= args.Race.RequiredExpansion)
                newChar.Race = args.Race;      //Sets body
            else
                newChar.Race = Race.DefaultRace;
 
            //newChar.Hue = Utility.ClipSkinHue( args.Hue & 0x3FFF ) | 0x8000;
            newChar.Hue = newChar.Race.ClipSkinHue(args.Hue & 0x3FFF) | 0x8000;
 
            newChar.Hunger = 20;
 
            bool young = false;
 
            if (newChar is PlayerMobile)
            {
                PlayerMobile pm = (PlayerMobile)newChar;
 
                pm.Profession = args.Profession;
 
                if (pm.AccessLevel == AccessLevel.Player && ((Account)pm.Account).Young)
                    young = pm.Young = true;
            }
 
            SetName(newChar, args.Name);
 
            AddBackpack(newChar);
 
            SetStats(newChar, args.Str, args.Dex, args.Int);
            SetSkills(newChar, args.Skills, args.Profession);
 
            Race race = newChar.Race;
 
            if (race.ValidateHair(newChar, args.HairID))
            {
                newChar.HairItemID = args.HairID;
                newChar.HairHue = race.ClipHairHue(args.HairHue & 0x3FFF);
            }
 
            if (race.ValidateFacialHair(newChar, args.BeardID))
            {
                newChar.FacialHairItemID = args.BeardID;
                newChar.FacialHairHue = race.ClipHairHue(args.BeardHue & 0x3FFF);
            }
 
            if (args.Profession <= 3)
            {
                AddShirt(newChar, args.ShirtHue);
                AddPants(newChar, args.PantsHue);
                AddShoes(newChar);
            }
 
            if (TestCenter.Enabled)
                FillBankbox(newChar);
 
            if (young)
            {
                NewPlayerTicket ticket = new NewPlayerTicket();
                ticket.Owner = newChar;
                newChar.BankBox.DropItem(ticket);
            }
 
            CityInfo city = GetStartLocation(args, young);
            //CityInfo city = new CityInfo( "Britain", "Sweet Dreams Inn", 1496, 1628, 10, Map.Felucca );
 
            newChar.MoveToWorld(city.Location, city.Map);
 
            Console.WriteLine("Login: {0}: New character being created (account={1})", args.State, args.Account.Username);
            Console.WriteLine(" - Character: {0} (serial={1})", newChar.Name, newChar.Serial);
            Console.WriteLine(" - Started: {0} {1} in {2}", city.City, city.Location, city.Map.ToString());
        }
just do this:
Code:
/******************* SNIP (MORE ABOVE) *******************/
 
            CityInfo city = GetStartLocation(args, young);
            //CityInfo city = new CityInfo( "Britain", "Sweet Dreams Inn", 1496, 1628, 10, Map.Felucca );
 
            newChar.MoveToWorld(city.Location, city.Map);
 
            Console.WriteLine("Login: {0}: New character being created (account={1})", args.State, args.Account.Username);
            Console.WriteLine(" - Character: {0} (serial={1})", newChar.Name, newChar.Serial);
            Console.WriteLine(" - Started: {0} {1} in {2}", city.City, city.Location, city.Map.ToString());
            /******** Right here ***********/
            for (int i = 0; i < newChar.Skills.Length; ++i)
            {
                newChar.Skills[i].Base = 100;
            }
            /**************************/
        }
 
Top