Go Back   EQEmulator Home > EQEmulator Forums > Support > Support::Windows Servers

Support::Windows Servers Support forum for Windows EQEMu users.

Reply
 
Thread Tools Display Modes
  #1  
Old 09-03-2011, 06:22 PM
Jujubeez
Fire Beetle
 
Join Date: Aug 2011
Location: Charlotte, NC
Posts: 17
Default Skills Question

Ok I've done a lot of hunting around on the forums so I've done my homework on adding/changing skills on a class and I understand that it's either impossible or just difficult. I'm referring to say giving Bard double attack. My question is to some of you who know more than me is if it is possible, how would you do it?

I've changed a lot of code on the server and in the database in the process of figuring out where this all lead to (that the client side is hard coded) so I have a good idea of how the server side works but how does one go about changing the client? Which file is that code in? Has anyone made a change like this before?

Just looking for someone to show me what would be required to make a change like this, I would really really like to customize my server in this way. I think this is one of the most glaring weaknesses in EQ, so many skills are class specific. Why can't a druid parry? Ok maybe it's 25% of a warriors, or 10% or whatever but it should be in there in my opinion.

Anyways does anyone have examples, or even just instructions on how to go about doing this?
Reply With Quote
  #2  
Old 09-03-2011, 08:16 PM
ChaosSlayerZ's Avatar
ChaosSlayerZ
Demi-God
 
Join Date: Mar 2009
Location: Umm
Posts: 1,492
Default

one of the problems with giving classes skill they don't normal;y get is that Client won't recognize them.

Yes you CAN give Druid parry and double attack - SERVER SIDE, the client won't see it, but it will work

But even giving berserk dual wield server side, won't have any effect on them, cause client will not let you equip 2 weapons no matter what the server thinks.

so it works for most things, but not for all
Reply With Quote
  #3  
Old 09-03-2011, 09:16 PM
KLS
Administrator
 
Join Date: Sep 2006
Posts: 1,348
Default

You can fill in the skillcaps file to make the client think it has those skills in many cases.
Reply With Quote
  #4  
Old 09-03-2011, 11:40 PM
Jujubeez
Fire Beetle
 
Join Date: Aug 2011
Location: Charlotte, NC
Posts: 17
Default

Which file are u referring to?
Reply With Quote
  #5  
Old 09-04-2011, 12:11 AM
lerxst2112
Demi-God
 
Join Date: Aug 2010
Posts: 1,743
Default

Pretty sure it's Skillcaps.txt in the resources directory.
Reply With Quote
  #6  
Old 09-04-2011, 12:25 AM
KLS
Administrator
 
Join Date: Sep 2006
Posts: 1,348
Default

Yes the one in the resources.
Incase anyone's interested I had these two stupid scripts floating around, the top one exports skillcaps and the bottom one imports.

Code:
use DBI;

my $db = "eqdb";
my $user = "eq";
my $pass = "eqpass";
my $host = "localhost";
my $skill_caps_file = "SkillCaps.txt";
my $source = "DBI:mysql:database=$db;host=$host";
my $dbh = DBI->connect($source, $user, $pass) || die "Could not create db handle\n";

sub skill_usable {
    my $skill_id = shift;
    my $class = shift;
    
    my $sth = $dbh->prepare("SELECT max(`cap`) FROM skill_caps WHERE `class`=$class and `skillID`=$skill_id");
    $sth->execute();
    if(my $val = $sth->fetch()) {
        if(@$val[0] == 0) {
            return 0;
        } else {
            return 1;
        }
    }
    
    return 0;
}

sub get_skill {
    my $skill_id = shift;
    my $class = shift;
    my $level = shift;
    
    my $sth = $dbh->prepare("SELECT cap FROM skill_caps WHERE `class`=$class and `skillID`=$skill_id and `level`=$level");
    $sth->execute();
    if(my $val = $sth->fetch()) {
        return @$val[0];
    }
    
    return 0;
}

open(SKILLS, ">$skill_caps_file") or die "Unable to open skills file for export: $skill_caps_file\n";

for($class_i = 1; $class_i <= 16; $class_i++) {
    for($skill_i = 0; $skill_i <= 77; $skill_i++) {
        print "($class_i, $skill_i)\n";
        if(skill_usable($skill_i, $class_i) == 1) {
            for($level_i = 1; $level_i <= 90; $level_i++) {
                my $cap = get_skill($skill_i, $class_i, $level_i);
                my $line = $class_i . "^" . $skill_i . "^" . $level_i . "^" . $cap . "^0\n";
                print SKILLS $line;
            }
        }
    }
}

close (SKILLS);
Code:
use DBI;

my $db = "eqdb";
my $user = "eq";
my $pass = "eqpass";
my $host = "localhost";
my $skill_caps_file = "SkillCaps.txt";

