Resource icon

Level System 3 - Rerelease 3.4

No permission to download

eugenesa

Well-Known Member
Jun 2, 2014
53
6
35
Shard Name
eugenesa shard
Donate
Donate money to this user
Joshua updated Level System 3 - Rerelease with a new update entry:

StatPoint Update



Read the rest of this update entry...
[doublepost=1553051092][/doublepost]This isn't included in the current zip, but I will include it on the next update when it comes. This script, when set to true within the script will search players on login to delete the attachment. It's set to false by default so you do not accidentally delete stuff, you have to actually set is to true to use it then compile. This isn't going to be a big help for big servers of ppl testing things out, but its better then nothing. lol..
Even if I'm reset, it's definitely in effect.

The level-up system is getting upgraded!!!!
 

Insert Coin

Well-Known Member
Dec 2, 2018
49
5
37
Hello Joshua!For first i need to say: what a good job :D
Now i compiled the new update and im getting a single error:


Code:
Level system new/Items/ExpCoin.cs:
    CS0236: Line 107: Un inicializador de campo no puede hacer referencia al campo, método o propiedad no estáticos 'Server.Items.AwardExpTarget.c'
Line 107:
Code:
private int m_SCV = c.ExpCoinCommandValue;
Can you advice a fix for me?Thank you!!!
 

Lokai

Moderator
ServUO Developer
Dec 4, 2014
1,265
211
Western New York State
Shard Name
Test Center
Donate
Donate money to this user
It would however mean changes to the serialization of the main attachment which would break all existing level attachments when updating, so all current gained levels/exp would be lost.
Why would a serialization change break existing attachments? Don't they serialize independently? In other words, why can't you create a new "version" of the serialization? If the attachment has the old version, it loads using the old version. When it is saved, it saves the new version, then when it loads again, it uses the new version because of the updated version number.
 

Joshua

Well-Known Member
Sep 13, 2014
591
74
34
Bountiful, Utah
Shard Name
My Own Shard
Why would a serialization change break existing attachments? Don't they serialize independently? In other words, why can't you create a new "version" of the serialization? If the attachment has the old version, it loads using the old version. When it is saved, it saves the new version, then when it loads again, it uses the new version because of the updated version number.
That is a great question, I've been driving at that myself. I'm not sure why it breaks, if you have any insight on that I would be appreciative.

Hello Joshua!For first i need to say: what a good job :D
Now i compiled the new update and im getting a single error:


Code:
Level system new/Items/ExpCoin.cs:
    CS0236: Line 107: Un inicializador de campo no puede hacer referencia al campo, método o propiedad no estáticos 'Server.Items.AwardExpTarget.c'
Line 107:
Code:
private int m_SCV = c.ExpCoinCommandValue;
Can you advice a fix for me?Thank you!!!
Regarding this, for now replace that line with
Code:
private int m_SCV = 100;
Make 100 whichever value you want the command to invoke, I need to review that further.
 

Joshua

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

Fixed EXPCoin

EXPCoin isn't compiling with a configuration setting, reverted for now.
Read the rest of this update entry...
[doublepost=1553098166][/doublepost]I see what you mean, had to think about that for a second. Lokai you are correct, I neglected the possibility of just adding in another version to the serialization. Blah.. I will see about that for next attachment update if it comes to it.
 

Lokai

Moderator
ServUO Developer
Dec 4, 2014
1,265
211
Western New York State
Shard Name
Test Center
Donate
Donate money to this user
That is a great question, I've been driving at that myself. I'm not sure why it breaks, if you have any insight on that I would be appreciative.
Sure.

When you add new entries to be saved on any object (in this case XMLPlayerLevelAtt) you should change the version number. That is the first number that is saved on every item in ServUO. In your case, you should have changed it from a 0 to a 1, for example.

Then, in the Deserialize method, it will read that number before loading values. Right now, everyone's XMLPlayerLevelAtt was saved with a version of 0, so when you load one with a 0 version, you ONLY want it to load the values that were saved in that version, which is why in PlayerMobile for example, you will see so many case statements or whatever, because there could be many different versions out there, and when someone loads a new one, it will save all kinds of new variables, but when it first loads it will only have the ones from the one it was saved with.

