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!

Level Items (Redux)

Alcore

Wanderer
In my opinion, I think weapons should only gain on attacks and killing the creatures. with a melee attack..to give the benefit to a warrior..as far as rings and bracelets, necklaces anybody should gain no matter how you kill...and maybe go so far as certain armors only gaining on actual combat..to be realistic cant gain on armor unless you get hit..as far as pets, EV , blade spirits etc...no gains on weapons...and mages with staffs, harder to gain levels, or takes longer to gain, since they really dont use weapons to actually kill....course this would take considerable skill on writing the code...talking about alot of checks, if statements ect.... just my 2 cents worth...but like you are doing with the code right now... maybe leaving alot free area for admins to customize to their taste and what they feel their shard needs to be different...I wish you well on your C# writing and thank you again for a great concept...
 

Liam

Sorceror
dracana said:
Thanks for the feedback, this is exactly what I need. These are both the ways I was thinking of figuring experience. I am not sure on the via spells for weapons though.

If I wanted the easy way, I was going to do something either based on looting rights, aggressors, etc.

If I want to do it the more detailed way, I was thinking of weapons experience based on successful hits/damage dealt (melee only), armor based on hits absorbed, jewelry based on looting rights. Not completely sure on these, so any suggestions on this would be great!

Thanks again for the feedback :)

Thanks again for a really cool script. Have been busy creating all the levelable items and having fun :)

It would probably be difficult for anyone that doesn't melee, that uses leather armor, to actually have it raise due to the armor taking damage. Most melee chars use metal armor so while it would work for them, the leather armor users might have a problem gaining with that method. Who would melee with leather armor, destroying it in the process while trying to raise the level? Perhaps I am wrong hehe Is there a way to separate the two types and have leather gain a different way?
 

sir i forgot

Wanderer
was woundering

How could i make this too where all my items are levelable like the ones that come with runuo 1.0 that come in loot?
 

Liam

Sorceror
sir i forgot said:
How could i make this too where all my items are levelable like the ones that come with runuo 1.0 that come in loot?
Using the items he supplied as a template, you will have to recreate each item. Once done, add it as part of your loot.
 

Liam

Sorceror
sir i forgot said:
Thx much liam got it going almost done hehe :D
Awesome, I am getting there myself... Between school, work and my wife and children, I don't have as much time as I would like. Eventually... :)

Good job :)
 

dracana

Sorceror
coolguy335 said:
what file is basecreature.cs in?

If you aren't using a custom version, it should be in...

C:\Program Files\RunUO Software Team\RunUO 1.0\Scripts\Engines\AI\Creature

Be sure to make a backup of the original before making any changes :)
 

valdis

Wanderer
System Works great.

Just wanted to let you know.. The system works great! My players love it and most have take'n it apon themselfs to level them as fast as they can..

I did mod it alittle bit. To slow down the amount of spending points you get per level, so that at higher levels you get less and less points...

But it's a great script! Thanks again!
 

jhs59

Sorceror
I would DEFINATELY use this if the experience is handed out based on looting rights. I'm a newbie scripter and am not sure exactly how to change it mself. Anyone have any suggestions on that? If this is not a proper forum to ask this in let me know and I'll head over to the correct one. Thanks for your hard work on this script it looks great. :)
 

dracana

Sorceror
jhs59 said:
I would DEFINATELY use this if the experience is handed out based on looting rights. I'm a newbie scripter and am not sure exactly how to change it mself. Anyone have any suggestions on that? If this is not a proper forum to ask this in let me know and I'll head over to the correct one. Thanks for your hard work on this script it looks great. :)

This is not tested, but you should be able to make the following modifications to BaseCreature.cs to accomplish item experience by looting rights...

First, if you added the modification to OnDamage in BaseCreature (from my initial post), comment it out or remove it. This change was...
Code:
			if ( willKill )
				LevelItemManager.CheckItems( from, this );
Change this to...
Code:
			//if ( willKill )
				//LevelItemManager.CheckItems( from, this );
or delete it altogether.


Now, look for the following in OnBeforeDeath...
Code:
			if ( !Summoned && !NoKillAwards && !m_HasGeneratedLoot )
			{
				m_HasGeneratedLoot = true;
				GenerateLoot( false );
			}

change it to...
Code:
			if ( !Summoned && !NoKillAwards && !m_HasGeneratedLoot )
			{
				m_HasGeneratedLoot = true;
				GenerateLoot( false );
				[B]LevelItemCheck();[/B]
			}

finally, add the following anywhere in BaseCreature.cs (in the BaseCreature: mobile class)
Code:
		public void LevelItemCheck()
		{
			ArrayList rights = GetLootingRights( this.DamageEntries, this.HitsMax );
			ArrayList mobile = new ArrayList();

			for ( int i = rights.Count - 1; i >= 0; --i )
			{
				DamageStore ds = (DamageStore)rights[i];

				if ( ds.m_HasRight )
				{
					if ( ds.m_Mobile is PlayerMobile )
					{
						mobile.Add( ds.m_Mobile );
					}
				}
			}

			for ( int i = 0; i < mobile.Count; ++i )
			{
				PlayerMobile pm = (PlayerMobile)mobile[i % mobile.Count];

				LevelItemManager.CheckItems( pm, this );
			}
		}

A good place to add it is after the closing "}" of the OnBeforeDeath routine, i.e.
Code:
			return base.OnBeforeDeath();
		}
after this.


Save BaseCreature.cs and restart server.
 

AdminThorn

