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!

[RunUO 2.0 RC1] Levelable Items System 3.0

dracana

Sorceror
[RunUO 2.0 RC1] Levelable Items System 3.0

Levelable Items (for RunUO 2.0 rc1)
Current Version: 3.0


This is my first major update to the levelable items system. This is a RunUO 2.0 (rc1) compatible update to the Levelable items system. This system is a complete overhaul from version 2.x and will require modification of any levelable items that were created to work with my previous releases.

***** Disclaimer *****
This system was written and intended for AOS/SE enabled shards, as it is based on AOS Attributes. It will not break a pre-AOS shard, but the attributes will have no effect!!
*******************


Here are the features...
This system allows you to create levelable weapons, armor, clothing, and jewelry. Upon killing creatures, the levelable items will gain experience. Once experience reaches certain points, the item will gain a level. Upon gaining levels, the item will receive "spending points". These points can be used to purchase attribute enhancements to the item via use of a gump.

Here is what is included...
  • Leveling system (based off of OutkastDev's Levelable Items system) - This is the core to the system and how your items will gain experience when a creature is killed.
  • Item Experience Gump - This gump allows the players to view the items experience, experience to next level, spending points available, and attributes on the item. It is also where they can spend the available spending points! Here is an image of the interface...

  • Item Experience Command - Players can single click a levelable item and click on information context menu to bring up the Item Experience Gump. Alternatively, players can use the commands [itemexp or [ixp to bring up the gump.
  • [New to 3.0]Max Level Increase Deeds - Much like Power Scrolls or Stat Scrolls, these scrolls are used to increase the maximum levels allowed for a given levelable item. Option to require player blacksmith involvement in this process.
  • [New to 3.0]New gumps for increasing levels - If player blacksmiths are required in level increase process, there are new gumps for both the level scroll user and the blacksmith player for confirmation of the process.
  • [New to 3.0]Levelable Item Settings in separate script - All configurable settings for the system have been moved to a separate script (LevelableItemSettings.cs).

Here are the main differences between this version (3.0) and my previous versions...
  • Only works with RunUO 2.0 RC1 (possible future version for RunUO 1.0 will be released at later date).
  • Each item will now store it's own max level.
  • All levelable item code has been moved to Base scripts for each item type (BaseLevelArmor, BaseLevelShield, BaseLevelClothing, BaseLevelAxe, BaseLevelSword, etc) This is optional, but it makes creation of items much easier, since the levelable code is not required in each items script... see sample items for example.
  • Ability to use old format of levelable item scripts, with a few modifications that is!!! Will work side by side with new BaseLevel scripts.
  • The items max level can be increased up to the global level cap by use of Level Increase Scrolls.
  • Level increase scrolls are configurable to require a player blacksmith to validate prior to using on levelable item.
  • Item max level can be defaulted by setting DefaultMaxLevel in LevelableItemSettings.cs (current default is 10 for DefaultMaxLevel and 100 for MaxLevelsCap). To not require the use of Level Increase Scrolls, set DefaultMaxLevel and 'MaxLevelsCap' to the same value.
  • Optional Champion Spawn (w/Distro mods) for dropping Level Increase Scrolls.

To install
Download the attached file and unrar it to your customs directory.
****If you are currently using my previous levelable items system, I recommend that you first unrar the files to a directory outside RunUO, copy your old items into this directory, upgrade your items to the new format (see attached instructions), then overwrite the entire old system with this new version! All on a test server of course :p

Now you are ready to setup your items.

1. I have included a few examples, a normal kryss, a normal bracelet, a normal cloak, and two artifacts (Aegis and Inquisitors Resolution). These are commented and will get you started on creating your own levelable versions of items. With the new format, basically you would create levelable items using the exact same code as any other item, only referring to BaseLevelXXX instead of BaseXXX (where XXX is the type of item, like Armor, Sword, etc)
****NOTE**** you can still use your old versions of levelable items with a few required modifications, please read the attached upgrade instructions for upgrading older version items

2. Now that you have created levelable items, you need to make the following changes to BaseCreature.cs to let these items gain experience...

Open up your basecreature.cs and find the following in the OnDamage method

Code:
   if ( speechType != null && !willKill )
    speechType.OnDamage( this, amount );

Add this immediately after...

Code:
   [B]if ( !Summoned && willKill )
    LevelItemManager.CheckItems( from, this );[/B]

3. Now you can modify the definable parameters of the leveling system. To do this,
* Open LevelableItems\New\LevelableItemSettings.cs and modify the following code to your preference...
Code:
  //These are the definable features for item leveling...
        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.
        public static readonly bool EnableExpCap = true; //true = Cap experience per level.  false = no cap.
        public static readonly bool DisplayExpProp = true; //true = Display experience on item onmouseover/click.

        //These are the definable features for spending points...
        public static readonly int PointsPerLevel = 5; //How many spending points an item gets per level.
        public static readonly bool DoubleArtifactCost = true; //true = Artifact attributes will cost double points.

        //These are the definable features for Level Increasing...
        public const bool BlacksmithOnly = true; //true = May only be used by char with blacksmithy.
        public const double BlacksmithSkillRequired = 100; // Amount of Blacksmith skill required to validate deeds (if BlacksmithOnly is true).
        public const bool RewardBlacksmith = true; //true = give the blacksmith reward for validating (if BlacksmithOnly is true).
        public const int BlacksmithRewardAmt = 500; // Amount to pay blacksmith if they validate deed for another player (if BlacksmithOnly and RewardBlacksmith are true).

Description of parameters...
DefaultMaxLevel & MaxLevelsCap
DefaultMaxLevel is the initial max levels that all levelable items will cap at. MaxLevelsCap is the global max level cap that all items can be increased to by using Level Increase Deeds

EnableExpCap
If set to true, their will be a cap of how many experience points an item can gain per creature/per item level. As the levels increase, this cap increases. If false, there is no cap. For example, if an item is level 2 and a player kills a Titan. With EnableExpCap set to true, the item will be capped at around 40 points of experience. If false, the item will gain more like 50-60 points.

DisplayExpProp
If set to true, the total experience points will show OnMouseOver for the item. If false, only the level will show
PointsPerLevel
The points that an item will receive on each level increase. At 100 levels and 5 points gained each level (with 5 extra points every 10th level), that gives players 550 points to spend on attributes. You can create an item like the following...


If you want uber weapons or if you think this is too much already, you will need to either increase/decrease Levels or increase/decrease PointsPerLevel to meet your needs.

DoubleArtifactCost
If set to true, Artifacts will cost double the spending points for each attribute. If false, artifacts attributes will cost the same as non-artifacts. In my opinion, this create VERY unbalanced items if set to false!
BlacksmithOnly , BlacksmithSkillRequired, RewardBlacksmith & BlacksmithRewardAmt
All the parameters involved in applying level increase deeds if player blacksmiths are required to validate.​


4. Modify Attribute parameters.
To do this,
* Open LevelableItems\New\LevelAttributes.cs and modify each of the attribute parameters to your preference...
You want to modify the lines like

Code:
 new AttributeInfo( AosAttribute.RegenHits, "Regen Hits", AttributeCategory.Stats, 2, 4 ),

Your options are...
  • Delete an entire line to remove the ability to increase the given attribute.
  • Modify the "Cost" of increasing an attribute (the second to last number).
  • Modify the max value to the given attribute (last number).

5. (Optional) Download and unrar the Champion scripts to include the new Ancient Blacksmith champion into the ChampionSpawn system. Be sure to either backup and overwrite OR rename the distro versions of ChampionSpawns.cs and ChampionSpawnTypes.cs found under Engines\CannedEvil of the RunUO 2.0 RC1 distro. The Ancient Blacksmith (by default) can be used without champ spawn as well... just spawn him anywhere. If you don't use the Ancient Blacksmith to drop level increase scrolls, you will obviously need to distribute them in another manner (vendor stone, events, etc.)​
6. Now, restart your server and you are ready to go.

Obviously you will need a way to distribute the levelable items as well (i.e., loot, token stone, rewards, etc), but I will leave that up to you :)

I have also included upgraded versions of my old style levelable item samples.
In addition, I have also included a file that includes nearly every RunUO 2.0 Weapon/Armor/Clothing/Jewelry in a levelable format (using my new BaseLevel version of items)


Credit:
******************
OutkastDev - For the original Levelable Items script and for the Race/Class system, which I used for the calculation of points to each level.
tindin156 - For his contribution of allowing Clothing items to be levelable and the context menu addition.
Daat99 - For his MasterOfTheArts, which I used to create my AncientBlacksmith
RunUO dev team - Obviously!! For all the great distro scripts, but especially for PowerScrolls, items, and gumps I used for help in writing my system.
******************

Feel free to post any bugs or critical feedback

Thanks and hope you enjoy!
 

Attachments

  • [2.0]Levelable Items 3.0.rar
    34.2 KB · Views: 1,515
  • [2.0]All Levelable Items - New Format for 3.0.rar
    156.9 KB · Views: 1,388
  • [2.0]Old Format Item Samples - Modified for 3.0.rar
    10 KB · Views: 618
  • Item Conversion Instructions 2.0 to 3.0 (using old method).txt
    2.9 KB · Views: 631
  • [2.0]Champion Spawn for Levelable Items 3.0.rar
    9.9 KB · Views: 895

dracana

Sorceror
Additional Resources...

1. If you are using the new BaseLevel scripts, your players will not be able to repair weapons by default. To fix this, you will need to replace/modify the distro repair.cs found in \Engines\Craft\Core with the attached repair.cs.
 

Attachments

  • Repair.cs
    12.5 KB · Views: 386

roadblock06

Wanderer
Hi installing the scripts, looks great.. got errors for the items : craftercloak and craftersandles.. not in with files...
 

Draegen

Sorceror
hey nice system and all but what stops players from coming over powered ?? is there any cap on each new prop added or can the get 100 each and be like god
 

dracana

Sorceror
roadblock06 said:
Hi installing the scripts, looks great.. got errors for the items : craftercloak and craftersandles.. not in with files...

Oops, i forgot to move out some code specific to my shard...

Remove the following code from OnBeforeDeath in the AncientSmithy.cs script (under \Champion\Mobiles )

Code:
            //Pirates Grotto Only.... take out if published
			switch (Utility.Random(20)) 
			{
				case 0: PackItem( new CrafterCloak()); break;
				case 1: PackItem( new CrafterSandals()); break;
			}
            //End Pirates Grotto Only

I will also fix the file in the first post.

Thanks for bringing this to my attention!
 

dracana

Sorceror
Draegen said:
hey nice system and all but what stops players from coming over powered ?? is there any cap on each new prop added or can the get 100 each and be like god

Refer to step 4 in my original post...

4. Modify Attribute parameters.
To do this,
* Open LevelableItems\New\LevelAttributes.cs and modify each of the attribute parameters to your preference...
You want to modify the lines like

Code:
 new AttributeInfo( AosAttribute.RegenHits, "Regen Hits", AttributeCategory.Stats, 2, 4 ),

Your options are...
  • Delete an entire line to remove the ability to increase the given attribute.
  • Modify the "Cost" of increasing an attribute (the second to last number).
  • Modify the max value to the given attribute (last number).

I didn't get into too much detail, but this is where you control how far a user can take the attributes. In particular, the last option. By setting the max value of a given attribute, that will be the cap on how many points a player can increase each attribute. So in the above example code, a player would not be able to increase Regen Hits past 4.

Hope that helps :)
 

chocomog

Wanderer
Possibiilities of making the levelable items enhancable and repairable

I love the system. I have added them all into loot so that they drop randomly in lootpack for easy distribution and they get a little head start with magic properties. The only thing I would like to see added is the ability to repair and Enhance with the ores mainely for the durablility aspect of enhancement.
The only complaint from players has to do with the life of there levelable some items do not allow for self repair or durability . I tried adding ilevelable into the repair part of base weapon. no errors but still not repairable.
oooh and if possibe to add an if makers mark 10% chance for the item to be levelable. and for a final not it would also be nice if you and lucid got to gethher to add the levelable option to his bows. he uses a alternate system and I can either use his arrows with his bows an don't level or use your bows and level them but only use base arrows.
Just some notes and ideas this system has added a lot to the way you can customize your character. thanks for all your hard work.
 
dracana

Excellent system. I was gonna make a patch so this can be merged easily with Advanced Archery. I hope you don't mind. ++Karma
 

dracana

Sorceror
chocomog (repair.cs)

chocomog said:
I love the system. I have added them all into loot so that they drop randomly in lootpack for easy distribution and they get a little head start with magic properties. The only thing I would like to see added is the ability to repair and Enhance with the ores mainely for the durablility aspect of enhancement.
The only complaint from players has to do with the life of there levelable some items do not allow for self repair or durability . I tried adding ilevelable into the repair part of base weapon. no errors but still not repairable.
oooh and if possibe to add an if makers mark 10% chance for the item to be levelable. and for a final not it would also be nice if you and lucid got to gethher to add the levelable option to his bows. he uses a alternate system and I can either use his arrows with his bows an don't level or use your bows and level them but only use base arrows.
Just some notes and ideas this system has added a lot to the way you can customize your character. thanks for all your hard work.

Thanks for pointing this out. It appears that the reason they can not be repaired or enhanced is because they are not craftable items. I have modified the base repair.cs to allow for repairing the levelable items, it is attached. I have commented my changes in case you already have a modified version of repair.cs. I will look into enhance.cs as well and let you know what needs to be changed there to enhance.

Please make a backup of \engines\craft\core\repair.cs and then save the attached script to the same location (or custom folder) then restart shard to allow for repairing levelable items.

If you have any questions, please let me know.
 

Attachments

  • Repair.cs
    12.5 KB · Views: 191

dracana

Sorceror
Lucid Nagual said:
Excellent system. I was gonna make a patch so this can be merged easily with Advanced Archery. I hope you don't mind. ++Karma

That sounds great Lucid! I look forward to seeing what you come up with. If you need any information from me to help, please let me know. :)
 

