PDA

View Full Version : Working on Titanium AAs


Glorandwarf
07-28-2006, 02:50 PM
Hello all.

I've found an opcode that allows AAs to be purchased for Titanium. The opcode is OP_RespondAA=0x3af4. I have included the coding changes for 0.7.0-840:

for common/patches/Titanium.cpp:
577c577
< Message_StringID(15,AA_GAIN_ABILITY,ConvertArray(a a2->title_sid,val1),ConvertArray(aa2->cost,val2),points2);
---
> Message_StringID(15,AA_GAIN_ABILITY,ConvertArray(a a2->id,val1),ConvertArray(aa2->cost,val2),points2);
579c579
< Message_StringID(15,AA_GAIN_ABILITY,ConvertArray(a a2->title_sid,val1),ConvertArray(aa2->cost,val2),point2);
---
> Message_StringID(15,AA_GAIN_ABILITY,ConvertArray(a a2->id,val1),ConvertArray(aa2->cost,val2),point2);
583c583
< Message_StringID(15,AA_IMPROVE,ConvertArray(aa2->title_sid,val1),ConvertArray(cur_level,val2),Conve rtArray(aa2->cost,val3),points2);
---
> Message_StringID(15,AA_IMPROVE,ConvertArray(aa2->id,val1),ConvertArray(cur_level,val2),ConvertArray (aa2->cost,val3),points2);
585c585
< Message_StringID(15,AA_IMPROVE,ConvertArray(aa2->title_sid,val1),ConvertArray(cur_level,val2),Conve rtArray(aa2->cost,val3),point2);
---
> Message_StringID(15,AA_IMPROVE,ConvertArray(aa2->id,val1),ConvertArray(cur_level,val2),ConvertArray (aa2->cost,val3),point2);


For zone/AA.cpp:
147,148c147,148
< eq->title_sid = emu->id;
< eq->desc_sid = emu->id;
---
> eq->title_sid = emu->id - emu->current_level + 1;
> eq->desc_sid = emu->id - emu->current_level + 1;


and for zone/client_packet.cpp:
6234c6234
< //SendAATable();
---
> SendAATable();


There are still some issues at the moment that need addressing:

1. This only works for Titanium, due to the changes in string ids that need to be sent to the client. I am working on a method that involves a custom Message_StringID function that uses a "fake" opcode that both Titanium and Client62 can interpret and send the correct string id.
2. The AA information does not show correctly in the AA window after zoning or logging. The rank for the AA appears to be one less than the actual rank. However, a rank that is maxed out (such as Innate Strength 5/5) will show correctly.

Hope this helps out.

soulshot
07-28-2006, 04:53 PM
Nice work guy!

greneday
07-28-2006, 06:28 PM
nice!
I was wondering how I add this to my 0.7.0 server, I am still new to running one.

fathernitwit
07-29-2006, 05:31 AM
prolly the easiest thing to do about the string IDs is to just go back to sending the entire message ourself instead of using the stringID stuff... the hardest part would be updating the altadv_vars table to have the correct 'name' column (hasnt been updated in a long time), and then loading that field up from the DB so we can use it to make these messages.

I havent been able to figure out what they are not persisting across zones properly, I suspect its the AA storage in the player profile, but I have compred them across versions and theres no difference.... so either they are not getting stored into the PP properly, or we are sending some packet later (like SendAATable()) which is overriding the values stored in PP and breaking things.

blaaaah
08-01-2006, 09:00 PM
dude, this is so sic, i cant wait to start playing, how well does the server work now? any bugs?

John Adams
08-02-2006, 04:38 AM
After applying a decrypting interpolation routine to the OP instructions, I was able to get AA's to stick on my 840 server. Great find, and thank you for your effort!

Now to find that missing Innate STR AA. :)


Edit: Ahhh, I see what you're saying now. If I train 1/5 innate [anything] then zone, that entire AA is removed from the list. Gonna try and figure out how to get it back. That must be where STR went originally, since I had been playing with this for some time.

fireclav
08-03-2006, 02:19 PM
do aa;s work except the innate ones or no

Zengez
08-03-2006, 02:54 PM
Just out of curiosity, (sorry if this is what the last poster was wondering, not really sure) but do teh AA's actually 'work' or are they just buyable as in it sticks and the numbers show (except the zoning issue)

Also, any ETA on when the next level emu will come out with this patch included? (like the 0.7.0-841 or whatnot)