Wanderer
okay maybe I'm just stupid but I want to be sure I get this right and not screw up this script. I want to change the max level that items can go up to from 100 to 50 or less but I'm confused as to what I need to change in the exp table to be sure it's correct. Any help on that would be gretaly appreciated.

Also I'm dumb at the whole serialize/deserialize thing, when I go to make my own levable items how would I go about doing that to make them work properly?

Again any help is greatly appreciated and thank you to all your hard work on this dracana :)
 

dracana

Sorceror
AdminThorn said:
okay maybe I'm just stupid but I want to be sure I get this right and not screw up this script. I want to change the max level that items can go up to from 100 to 50 or less but I'm confused as to what I need to change in the exp table to be sure it's correct. Any help on that would be gretaly appreciated.

Also I'm dumb at the whole serialize/deserialize thing, when I go to make my own levable items how would I go about doing that to make them work properly?

Again any help is greatly appreciated and thank you to all your hard work on this dracana :)

Changing the max levels really only "requires" one change...

Around line 16 of LevelItemManager.cs change the 100 in the following line to 50 (or whatever).
Code:
public const int Levels = 100;

Now the rest is optional and is up to how powerfull you want the items to be at level 50. To have weaker items, make no more changes. To increase the item's total stats when fully leveled you can change the amount of points the item gets on each level.
To do this, increase the PointsPerLevel (around line 17 of LevelItemManager.cs). i.e. Change
Code:
public const int PointsPerLevel = 5;
to
Code:
public const int PointsPerLevel = 10;

you can also reduce the "Cost" of each attribute in LevelAttributes.cs. The cost is in bold/red below...
Code:
new WeaponAttributeInfo( AosWeaponAttribute.LowerStatReq, "Lower Stat Requirement", AttributeCategory.Stats, [B][COLOR="Red"]2[/COLOR][/B], 100 ),

This method is a bit more work, but puts you in more control of what each attribute costs (lower cost on some to make easier and raise on others to make them harder to raise)

As for the ser/deser question, no changes should be required in each levelable item you create... look at the sample items I provided in the package for examples.

Hope this helps!
 

jhs59

Sorceror
Wow. I really appreciate your taking the time to do that for me, Dracana. Thank you for taking the time to help someone out that you don't even know. :)
 

Greystar

Wanderer
jhs59 said:
Wow. I really appreciate your taking the time to do that for me, Dracana. Thank you for taking the time to help someone out that you don't even know. :)

very few if anyone here knows each other personally so if no one submitted anything then no one would be helping each other. So that's a given.
 

AdminThorn

Wanderer
Thanks so much for your help and quick response dracana :) I'm going to add this in today and have some fun with it. Great work as always :)
 

PoxIRL

Wanderer
How would I go about letting people choose certain mods for certain item types?

For example. I want people to be able to add FC/FCR/LMC/Resists, to JUST jewelery, and not weps or armor.

Sorry if this isn't clear enough.
 

dracana

Sorceror
PoxIRL said:
How would I go about letting people choose certain mods for certain item types?

For example. I want people to be able to add FC/FCR/LMC/Resists, to JUST jewelery, and not weps or armor.

Sorry if this isn't clear enough.

There are many ways you could do this, from adding a new attribute category to LevelAttribute.cs and the ItemExperienceGump.cs (harder, but requires no hardcoding in future) to just adding a special if/then in ItemExperienceGump.cs to not show the button for those attributes if m_Item is not BaseJewel (this will be easier, but more sloppy). It's a bit too in depth for me to give samples. Hopefully this will get you pointed in right direction to attempt coding it. If you need help then, post what you tried and I will assist in getting it working.
 

PoxIRL

Wanderer
I looked in the Gump file for where you had if baseweapon show button Weapon hits. I then looked further into it to see if I could change it to after you click on Magic attributes. To try and make it so if basejewel show fc/fcr/lmc buttons. But I couldnt even find those attributes. I dont want to limit magic attributes to just jewels. I want to be able to let players chose SC for a wep.

Sorry if this isn't clear.

I added the lines
Code:
if (m_Item is BaseJewel)
Here
Code:
AddLabel(136, 93, TitleHue, @"Categories");
			AddButton(75, 116, 4005, 4007, GetButtonID( 1, 0 ), GumpButtonType.Reply, 0);
            AddLabel(112, 117, LabelHue, @"Melee Attributes");
			[COLOR="Red"]if (m_Item is BaseJewel)[/COLOR]
				AddButton(75, 138, 4005, 4007, GetButtonID( 1, 1 ), GumpButtonType.Reply, 0);
            AddLabel(112, 139, LabelHue, @"Magic Attributes");
			AddButton(75, 160, 4005, 4007, GetButtonID( 1, 2 ), GumpButtonType.Reply, 0);
            AddLabel(112, 161, LabelHue, @"Character Stats");
			AddButton(75, 182, 4005, 4007, GetButtonID( 1, 3 ), GumpButtonType.Reply, 0);
            AddLabel(112, 183, LabelHue, @"Resistances");
            if (m_Item is BaseWeapon)
			    AddButton(75, 204, 4005, 4007, GetButtonID( 1, 4 ), GumpButtonType.Reply, 0);
            AddLabel(112, 205, LabelHue, @"Weapon Hits");
			AddButton(75, 226, 4005, 4007, GetButtonID( 1, 5 ), GumpButtonType.Reply, 0);
            AddLabel(112, 227, LabelHue, @"Misc. Attributes");

But that only makes it so that if targeted item is not basejewel, then you cant select magic attributes, making it so weapons cant have SC added to it.

I want to look further in the script for after that part is selected. I dont know where to go from here. Any help as to where to look would be greatly appreciated.
 
Top