So, to make sure the new variables are ONLY loaded if someone has already updated their scripts you put a switch in the Deserialize method, so if they have version 1 it will load all the new stuff, then proceed to load the old stuff, and if they have version 0, it will only load the old.

To make that work in Serialize, you need to save version as 1, then save all the new variables, then LAST save all the old variables that were in the original version.
 

Joshua

Well-Known Member
Sep 13, 2014
591
74
34
Bountiful, Utah
Shard Name
My Own Shard
Perfect explanation :) Thank you kindly. Using that should make future updates easier in that case without breaking the attachments.
[doublepost=1553099658][/doublepost]So probably something like this.
Code:
        public override void Serialize( GenericWriter writer )
        {
            base.Serialize( writer );
            writer.Write( (int) 1 );
        }
      
        public override void Deserialize(GenericReader reader)
        {
            base.Deserialize( reader );
            int version = reader.ReadInt();
            if( version < 1 )
            {
                Add Attributes
            }
        }
 

Joshua

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

Update - Fix ResetStatToken

Token did not Delete on usage
Fixed an issue with command and token being used.
Read the rest of this update entry...
[doublepost=1553136963][/doublepost]I just realized, I dropped a new feature in the system without mentioning it. If you go into ConfiguredSkills.cs and scroll down you will notice a new entry.
"GainFollowerSlotOnLevel"
This feature will give (1) follow slot PER level. Wanted to give a heads up, this feature wasn't supposed to be slipped in yet, I forgot I included it in the zip, it is FALSE by default. The reason I did not want to include it yet was because it's not complete. If you turn it on, what will happen is from level 1 to Level 200 the toon will gain a bonus to their follower slots all the way up! so final total of 205 follow slots. :) If you make changes to the config and maybe set it to zero for most of the levels except for maybe one back *Like the last levels between 180 and 200 then it might be usable.

But just giving a heads up... lol
 
Last edited:

eugenesa

Well-Known Member
Jun 2, 2014
53
6
35
Shard Name
eugenesa shard
Donate
Donate money to this user
Hello ~! You can not gain experience by killing a creature with a summoned pet and killing it.
Could it be possible?
 

Joshua

Well-Known Member
Sep 13, 2014
591
74
34
Bountiful, Utah
Shard Name
My Own Shard
Hello ~! You can not gain experience by killing a creature with a summoned pet and killing it.
Could it be possible?
Hmm, I assumed it was tied into the basecreature tamed pet code so I never really tested that out.. that is good to know. I will look into it tonight, thanks for bringing that up! :)
[doublepost=1553184986][/doublepost]
Hello ~! You can not gain experience by killing a creature with a summoned pet and killing it.
Could it be possible?
Can you please tell me what you summoned that handled the kills? Were these normal summons like Daemons / Elementals or EV's ?
 
Last edited:
  • Like
Reactions: eugenesa

eugenesa

Well-Known Member
Jun 2, 2014
53
6
35
Shard Name
eugenesa shard
Donate
Donate money to this user
Hmm, I assumed it was tied into the basecreature tamed pet code so I never really tested that out.. that is good to know. I will look into it tonight, thanks for bringing that up! :)
[doublepost=1553184986][/doublepost]

Can you please tell me what you summoned that handled the kills? Were these normal summons like Daemons / Elementals or EV's ?

Summoning Necromancer When I tested the creatures, blade spirits, and vortexes, I sometimes did not get experience!
 

Joshua

Well-Known Member
Sep 13, 2014
591
74
34
Bountiful, Utah
Shard Name
My Own Shard
Summoning Necromancer When I tested the creatures, blade spirits, and vortexes, I sometimes did not get experience!
I think I know the issue here, I made a change in LevelHandler.cs, back your original up in case this doesn't work or just re download it.
Replace LevelHandler.cs with this file and see if that helps. Sorry, not in a place I can test this out.
 

Attachments

Last edited:
  • Like
Reactions: eugenesa

eugenesa

