So playing around with the XML Level Items and am having an issue, when setting this:

C#:
public static readonly int DefaultMaxLevel = 10; //Default Max level for items.
public static readonly int MaxLevelsCap = 100; //Number of total levels items can go up to when maxed.

This in theory should create an item that has a level of 10 but can go to a max of 100 yes? well what's happening is it just creates an item that can go to 100.. is something broken or am I doing something wrong?
 
I read that as it should create an item that is levelable set at level 0 and capable of going to level 10, but in props maybe it is showing you the maxlevel cap and not the default max level. You would probably have to create an item and begin leveling it manually and see if it passes 10.
 
I suppose I should have mentioned that, I did manually test a newly added weapon and it did go past level 10 here is what is shows in game, if I change the "maxlevelcap" to another number it will show that in place of the 100.
1635639421973.png1635639431924.png
 
I suppose I should have mentioned that, I did manually test a newly added weapon and it did go past level 10 here is what is shows in game, if I change the "maxlevelcap" to another number it will show that in place of the 100.
View attachment 19113View attachment 19114
Not to sound like a drone...but, are you *positive* your Xmlspawner installation is 100% correct?
I had this problem originally and after going back over my install, I realized I had missed a merge. After that it was working as intended and stopped at the maxLevel that was set. I did have to remove and replace all the spawned LevelItems though.

Send me a PM if this advice is not helpful. ;)
 
I mean I am not looking at the full code,

based on "MaxLevelsCap" well ... max level is 100, there is no issue there.
What DefaultMaxLevel is? Well idk, maybe it was used, maybe it is used, but it is not used as you think.
 
Not to sound like a drone...but, are you *positive* your Xmlspawner installation is 100% correct?
I had this problem originally and after going back over my install, I realized I had missed a merge. After that it was working as intended and stopped at the maxLevel that was set. I did have to remove and replace all the spawned LevelItems though.

Send me a PM if this advice is not helpful. ;)
The only thing that came with the level system was modifications to the base items for the context menu, and a single edit to basecreature for the exp. Are you referring to the entire XML system? because if so I didn't install that it came with it, I'm looking around right now for additional instructions for installing the system.

I mean I am not looking at the full code,

based on "MaxLevelsCap" well ... max level is 100, there is no issue there.
What DefaultMaxLevel is? Well idk, maybe it was used, maybe it is used, but it is not used as you think.
Kinda what I've been thinking, but who knows Tass is probably right and something just isn't installed right..


**EDIT**
I'm using Pub 57 if that makes a difference, I know some of the XML stuff was removed from that version.
 
Last edited:

As an update on this, I have compared the XML system to the RunUO version it was converted from and they're basically identical other than all the base level items the RunUO version has in it. With the RunUO version the system works as intended but you have to manually code each item you want to have a level system added to it which is far from efficient.

Works as intended as in, the item will have the "default max level" as default, then with level up scrolls it can level to the "max level" set in the script.

My theory is something is missing in the XML version that is preventing the item from setting the proper level format.
 
I was able to fix this..

In the XmlLevelItem.cs I changed this:
C#:
        public XmlLevelItem()
            : this(200)
        {
        }
to this after comparing it with the RunUO variant..
C#:
        public XmlLevelItem()
            : this(200)
        {
            MaxLevel = LevelItems.DefaultMaxLevel;

            /* Invalidate the level and refresh the item props
             * Extremely important to call this method */
            LevelItemManager.InvalidateLevel(this);
        }
 
I was able to fix this..

In the XmlLevelItem.cs I changed this:
C#:
        public XmlLevelItem()
            : this(200)
        {
        }
to this after comparing it with the RunUO variant..
C#:
        public XmlLevelItem()
            : this(200)
        {
            MaxLevel = LevelItems.DefaultMaxLevel;

            /* Invalidate the level and refresh the item props
             * Extremely important to call this method */
            LevelItemManager.InvalidateLevel(this);
        }
That would certainly make a huge difference!
This here is what does it: MaxLevel = LevelItems.DefaultMaxLevel;
Yep! Nice catch! :cool:
 
That would certainly make a huge difference!
This here is what does it: MaxLevel = LevelItems.DefaultMaxLevel;
Yep! Nice catch! :cool:
I just want to know one thing, how has this never been caught before lol.. I'll be doing some more extensive testing of items tonight to make sure that's a permanent fix but so glad it's working now I did not want to use another system, XML is just so clean.

**EDIT**
Welp back to the drawing board lol, will do some more comparison reading tonight. When I level the weapon it will still go past the default max level then the properties get broken :)
1636155568799.png1636155576135.png
 
Last edited:
Alright partially on the right track, thanks to @Doom for helping me troubleshoot you have to make the following change from this:
C#:
        public XmlLevelItem()
            : this(200)
        {
        }
