Go Back   EQEmulator Home > EQEmulator Forums > Development > Development::Development

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

Reply
 
Thread Tools Display Modes
  #1  
Old 02-28-2005, 04:12 AM
mollymillions's Avatar
mollymillions
Hill Giant
 
Join Date: May 2003
Posts: 176
Default

OK, i will get all the data together for starters.
Reply With Quote
  #2  
Old 03-03-2005, 02:29 AM
mollymillions's Avatar
mollymillions
Hill Giant
 
Join Date: May 2003
Posts: 176
Default

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..
Reply With Quote
  #3  
Old 03-03-2005, 05:08 AM
fathernitwit
Developer
 
Join Date: Jul 2004
Posts: 773
Default

gunna be a lot of work still to turn that into a db table like we need, but its a good start.
Reply With Quote
  #4  
Old 03-03-2005, 06:24 AM
Wiz
Dragon
 
Join Date: Feb 2002
Posts: 583
Default

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..
Reply With Quote
  #5  
Old 03-03-2005, 01:09 PM
fathernitwit
Developer
 
Join Date: Jul 2004
Posts: 773
Default

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?
Reply With Quote
  #6  
Old 03-03-2005, 09:16 PM
Wiz
Dragon
 
Join Date: Feb 2002
Posts: 583
Default

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?
Reply With Quote
  #7  
Old 03-04-2005, 05:36 AM
fathernitwit
Developer
 
Join Date: Jul 2004
Posts: 773
Default

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.
Reply With Quote
  #8  
Old 03-04-2005, 02:29 PM
mollymillions's Avatar
mollymillions
Hill Giant
 
Join Date: May 2003
Posts: 176
Default

This is minor, but code needs to handle skill values > 254.
Reply With Quote
Reply

Thread Tools
Display Modes

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 09:03 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 - 2025, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3