Resource icon

Level System 3 - Rerelease 4.0

No permission to download

Lemke

Well-Known Member
Sep 26, 2015
81
7
38
So the level requirement for all loot based on props and 'value' can be done however I want to write this a little different. Ultimately importing his package and modifying it to communicate with the level system isn't a hard thing and mesh it into the existing level requirement script that is in place. However, I rather not 'copy' or 'recreate' the wheel. Though this original idea spawned off a concept that already existed, it was out of personal necessity because a decent level system truly did not exist, and the one possible system was super dated. Hence what we have here. So... yeah let me see what will come of this, I rather write it out from scratch for sure and maybe add a few 'shortcuts' to have cleaner code with it.
Post automatically merged:

Also, what do you guys think about removing the 'Loot Generator' from basecreature and having loot handed out based on level? just a concept i was looking into. So, Level 1 through 10, you are stuck with meager loot, no matter what you kill (prevents the idea of someone getting uber armor or whatever and gaining a super jump to fame), and as you level you gain access to higher levels of randomized loot.
What you say is for sure the greatest feature you can add to your level system,if you got it working all the entire PVM can be changed to be better and better,i think is the last great change needed to be a perfect level system.
Good luck in trying,so excited to see some results lol,and THANK YOU for your time and work.
 

Exale

Well-Known Member
Mar 2, 2014
236
25
38
Wisconsin
Shard Name
Mystical Nights
I personally like the idea of loot based off level however I feel not everyone will want it that way to maybe make that an option you can enable or disable?
 

Joshua

Well-Known Member
Sep 13, 2014
606
91
35
Bountiful, Utah
Shard Name
My Own Shard
What you say is for sure the greatest feature you can add to your level system,if you got it working all the entire PVM can be changed to be better and better,i think is the last great change needed to be a perfect level system.
Good luck in trying,so excited to see some results lol,and THANK YOU for your time and work.
I'm just glad my 'hobby' is fun and everyone enjoys it. :)

I personally like the idea of loot based off level however I feel not everyone will want it that way to maybe make that an option you can enable or disable?
That would be without saying, aside from the core features (which even those can be disabled) that are enabled by default, everything up this point can be toggled on or off in the config files with no changes to the code. The idea I desire to keep is user-friendly, drop and drag as much as possible, use what you want, turn off what you do not want.
Post automatically merged:

Oh, fun note, So when my computer took that dump I was talking about, I was halfway done with recreating the Equipment level system to be compatible with Level 3. Unfortunately, when the dump happened I lost that code that was never saved to my project cloud (I failed on that...), perhaps that's why I took a moment to myself too? Shear annoyance.. lmao. I will likely restart that again and finish and include it.
 
Last edited:
  • Love
Reactions: Exale

Quasar

Well-Known Member
Oct 26, 2018
197
24
Loot based on level. Not so sure about it, it doesnt promote the idea of group hunting, say a group of 6-9 level players kill something higher difficulty they should have access to a loot comparable to the effort it took to kill it, or if a lower level player took an hour to kill something and got low level loot it could easily discourage them.
 

Joshua

Well-Known Member
Sep 13, 2014
606
91
35
Bountiful, Utah
Shard Name
My Own Shard
Loot based on level. Not so sure about it, it doesnt promote the idea of group hunting, say a group of 6-9 level players kill something higher difficulty they should have access to a loot comparable to the effort it took to kill it, or if a lower level player took an hour to kill something and got low level loot it could easily discourage them.
In that kind of scenario, I could agree on that, in either case, this would be an option (if I manage it correctly) turned off by default, so it would cater to single-player or multi-player shards.
 
  • Like
Reactions: Exale and Quasar

Quasar

Well-Known Member
Oct 26, 2018
197
24
In that kind of scenario, I could agree on that, in either case, this would be an option (if I manage it correctly) turned off by default, so it would cater to single-player or multi-player shards.
would there be a way to check to see if they are in a party? then if so use combined party level?
 

Joshua