Thanks!

mattmeck
08-03-2006, 05:41 PM
Some AA's work some dont

no ETA's are ever given, could be tomorow could be next year.

Zengez
08-03-2006, 07:16 PM
no ETA's are ever given, could be tomorow could be next year.



Er, guess i was just confused by the line in the 'downloads' section;


This release system has been developed to give the community up to date builds of eqemulator, while not wasting the time of the developers. These builds are compiled automatically each night from the latest source in the Development branch.


Last upload I see anyway is the one from July 25th (840) so I was just wondering if there was a reason why these newer AA patches weren't being uploaded yet, no biggie though, I can wait, or if I get impatient enough I can take a stab at doing it myself.

mattmeck
08-04-2006, 07:03 AM
YEs it builds each nite with what the developers do that day, your asking for an ETA on when there going to include something.

Basicaly it will be included when its done, the fixes so far still dont work.

Glorandwarf
08-14-2006, 07:56 AM
Hello all,

I think I've finally gotten the AAs to display correctly in the AA window of the Titanium client. Now you can purchase the AAs and they will display correctly, even after zoning and logging. So if you purchase 2 ranks of Innate Strength, the client will reflect this in the Inventory window. It also has a fix that will display the purchase strings correctly for both Client62 and Titanium.

The following patches are built using the 0.7.0-841 source:

for common/emu_oplist.h:
25a26
> N(OP_UpdateAA),

for common/eq_packet_structs.h:
3116,3117c3116,3118
< /*0088*/ int32 total_abilities;
< /*0092*/ AA_Ability abilities[0];
---
> /*0088*/ char name[128]; // added AA name to struct, not used outside of server
> /*0216*/ int32 total_abilities;
> /*0220*/ AA_Ability abilities[0];
for utils/patch_Titanium.conf:
414c414
< OP_UpdateAA=0x0000
---
> OP_UpdateAA=0x5966

for zone/AA.cpp:
569,587c569,572
< char val1[20]={0};
< char val2[20]={0};
< char val3[20]={0};
< char points[20]={0};
< char point[20]={0};
< const char* points2=ConvertArray(AA_POINTS,points);
< const char* point2=ConvertArray(AA_POINT,point);
< if(cur_level<1){
< if(aa2->cost>1)
< Message_StringID(15,AA_GAIN_ABILITY,ConvertArray(a a2->title_sid,val1),ConvertArray(aa2->cost,val2),points2);
< else
< Message_StringID(15,AA_GAIN_ABILITY,ConvertArray(a a2->title_sid,val1),ConvertArray(aa2->cost,val2),point2);
< }
< else{
< if(aa2->cost>1)
< Message_StringID(15,AA_IMPROVE,ConvertArray(aa2->title_sid,val1),ConvertArray(cur_level,val2),Conve rtArray(aa2->cost,val3),points2);
< else
< Message_StringID(15,AA_IMPROVE,ConvertArray(aa2->title_sid,val1),ConvertArray(cur_level,val2),Conve rtArray(aa2->cost,val3),point2);
< }
---
> if(cur_level<1)
> Message(15,"You have gained the ability \"%s\" at a cost of %d ability %s.", aa2->name, aa2->cost, (aa2->cost>1)?"points":"point");
> else
> Message(15,"You have improved %s %d at a cost of %d ability %s.", aa2->name, cur_level, aa2->cost, (aa2->cost>1)?"points":"point");
671c656
< saa->abilities[0].increase_amt*=value;
---
> saa->abilities[0].increase_amt*=saa->current_level;
1001c986
< "classes, berserker,spellid,class_type"
---
> "classes, berserker,spellid,class_type,name"
1034a1020
> strcpy(sendaa->name,row[15]);
1037c1023
< if(sendaa->hotkey_sid==0xFFFFFFFF)
---
> if(sendaa->max_level>1)

for zone/client_packet.h:
7a8
> void Handle_Connect_OP_UpdateAA(const EQApplicationPacket *app);

and for zone/client_packet.cpp:
115a116
> ConnectingOpcodes[OP_UpdateAA] = &Client::Handle_Connect_OP_UpdateAA;
6449a6451,6455
>
> void Client::Handle_Connect_OP_UpdateAA(const EQApplicationPacket *app)
> {
> SendAATable();
> }
\ No newline at end of file

