Page 3 of 4
Re: Implementing: Achievements
Posted: Thu Apr 11, 2013 6:36 pm
by thefoof
I know you would get suffixes (Slayer of Gnolls, Destroyer of Gnolls ect) after killing a certain amount of a race for races that showed up on those boards,
checking live now I'll edit my post if I find them but they should still exist.
It looks like the posters were removed but the game still keeps track of your kills, you can check them in the achievements ui in General -> Slayer
I think you do get achievements as well for each title, but the titles were available before achievements existed - so they should be awarded instantly based on the history rather than when you get the achievment for people who want to run oldschools servers (but that's another topic

)
Re: Implementing: Achievements
Posted: Mon Nov 18, 2013 10:46 pm
by Jabantiz
I attempted to get achievements loading faster but after several attempts the lowest I could get it was 19 seconds for a single packet. I think the issue is the large amount of data being pushed into the struct. The only thing I can think of now is to let the world continue to startup and allow connections while the packets are being created, keep track of any connections and when the packets are finally created send them to the clients that connected already. Any one have other ideas?
Re: Implementing: Achievements
Posted: Tue Nov 19, 2013 6:25 am
by John Adams
The massive packet build/delay is only during world startup, right? If so, just thread it like you do other loading... but in this case, don't wait til it's done to open connections to the World.
I guess you could put a safety catch in there that if the packet isn't in a "done loading" state, to ignore any attempts to shove it to a client.
Re: Implementing: Achievements
Posted: Wed Nov 20, 2013 3:47 pm
by Jabantiz
That is what I had in mind but I was also going to hold a list of clients that the packet was going to be sent to and when the packets are finally loaded go through the list and send them. Currently they load on its own thread if threaded loading is enabled, still takes long enough to hold up the server though.
Re: Implementing: Achievements
Posted: Wed Nov 20, 2013 5:10 pm
by John Adams
Any chance of NOT "waiting for threads to finish" before allowing connections, or would that be disastrous?
Re: Implementing: Achievements
Posted: Wed Nov 20, 2013 5:46 pm
by Jabantiz
I don't think achievements will cause issues if we let the server start up without it, will have to go over the code again to be sure though
Re: Implementing: Achievements
Posted: Fri Nov 22, 2013 6:49 pm
by Jabantiz
Achievements should no longer hold up the server start up. This only effects threaded loading.
Re: Implementing: Achievements
Posted: Fri Nov 22, 2013 9:25 pm
by John Adams
Indeed, I was excited to see this log
14:58:38 D Thread : Starting autoinit loginserver thread...
14:58:38 I World : Connected to LoginServer: eq2emulator.net: 9100
14:58:38 D Login : Looking for Login Zone Updates...
14:58:38 D Login : Looking for Login Appearance Updates...
14:58:39 I Achievements: Achievements loaded (took 11 seconds)
<-- 
see?
14:58:39 W Thread : Achievement Loading Thread completed.
11 seconds on my uber linux box

