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!

Another one of those questions...

kriggle

Wanderer
Another one of those questions...

Hope I'm not annoying people too much, but I've been reading the general variety of topics in here and it seems like a good place to ask this, but it may belong on Script Support...Well, anyway, in the CharacterCreation.cs file are several lines that I am wondering if what I think they do is right or not.

private static bool ValidSkills( SkillNameValue[] skills )
{
int total = 0;

for ( int i = 0; i < skills.Length; ++i )
{
if ( skills.Value < 0 || skills.Value > 50 )
return false;

total += skills.Value;

for ( int j = i + 1; j < skills.Length; ++j )
{
if ( skills[j].Value > 0 && skills[j].Name == skills.Name )
return false;
}
}

return ( total == 100 );
}
That line right there...I think that sets the max total of starting skill points when you choose Custom as your character class...If so, can that be changed to allow a player to have more skill points upon char creation (like say 150) ?

Basically I guess I need the lamers response to that question, and/or if the max stats upon creation can be customized in that file as well. Thanks in advance, someone always seems to have the answer for these questions I manage to come up with. :)
 

bean56

Wanderer
That code checks to make sure that none of the characters skills are less than 0 or more than 50 when they are created. To actually change how many points the get making a custom character I think it is either in the core or in the client, either way you can't change it. The only thing you can do is either script something yourself so they can add extra skill points to their char when they create it or get a script like skill ball from the script submissions forum to give to newly created chars. If you do something like that you will probably want to change the code so that it is frozen so they can't keep getting them and trading them. You may also want to make an account tag so only one character per account gets free skill points. That is too complicated for you right now and i won't go into that. That should answer your question.
 

kriggle

Wanderer
Many thanks. Too bad that can't be adjusted simply...But I think what I'll do instead is to give them more money to spend on basic skill training...although, is the amount that a char can learn from an NPC trainer set on the server side (i.e. somewhere in the RunUO scripts?), since the initial points are established on the client's end?
 

Zippy

Razor Creator
The code above verifies the # of skill points the client sent to the server... there are several client hacks which allow you to set these values to anything you want... that owuldnt be too good would it... :-P

NPC training stuff is in Scripts/Engines/Creature/BaseCreature.cs

Most text editors or windows itself have the ability to search through a whole directory to find a file with some text in it... you can use this to search for a specific string an NPC says to easily find the part of code you're looking for... example searching for the npc teaching stuff... the npc will sometimes say "I cannot teach thee...." so I searched for "I cannot teach" and viola... BaseCreature.cs :-P
 
Top