Great info Bad_capn. I will play with it.
In the meantime, If i wanted to remove (I'd much rather just disable them) journeyman mercs (without completely breaking the merc tables) what's the easiest way to do that? Should I: 1) Wipe the hired merc table, delete the mercs from the merchant template entries where (and i'm not sure how to do in in SQL -- MERC ID matches with name like '%journeyman%' from the merc_npc_types table) so they should be unpurchasable? 2) Just delete * where name like '%journeyman%' from merc_npc_types table -- but will that break the merc merchants? 3) Is there a way to implement a cost PER MERC? -- I would love to set the journeyman mercs to cost a crazy amount of plat, that would solve everything rather nicely. Thanks again for any help you guys can provide |
There is a function that returns the cost of the merc based on a simple formula I came up with that is pretty close up to level 65 or so. You should be able to add more based on the proficiency if you wanted to.
You could also do it in sql. I can't test right now, but removing the templates from the merchants would be the best of your options, so you could keep most of the data there in case you wanted it later. Another option is client version, which is in merc_templates. Set that to a very high number so it won't show up for any client (this restriction works so you don't get unknown dbstring errors for invalid races or classes depending on your client). I'll try to come up with a script when I get a chance. |
After yesterdays build with secrets latest patch, the crashes stopped, so i thought things were good until i noticed mercs with no owners standing around in hub area today. I checked DB and lots and lots of multiple mercs per PC in merc database.
I am cleaning out the DB and rebuilding source and will let you know results. |
Running latest git pull, x86 build, seems to happen on either UF and ROF clients.
Considering ive only had 6 people over last couple hours, and already i have 2 instances of multiple mercs per PC. No crashes that i can find. |
Still havent figured what causes it. It might be related to grouping because these mercs below are run by a guy who multiboxes/groups...
Anyhow demonstrating the "leftovers" http://s13.postimg.org/tdhjqxq6v/mercs.jpg |
Quote:
|
Ok, sounds good.
|
Quote:
|
Thank you much, that should ease the mana strain on them.
|
Some additional feedback; i'm not sure if this is exclusive to me or those of us using mercs but; has anyone noticed with the latest build and mercs that grouping seems off? If I'm two boxing, the invitee doesn't see the other's merc in the group but the inviter sees the group leader's merc within the group.
If i revert a few builds back the issue isn't there. Disbanding, suspending etc. doesn't seem to fix the problem. |
Possible bug
Is that GetSTR() supposed to be there in merc.cpp
Code:
int16 Merc::CalcAGI() { |
One bug and a few things i dont understand.
I buy a level 50 J2 tank merc, has base stats like DB using #showstats. If i buff him with "Swift like the wind" spell number 172 which to my knowledge has no stat or resist buffs in it, then the merc has around 20 added to str,dex,40 to sta, 20 to agi, and resists are bumped up 60? When you suspend and restore the merc MOST of the time the stats return back to normal. Picture is below demonstrating me buying the merc, #showstats, buffing-showstats, suspending and bringing him back - showstats. I totally don't understand this. Why do the mercs have so much attack? The values in the database don't match up with stats shown in game, and the ATK stats in the database are SKY high. If i am understanding the code in attack.cpp right below then its looking for merc ATK which doesn't seem to be the same as in the database(which is even higher) Is it using CalcATK() from merc.cpp?? If so does then CalcATK also adds strength and skill to come up with its number?? If CalcATK does that then isnt Str and Offense added twice when it hits the code below?? I am trying pretty hard to balance things for my server, and the ground keeps shifting under my feet every time i solve one problem. Any information is apprecaited. Thank you. Code:
if(attacker->IsClient()) http://s23.postimg.org/dbtw2hniz/mercstats.jpg |
I've been out and busy the last 2 weeks, so I'm going to try and get back into this this weekend and check out some of the issues you've pointed out.
I'd have to look into the buffs. Not sure what's going on there. Attack and AC are kind of confusing and how they are calculated and displayed are different between clients, npc, bots, mercs, and pretty much everything else. Merc base ATK and AC may be higher than what clients are used to because they have little to no way to improve them. No equipment upgrades, no AAs, etc. Only buffs can be used to increase them. They may still be a little high, as I just guessed when I created them, trying to get them close to high end client values at that level. If you have a specific example of what one should be, I can adjust them accordingly. #Showstats shows different values for Bots as well, but I'd have to look into it again, as it's been a while since I tried to figure it out. I do remember ATK values being maybe half what they should have shown for bots. Edit: Looks like that is being added twice. I'll get that removed. |
I have figured out the buffs issue, I believe. I'll see if I can get it in this weekend.
|
Thank you.
I agree the attack code is confusiing. Since you asked for a specific example ill give you one with the level 50 scenario above. The example below ASSUMES i know what the code is doing. I am going to leave ATK values out of it because im not sure what is being calced here. Mob is level 50 Froglok Dar Knight from sebilis who has an AC of 429 in DB. Level 50 Merc attack the Froglok. Merc has str of 267, and warrior for that level has offense of 210. Running that through formuyla listed above WIHTOUT the ATK added onto it gives you 463 for attack RATING. Froglok is an NPC so the NPCACfactor rule is 2.25 by default. Code:
else if(IsNPC()) You can see the problem is that the attack rating is already over 2 times the AC to begin with. Now if you add (im working from memory) several hundred or thousand ATK once or twice you can see that the attack rating to AC ratio is someplace from 3x to 20x. To be fair , you are remarkably close on your AC settings for mercs tanking NPCs. |
All times are GMT -4. The time now is 04:35 AM. |
Powered by vBulletin®, Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.