Well-Known Member
Sep 13, 2014
606
91
35
Bountiful, Utah
Shard Name
My Own Shard
would there be a way to check to see if they are in a party? then if so use combined party level?
That already exists, at least the code for it. When I fixed the share EXP for party kills that opened up a lot of utility. So I could easily just hook the loot check in with that script.
 
  • Like
Reactions: Quasar

Joshua

Well-Known Member
Sep 13, 2014
606
91
35
Bountiful, Utah
Shard Name
My Own Shard
Joshua updated Level System 3 - Rerelease with a new update entry:

Added Feature and fixes applied.

-Modified Files
-- XMLItemlevelReq.cs
-- LevelCore.CS - Fixed old code - Thanks to Malbolger for pointing this out and providing the fix/workaround.

- Added Files
-- LevelEquipXMLDynamic.cs
-- ConfiguredEquipment.cs

- Removed MountCheck.cs from zip File.


I know I said I was not going to do any more features or expand on this but I got some motivation so figure I might as well use it.
Read the rest of this update entry...
 
  • Love
  • Like
Reactions: Lemke and Exale

Lemke

Well-Known Member
Sep 26, 2015
81
7
38
Ok lets go!
Im using colored item names,i think is the problem?Equipmet is displaying twice the battle rating tag,picture attached:
The mod change code for colored names with your update:

C#:
 #region [Item Name Color]
        public override void AddNameProperty(ObjectPropertyList list)
        {
            string resourceName = CraftResources.GetName(m_Resource);

            if (string.IsNullOrEmpty(resourceName) || resourceName.ToLower() == "none" || resourceName.ToLower() == "normal" || resourceName.ToLower() == "iron")
                resourceName = "";

            list.Add(1053099, ItemNameHue.ArmorItemProps.RarityNameMod(this, ((m_Quality == ItemQuality.Exceptional) ? "Exceptional " : "") + "{0}\t{1}"), resourceName, GetNameString());
            Server.Engines.XmlSpawner2.XmlAttach.AddAttachmentProperties(this, list);

        }
        #endregion
twice.png
 

Lemke

Well-Known Member
Sep 26, 2015
81
7
38
UPDATE:I do rollback without colored names,the problem is not solved,just double battle rating display,and some item is correctly displayed.
 

Joshua

Well-Known Member
Sep 13, 2014
606
91
35
Bountiful, Utah
Shard Name
My Own Shard
UPDATE:I do rollback without colored names,the problem is not solved,just double battle rating display,and some item is correctly displayed.
Let me take a look, there should be no remaining references. I could have missed something. Can you please post your BaseArmor.cs ? Or if rather you can send it to me in a PM.
Post automatically merged:

Also, I recall that in basearmor there should already be a reference that calls the xmlproperties, did you add an additional line?
 
Last edited:

Joshua

Well-Known Member
Sep 13, 2014
606
91
35
Bountiful, Utah
Shard Name
My Own Shard
Let me take a look, there should be no remaining references. I could have missed something. Can you please post your BaseArmor.cs ? Or if rather you can send it to me in a PM.
Post automatically merged:

Also, I recall that in basearmor there should already be a reference that calls the xmlproperties, did you add an additional line?
@Lemke - Delete line 2754

You have
Server.Engines.XmlSpawner2.XmlAttach.AddAttachmentProperties

twice in the basearmor script.

On line 3028 , that is what is part of the initial distro, when I said basearmor, baseweapon and basejewel already have existing references, just baseclothing needed it. Which for those wondering why the XML Extra's Equipment Level system (the one that was made ages ago) never showed anything above the clothing items, that is the reason why.
 
Last edited:
  • Like
Reactions: sahisahi

Lemke

Well-Known Member
Sep 26, 2015
81
7
38
@Lemke - Delete line 2754

You have
Server.Engines.XmlSpawner2.XmlAttach.AddAttachmentProperties

twice in the basearmor script.

On line 3028 , that is what is part of the initial distro, when I said basearmor, baseweapon and basejewel already have existing references, just baseclothing needed it. Which for those wondering why the XML Extra's Equipment Level system (the one that was made ages ago) never showed anything above the clothing items, that is the reason why.
So sorry Joshua,just my fail,new feature is working 100% without issues!!!
 
  • Like
Reactions: Joshua

Lemke