to this:
C#:
        public XmlLevelItem()
            : this(LevelItems.DefaultMaxLevel)
        {
        }

This will pull the default level from your settings and appears to have fixed all the issues.
 
Alright partially on the right track, thanks to @Doom for helping me troubleshoot you have to make the following change from this:
C#:
        public XmlLevelItem()
            : this(200)
        {
        }
to this:
C#:
        public XmlLevelItem()
            : this(LevelItems.DefaultMaxLevel)
        {
        }

This will pull the default level from your settings and appears to have fixed all the issues.
I guess someone got overzealous with updating code and missed a few ticks then.

Chances are it has never been caught because so many people talk down about Xmlspawner, no one wants to use it. All the other working installs are already in production 'shards, and not all of those stay up-to-date with repos.
Glad you all got it figured out. now the latest repo install can be fixed too. ;) :cool:
 
Xml is actually pretty amazing, I've used it before but never actually looked into it much, definitely looking now haha.. also I'm sure most people left the default settings in place too which were 200/1000 and it probably worked just fine for them..
 
Xml is actually pretty amazing, I've used it before but never actually looked into it much, definitely looking now haha.. also I'm sure most people left the default settings in place too which were 200/1000 and it probably worked just fine for them..
So many mods have such OP props though and then you make it Levelable and you might as well just use m_Kill and play, because everything dies in one hit almost *insert ROFL guy from Discord since we have no smiley that even comes close*
 
i added the levelcontrol system and i have an issue of deserialization?
error deserilizing attachments server

server.engines.xmlspawner2.xmldata
and for xmldialog and spellbarscroll ?????
first time i installed it [levelcontrol gave me a gump worked fine but on restart gump went blank!
 
i added the levelcontrol system and i have an issue of deserialization?
error deserilizing attachments server

server.engines.xmlspawner2.xmldata
and for xmldialog and spellbarscroll ?????
first time i installed it [levelcontrol gave me a gump worked fine but on restart gump went blank!
Yes, if it is a serialize/deserialize issue, on restart everything will be wiped clean, *if* it will reboot at all.
Doublecheck where you have added new code.
In Ser/Deser areas new items should be at the top in both spots and numbered accordingly.
If you have 13 Ser/Deser, adding one makes them both 14. <--- this is an easy thing to miss and *very* commonly missed. ;)
 
Not to off-topic, I never understood levels on items in perspective of sensical explanations to mechanics
I mean -- ''how'' is the item 'leveling up' why does that make any sense.

I could explain a player mastering an item as 'leveling up' the item,
but then the item is traded and how did another player whom did not level the item have such mastery.

I could explain the item is slowly becoming further 'ancient'-ified and renowned 'er battle-hardened, etc as 'leveling up'
but then, if an item isn't leveled up and exists for a year why doesn't that item become more similarly. whrah.

Or, why does an item 'level up' in a way that imparts magical effects as selected by a player, I don't know.
I could explain that as the world's energies in-flowing through the battles of the item as 'leveling up' and that's why there's elemental properties. I don't know.

'err, or, why are there certain properties that can be selected, such as, slayers, undead slayers that are ordinarily associated to silver, but the item is copper. it's it's it's a silver blade that's made from copper but is an undead silver slayer. I don't understand.

The system, you know leveling items, while cool, is just lacking in terms substance. What solid singular explanation explains why this occurs universally.
 
Last edited:
I always thought of them being akin to the Blackrock Sword in ultima 7. It had a demon trapped inside a crystal that gave it many special powers that made it far more powerful than the level weapons I've seen. You could talk to it and have it insta kill anything in the game, fully restore your mana, ect... lol.

I imagined them as being a type of living weapon/armor infused with magic that grew in strength as it was used. There are many examples of weapons that do similar things in literature. such as The Sword of Gryffindor in Harry Potter (absorbed strength from things it killed) . Most importantly though we are talking about magic items so anything is possible.

The problem with them is that they are usually very over powered causing the game to be to easy once they are leveled up, but assuming someone took the time to balance them out they are good for several more hours of getting a player to be motivated to play while leveling them up.
 
I can understand if there's an explanation like there's a fuckin demon trapped in the item.
that makes sense. there's substance to explain why the item has all these properties.
but then, this applies to every item, so does every item have a fuckin demon trapped?

roleplay element here, are we actually just using demon-trapped swords and there's not just a sword made of copper?
is there a copper-demon trapped in every copper sword? does the demon live in the copper? why?!?

if levelable items apply only to certain items, such as the sword of Gryffindor, which I assume would be unique and there's not more than 1 sword of gryffindor. but when every item is akin to the sword of gryffindor, this loses its steam.
 
The things your talking about is up to the person making the design decisions for whatever server uses them. Nothing about the system prevents setting up some in game lore for the way they work. If they want every weapon or just a few specific uniques to have the ability to level up, it's up to the designer of the server. It could also be a quest reward with some unique lore to it or many other ways that they could be added. Basically someone made a unique system for weapons gaining power over time and it's up to you to decide how it's used or not used. It would also be fairly easy to mod them so they bonded to the user when equipped then you wouldn't have to worry about them trading a leveled up weapon.
 
Last edited:
100% all about presentation.
If something seems "dumb" I would suggest either not using it, or using your imagination to create a fantastical situation in which an item could gain experience (in this case).

Could be the material the weapon is made from absorbs varying properties from the environment it is used in, or the mobs it hits. Hacking away at Daemons all day might boost Fire Resist and cast Fireball, or Fire Column. Likewise going after WW's might offer Ice, or Para AL's might offer Poison.

These systems are mainly very generic, because not every free shard is the same. It helps to have the general settings available and then people can code their own specifics. Your limitation is your imagination. :)
 
