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

09-03-2011, 06:22 PM
|
Fire Beetle
|
|
Join Date: Aug 2011
Location: Charlotte, NC
Posts: 17
|
|
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?
|
 |
|
 |

09-03-2011, 08:16 PM
|
 |
Demi-God
|
|
Join Date: Mar 2009
Location: Umm
Posts: 1,492
|
|
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
|

09-03-2011, 09:16 PM
|
Administrator
|
|
Join Date: Sep 2006
Posts: 1,348
|
|
You can fill in the skillcaps file to make the client think it has those skills in many cases.
|

09-03-2011, 11:40 PM
|
Fire Beetle
|
|
Join Date: Aug 2011
Location: Charlotte, NC
Posts: 17
|
|
Which file are u referring to?
|

09-04-2011, 12:11 AM
|
Demi-God
|
|
Join Date: Aug 2010
Posts: 1,742
|
|
Pretty sure it's Skillcaps.txt in the resources directory.
|
 |
|
 |

09-04-2011, 12:25 AM
|
Administrator
|
|
Join Date: Sep 2006
Posts: 1,348
|
|
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");
}
}
|
 |
|
 |

09-04-2011, 10:06 AM
|
Fire Beetle
|
|
Join Date: Aug 2011
Location: Charlotte, NC
Posts: 17
|
|
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?
|

09-04-2011, 10:19 AM
|
 |
Discordant
|
|
Join Date: Mar 2009
Location: Ottawa
Posts: 495
|
|
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
|

09-04-2011, 10:32 AM
|
Fire Beetle
|
|
Join Date: Aug 2011
Location: Charlotte, NC
Posts: 17
|
|
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?
|

09-04-2011, 03:02 PM
|
 |
Demi-God
|
|
Join Date: Mar 2009
Location: Umm
Posts: 1,492
|
|
yeah I am curious if this will work for T, like granting casters Dual Wield
|

09-04-2011, 07:20 PM
|
Fire Beetle
|
|
Join Date: Aug 2011
Posts: 2
|
|
Thanks a lot for posting those scripts KLS, you saved me countless hours!
|

09-04-2011, 10:07 PM
|
Fire Beetle
|
|
Join Date: Aug 2011
Location: Charlotte, NC
Posts: 17
|
|
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.
|

09-04-2011, 11:49 PM
|
Dragon
|
|
Join Date: Dec 2008
Location: Tennessee
Posts: 656
|
|
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?
|

09-05-2011, 12:32 AM
|
Administrator
|
|
Join Date: Sep 2006
Posts: 1,348
|
|
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.
|

09-05-2011, 12:45 AM
|
 |
Developer
|
|
Join Date: Aug 2006
Location: USA
Posts: 5,946
|
|
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.
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -4. The time now is 03:32 AM.
|
|
 |
|
 |
|
|
|
 |
|
 |
|
 |