dracana

Sorceror
TheOutkastDev said:
I'm very impressed with how much you've expanded on my original script. Good job, and keep up the work!

Thanks for the feedback Outkast! I never would've thought of the additional features without your original idea and scripts! Thanks.
 

chocomog

Wanderer
Repairing Levelables

Thanks the update worked wonders. glad to be able to repair the items leveled. I was thinking about another addition to this system if you don't beat me to it. Was thinking of adding a gump that shows your over all totals of what all the levelable items that you are wearing. just so ya dont have to do the math as your leveling them. thanks again.:D
 

cyber_t

Wanderer
some error

hey mate amazing script , but for me its abit hard to find out where is my prob if you can guide me please to fix it.

RunUO - [www.runuo.com] Version 2.0, Build 2357.32527
Core: Running on .NET Framework Version 2.0.50727
Scripts: Compiling C# scripts...failed (6 errors, 0 warnings)
Errors:
+ Custom/All Items - New Format/Items/Armor/Artifacts/LevelInquisitorsResolutio
n.cs:
CS0101: Line 6: The namespace 'Server.Items' already contains a definition f
or 'LevelInquisitorsResolution'
+ Custom/All Items - New Format/Items/Clothing/LevelCloaks.cs:
CS0101: Line 5: The namespace 'Server.Items' already contains a definition f
or 'BaseLevelCloak'
CS0101: Line 35: The namespace 'Server.Items' already contains a definition
for 'LevelCloak'
CS0101: Line 159: The namespace 'Server.Items' already contains a definition
for 'LevelFurCape'
+ Custom/All Items - New Format/Jewels/Artifacts/LevelBraceletOfHealth.cs:
CS0101: Line 6: The namespace 'Server.Items' already contains a definition f
or 'LevelBraceletOfHealth'
+ Custom/All Items - New Format/Shields/Artifacts/LevelAegis.cs:
CS0101: Line 6: The namespace 'Server.Items' already contains a definition f
or 'LevelAegis'
+ Custom/All Items - New Format/Weapons/Ranged/LevelBow.cs:
CS0101: Line 8: The namespace 'Server.Items' already contains a definition f
or 'LevelBow'
+ Custom/All Items - New Format/Weapons/Swords/LevelKryss.cs:
CS0101: Line 8: The namespace 'Server.Items' already contains a definition f
or 'LevelKryss'
Scripts: One or more scripts failed to compile or no script files were found.
- Press return to exit, or R to try again.
 

