Welcome!

Join our community of MMO enthusiasts and game developers! By registering, you'll gain access to discussions on the latest developments in MMO server files and collaborate with like-minded individuals. Join us today and unlock the potential of MMO server development!

Join Today!

Skills Research

Junior Spellweaver
Joined
Oct 15, 2020
Messages
152
Reaction score
184
My research is based on Bloodharvest.
---Skills Basics:

*Races: 1-Human 2-Elves 3-Dwarf 4-Stoneman 5-Kindred 6-Lycan
*Occupation: 1-Warrior 2-Protector 3-Assassin 4-Marksman 5-Mage 6-Priest 7-Vampire 8-Bard 9-Reaper

Warriors can be {Human & Elf}
Protectors can be {Stoneman}
Assassins can be{Human & Kindred & Lycan}
Marksmans can be {Dwarf}
Mages can be {Human & Kindred}
Priest can be {Human & Elf & Lycan}
Vampire can be {Kindred}
Bard can be {Elf}
Reaper can be {Kindred & Lycan}

->At most 3 races can be used per occupation.
->Each race has its own skills.h and animation.
->buff_str.txt ->Gives number of statefilters.

---Types of Skills:
*Racial skills
*Soulforce skills
*Anima skills
*Occupation Core skills
*Talents
*Soulpower bonuses & Runes Bonuses
*Job Skills
*Monsters skills
*Pet Skills:[Mana Consumption of Pet skills increase with the level of the pet]
---SKILLTOME_ESSENCE[Structure_11 in element]:
Let's work on Iceblade for priest:
Priests can be {Human & Elf & Lycan}
Code:
learn_skill(0)->skill_id; //skill ID of the core skill to learn!
learn_skill(0)->skill_level;    //Skill level to learn //Lv 7
learn_skill(0)->require_skill_id; //Ice Blade Strike=175 (Human version)
learn_skill(0)->require_skill_level;    //Lv 7-1= Lv6

learn_skill(1)->skill_id; //skill ID of the core skill to learn!
learn_skill(1)->skill_level;    //Skill level to learn //Lv 7
learn_skill(1)->require_skill_id; //Ice Blade Strike=2014 (Elf version)
learn_skill(1)->require_skill_level;    //Lv 7-1= Lv6    //required skill level

learn_skill(2)->skill_id; //skill ID of the core skill to learn!
learn_skill(2)->skill_level;    //Skill level to learn //Lv 7
learn_skill(2)->require_skill_id; //Ice Blade Strike=4260 (Lycan version)
learn_skill(2)->require_skill_level;    //Lv 7-1= Lv6
Races: 1-Human 2-Elves 3-Dwarf 4-Stoneman 5-Kindred 6-Lycan
->As you can see the same order is followed. {Human,Elf,Lycan}

---Skills Description:[This links FW clients with Server side skills.]
Script/skillstr/ {This Folder may be removed}
Script/skillstr.lua {This File may be removed}
Skills description are from Script/skill/skillstr.lua
Example: SkillDesc[4761].strname = "Holy Light Melody"

When a Skill description is missing ,it looks like this:


2466=Rampage Elemental talent for Elf Warrior.
Code:
------------------------------Elf Warrior Elemental:
SkillDesc[2466].strname = "Rampage"
SkillDesc[2466].strUsedesc = "Frenzy Stance increases the Attack bonus granted by %.1f%% plus %d."

->Skillstr.lua allows you to easily find the skills you are looking for in FW/wskill/skills

->Should the skillstr.lua be broken,the client wouldn't even be able to load.
It's even more fragile than shopdir.lua because it contains too many lines.

---Custom Skillstr.lua(260):
I'am posting my customized version of skillstr.lua that I have remade manually for Bloodharvest.
I like to use Single/Multi-line comments to sort luas.
I intend to work on Skillstr.lua on other versions whenever I have time.

My custom file is in this folder:


---BONUS:
Thanks to a friend,I have discovered that Game formulas and mechanisms are actually in wskill unexpectedly:
skillwrapper.cpp -> SkillWrapper::AttackDamage
->I'm trying to understand game systems in depth and slowly prepare my own dmg estimation sheet.

