View Single Post
  #7  
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