Today, I committed the initial spell casting code & AI. The spell data is in the mercs.sql file, which should be rerun. With this commit, healers should heal and tanks will use their aggro discs. I'm still working on dps mercs. For now, stances don't factor in, but will be added in soon.
Another issue I'm working on is the built in merc focus effects. I have most of the data, they are just not implemented yet. Feel free to comment. |
i picked up on another opcode that might have to with mercs found in 1-16-13 patch [OPCode: 0x27af] OP_MercenaryUnknown2 [Server->Client] [Size: 68] Merc Name????????*** i'll look back on patch 12/12/12 and see if i can find it. 0x38e3 12/12/12 [Size: 68]
all found in patch 1-16-13 Code:
[OPCode: 0x60a8] OP_ZoneEntry [Client->Server] [Size: 76] Players Mercenary or Quest,Corpse,Mercenary Liaison, a_diseased_spiderling's_corpse |
Quote:
|
is there a specific order to run the sql for mercs? wanted to try em out, but having issues trying to run those sql's. only getting errors with em.
|
From the changelog:
REQUIRED SQL: utils/sql/svn/2383_required_group_ismerc.sql -- adds ismerc column to group_id table OPTIONAL SQL: utils/sql/svn/2380_optional_merc_rules.sql -- Contains rules for mercs including rule to enable mercs OPTIONAL SQL: utils/sql/svn/2380_optional_merc_merchant_npctypes_update.sql -- Contains npc_types & spawn updates for merc merchants in PoK OPTIONAL SQL: utils/sql/svn/2380_optional_merc_data.sql -- Contains basic merc data, template info, & merc merchant entries OPTIONAL SQL: utils/sql/svn/mercs.sql Do them in that order. Actually, you just need to do 2380_optional_merc_merchant_npctypes_update.sql before 2380_optional_merc_data.sql, before mercs.sql The rules one and isMerc for group_id can be done whenever. |
run mercs.sql last.
|
thanks, that worked for the most part. at the end of sourcing the last one (mercs.sql) i get an error that says " column spell_id cannot be null". gives me four of those errors right at the end.
|
Yeah, that happens if the spells_new table doesn't have all of the correct spells. On the default peq spells_new (at least from a while ago), many if not most of the 75-80 spells are duplicates of the 70-75 spells, so it's not matching the spell name.
You can remove the ones it didn't find by doing: DELETE FROM merc_spell_list_entries WHERE spell_id = 0; Or, update the spells_new table to have all of the correct spells. I'll see if I can add the missing spells as needed later. |
ok just a question now that i had a second to install and see it for myself. Upkeep is charging every 3 minutes, not sure if that has been changed, but back a few years when i played upkeep was charged every 10 minutes.
nm i see it can be set in the db |
Yeah, I think the SQL for the upkeep cost was committed as testing settings, where it is easier to tell if upkeep is working properly when you don't have to wait 15 minutes between each one. On live, it is 15 minutes for upkeep and 3 minutes for the suspend interval. If you want to set that, you can run the following SQL:
Code:
UPDATE rule_values SET rule_value = 900000 WHERE rule_name = 'Mercs:UpkeepIntervalMS'; |
noticed that after zoning the mercs mana goes to zero. so it isnt retaining their mana when zoning.
|
Yeah, nothing is saved currently. I plan on working on buffs & other stuff in the next couple days.
|
I left Trevius a message on IRC but I am really not sure who this should go to.
After looking into the dbstr_us.txt file changes I was able to pull out data for 2375 mercs. The data includes ID, Race, Type, Confidence, Proficiency and Tier. Anyone want it? |
What's in there that's not already in game? I haven't looked at RoF to see if there were any new mercs, but the rest should be in there ( then again, half or more of them are only available through expansion purchases, special merchant contracts, and other methods that may not be available in game).
|
Quote:
|
Some of these rule values seem duplicated.
Mercs:SuspendIntervalMS Mercs:SuspendIntervalS Mercs:UpkeepIntervalMS Mercs:UpkeepIntervalS Mercs:AggroRadius Mercs:AggroRadiusPuller Is one or the other obsolete? |
The top two sets are, and I think were done for convenience. The last pair are not, as it allows two different aggro radii, depending on if the mob's target is the puller or not (puller radius is smaller, or they would run out to attack before you want them to.)
|
Here are the default rule settings from ruletypes.h for the merc timer stuff:
Code:
RULE_INT (Mercs, SuspendIntervalMS, 10000) I dunno why they were done in seconds and ms, since we could just multiple or divide by 1000 in the source to switch from seconds to ms. I think the reasoning was because some places use seconds and some use ms, so it might be a bit less resources to not have to do the math even though the math is pretty simple/quick. We can probably remove whichever rule is used the least and just do the math for the seconds or ms depending on which one is kept. Either way, for now, just make sure they are the same amount of time for the MS and S rules with the same name (as shown in the defaults). To be Live-Like, the UpkeepIntervals should actually be 15 minutes, otherwise you get spammed every 3 minutes about upkeep costs. Currently, upkeep costs are disabled until the merc stuff is more finalized, so there is no actual charge that happens, just a message about it. |
I would love to see mercs succeed. That being said here is what i am observing..
ROF clients trying to zone with most mercs = zone crash Ill have to compile with debug and try this... Cleric mercs just chain cast group loyalty buffs Cleric mercs just keep chain casting group hp buff if it cant buff pet of PC. When you dismis a bot, it still hows on your screen, and is targetable, but strangely enough you can do anything to it. Still shows in group. Zoning seems to clear the issue ONLY for the PC that zoned. everyone else can still see merc in group and standing there doing nothing. After you dismiss a merc it is not deleted from database. I realize its an enormous amount of work, and i appreciate your efforts. |
Quote:
REQUIRED SQL: 2013_02_18_Merc_Rules_and_Tables.sql OPTIONAL SQL: 2013_02_18_Merc_Spells.sql ...is the mercs.sql in the utils\sql\svn still required as well? |
How unlock mercs slot one more?
|
Quote:
|
Quote:
Edit: the file referenced in my git commit about merc spells is the same as the one you referenced. The earlier files are required as they add the necessary tables, if this is an initial install. If it is just an update, then just use the version in the git sql folder. |
Can this code even work anymore now that mercs have own table?? I assume they dont have NPC ids that i have seen?? I assume since they dont have a special attack field this wont ever be true?
Code:
//try main hand first |
I haven't tested it specifically, but mercs have a specialattks field. They also have an attack_count field. I'm pretty sure I've at least seen my merc triple, but I'd have to look. I dont think there's any data in the specialattks field, whereas attack_count should match where client get double, triple, and quad attacks. I know there will be a lot of little things that need tweaked, but I am focusing on the major issues right now.
The best way to test is to parse or do some debugging to see for sure. |
Quote:
|
Using ROF and UF client with latest 32 bit GIT build, running latest PEQ and patches, up to and including git sql patches.
These problems happen on both ROF and UF clients every time: Suspend and Dismiss merc leaves merc standing there, targetable, but only has an entity number. Cant use #kill or #damage on him. If you zone you cant see them anymore. With 2PC in group with mercs, if you suspend a bot, UNSUSPEND him and then zone, you end up with 2 mercs with same name in database. Repeat and you get more mercs in database with same name. The old ones show as suspended. If you start chain dismissing them you can get rid of some but not all of dupes. Assuming 2 PCs and mercs in group, 1 tank merc, 1 healer merc... 2 pets. Healer will chain cast loyalty group buff series because it wont stick on pets im guessing. Get rid of pets, problem goes away. Thank you for working on mercs! they seem to zone better than bots. If the ghost/dupe thing was figured out it would be great. |
I'm working on the dismiss/suspend issue. I'm not sure why that broke, but I'm working on it.
I'll check out the duplicate save entries as well. About the spell, do you mean Blessing of Loyalty, the spell haste buff? I'll have to look more into this, as I don't see this issue at 65. What level and what kind of pet? Thanks for the feedback. Edit: I think I've fixed the duplicate saves, and will try to commit tomorrow after more testing. |
Quote:
|
I had level 85 characters, not sure what level the spell is but the spell haste cleric buff yes. If you have pets in the group who dont have pet affinity ( and thus cant get buffs) the cleric chain casts it. If you give the characters pet affinity, the buff sticks on pets and the clerics stop casting it.
|
Gotcha. Thanks, that should give me what I need. I was using pet affinity, so that's why I didn't see it.
Now, a good question would be why a level 85 character wouldn't have pet affinity.. :) |
For servers that pets can be used by all classes :) Yes i will likely change AA but i thought id let you know because ive seen it happen on bots also.
Thank you for your willingness to converse about this stuff. It is appreciated. |
I am not sure if this is the right place for this but since it happens only when i am trying to purchase a fungusman or orc tier 2 journeyman healer. Right after i purchase them the zone crashes... debug info below (this is using ROF client)
Code:
--------------------------------------------- |
Happens whenever you purchase a merc and you are over level 85. Somewhat expected but i was suprised it crashed the zone. FYI
|
Odd, I thought I had fixed that particular crash and committed the fix, but maybe I only fixed it on my own server and forgot to commit it.
The problem is that in the handling for hiring a merc in client_packet.cpp, it makes the call to LoadMerc(), and then spawns the merc without first making sure it actually got one returned. I highlighted the line below where the issue is. We just need an "if (merc)" added right below that line to prevent the crash. Code:
void Client::Handle_OP_MercenaryHire(const EQApplicationPacket *app) |
I have this fix in (as well as others) , I just need some time to merge in all the recent changes and commit. The issue is there is only merc data through lvl 85. On my next stat update, I'll try to add merc data through lvl 100, since RoF can be used.
I've just been crazy busy and haven't had a chance to commit (I've also been trying to track down the depop bug). |
It should no longer crash if a merc can't spawn, but I will have to add in mercs to 100 when I get a chance. It's more of an issue for spells and such for those levels as I have a script I use to generate the stats, but I'll see what i can do.
|
Thank you for that update! I hear yah on the crazy busy.
|
i compiled the latest version alright, i went to source in the merc_rules_and_equipment.sql statement and i get errors about primary key for first two lines which i fixed because they already exist...
However alter table also got tripped up claiming it couldnt find mercbuffs, in my case it was already named properly to merc_buffs?? The final error i couldnt get past and i tried this in mysqldump and heidesql... once it get to the part where it wants to create merc_inventory it throws an error saying.. Code:
DROP TABLE IF EXISTS merc_inventory; |
Also if you do a SHOW INNODB STATUS you get this relevant portion..
Code:
LATEST FOREIGN KEY ERROR\n------------------------\n130301 10:49:53 Error in foreign key constraint of table peq/merc_inventory:\n FOREIGN KEY (merc_subtype_id) REFERENCES merc_subtypes (merc_subtype_id)):\nCannot resolve table name close to:\n (merc_subtype_id))\n------------\n |
All times are GMT -4. The time now is 10:39 PM. |
Powered by vBulletin®, Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.