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!

Resource icon

[2.x] Custom Detect Hidden and Reveal Hidden 1.2

No permission to download

ViWinfii

Sorceror
ViWinfii submitted a new resource:

Custom Detect Hidden and Reveal Hidden (version 1.0) - Replaces the skill Detect Hidden with two abilities that do not require targetting.

Do you think it is a waste of time having to choose a target when trying to detect hidden players or traps? Do you find the Detect Hidden skill to be boring and not worth training? Then this script is for you.

This script completely changes how Detect Hidden is used. The Detect Hidden button in your skills gump has been disabled and replaced by two powerful commands: Detect and Reveal. Both commands rely on and will raise your Detect Hidden skill.

Using Detect
The concept...

Read more about this resource...
 

ViWinfii

Sorceror
Good questions!

It is possible to create two new skills but doing so requires editing the core and adding 2 new skills in Skills.cs. That takes a bit of work and a newly compiled core. There is also a way to add custom skills outside of the core but I'd rather not go into how to do that here :) I have done that before but for this release I thought I would keep it simple and just replace the original skill Detect Hidden.

Using Detect or Reveal have the same success rates at the moment but you can change these if you want. The Hiding skill of each hidden person around you also determines if you are able to Detect or Reveal them. It is possible you could be surrounded by 3 or 4 hidden characters and you only Detect or Reveal one of them. Here's the code that determines the success rates:

Detect Success (lines 56 and 57) and Reveal Success( lines 172 and 173):
Code:
                            double ss = srcSkill + Utility.Random( 21 ) - 10;
                            double ts = trg.Skills[SkillName.Hiding].Value + Utility.Random( 21 ) - 10;

ss represents your Detect Hidden skill + a random number between -10 and 10

ts represents each hidden character's Hiding skill + a random number between -10 and 10.

If ss >= ts, you Detect/Reveal that particular hidden person, but this check is done for each hidden character with different random numbers in each check. Note that even with 100 skill in Detect Hidden, you may not Detect/Reveal someone who has a Hiding skill of 100. If you have 100 skill in Detect Hidden and the hidden person has a skill of 80 in Hiding, you will Detect/Reveal them every time.
 

bazspeed

Sorceror
Hi Guys, Can anyone tell me why this wont work on SVN? Any idea what changes need to be done to make it work?

+ Customs/CustomDetectHidden.cs:
CS0246: Line 23: The type or namespace name 'CommandEventArgs' could not be
found (are you missing a using directive or an assembly reference?)
CS0246: Line 91: The type or namespace name 'CommandEventArgs' could not be
found (are you missing a using directive or an assembly reference?)
 

ViWinfii

Sorceror
Hi Guys, Can anyone tell me why this wont work on SVN? Any idea what changes need to be done to make it work?

+ Customs/CustomDetectHidden.cs:
CS0246: Line 23: The type or namespace name 'CommandEventArgs' could not be
found (are you missing a using directive or an assembly reference?)
CS0246: Line 91: The type or namespace name 'CommandEventArgs' could not be
found (are you missing a using directive or an assembly reference?)

Hmm, I'm not sure why it isn't there but somehow the version I uploaded was missing a few things at the top. Let me upload a new version that fixes your problem.
 

Tru

Knight
Why cant you change DetectHidden.cs to activate your script instead of using the command? Then theres no need to disable the button.
 

ViWinfii

Sorceror
Why cant you change DetectHidden.cs to activate your script instead of using the command? Then theres no need to disable the button.

I try to minimize the edits to existing scripts because I thought it would be easier to install. I could make a version that is just a replacement for DetectHidden.cs but the problem is when activating Detect and Reveal, they both call upon OneUse function in DetectHidden.cs. That's how both commands make you wait to use new skills. I'm not sure about another solution on how to make them both use the skill Detect Hidden and make you wait to use new skills - there may be a way but I never figured it out.
 

ViWinfii

Sorceror
In hindsight, I see your point. If people want it I can make a version to do just that. I'll still have to disable the skill button for it to work correctly.
 

tindo

Sorceror
I seem to have 100% fail rate when testing this. I had one player with 50 hiding and one with 100 detect and he still failed to detect him after multiple tries. Anyone else experiencing this?
 

ViWinfii

Sorceror
Hey tindo, quick question: Does the player with 50 hiding have an AccessLevel above Player, such as GM or something? If so, he will not be detectable.

If both players have an AccessLevel of Player, then I will look into this. Anyone else having the same problem?
 

tindo

Sorceror
Duh, didn't think of that. I have a custom accesslevel of Mentor, which is below a Counselor but above a player. Easy fix, thanks!
 
Top