Ability Data Type Population?

mistahmikey

Active Member
Was playing around with EQ2Bot, and noticed the initialization code goes though a very odd sequence of repeatedly opening/closing the knowlege book in what appears to be an attempt to completely populate Ability so that spells pulled from the spell list xml files can be found. Can someone explain to me why this seemingly "hit or miss" method for getting a complete list of abilities must be used?
 

mistahmikey

Active Member
Excuse my ignorance, but would you mind briefly explaining why is it the safest way? Is the Ability data structure repopulated each time the knowledge book is opened? If so, is every ability in existence at the time it is opened put into Ability? If not, why are multiple openings necessary to accomplish this? Just trying to understand the nuances of the interface so I can write reliable scripts.

Please understand, I have just started looking into this product. I have searched the net and wiki to try to understand this stuff myself, and have answered many of my questions that way, but I have been unable to find information about everything I am unclear about. So if there is a better place for me to look, please let me know.

Thanks for your help.
 

Kannkor

Ogre
Was playing around with EQ2Bot, and noticed the initialization code goes though a very odd sequence of repeatedly opening/closing the knowlege book in what appears to be an attempt to completely populate Ability so that spells pulled from the spell list xml files can be found. Can someone explain to me why this seemingly "hit or miss" method for getting a complete list of abilities must be used?
A lot depends on how you are using / accessing things.

In short, the client knows VERY little about your abilities. It doesn't even know their names until it needs to know them (say you hover over an ability, or examine it).

The idea of opening the knowledge book helps to get some abilities to your client..

I took the route of using ability IDs (which are always on the client and never have to talk to the server).
 

Amadeus

The Maestro
Staff member
Right -- if you change your scripts to utilize (or use a script that utilizes) IDs exclusively, then you wouldn't have to do any of this. The problem is that the client only knows what it NEEDS to know. So, until you actually use an ability, the "name" of it (and some other things) are not readily available to the client.

There are other ways to accomplish the population of this 'extra' information; however, the trick we do with opening the knowledge book seems to work for now.

I should also point out that the scripts DO check every time to see if the information has yet appeared, so it doesn't just open/close randomly. You'll notice that if you restart eq2bot after playing a while it may not even do it at all.
 

Kannkor

Ogre
Ah, now it makes sense. So then - is there someplace I can find an Ability ID reference?
Care to be more specific..? If you mean, one big huge chart that contains every ID and name, there isn't one. I personally just have a script compile all of their spells and IDs, then re-run it if I ever get new abilities (be, level up, or get AA). Then I store them in an XML file.
 

mistahmikey

Active Member
Yep, was wondering if this is something that is published. Assuming the AbilityId/AbilityName associations are persitent, I guess I could do what you do and dump them to a file for future reference after I load them up using the knowledge book approach. Or do the IDs for a given spell change from time to time?
 

Kannkor

Ogre
Yep, was wondering if this is something that is published. Assuming the AbilityId/AbilityName associations are persitent, I guess I could do what you do and dump them to a file for future reference after I load them up using the knowledge book approach. Or do the IDs for a given spell change from time to time?
They almost never change... Spell names change more frequently, and that is rarely in itself.
 
Top Bottom