dracana

Sorceror
cyber_t

cyber_t, it appears that you have duplicate scripts of those items. Just wondering... did you possibly install both my full set of weapons and the sample old weapons? If so, you need to remove the old samples, as they are just for showing people how to upgrade from my old version :)

Hope that helps
 

dracana

Sorceror
skiter said:
I cant find it in the base creature can somone help me out?

Search for OnDamage( in BaseCreature.cs. Towards the bottom of the OnDamage routine, you should see

Code:
			if ( speechType != null && !willKill )
				speechType.OnDamage( this, amount );

It will be on line 1139 of a distro RunUO 2.0 RC1 BaseCreature.cs.

Hope that helps :)
 

chocomog

Wanderer
leveling shields not working with parry

I love the system and only problem that persists is that all shields if they are levelable do not allow for parry gain now my assumption is since they are not gaining in parry then they do not allow you to parry a blow.
oh and if any further updates and advancements are to come it would be nice to have the ability to use the arrows and bolts from lucids archery. I saw that he was thinking of making a patch to your fantastic system but has not done so. (I know he is busy and has lots to do from reading his posts) and the only addition that would be nice is a way to view all stats that are being altered by the levelable items being worn at once via gump or something. the system is stable and awsome in all other ways thanks for the contribution.
 

dracana

Sorceror
chocomog said:
I love the system and only problem that persists is that all shields if they are levelable do not allow for parry gain now my assumption is since they are not gaining in parry then they do not allow you to parry a blow.
oh and if any further updates and advancements are to come it would be nice to have the ability to use the arrows and bolts from lucids archery. I saw that he was thinking of making a patch to your fantastic system but has not done so. (I know he is busy and has lots to do from reading his posts) and the only addition that would be nice is a way to view all stats that are being altered by the levelable items being worn at once via gump or something. the system is stable and awsome in all other ways thanks for the contribution.

I just got home from vacation, but I will check out the parry issue asap! I use Lucid's Advanced Archery and I did change his/my scripts to work together, but never posted them. I will pass the changes I made on to Lucid to get his buy in and see if we can release them.
 
Top