Well-Known Member
Sep 26, 2015
81
7
38
New issue appear when player kill a creature,but not sure about where is the issue located,here the log:

C#:
Server Crash Report
===================

ServUO Version 0.5, Build 6996.26785
Operating System: Microsoft Windows NT 6.2.9200.0
.NET Framework: 4.0.30319.34014
Time: 2/15/2020 12:42:19 AM
Mobiles: 43643
Items: 223933
Exception:
System.NullReferenceException: Object reference not set to an instance of an object.
   at Server.LevelCore.IsFireBreathingCreature(BaseCreature bc)
   at Server.LevelCore.Base(Mobile kld)
   at Server.LevelHandler.AddExp(Mobile m, Mobile k, Party p, Configured c)
   at Server.LevelHandler.Set(Mobile killer, Mobile killed)
   at Server.Engines.XmlSpawner2.XMLPlayerLevelAtt.OnKill(Mobile killed, Mobile killer)
   at Server.Engines.XmlSpawner2.XmlAttach.CheckOnKill(Mobile m_killed, Mobile m_killer)
   at Server.Items.XmlQuest.RegisterKill(Mobile m_killed, Mobile m_killer)
   at Server.Mobiles.BaseCreature.OnDeath(Container c)
   at Server.Mobile.Kill()
   at Server.Mobile.Damage(Int32 amount, Mobile from, Boolean informMount, Boolean checkDisrupt)
   at Server.Mobiles.BaseCreature.Damage(Int32 amount, Mobile from, Boolean informMount, Boolean checkDisrupt)
   at Server.AOS.Damage(IDamageable damageable, Mobile from, Int32 damage, Boolean ignoreArmor, Int32 phys, Int32 fire, Int32 cold, Int32 pois, Int32 nrgy, Int32 chaos, Int32 direct, Boolean keepAlive, DamageType type)
   at Server.Items.BaseWeapon.OnHit(Mobile attacker, IDamageable damageable, Double damageBonus)
   at Server.Items.BaseSword.OnHit(Mobile attacker, IDamageable damageable, Double damageBonus)
   at Server.Items.BaseWeapon.OnSwing(Mobile attacker, IDamageable damageable, Double damageBonus)
   at Server.Mobile.CombatTimer.OnTick()
   at Server.Timer.Slice()
   at Server.Core.Main(String[] args)
Your level core section:

C#:
private static bool IsFireBreathingCreature(BaseCreature bc)
        {
            if (bc == null)
                return false;


            if (bc.AbilityProfile != null)
            {
                if (bc.AbilityProfile.SpecialAbilities.Length != 0)
                {

                    Array arr = bc.AbilityProfile.SpecialAbilities;

                    foreach (SpecialAbility i in arr)
                    {
                        if (i == SpecialAbility.DragonBreath)
                        {
                            return true;
                        }
                    }
                    return false;
                }
                else
                    return false;
            }
            return false;
        }
 
Last edited:

Visam

Well-Known Member
Mar 19, 2015
275
51
47
Replace what you posted with this and it will fix it.

C#:
public static bool IsFireBreathingCreature(BaseCreature bc)
        {
            if (bc == null)
                return false;

            var profile = bc.AbilityProfile;

            if (profile != null)
            {
                return profile.HasAbility(SpecialAbility.DragonBreath);
            }

            return false;
        }
 
  • Like
Reactions: Lemke

Lemke

Well-Known Member
Sep 26, 2015
81
7
38
Yes i solved doing that for now.Thank you so much!
Post automatically merged:

And the last question,the level required system on items didnt work in custom armors or weapon,any idea?At the same time this item requirements are not working,looted items works well without issues.Here an example:
example.png
 
Last edited:

Joshua

Well-Known Member
Sep 13, 2014
606
91
35
Bountiful, Utah
Shard Name
My Own Shard
Awesome, I will patch that fix through, thanks @Visam

Yes i solved doing that for now.Thank you so much!
Post automatically merged:

And the last question,the level required system on items didnt work in custom armors or weapon,any idea?At the same time this item requirements are not working,looted items works well without issues.Here an example:
View attachment 14796
I will check into this.