|
|
 |
 |
 |
 |
|
 |
 |
|
 |
 |
|
 |
|
Development::Development Forum for development topics and for those interested in EQEMu development. (Not a support forum) |

03-03-2005, 02:29 AM
|
 |
Hill Giant
|
|
Join Date: May 2003
Posts: 176
|
|
http://members.dodo.net.au/~mollymillions/Skills.xls
*Edit* -Added code to create table. It's going to take quite a while to locate all the 65+ caps.
Last edited by mollymillions; 03-05-2005 at 05:59 AM..
|

03-03-2005, 05:08 AM
|
Developer
|
|
Join Date: Jul 2004
Posts: 773
|
|
gunna be a lot of work still to turn that into a db table like we need, but its a good start.
|
 |
|
 |

03-03-2005, 06:24 AM
|
Dragon
|
|
Join Date: Feb 2002
Posts: 583
|
|
Here you go, mostly accurate up to PoP table, also table of racial skills.
http://www.wintersroar.com/files/caps.zip
Function for it here:
Code:
int8 Database::GetSkillCap(int8 skillid, int8 in_class, int16 in_level)
{
int8 skill_level = 0, skill_formula = 0;
int16 base_cap = 0, skill_cap = 0, skill_cap2 = 0, skill_cap3 = 0;
char errbuf[MYSQL_ERRMSG_SIZE];
char *query = 0;
int32 affected_rows = 0;
MYSQL_RES *result;
MYSQL_ROW row;
//Fetch the data from DB.
if (RunQuery(query, MakeAnyLenString(&query, "SELECT level, formula, pre50cap, post50cap, post60cap from skillcaps where skill = %i && class = %i", skillid, in_class), errbuf, &result, &affected_rows))
{
if (affected_rows != 0)
{
row = mysql_fetch_row(result);
skill_level = atoi(row[0]);
skill_formula = atoi(row[1]);
skill_cap = atoi(row[2]);
if (atoi(row[3]) > skill_cap)
skill_cap2 = (atoi(row[3])-skill_cap)/10; //Split the post-50 skill cap into difference between pre-50 cap and post-50 cap / 10 to determine amount of points per level.
skill_cap3 = atoi(row[4]);
}
delete[] query;
mysql_free_result(result);
}
if (skill_cap == 0) //Can't train this skill at all.
return 255; //Untrainable
if (in_level < skill_level)
return 254; //Untrained
//Determine pre-51 level-based cap
if (skill_formula > 0)
base_cap = in_level*skill_formula+skill_formula;
if (base_cap > skill_cap || skill_formula == 0)
base_cap = skill_cap;
//If post 50, add post 50 cap to base cap.
if (in_level > 50 && skill_cap2 > 0)
base_cap += skill_cap2*(in_level-50);
//No cap should ever go above its post50cap
if (skill_cap3 > 0 && base_cap > skill_cap3)
base_cap = skill_cap3;
//Base cap is now the max value at the person's level, return it!
return base_cap;
}
Just assign pp.skills to 254/255 selected from this when a character is created, and 0 to anything that isn't 254 or 255 (asides from the 5 in a melee skill).
Last edited by Wiz; 03-03-2005 at 02:29 PM..
|
 |
|
 |

03-03-2005, 01:09 PM
|
Developer
|
|
Join Date: Jul 2004
Posts: 773
|
|
hey wiz,
I had the code for this, and I looked it over, but I didnt like the way it deals with the higher level skill caps. But since im not the one programming it right now, I guess I cant really voice what I dont like, eh?
|

03-03-2005, 09:16 PM
|
Dragon
|
|
Join Date: Feb 2002
Posts: 583
|
|
Quote:
Originally Posted by fathernitwit
hey wiz,
I had the code for this, and I looked it over, but I didnt like the way it deals with the higher level skill caps. But since im not the one programming it right now, I guess I cant really voice what I dont like, eh?
|
It pretty much deals with them as live does. What's the issue with it exactly?
|

03-04-2005, 05:36 AM
|
Developer
|
|
Join Date: Jul 2004
Posts: 773
|
|
theres no issue per-se, I know it works for live-like skill caps up around level 60. I would just rather have a system that is more flexible. Allowing people to put as many differernt caps at as many different levels as they want, with whatever formula they want to use in between each milestone. Gives us better flexibility into the future, and for custom servers.
|
 |
|
 |

03-04-2005, 06:17 AM
|
Dragon
|
|
Join Date: Feb 2002
Posts: 583
|
|
Quote:
Originally Posted by fathernitwit
theres no issue per-se, I know it works for live-like skill caps up around level 60. I would just rather have a system that is more flexible. Allowing people to put as many differernt caps at as many different levels as they want, with whatever formula they want to use in between each milestone. Gives us better flexibility into the future, and for custom servers.
|
Could always do something like:
table: (skillid, class, race, level, max)
And code that takes the entry >= your skilllevel and the entry closest to your level and < your level. Calculate the difference between the two caps / the difference between the two levels.
So you have a skill with a cap of 10 at level 10 and a cap of 50 at level 20. You can gain 1 in it per level up to 10, then 4 per level up to 20, so your cap at level 12 would be 18.
I'm not really inclined to split my table entries or do the writing-up for it though :P
Last edited by Wiz; 03-04-2005 at 02:23 PM..
|
 |
|
 |

03-04-2005, 02:29 PM
|
 |
Hill Giant
|
|
Join Date: May 2003
Posts: 176
|
|
This is minor, but code needs to handle skill values > 254.
|
Thread Tools |
|
Display Modes |
Hybrid Mode
|
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 09:29 PM.
|
|
 |
|
 |
|
|
|
 |
|
 |
|
 |