How fun would it be to understand all the systems and perhaps make our own formulas in the future!

I'am slowly exploring the game in depth along with some friends.
I'am trying to spread the acquired knowledge within the community so that we can increase our level and do insane things in the future!
 
Last edited:
Newbie Spellweaver
Joined
Nov 11, 2015
Messages
36
Reaction score
14
I see you've grown from the last time I worked with you, good job *claps*

I will teach you how to add your own skills to the game as a reward for your dedication and hard work on this and your compiler thread!

you will need to pay extremely close attention to this,

animations are handled purely client sided sooooo you can ignore most the animation data in skill###.h unless you want the animations and have the client source and compiler in hand already.

first off! filters! oh yes filters! these are extremely valuable and are called from the server by the client and use the file in configs.pck/buff_icon.txt, Buff_str.txt and Buff_type.txt

Lets go over these files one at a time to explain what each of these does shall we?

Buff_icon.txt --> this calls the filter ID and then places a corresponding icon dds image to what it is, for example
Code:
4537  "任务_克莱蒙多无忧卡.dds"
This calls my custom filter 4537 and applies the Eryda VIP dds image to it

Buff_str.txt ---> This applies the same as Buff_icon.txt but uses it to display what it does for example
Code:
4537 "^9000ff^O057Reborn V.I.P.\r
^ff7502^O001Welcome, Warrior!\r
^ffffff^O001You have the following privileges:\r
[Upgrade] Enhanced Memory Berry consumption.\r
[Convenient Service] Town Portal cooldown reduced. Access to the VIP Shop.\r
[Gems] Increased speed and optimization of Gem Reforging.\r
[Exclusive Drop Rate] You Gain Double the Drops!\r
[Luck Visits] Able to receive Champion every day, as will as other benefits."

Buff_type.txt --> this one is arguably the most important, this tells the game what type of buff it is, 0 being a buff and 1 being a debuff

Now you want to add your own filters? they are pretty straight forward but with some complications, you MUST ADD them to wskill\filters\filters.h and filterstubb.cpp, you must assign the filters themselves a new filterID and internal server ID for the compiler to work

Now onto the Skills, this part is really difficult, i would get accustomed to all the basic skills in the game and their ID's before you go poking around in them, you could have some pretty serious consequences from modifying such. but when your ready to proceed lets go over a pretty simple skill!

