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 07-28-2006, 02:50 PM
Glorandwarf
Fire Beetle
 
Join Date: Jul 2006
Posts: 5
Default Working on Titanium AAs

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:
Code:
577c577
< 				Message_StringID(15,AA_GAIN_ABILITY,ConvertArray(aa2->title_sid,val1),ConvertArray(aa2->cost,val2),points2);
---
> 				Message_StringID(15,AA_GAIN_ABILITY,ConvertArray(aa2->id,val1),ConvertArray(aa2->cost,val2),points2);
579c579
< 				Message_StringID(15,AA_GAIN_ABILITY,ConvertArray(aa2->title_sid,val1),ConvertArray(aa2->cost,val2),point2);
---
> 				Message_StringID(15,AA_GAIN_ABILITY,ConvertArray(aa2->id,val1),ConvertArray(aa2->cost,val2),point2);
583c583
< 				Message_StringID(15,AA_IMPROVE,ConvertArray(aa2->title_sid,val1),ConvertArray(cur_level,val2),ConvertArray(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),ConvertArray(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:
Code:
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:
Code:
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.
Reply With Quote
  #2  
Old 07-28-2006, 04:53 PM
soulshot
Hill Giant
 
Join Date: Jun 2006
Posts: 142
Default

Nice work guy!
Reply With Quote
  #3  
Old 07-28-2006, 06:28 PM
greneday
Fire Beetle
 
Join Date: Jul 2004
Posts: 12
Default

nice!
I was wondering how I add this to my 0.7.0 server, I am still new to running one.
Reply With Quote
  #4  
Old 07-29-2006, 05:31 AM
fathernitwit
Developer
 
Join Date: Jul 2004
Posts: 773
Default

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.
Reply With Quote
  #5  
Old 08-01-2006, 09:00 PM
blaaaah
Fire Beetle
 
Join Date: Aug 2006
Posts: 8
Default phych outq

dude, this is so sic, i cant wait to start playing, how well does the server work now? any bugs?
Reply With Quote
  #6  
Old 08-02-2006, 04:38 AM
John Adams
Demi-God
 
Join Date: Jul 2006
Posts: 1,552
Default

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.

Last edited by John Adams; 08-02-2006 at 12:42 PM..
Reply With Quote
  #7  
Old 08-03-2006, 02:19 PM
fireclav
Sarnak
 
Join Date: Jun 2006
Location: nowhere
Posts: 56
Default

do aa;s work except the innate ones or no
Reply With Quote
  #8  
Old 08-03-2006, 02:54 PM
Zengez
Hill Giant
 
Join Date: Nov 2004
Posts: 160
Default

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!
Reply With Quote
  #9  
Old 08-03-2006, 05:41 PM
mattmeck
Guest
 
Posts: n/a
Default

Some AA's work some dont

no ETA's are ever given, could be tomorow could be next year.
Reply With Quote
  #10  
Old 08-03-2006, 07:16 PM
Zengez
Hill Giant
 
Join Date: Nov 2004
Posts: 160
Default

Quote:
Originally Posted by mattmeck
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;

Quote:
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.
Reply With Quote
  #11  
Old 08-04-2006, 07:03 AM
mattmeck
Guest
 
Posts: n/a
Default

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.
Reply With Quote
  #12  
Old 08-14-2006, 07:56 AM
Glorandwarf
Fire Beetle
 
Join Date: Jul 2006
Posts: 5
Default

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:
Code:
25a26
> N(OP_UpdateAA),
for common/eq_packet_structs.h:
Code:
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:
Code:
414c414
< OP_UpdateAA=0x0000
---
> OP_UpdateAA=0x5966
for zone/AA.cpp:
Code:
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(aa2->title_sid,val1),ConvertArray(aa2->cost,val2),points2);
< 			else
< 				Message_StringID(15,AA_GAIN_ABILITY,ConvertArray(aa2->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),ConvertArray(aa2->cost,val3),points2);
< 			else
< 				Message_StringID(15,AA_IMPROVE,ConvertArray(aa2->title_sid,val1),ConvertArray(cur_level,val2),ConvertArray(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:
Code:
7a8
> 	void Handle_Connect_OP_UpdateAA(const EQApplicationPacket *app);
and for zone/client_packet.cpp:
Code:
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.
Reply With Quote
  #13  
Old 08-14-2006, 08:01 AM
Zengez
Hill Giant
 
Join Date: Nov 2004
Posts: 160
Default

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

Last edited by Zengez; 08-14-2006 at 05:01 PM..
Reply With Quote
  #14  
Old 08-14-2006, 01:14 PM
fathernitwit
Developer
 
Join Date: Jul 2004
Posts: 773
Default

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.
Reply With Quote
  #15  
Old 08-14-2006, 01:32 PM
fireclav
Sarnak
 
Join Date: Jun 2006
Location: nowhere
Posts: 56
Default

ive noticed a few problems and alot of aas not showing up but other then that this is a HUGE improvement over nothing
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 11:31 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 - 2024, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3