1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Level System 3 - Rerelease 2019-01-08

Levels XML

  1. Joshua
    Requirements:
    XMLSpawner
    Description of System
    This is a re release of the level System 3 that was popular with RunUo 2.2. The original release was a bit buggy and also required edits to playermobile which caused serialization errors periodically.

    Please take this for what it is as I'm trying to recover and make the system usable again and will post updates as I get them.

    Expansion of this system is NOT destructive to mobiles since the level information is handled via XML and not Playermobile. However upgrades to the xml attachment itself and changes to the serialization will cause existing attachments to break and be deleted, so just a heads up for those with production shards....

    Working Features
    - Levels up when killing Creature
    - Level up Gump
    - Stat Distribution
    - Skill Point Distribution
    - Mount Based on Level
    - Bonus Stat On Level

    Not Working Features
    - Titles
    - SkillCoin
    - Share EXP for party
    - Titles of BaseCreature (kind of weird with the level shown)

    Misc Info
    I've moved the PlayerMobile Edits to an XML attachment, and changed all the references to PlayerMobile in regards to EXP, Levels to point at the attachment instead. Some distro edits cannot be helped for some features to work, I will continue to see if i can move the rest of this strictly to XML attachments instead of using distro edits so the system can for the most part be drop and go.

    I will offer what support I can for this as its not my creation nor do take credit for it, however the original resource as most of you know is no longer available for download at runuo.com..

    Update ExpTables.cs Based on Shard. Default Tables may not be complete for all creatures, it's easy enough to add them in.

    There are edits to Titles.cs however the edits are not usable in the current distro without causing some problems, so I will leave them out until I find a proper way to implement them.

    The system IS set to attach the XML attachment on login, just delete or turn off XMLPlayerLevelAttOnLogin.cs if that is not desired.

    RaiseMaxLevelScroll does work
    SkillCoin does not work

    Download and place folder in Customs Folder
    Please find the suggested Edits Below.
    Use command [getatt to see the attachments on creatures and items.


    PlayerMobile.cs Distro Edits
    Under
    Code (C#):
    1.         public override void GetProperties( ObjectPropertyList list )
    2.         {
    Add somewhere , probably towards the top
    Code (C#):
    1.             //Player Level - This adds the Player level Publically over the Toon.
    2.             XMLPlayerLevelAtt xmlplayer = (XMLPlayerLevelAtt)XmlAttach.FindAttachment(this, typeof(XMLPlayerLevelAtt));
    3.             if (BelowName.Enabled && xmlplayer != null)
    4.             {
    5.                 string d = LevelCore.Display(this, new Configured());
    6.                 list.Add("<BASEFONT COLOR=#7FCAE7>Level: <BASEFONT COLOR=#17FF01>" + d);
    7.             }
    Also in PlayerMobile, it SHOULD be there however if its not please add
    Code (C#):
    1. using Server.Engines.XmlSpawner2;
    To the list of systems being used at the top.

    Basecreature.cs Distro Edits
    Under
    Code (C#):
    1.         public override string ApplyNameSuffix( string suffix )
    2.         {
    Add
    Code (C#):
    1.             //Level System
    2.             Configured c = new Configured();
    3.             int cl = LevelCore.CreatureLevel(this, new Configured());
    4.             if (c.CreatureLevels)
    5.             {
    6.                     if (cl > 0)
    7.                     {
    8.                             if (suffix.Length == 0)
    9.                                 suffix = String.Concat(suffix, "(level " + cl + ")");
    10.                             else
    11.                                 suffix = String.Concat(suffix, " (level " + cl + ")");
    12.                     }
    13.             }
    14.        
    15.             //End Level System
    Under
    Code (C#):
    1.         public override void OnDamage( int amount, Mobile from, bool willKill )
    2.         {
    Add
    Code (C#):
    1. //Level System
    2.             if (willKill && En.Enabled)
    3.             LevelHandler.Set(from, this);
    4.             //End Level System
    BaseMount.cs Distro Edits
    Under
    Code (C#):
    1. public override void OnDoubleClick(Mobile from)
    Add
    Code (C#):
    1. if (from.InRange(this, 1))
    2. {
    3.  
    4. Add
    5.                 //Level System
    6.                 if (!(Off.Enabled))
    7.                 {
    8.                     if (NeedLevel.MountCheck(from, this) == false)
    9.                         return;
    10.                 }
    11.                 //End Level System
    CraftItem.cs Distro Edits
    Locate this line
    Code (C#):
    1. from.AddToBackpack
    Should be somewhere under
    if ( item != null )
    and below that add
    Code (C#):
    1.                    //Level System
    2.                     PlayerMobile pm = from as PlayerMobile;
    3.                     Configured c = new Configured();
    4.  
    5.                     double ch = GetSuccessChance(pm, typeRes, craftSystem, false, ref allRequiredSkills);
    6.                     double ex = GetExceptionalChance(craftSystem, ch, pm);
    7.  
    8.                     LevelCore.Craft(item, quality, ch, ex, pm, new Configured());
    9.                     //End Level System
    Espcevan and Lena80 like this.