Also, during my testing, I have found out that in SendAA_Struct, the field "class_type" refers instead to the minimum level the character has to be in order to buy the AA.

Hope this helps out.

P.S. Sorry about the long post, was going to send the files in a zip attachment, but couldn't upload them for some reason.

Zengez
08-14-2006, 08:01 AM
Woot!

This makes me wish i had a compiler.... /cry

Good work on the aa's everyone, looking foward to them being fully functional

Quick question though, you said they 'display' correctly after zoning, but do their effects still stick? i noticed with the current 841 source when you zone it displays as 1 shorter than what it does (as i know people have noticed/mentioned) but more importantly only the 1st rank worth of an aa takes effect until you spend your next aa point, and unless you want to farm an aa point every time you go somewhere to use aa's that's kinda annoying... i know things don't work yet and they aren't done, just wondering if this was among the 'zoning issues resolved' or if thats still on the list?

Thanks Again GloranDwarf for all your efforts

fathernitwit
08-14-2006, 01:14 PM
good work. This seems to have improved things a bit, but I am still seeing problems with some AAs sticking across zoning with titanium... for example I trained salvage, did a #save just in case, and then zoned, on the other side, neither my "total points spent" nor my salvage item were correct (however, my avaliable points were reduced...) Hopefully you can repeat this, I am a bit busy right now, none the less I will get these changes in.

fireclav
08-14-2006, 01:32 PM
ive noticed a few problems and alot of aas not showing up but other then that this is a HUGE improvement over nothing

Glorandwarf
08-14-2006, 01:33 PM
will take a look into training the Salvage AA and see what happens, pretty much just tested it with Innate Strength and Innate Stamina. Those AAs will show the correct values in the client (have been working correctly on the server side), figured that they would work for all of them. Back to the drawing board.

I'm going to check my source and make sure that I did make a patch for all of my AA changes, and if I missed anything I will repost it.

LOL, when I first posted my changes to the AA code I was stuck at getting it to work, so I thought that maybe someone else would get it working. Never know when inspiration will strike, huh?

Glorandwarf
08-14-2006, 04:20 PM
After doing some preliminary checking on the Salvage AA, it appears that it is not saving it in the player profile for some reason. Using a test command that displays PC stats (including AAs), I can see that whenever I zone, it loses the Salvage AA altogther, but it keeps the others (ex. Innate Charisma).

Will check into it some more later, getting late now.

EDIT: I located the problem with the Salvage AA: has to do with its id of 997. There's some code that removes any AA entries that have ids out of range, and the highest ID (defined in AA.h) is 933, so it is removing the Salvage AA entry. Will see about adding the rest of the aa ids into the file later, it's still late.

John Adams
08-14-2006, 04:23 PM
Slightly off-topic, but similar in loss of data (maybe due to it not saving while zoning) -- Endurance. Everytime I zone, it's 0. And yes, it's been posted before. But if Glorandwarf can locate the bad save, maybe it'll lead to a fix for endurance, too.

mattmeck
08-14-2006, 05:28 PM
Slightly off-topic, but similar in loss of data (maybe due to it not saving while zoning) -- Endurance. Everytime I zone, it's 0. And yes, it's been posted before. But if Glorandwarf can locate the bad save, maybe it'll lead to a fix for endurance, too.

Endurance is 100% broke, its not even started code wise, last I checked. So even if it saves properly it wont do anything.

John Adams
08-15-2006, 01:28 AM
Endurance is 100% broke, its not even started code wise, last I checked. So even if it saves properly it wont do anything.
Ahh, ok. That answers that.

Thanks for the info.

Glorandwarf
08-16-2006, 03:39 PM
Hello all,

I managed to find out what was going on with the Salvage AA, and I think that I have it fixed now. There was some code that checked AAs to see if any were invalid, and if so, they were removed. The last valid ID was 933, and since the ID for Salvage was 997, it was seen as being invalid and was removed.

I have updated the zone/AA.h file to include all of the AAs available up through the Omens of War expansion, so any of the AAs that are currently available should be purchaseable without any being deleted on zoning. Note that this does NOT add any new AAs to the game, as that needs to be done with the database. This new file provides IDs to the developers to use when coding the AAs into EQEmu.

