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

Development::Feature Requests Post suggestions/feature requests here.

Reply
 
Thread Tools Display Modes
  #1  
Old 10-25-2008, 08:15 AM
trevius's Avatar
trevius
Developer
 
Join Date: Aug 2006
Location: USA
Posts: 5,946
Default Requested Change to the prereq_skill field in altadv_vars table

Well, after failing to properly add some new AAs and accidentally breaking many AAs so they couldn't be trained due to Requirement issues, I finally figured out how the prereq_skill field works in the altadv_vars table. The problem with it is that currently if you add any AAs to that table, you have to update every AA that uses a requirement higher than the line number that the AA you added is in.

AAs are ordered by the skill_id field. And, the prereq_skill field actually uses the line number in the table, not any actual field data from the table. So, if you add an AA with skill_id of 225 and it actually goes in at line 100 in the table, then in order to set another AA to require that one, you must set the prereq_skill field to 100 in the AA you want to require the one you added before.

The problem with this is that there are no line number in the table, so to find out what to set the prereq_skill field to, you have to COUNT each row until you get to the one you want it to require and that is the number.

An even worse problem with this system is that if you add any new AAs in the table, it will bump the line numbers on any AAs that come after it, which throws off the prereq_skill field for anything requiring an AA higher than the one you added. This means that anytime you add an AA, you have to increment all prereq_skills higher than the one you added by 1 for them to align properly again.

If possible, I propose a change to this system. Either add in an incrementing ID number field that gets added to for each new AA, or probably the best solution is to set the prereq_skill field to look for the skill_id instead of the line number.
__________________
Trevazar/Trevius Owner of: Storm Haven
Everquest Emulator FAQ (Frequently Asked Questions) - Read It!
Reply With Quote
  #2  
Old 10-25-2008, 01:24 PM
ChaosSlayer
Demi-God
 
Join Date: May 2007
Posts: 1,032
Default

i second that
ANother thing. IF any of the AA actualy just a reference to some sort of Spell effect in a spell file, those spell ID# should not be hardcoded. Instead they should be put into a separate table where each such AA can be assigned a spell ID#, and later can be changed to something else by choice wihout affecting any of the server hardcode
Reply With Quote
  #3  
Old 10-25-2008, 04:03 PM
KLS
Administrator
 
Join Date: Sep 2006
Posts: 1,348
Default

Code:
SET @idindex = 0;
SELECT skill_id, name, (@idindex:=@idindex+1) FROM altadv_vars ORDER BY skill_id ASC;
Works on 5.0 not sure about other mysql vers.
Reply With Quote
  #4  
Old 10-26-2008, 06:07 PM
AndMetal
Developer
 
Join Date: Mar 2007
Location: Ohio
Posts: 648
Default

Quote:
Originally Posted by ChaosSlayer View Post
IF any of the AA actualy just a reference to some sort of Spell effect in a spell file, those spell ID# should not be hardcoded. Instead they should be put into a separate table where each such AA can be assigned a spell ID#, and later can be changed to something else by choice wihout affecting any of the server hardcode
You mean like the aa_effects table?
__________________
GM-Impossible of 'A work in progress'
A non-legit PEQ DB server
How to create your own non-legit server

My Contributions to the Wiki
Reply With Quote
  #5  
Old 10-27-2008, 12:00 AM
MNWatchdog
Hill Giant
 
Join Date: Feb 2006
Posts: 179
Default

Wow..gross.

KLS, yes, there may be a way to fix it with a SQL command, but doesnt mean it shouldnt be done better in the first place.

Plus, having to execute that SQL command every time you want to modify the AA table is just poor implimentation.
Reply With Quote
  #6  
Old 10-27-2008, 12:10 AM
trevius's Avatar
trevius
Developer
 
Join Date: Aug 2006
Location: USA
Posts: 5,946
Default

Ya, it is unfortunate, but it looks like the indexing thing is mandated by the client, not something the emu team decided to put in for fun :P

AndMetal has already made a suggestion of a work-around for it here:

http://www.eqemulator.net/forums/showthread.php?t=26638
__________________
Trevazar/Trevius Owner of: Storm Haven
Everquest Emulator FAQ (Frequently Asked Questions) - Read It!
Reply With Quote
  #7  
Old 10-27-2008, 12:11 AM
ChaosSlayer
Demi-God
 
Join Date: May 2007
Posts: 1,032
Default

Quote:
Originally Posted by AndMetal View Post
You mean like the aa_effects table?