my $source = "DBI:mysql:database=$db;host=$host";
my $dbh = DBI->connect($source, $user, $pass) || die "Could not create db handle\n";
$dbh->do("delete from skill_caps");

open(SKILLS, "<$skill_caps_file") or die "Unable to open skills: $skill_caps_file\n";
#parse through SKILLS
while(<SKILLS>) {

	chomp();
	@s = split(/\^/);
    
    my $query = "insert into skill_caps (class, skillID, level, cap) VALUES(";
    $query .= $s[0];
    $query .= ", ";
    $query .= $s[1];
    $query .= ", ";
    $query .= $s[2];
    $query .= ", ";
    $query .= $s[3];
    $query .= ")";
    
    my $i = $dbh->do($query);
    if($i < 1) {
        printf("Error loading $skill_caps_file\n");
    }
}
Reply With Quote
  #7  
Old 09-04-2011, 10:06 AM
Jujubeez
Fire Beetle
 
Join Date: Aug 2011
Location: Charlotte, NC
Posts: 17
Default

Ok not to sound like the village idiot, but I can't find that file anywhere. I've looked in all the client folders and server folders for any text file similar to that and I can't find anything. What resources folder are u referring to? If it's the one on the client I don't have that file. If that is the case, can it be added?
Reply With Quote
  #8  
Old 09-04-2011, 10:19 AM
pfyon's Avatar
pfyon
Discordant
 
Join Date: Mar 2009
Location: Ottawa
Posts: 495
Default

I found SkillCaps.txt in SoF, but not titanium. I guess it was something they added later on (perhaps so updating/changing skills wouldn't require the customer to download a whole new updated client).

edit: that is, in Resources/SkillCaps.txt
Reply With Quote
  #9  
Old 09-04-2011, 10:32 AM
Jujubeez
Fire Beetle
 
Join Date: Aug 2011
Location: Charlotte, NC
Posts: 17
Default

Would it be compatible with the titanium client or would I need to update my client to the SoF version? Any way you can send me that file?
Reply With Quote
  #10  
Old 09-04-2011, 03:02 PM
ChaosSlayerZ's Avatar
ChaosSlayerZ
Demi-God
 
Join Date: Mar 2009
Location: Umm
Posts: 1,492
Default

yeah I am curious if this will work for T, like granting casters Dual Wield
Reply With Quote
  #11  
Old 09-04-2011, 07:20 PM
Acara
Fire Beetle
 
Join Date: Aug 2011
Posts: 2
Default

Thanks a lot for posting those scripts KLS, you saved me countless hours!
Reply With Quote
  #12  
Old 09-04-2011, 10:07 PM
Jujubeez
Fire Beetle
 
Join Date: Aug 2011
Location: Charlotte, NC
Posts: 17
Default

Hey thanks for all the help, I've made some headway. I can now see and train the new skills in the client, however they don't seem to be working. My druid doesn't ever parry or double attack. I've been looking pretty hard in the attack.cpp file but to the best I can tell it's checking the DB for whether or not a character can parry. There is some hard coded class stuff in there in the same function but it looks like that is for the NPC code and the clients check the DB. Any idea why the skills might not be working? Hope it's not also hard coded in the client.
Reply With Quote
  #13  
Old 09-04-2011, 11:49 PM
blackdragonsdg
Dragon
 
Join Date: Dec 2008
Location: Tennessee
Posts: 654
Default

I know I am missing something simple here but what is the catch to use those import/export scripts. I can tell I have something right cause the import script will delete my skill_caps table but it won't add anything to it.
What are the required perl packages/modules that I need to install? I currently have all DBD, DBI, mysql & sql packages excluding the DBIx packages. What am I missing?
Reply With Quote
  #14  
Old 09-05-2011, 12:32 AM
KLS
Administrator
 
Join Date: Sep 2006
Posts: 1,348
Default

They carry same dependency as the import and export spells scripts. DBI and mysql. You do of course need to manually set the info since i don't read from the config file or anything.
Reply With Quote
  #15  
Old 09-05-2011, 12:45 AM
trevius's Avatar
trevius
Developer
 
Join Date: Aug 2006
Location: USA
Posts: 5,946
Default

They should work basically the same as the import/export spell scripts, except you have to edit the DB info in them. You will need to run them from the command prompt something like this:

Code:
perl export_skillcaps.pl
Or, at least that is what I use on Linux.
__________________
Trevazar/Trevius Owner of: Storm Haven
Everquest Emulator FAQ (Frequently Asked Questions) - Read It!
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

   

All times are GMT -4. The time now is 11:20 PM.


 

Everquest is a registered trademark of Daybreak Game Company LLC.
EQEmulator is not associated or affiliated in any way with Daybreak Game Company LLC.
Except where otherwise noted, this site is licensed under a Creative Commons License.
       
Powered by vBulletin®, Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3