The updated zone/AA.h file is located here (http://www.geocities.com/glorandwarf/AA.zip).

Hope this helps out.

Zengez
08-16-2006, 05:13 PM
Hello all,
Note that this does NOT add any new AAs to the game, as that needs to be done with the database.

So I assume you mean the aa's that are visable to each class as a class, the info for which to display is in teh database somewhere?

If someone could point out where I'd be happy to start working through it to see if i could clean that up, I don't mind database work so much anymore...

EDIT:: Unless you meant all new AA's, cause I don't know enough to be able to do that, but i notice several classes are missing aa's that other classes have and can use, they just aren't visable to those (melee crit for rogue isn't visable, but the same aa is visable to SK or pally for example...)

Zengez
08-17-2006, 07:01 PM
I Figured out where the class variable is placed for who can get what on alt advancement, but can anyone tell me how this variable is calculated? It's the class collumn under the altadv_vars table... I knew how that worked once upon a time but if someone can give me the formula/post a link describing it, i'll post an update to fix some of them when I'm done editing it....

Thanks

EDIT: Nevermind, should have guessed it was the powers of 2 trick, will post an update sometime in the near future...

Zengez
08-17-2006, 08:12 PM
Update:

Ok, heres all the arch-type aa's and their correct 'classes' field to make them availible to the correct classes... it's only mildly tested as i lost the ability to log into the emu login server a few minutes ago and so I must go figure out why that is...

Also; I couldn't find a decent list of aa's anywhere so this is off allakhazam's website... if you notice one is missing from a class please let me know and i will update it as necessary..

Enjoy.

Healing Adept 33876
Healing Gift 33876
Spell Casting Reinforcement 58452
Spell Casting Fury 58492
Channeling Focus 64892
Natural Durability 33722
Natural Healing 33722
Combat Fury 33722
Fear Resistance 33722
Finishing Blow 33722
Combat Stability 33722
Combat Agility 33722
Mental Clarity 64892
Spell Casting Mastery 31812
Spell Casting Subtlety 31016
Spell Casting Expertise 31016
Spell Casting Deftness 30760

sylverwolf
08-18-2006, 04:17 AM
I'm not sure if you're up to the 1 class specific AA's yet or working on the general ones but ranger class AA's missing are:

Innate camoflage (druid also but never made one to see if it exists)
Endless quiver
Archery mastery

Not trying to rush ya folks or anything but so far, this is awesome. Thanks all :)

Oh, also when I bought a point in Planar Power, my STR cap increased but none of the others and any following purchases didn't increase STR cap. It was just a one time thing it seems. I been thinking about this and for others, they seem to be working as they should for the most part. Maybe I should recreate a character using the new server? or download and rebuild the PEQ database? or both?

Zengez
08-18-2006, 07:02 AM
I'm not sure if you're up to the 1 class specific AA's yet or working on the general ones but ranger class AA's missing are:

Innate camoflage (druid also but never made one to see if it exists)
Endless quiver
Archery mastery


Yea i've only done the arch type aa's because the class specific aa's aren't in the database at the moment (aside from the ones that are already showing) figured I'd look into that maybe tomorrow if i get the time, but I'd bet they need to be entirely coded which I don't really know how to do.... 'course i didn't know how to do most of this stuff i've done so no time like the present to learn and all that ;)



Oh, also when I bought a point in Planar Power, my STR cap increased but none of the others and any following purchases didn't increase STR cap. It was just a one time thing it seems. I been thinking about this and for others, they seem to be working as they should for the most part. Maybe I should recreate a character using the new server? or download and rebuild the PEQ database? or both?


This i believe is a known issue, anything past the 'general' tab doesn't work for more than 1 aa rank... i.e. natural durability (archtype increase max hp) only works for the initial rank of 2%, but not for the following 2nd or 3rd rank hp boosts, I believe this is being worked on... Rebuilding your database or the server type won't help this problem, however it is not a bad idea to keep up to date on the server downloads as patching is quick and easy and does help various other problems with aa's.

Hope that helps.

Walnutt
02-02-2007, 10:52 AM
It has been a couple of months, just curious if there has been anything else done to fix aa's? I'm not a programmer or anything but I've noticed, like this thread mentioned, on the server I play on that the general aa's work, and that the rest look broke, and quite a few are missing.

Thanks for yalls work guys.

KLS
02-03-2007, 06:37 PM
I actually have been looking at AAs. I have all up through general completely working.. not that they weren't working before but under my new modifications to the aa system heh. I'm doing archtypes now and I hope to have all luclin aa's working within a few weeks.. if I don't get distracted with anything or run into any major hurdles that is.