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!

[item identification] properties switching on/off

Elg'cahlxukuth

Traveler
Hi

Old topic but new approach: I would like to implement (or use some existing) item identification skill system. I found many discussions and scripts already posted, but the problem is that I would like to do it differently. My idea is that:
- unidentified item can be wear (if someone just want to get armor resist or just use a sword);
- properties of unidentified item are inactive, so when item is wear none of the properties affect the character;
- the list of properties on an unidentified item contains only the names of properties but not the values;
- when item becomes identified (by using the Skill on it) properties becomes active and exact values of them are shown;

So far I managed to list the item properties in the proper way, that is, for example:
"Unidentified
hit lower attack
lower mana cost
night sight".
I have also implemented all the code to identify items with skill.

What I didn't manage to implement properly is to get the properties not working on unidentified item.
I tried a few ideas how to implement it, but there was always something wrong.
For example I tried to modify the BaseWeapon class, which has AosAttributes and AosWeaponAttributes varribles inside. I created the "false-empty" varribles of the same types and tried to switch the reference either on the real varrible (which contains values of item properties) or on the empty one. I got mixed my mind and stuck, decided to do it a different way.
I also tried to modify the methods of AosAttributes, AosWeaponAttributes classes (and a few other classes inside AOS.cs) to make them dependent on my new parameter bool isIdentified, but it turned out that there was something wrong then for identified items (resistance values like 30340349 on armors). Now I'm trying to fix that, but I'am not sure anymore if I will manage to do it.

So my question is: have anyone of You ever tried to turn the properties on/off to make them dependent on something, like Identified state for example? Maybe someone know that there is such implementation ready somewhere? Maybe You have som suggestions or know the good way how to do what I want?
I will be glad for any help.

Regards
 
Top