Frybaby500

Initiate
ServUO Version
Publish 58
Ultima Expansion
Time Of Legends
Hey All!!

I'm quite new to servuo but I've been playing with it for about a week and it's great fun to change the world configs around to have your game be tailored to you. I'm having problems trying to adjust the meditation.cs in my world setup. I guess I'm still not quite sure how to adjust the formula to work better. I basically like to play a god like character that has like 500 mana but the above formula makes it so you can only med if you are within something like 120 mana.


double skillVal = m.Skills[SkillName.Meditation].Value;
double chance = (50 + (( skillVal - ( m.Mana / m.ManaMax ) ) * 2)) / 100;

if ( chance > Utility.RandomDouble() )
{
m.CheckSkill( SkillName.Meditation, 0.0, 100.0 );


I'm quite bad when it comes to math but I do remember the order of operations but no matter how I change this formula everything still stays the same. Which part of this formula do I change to achieve a much wider spread than 120 to be able to meditate? I tried changing the variable skillvalue to something like 1000 instead of 120 but I still seem to get the same results. That could be completely wrong but I've changed the formula a lot just to see if I get any difference and I don't.

Also, If I adjust these .cs files do I have to do anything more than restart the server and log back in? I also tried to change some of the item .cs files with no luck.

Do I need to run the assembly again or rebuild something in game? Any help would be greatly appreciated. I'm an IT guy and adjusting config files isn't really that new to me but I'm hardly a programmer. Sorry again to re-open such an old thread but any help would be awesome!
 
Well in your case what you could do is make meditation only rely on the skill
C#:
double skillVal = m.Skills[SkillName.Meditation].Value;

double chance = skillVal / 100;

 if (chance > Utility.RandomDouble())
 {


Which means, at 100 Meditation the person will have 100% chance of triggering meditation
 
Last edited:
Thank you so much for your reply!

I've made that change to the scripts/meditation.cs file but I seem to be getting the same results? I've noticed this when attempting to change and item.cs file as well. Do I need to do something other than restart the server when I make changes to these files? I haven't had to with config files so I may be ignorant of something here. :)

Thanks again!
 
For anything in "Scripts" you should only need to restart your server. (Atleast with p57)
For "Server" files like items, maps, mobile etc.. you will need to recompile.
 

Active Shards

Donations

Total amount
$80.00
Goal
$1,000.00
Back