Re: Implementing: Achievements
Posted: Sun Dec 29, 2013 1:22 pm
by xinux
Character Achievement packet has changed some i updated the struct and committed the change.
This is the main section that has changed.
Reward array is gone and the extra int 8 now replaced with guild_raid which is a value of 1 if the achievement is a guild raid category.
Before
Code: Select all
<Data ElementName="num_items" Type="int8" Size="1" />
<Data ElementName="item_array" Type="Array" ArraySizeVariable="num_items">
<Data ElementName="item_name" Type="EQ2_16Bit_String" />
<Data ElementName="item_qty_req" Type="int32" Size="1" />
</Data>
<Data ElementName="num_rewards" Type="int8" Size="1" />
<Data ElementName="reward_array" Type="Array" ArraySizeVariable="num_rewards">
<Data ElementName="reward_item" Type="EQ2_16Bit_String" />
<Data ElementName="unknown4" Type="int32" Size="1" />
</Data>
<Data ElementName="num_reward_links" Type="int8" Size="1" />
<Data ElementName="reward_link_array" Type="Array" ArraySizeVariable="num_reward_links">
<Data ElementName="reward_link" Type="EQ2_16Bit_String" />
</Data>
Now
Code: Select all
<Data ElementName="guild_raid" Type="int8" Size="1" />
<Data ElementName="num_items" Type="int8" Size="1" />
<Data ElementName="item_array" Type="Array" ArraySizeVariable="num_items">
<Data ElementName="item_name" Type="EQ2_16Bit_String" />
<Data ElementName="item_qty_req" Type="int32" Size="1" />
</Data>
<Data ElementName="num_reward_links" Type="int8" Size="1" />
<Data ElementName="reward_link_array" Type="Array" ArraySizeVariable="num_reward_links">
<Data ElementName="reward_link" Type="EQ2_16Bit_String" />
</Data>
Re: Implementing: Achievements
Posted: Sun Dec 29, 2013 4:11 pm
by xinux
Re enabled loading of achievements and it look's pretty good but it does like to crash every now and then and i think that is because we are sending one packet with all 1169 unlike live which sends multiple packets with a max of 200 achievements in each packet.
I'm not sure why it was sending opcode 677 with a copy of the achievements tho.
Re: Implementing: Achievements
Posted: Sun Dec 29, 2013 10:13 pm
by xinux
We are also going to need another column in the DB under the Achievements table labeled guild Tinyint Size 1.
How are we going to handle previous versions since the older clients won't accept the extra Achievements?
Re: Implementing: Achievements
Posted: Mon Dec 30, 2013 3:12 pm
by John Adams
Why not just commit the Parser code to SVN? I could take a look at the SQL errors then.
As for older clients, I'm almost ready to call that a done deal since we have had no issues keeping a Live client compatible anyway... but ultimately, that is up to you all who C++ it together. If we continue to support older clients, we'd have to do a LOT of work with the client version detection and splitting what is displayed based on that... we already know appearances and terrain (Darklight) are going to screw older clients.
If it's my call, I say we're done with anything older than Live.
By this I don't mean scrap all our structs/opcodes, just those that are so vastly different (DoV) that they literally cannot play Emu without a major effort.
Re: Implementing: Achievements
Posted: Tue Dec 31, 2013 3:41 am
by xinux
Ok so the new packet does also populate the Guild achievement window but unlike before i had to delete the guild achievements if i wanted to send a packet with more then about 200 achievements in it cause the client kept crashing with the guild achievements in guessing that is why they broke the packet apart on live. Anyway the packet will need to be split into smaller pieces and also the master Achievement packet only need's to be sent on first login cause the client appears to remember it. I was able to zone just fine but as soon as i camped and tried to reenter the game the server would crash.
I can commit my changes if you want my changes will make it compliant with live but will break the older clients i'm also attaching a SQL query that will drop and recreate the achievement tables with the current live data and with the added column in the achievements table.

Re: Implementing: Achievements
Posted: Thu Mar 28, 2019 11:11 am
by Ememjr
i know this was an old thread but i thought the displaying of achievements list was working for just the DOV client i could not find where xinux and actually committed the code that broke the achiement packet to 200 achiements each,
so i trying with dov and renables the comment stuff out that would send the packets
when the packet is qued up maxlen appears to be 512
not sure if there was a change sometime before this that changed how to handle big packets
i am using the original achiements tables that were in this trhead were there is only 1169 achiements in it, and i am trying with DOv client
Re: Implementing: Achievements
Posted: Thu Mar 28, 2019 1:36 pm
by Ememjr
ok i found the issue it was an extra SendAchievementsList();that was in send charinfo i commented it back out and the achiements show up
guess not arrapently even the very next toon logging in does not get the proper packet from here
master_achievement_list.masterPacket
seems to work once per reboot, not sure if its one of those mutex we dont like, or masterPacket is just going away, when a user disconnects, or camps