I must have been looking at the wrong table lol.

so if I change price for AA - will that actualy work?
Cuase I tried giving some AA (like Innate Agilty) more ranks but produced some weird errors/effects with client
Reply With Quote
  #8  
Old 10-27-2008, 12:33 AM
trevius's Avatar
trevius
Developer
 
Join Date: Aug 2006
Location: USA
Posts: 5,946
Default

If you want to add more ranks, you would need to add more ranks in the source code as well. There is no way around that. The actual effects that the AAs have all need to be hard coded into the source in appropriate areas. There is no way to put that stuff into a table. The only rank editing you can do from a table is lowering it. You can adjust the cost of the AAs, the requirements for AAs, and even the classes that can get AAs from the tables, but that is about it without going into the source and making changes.
__________________
Trevazar/Trevius Owner of: Storm Haven
Everquest Emulator FAQ (Frequently Asked Questions) - Read It!
Reply With Quote
  #9  
Old 10-27-2008, 12:33 AM
AndMetal
Developer
 
Join Date: Mar 2007
Location: Ohio
Posts: 648
Default

Quote:
Originally Posted by MNWatchdog View Post
Wow..gross.

KLS, yes, there may be a way to fix it with a SQL command, but doesnt mean it shouldnt be done better in the first place.

Plus, having to execute that SQL command every time you want to modify the AA table is just poor implimentation.
I would recommend reading my post in the Development::Development forum, also mentioned by trevius.

Basically, this isn't something we do, it's something the client does: the client counts them in the order it receives them, and uses the count as an ID. Since we don't ORDER BY when we send the AA info, that's why it ends up putting the newest AAs at the end of the pack.

All the query KLS mentions does is sets an arbitrary variable (idindex) in the database & adds 1 to it when it gets a result. This allows us to determine what the row "number" would be, which corresponds to the ID the client uses.

A query like this
Quote:
Originally Posted by AndMetal View Post
Code:
SET @row = 0;
SELECT 
	a.cost, 
	a.max_level, 
	a.hotkey_sid, 
	a.hotkey_sid2, 
	a.title_sid, 
	a.desc_sid, 
	a.type, 
	COALESCE(
		(
		SELECT 
			prereq_index_num 
		FROM 
			(
			SELECT 
				@row := @row + 1 AS prereq_index_num 
			FROM 
				altadv_vars
			) AS prereq_conv 
		WHERE 
			prereq_skill = prereq_index_num
		), 
		0)  AS prereq_skill_index, 
	a.prereq_minpoints, 
	a.spell_type, 
	a.spell_refresh, 
	a.classes, 
	a.berserker, 
	a.spellid, 
	a.class_type, 
	a.name, 
	a.cost_inc 
FROM 
	altadv_vars a 
;
should get us around that issue, which is part of my proposed solution listed in the other thread.

Quote:
Originally Posted by ChaosSlayer View Post
I must have been looking at the wrong table lol.

so if I change price for AA - will that actualy work?
Cuase I tried giving some AA (like Innate Agilty) more ranks but produced some weird errors/effects with client
There's actually several reasons why modifying Innate Agility wouldn't work.

Right now, aa_effects is only used to let the client know about additional effects, such as additional stats. It's like a spell, using an effect ID & base/base2 values. Unfortunately, it's only used client-side at this point. I've been working some on making it used by server-side calculations (see SVN Revision 79), but a lot of stuff has to be changed in the AA calculations throughout the rest of the source to not look at the AA value, and use values from aabonuses instead. Not only that, but I'm concerned that the current functions that I do have in the source may cause an issue with the database based on the amount of queries needed to pull the info from the database (1600+ each time we have to calculate stats).

Even if you didn't really mess with the aa_effects table, you could still calculate it server side. However, if you increase the max_level in altadv_vars, the ID it uses is then going to overwrite whatever is above it. Specifically, its skill_id is 12 with 1 point, 16 with 5 points. Make it 6 points, the ID becomes 17, which is being used by Innate Dexterity, so it wouldn't work.

The bottom line is you would need to create a new AA with a skill_id higher than any currently used (somewhere above 1627, which is Selo's Enduring Cadence). However, you would still need to update the dbstr_us.txt file for the Titanium client to display info about the AA.
__________________
GM-Impossible of 'A work in progress'
A non-legit PEQ DB server
How to create your own non-legit server

My Contributions to the Wiki
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 06:33 AM.


 

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