How I can find the first menu with props "xmlLevelItem"? Is there a special command? And How I can gain exp? I have tried killing orcs and drakes but does not work
XmlLevelItem is an attachment.
You have to have an item with the attachment applied to be able to see any props to it. AddAttach XmlLevelItem
After adding the attachment, use the GetAtt command and target the item. You should see all attachments on that item and be able to access each one. :)
 
XmlLevelItem is an attachment.
You have to have an item with the attachment applied to be able to see any props to it. AddAttach XmlLevelItem
After adding the attachment, use the GetAtt command and target the item. You should see all attachments on that item and be able to access each one. :)
Thank you but I am trying to kill monsters: the weapon is not gaining experience. Why?
 
Thank you but I am trying to kill monsters: the weapon is not gaining experience. Why?
If you do not have the full install for Xmlspawner, the KILLs are not registered.
You will have perform Step 2 of the install:

C#:
STEP 2: (recommended but not required)
--------------------------------------
To take advantage of the XmlQuest killtask keywords KILL and KILLNAMED, one line must be added to the OnDeath method in BaseCreature.cs as described below (note, you dont have to make this mod if you dont want to, the spawner and other items will work just fine without it, the KILL and KILLNAMED features simply wont do anything)

around line 4172 of basecreature.cs change

Titles.AwardKarma( ds.m_Mobile, totalKarma, true );

to

Titles.AwardKarma( ds.m_Mobile, totalKarma, true );
// modification to support XmlQuest Killtasks
XmlQuest.RegisterKill( this, ds.m_Mobile);
 
If you do not have the full install for Xmlspawner, the KILLs are not registered.
You will have perform Step 2 of the install:

C#:
STEP 2: (recommended but not required)
--------------------------------------
To take advantage of the XmlQuest killtask keywords KILL and KILLNAMED, one line must be added to the OnDeath method in BaseCreature.cs as described below (note, you dont have to make this mod if you dont want to, the spawner and other items will work just fine without it, the KILL and KILLNAMED features simply wont do anything)

around line 4172 of basecreature.cs change

Titles.AwardKarma( ds.m_Mobile, totalKarma, true );

to

Titles.AwardKarma( ds.m_Mobile, totalKarma, true );
// modification to support XmlQuest Killtasks
XmlQuest.RegisterKill( this, ds.m_Mobile);
I am not sure that we have the same servuo version: I have tried to search with ctrl+F in BaseCreature.cs and I have found only this in line 5834:
C#:
for (int i = 0; i < titles.Count; ++i)
                    {
                        Titles.AwardFame(titles[i], fame[i], true);
                        Titles.AwardKarma(titles[i], karma[i], true);
                    }
C'è un modo per trovare la versione che sto usando?
I am not sure but I think that, perhaps, might be this: Version 0.5, Build 6576.34593, correct?
 
Last edited:
What version of ServUO did you download?
In reference to your section of code here is where I have mine set, you can see down below your version of the Fame/Karma section.
C#:
                        OnKilledBy(ds.m_Mobile);

                        // modification to support XmlQuest Killtasks
                        XmlQuest.RegisterKill(this, ds.m_Mobile);

                        if (HumilityVirtue.IsInHunt(ds.m_Mobile) && Karma < 0)
                            HumilityVirtue.RegisterKill(ds.m_Mobile, this, list.Count);

                        if (!givenFactionKill)
                        {
                            givenFactionKill = true;
                            Faction.HandleDeath(this, ds.m_Mobile);
                        }
                    }

                    for (int i = 0; i < titles.Count; ++i)
                    {
                        Titles.AwardFame(titles[i], fame[i], true);
                        Titles.AwardKarma(titles[i], karma[i], true);
                    }
 
Back