Well-Known Member
Jun 2, 2014
53
6
35
Shard Name
eugenesa shard
Donate
Donate money to this user
I think I know the issue here, I made a change in LevelHandler.cs, back your original up in case this doesn't work or just re download it.
Replace LevelHandler.cs with this file and see if that helps. Sorry, not in a place I can test this out.
Thank you Tested it is very good!
You can get experience points with summoning pets!
[doublepost=1553251814][/doublepost]In PlayerLevelGump.cs

It's the part to fix.

Click Mysticism Skill Rise Below

Skill list changes to Trade list
.
2141 line
2145 line
2151 line
SkillCategory.Trade -> SkillCategory.Magic

You'll have to edit it.

Thank you
 
Last edited:

Joshua

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

Level System Expanded Into Pets and More

Expansion into pets is finally here, pets now can be leveled up right along side the main toon with their own EXP pool. Not shared to the control master. With this system new features are coming to light.
- ConfiguredPet.cs script to control the system
- Loss of level on Death
- Loss of Stat on Death (required Loss of level to be enabled to use)
- Customization Stat points like the player. (no Skills yet!)
- Level Sheet for the Pets (only works on your own pet!) - command available too...
Read the rest of this update entry...
 
  • Like
Reactions: eugenesa

Insert Coin

Well-Known Member
Dec 2, 2018
49
5
37
Hello!On a new Servuo repo,pets dont show his level as suffix.Tryed with a gm account,and player account.
Pet used = Kirin and horse.
Followed the new readme instructions to install.
 

Joshua

Well-Known Member
Sep 13, 2014
591
74
34
Bountiful, Utah
Shard Name
My Own Shard
Hello!On a new Servuo repo,pets dont show his level as suffix.Tryed with a gm account,and player account.
Pet used = Kirin and horse.
Followed the new readme instructions to install.
That is my Fault. I forgot to include the cosmetic display code for the Pets, I will get to it right away.
 
  • Like
Reactions: eugenesa

Joshua

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

Missing cosmetic pet Level and patch

Here is the missing Cosmetic Level info.

Changes to these files were done.
- LevelCore.cs
- PetConfiguration.cs
- LevelHandlerPet.cs
- Readme

Fixed a possible unlikely of unlikely scenario's where if the controlmaster was null however the pet still had the attachment the server would crash. Changes made in LevelHandlerPet.cs

Added a distro edit for basecreature.cs to pull the level info. The changes to PetConfiguration and LevelCore are required for this to work.

Here is the quick...
Read the rest of this update entry...
 
  • Like
Reactions: eugenesa

Joshua

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

Forgot the Updated Zip

Attached ZIP
Still getting used to the new form for submitting changes.
Read the rest of this update entry...
Post automatically merged:

Thank you Tested it is very good!
You can get experience points with summoning pets!
[doublepost=1553251814][/doublepost]In PlayerLevelGump.cs

It's the part to fix.

Click Mysticism Skill Rise Below

Skill list changes to Trade list
.
2141 line
2145 line
2151 line
SkillCategory.Trade -> SkillCategory.Magic

You'll have to edit it.

Thank you
I found what you were referring to and confirmed the issue, I have updated the file for when I push it next. Thanks for pointing this out :)
 
Last edited:
  • Like
Reactions: eugenesa

eugenesa

Well-Known Member
Jun 2, 2014
53
6
35
Shard Name
eugenesa shard
Donate
Donate money to this user
BaseCreature.cs ---

if (amount > disruptThreshold)
{
BandageContext c = BandageContext.GetContext(this);

if (c != null)
{
c.Slip();
}
}

in this part

BandageContext c = BandageContext.GetContext(this);

Script error on server startup

Could you tell me why?

*************************************************************************
And I have one idea.

Pet training

Can you make it active when you are in Pet Slot 5?
 

Joshua

Well-Known Member
Sep 13, 2014
591
74
34
Bountiful, Utah
Shard Name
My Own Shard
That is likely due to the variable "c" is used on part of my suggested edits. Change c to something else and be sure to edit any relevant references that it would use. Likewise you can change "c" in my edits to something else as well.
 
  • Like
Reactions: eugenesa