Code:
#ifndef __CPPGEN_GNET_SKILL_1
#define __CPPGEN_GNET_SKILL_1
namespace GNET
{
#ifdef _SKILL_SERVER
class Skill1:public Skill
{
public:enum    { SKILL_ID = 1 };
Skill1():Skill(SKILL_ID){}
};
#endif
class Skill1Stub:public SkillStub
{
public:
#ifdef _SKILL_SERVER
class State1:public SkillStub::State
{
public:
int GetTime(Skill * skill) const{return (int)(0);}
void Calculate(Skill * skill) const{skill->SetDamagetype(7);skill->SetToukonratio(0);skill->GetPlayer()->SetPerform(1);}};

all of this data here identifies the skill, the skill damage type, the Toukonratio which i think is wrath? idk its been a hot minute but this last part >SetPerform 1 is what enables it, if the skill says SetRatio this is the attack in multiplication, you can verify whether or not the code is doing its job by cross checking against script.pck/skill/skilldec##.lua with their ID from script\skill\skillstr.lua, those %.f%% is pulled directly from those lua files and the server acts on it, you can also modify cooldown times and mana and a whole mess of items in those lua files but the code MUST match in the server speaking of which!

lets talk about the next set of skill data

Code:
icon = "";
[B]race = 1;
occupation = 1;
type = 1;
usetype = 1;[/B]
origintype = 3;
showtype = 1;
timetype = 2;
barshow = 1;
extraflag = 0;
movemode = 0;
maxlevel = 200;
autoattack = 0;
rangetype = 0;
doenchant = false;
dobless = false;
selfcondition = 0;
delaymode = 1;
targettype = 0;
delaytime = 0;
flyspeed = 0;
statecondition = 0;
exclusivestatecondition = 0;
monster = "";
othercondition = 0;
no_fight_mount_canuse = 0;
eventflag = 0;
passive_filter_id = 0;

I've highlighted the most basic parts which you need to pay attention to if you plan to race / class lock the skill, this all details what is what in terms of flags and such, most of this is reverse engineered if you can read C++ code fairly well

this next part is tricky
Code:
[B]float GetMinPraydistance(Skill * skill) const{return (float)( 0);}
float GetMaxPraydistance(Skill * skill) const{return (float)( skill->GetRange()+2);}[/B]
float GetCastdistance(Skill* skill) const{return (float)(skill->GetRange());}
[B]int GetExecutetime(Skill* skill) const{return (int)(0);}[/B]

for our purposes here i have highlighted the most important, GetMin and GetMaxPraydistance tells the server and client how far the skill can reach, GetExecutetime tells it how fast it can cast in milliseconds

additionally once you've become accustomed at this point, you will notice theres alot more in that section such as GetCooldowntime, you will need to be GOOD at math at this point otherwise you will run into severe problems such as giant unintended errors like Bash having a cooltime of 2 seconds or 20 minutes !

Now the Juicy Parts!

Code:
#ifdef _SKILL_SERVER
bool StateAttack(Skill* skill) const{
    StateFilter646 *filter1 = new StateFilter646(skill->GetVictim()->GetObject(), 0);
     if(filter1->GetStub(0))        filter1->GetStub(0)->SetData(5*skill->GetT1());
    if(filter1->GetStub(1))        filter1->GetStub(1)->SetData(skill->GetT1()==5?0.01:0);
    filter1->SetTimeParam((int)(20000)); 
    filter1->SetSucceedParam((int)(skill->GetT1()==0?0:(50+20*skill->GetT3()))); 
    skill->GetVictim()->AddFilter(filter1);

This is extremely dependant on what the FilterID and filter is doing, so if you want to apply a bleed then you must take a skill that already does this and go look at its filter and pay very close attention to what the filter is doing, the code thats already there will teach you everything you need to know about how it works and what its doing, this is how i originally patched the healbot and tons of other exploits when i ran with RebornFW

Additionally you will need to add the custom skills if you plan to make your own to the skillstub###.cpp in wskill\skills

I hope you and whoever you are working with values this knowledge as much as i do and make something great from this gift! Take Care and Have Fun!
 
Last edited:
Junior Spellweaver
Joined
Oct 15, 2020
Messages
152
Reaction score
184
Client Source is my next goal to figure out.
I'm slowly trying to make my own Client Compiler in order to Compile the Sources.
 
Last edited:
Newbie Spellweaver
Joined
Nov 11, 2015
Messages
36
Reaction score
14
Client Source is my next goal to figure out.
I'm slowly trying to make my own Client Compiler in order to Compile the Sources.

i'll give you your 3 main components to start with

Windows 7 Chinese lang install <-- this install part is REQUIRED, because the source code is in zn-CH mainland chinese you will need this as the base to start with =)

MS-VC 6.0 with VSS <-- this is also extremely important as the source code is extremely ancient

alot of patience... you will need to unstand standard C++ lib requirements, and how windows microsoft visual studio behaves with code compile and installing, you may need to patch it with some arbitrary non-sense
 
Junior Spellweaver
Joined
Oct 15, 2020
Messages
152
Reaction score
184
The following was extracted from Wskill/skill/professionrule.h
It holds occupation IDs!
occupation = 1->Occupation 1 //Warrior
occupation = 2->Occupation 2 //Protector
occupation = 3->Occupation 3 //Assassin
occupation = 4->Occupation 4 //Marksman
occupation = 5->Occupation 5 //Mage
occupation = 6->Occupation 6 //Priest
occupation = 7->Occupation 7 //Kindred
occupation = 8->Occupation 8 //Bard
occupation = 9->Occupation 9 //Bloodraider
occupation = 10->Occupation 10 //Tormentor
occupation = 11->Occupation 11 //Warden
occupation = 12->Occupation 12 //Ranger
occupation = 13->Occupation 13 //Dragoon
occupation = 14->Occupation 14 //Juggernaut

occupation = 53->Talent Occupation 1 //Warrior
occupation = 54->Talent Occupation 2 //Protector
occupation = 55->Talent Occupation 3 //Assassin
occupation = 56->Talent Occupation 4 //Marksman
occupation = 57->Talent Occupation 5 //Mage
occupation = 58->Talent Occupation 6 //Priest
occupation = 59->Talent Occupation 7 //Kindred
occupation = 60->Talent Occupation 8 //Bard
occupation = 61->Talent Occupation 9 //Bloodraider
occupation = 62->Talent Occupation 10 //Tormentor
occupation = 63->Talent Occupation 11 //Warden
occupation = 64->Talent Occupation 12 //Ranger
occupation = 65->Talent Occupation 13 //Dragoon
occupation = 66->Talent Occupation 14 //Juggernaut
->Normally 65 & 66 should be for Dragoon & juggernaut
In reality it's currently for:
occupation = 65->SECT_MASTER_SKILL(Master Skills)
occupation = 66->SECT_DISCIPLE_SKILL(Apprentice Skills)

occupation=43 Monsters
occupation=44 Universal
occupation=45 Task
occupation=46 Academic
occupation=47 Social contact
occupation=48 Internal blessing
occupation=49 Mercenary(Pets)
occupation=50 Soulforce skills
occupation=51 Battlefield
occupation=52 Production
occupation=67 Activity
occupation=68 Faith in Gods and Demons(Soulpower)
 
Last edited:
Junior Spellweaver
Joined
Oct 15, 2020
Messages
152
Reaction score
184
Statetype,English_name
1 warrior
2 protector
3 assassin
4 Musket
5 Mage
6 Priest
7 battlefield
8 Universal
9 Task
10 Academic
11 social contact
12 Internal blessing
13 Mercenary
14 Soul skills
15 Minor warrior
16 Minor knight
17 Minor Assassin
18 Minor musket
19 Minor Master
20 Minor Pastor
21 Production
22 Occupational general status
23 Gorefiend
24 poet
25 monster
26 Activity
27 Faith in Gods and Demons
28 Blood Raider
 
Experienced Elementalist
Joined
Nov 1, 2015
Messages
280
Reaction score
175
Mistigri,

I'm proud of you. Keep up the good work.

-Fyyre

indeed, Mist is coming along nicely, if he doesn't burn out i see him becoming the new #1 dev someday! @Fyyre thank you again for everything you've given us, and please disregard my last two private messages, Mist has nearly figured out all of that. Also @Mistigri you should post your screenshots and all that you showed me on discord about what you've figured out with the skill sql.
 
Junior Spellweaver
Joined
Oct 15, 2020
Messages
152
Reaction score
184
I mainly managed to get it imported in FC2 by installing MySQL in FC2 server compiler.
That's doable through modifying yum repository and make it use the Fedora archive website
/etc/yum.conf

Source->
I can try to import and edit the SQL files through Notepad+ and fix syntax errors.
I still feel like names become gibberish though and that I have problems with Chinese encodings.
When I change the file enconding to Simplified Chinese in Notepad+ and use google translate in the SQL archives,I see that a lot of stuff have become non-sense.
It's likely that I need to set up weditor or use wskill/gen next.
I figured out some linux commands and stuff.
Code:
[B]#install mysql-server package:
yum install mysql-server

#Restart mysql service:
service mysqld restart

#Enter mysql panel:
mysql -u root -p

#Create Database:
mysql> CREATE DATABASE skilldev; 

#Give privileges to localhost:
mysql> GRANT ALL PRIVILEGES ON skilldev.* TO 'localhost'@'localhost'; 
mysql> FLUSH PRIVILEGES;

#Import SQL archives:
mysql -u localhost -p skilldev < skill.sql

#Export SQL archives:
mysqldump -u localhost -p skilldev > test.sql
[/B]
FC4 could import the SQL without editing it though.
After all,original SQL archives have a MySQL version that's higher than it should be in FC2.
I'm still trying to figure out how to extract the SQL archives.It's one of my goals.
One of my current weaknesses is my lack of familiarity with linux.I only started to use it after I become a FW Developer.It takes a lot of time to find solutions when using linux.
I'm still trying to figure out stuff.I try stuff here and there.
 
Last edited:
Junior Spellweaver
Joined
Oct 15, 2020
Messages
152
Reaction score
184
Special thanks to both @Fyyre and @waxyyfe123 ,I wouldn't have gone far without their help.
I extracted the publicly shared SQL archives in Fedora Core 4 Server version (chinese simplified) in which mysql was installed from the packages list.
I can't figure out how to build gen.jar yet in a way the SQL archives gets extracted properly.
I can't upload a SQL extractor VM unless I fully figure it out.
---Skills & Filters only:
*v253:

*v260:


---Skills source:
*wskill v253:

*wskill v260:


--Basics:
Code:
#enter mysql monitor
mysql -u root -p

#Create database skill
CREATE DATABASE skill;

Extract Java(Gift from Fyyre) in /usr:(it has to be put in /usr/java)


->Overall,we are using gen.jar (Java program in order to export skills & filters from an imported sql archive) provided by fyyre:

->Our database is skilldev from /wskill/gen/src/skilleditor/service/ConnectionService.java
Code:
                        connection = DriverManager.getConnection("jdbc:mysql://localhost:3306/skilldev?user=root", pr);
--mysql_link.sh
Code:
#Dynamic link to MYSQL:
ln -s /var/lib/mysql

#Dynamic link to skilldev Database:
ln -s /var/lib/mysql/skilldev
--build.sh(script to generate gen.jar)
Code:
export LANG=zh_CN
export LC_ALL=zh_CN
export PATH=$PATH:/usr/java/jdk1.5.0_10/bin
export JAVA_HOME=/usr/java/jdk1.5.0_10
export CLASSPATH=.:/usr/java/jdk1.5.0_10/lib/dt.jar:/usr/java/jdk1.5.0_10/lib/tools.jar
/usr/java/apache-ant-1.6.2/bin/ant -buildfile build.xml &> build.log
--gen.sh(Script to use gen.jar program and execute it):
Code:
#!/bin/bash
HOME=/root/wskill_20131107

#Restart MYSQL
service mysqld restart

#Create required directories before SQL extraction:
[ -d $HOME/gen/skills ] || mkdir $HOME/gen/skills
[ -d $HOME/gen/filters ] || mkdir $HOME/gen/filters

#Import skill.SQL from wskill/gen
cd $HOME/gen
mysql -u root -p skilldev < skill.sql >&$HOME/gen/import.log

#Generate Skills & Filters(gen.jar must be already compiled)
/usr/java/jdk1.5.0_10/bin/java -jar gen.jar ../skill/skill.og > gen.log 2>&1

#Copy skills& filters $HOME/gen from into $HOME
rsync -I -c skills/* ../skills
rsync -I -c filters/* ../filters

#Create an archive:
cd $HOME
tar -czvf skills.tar.gz $HOME/skills
tar -czvf filters.tar.gz $HOME/filters

#clear screen
clear
 
Last edited:
Newbie Spellweaver
Joined
Apr 27, 2021
Messages
62
Reaction score
17
I don't know skills, fiters and other txt files. How about importing them into the database
 
Junior Spellweaver
Joined
Oct 15, 2020
Messages
152
Reaction score
184
wskill is used to compile the skills library that is commonly known as libskill.so
It determines the game mechanics such as how damage gets calculated etc.
You need to gather skills & filters folders for the specific version or date you are working on.
Higher versions to tend to have more parameters and newer functions that get added that are read by gs.
Also it's undeniable that talents and skills gets adjusted from one expansion to another.

Overall skills changes requires coordinated edits in both server and client.
In order to truly change skills you need to at least consider the following points:
1)Deal with skills library at the level of libskill.so & Recompile gs along the way.
2)Recompile the SMElementSkill project or ElementSkill.DLL that is used by the client executable.
3)Adjust some luas related to skills description when needed in script/skillstr.

It's possible to start with the big picture then go in depth.
Everything is tangled and interconnected.That's why it takes time to properly understand things.
 
Back
Top