Go Back   EQEmulator Home > EQEmulator Forums > Development > Development::Server Code Submissions

Reply
 
Thread Tools Display Modes
  #1  
Old 07-08-2009, 02:57 PM
Zeice
Sarnak
 
Join Date: Oct 2008
Location: USA
Posts: 92
Default Rogue Max Backstab Damage Rule

Well I was thinking since there are now rules for the monk damage attacks and archery, there should be one for rogue's backstab damage. Granted I don't know what KLS has left to do to the formulas for backstab damage, but for custom server purposes this should be a temporary solution. Now I've just been delving into the code for the first time, so this is only my second attempt at something like this. I was comparing all the rule additions for monk/archery so I think I've figured this out. My only thing is I don't know if it would be better to use RuleR or RuleI...but I'll give both examples below and maybe someone can give me some better insight.

Another thing to note is this is just for max backstab damage above level 25. I would think min backstab damage is relatively fine, and damage below level 25 should be a moot point.

First RuleI:

Code:
ruletypes.h
----------------

ADD
RULE_INT ( Combat, MaxBackstabBonus, 10) //% Modifier 

AFTER
RULE_INT ( Combat, RoundKickBonus, 10) //% Modifier that this skill gets to str and skill bonuses
Code:
special_attacks.cpp
--------------------------

REPLACE 
max_hit = (((2*primaryweapondamage) * GetDamageTable(BACKSTAB) / 100) * 10 * GetSkill(BACKSTAB) / 355)  + ((level-25)/3) + 1;

WITH
max_hit = (((2*primaryweapondamage) * GetDamageTable(BACKSTAB) / 100) *  RuleI(Combat, MaxBackstabBonus) * GetSkill(BACKSTAB) / 355)  + ((level-25)/3) + 1;
Or using RuleR:

Code:
ruletypes.h
----------------

ADD
RULE_REAL ( Combat, MaxBackstabBonus, 1) // % Modifier to Max Backstab Damage (.5 = 50% base damage, 1 = 100%, 2 = 200%)

AFTER
RULE_INT ( Combat, RoundKickBonus, 10) //% Modifier that this skill gets to str and skill bonuses

Code:
special_attacks.cpp
--------------------------

REPLACE 
max_hit = (((2*primaryweapondamage) * GetDamageTable(BACKSTAB) / 100) * 10 * GetSkill(BACKSTAB) / 355)  + ((level-25)/3) + 1;

WITH
max_hit = ((RuleR(Combat, MaxBackstabBonus)*(2*primaryweapondamage) * GetDamageTable(BACKSTAB) / 100) *  10 * GetSkill(BACKSTAB) / 355)  + ((level-25)/3) + 1;
Like I said I'm not sure which route would be the best way to go or if I even did it right, any help would be appreciated. =)
Reply With Quote
  #2  
Old 07-08-2009, 04:08 PM
ChaosSlayerZ's Avatar
ChaosSlayerZ
Demi-God
 
Join Date: Mar 2009
Location: Umm
Posts: 1,492
Default

KLS prabobly didn't see a need for BS rule cause BS has recently was changed to be based of new weapon property field called backstab_damage, which now used as base for BS sintead of normal weapon dmg (I am not however sure if this works for T. or just for SoF?)

This is a guess however =)

Nothing against the rule thought =)
Reply With Quote
  #3  
Old 07-08-2009, 04:12 PM
Zeice
Sarnak
 
Join Date: Oct 2008
Location: USA
Posts: 92
Default

Yeah, I don't believe that field is being used just yet. It shows on items, but I don't think it's being used in the formula. Like I said this is just a temporary thing if people wanted to use it. /shrug
Reply With Quote
  #4  
Old 07-08-2009, 04:57 PM
ChaosSlayerZ's Avatar
ChaosSlayerZ
Demi-God
 
Join Date: Mar 2009
Location: Umm
Posts: 1,492
Default

well as of 6/15 changelog it says:

Recommended SQL: (This is recommended for databases that don't stay current with PEQ or are custom)
UPDATE items SET backstabdmg = damage WHERE backstabdmg = 0 AND itemtype = 2;


I guess it means that weapon no longer use normal DMG for BS base- though best way to test this is to take a weapon with high normal dmg, 1 bs dmg and see how mcuh it stabs for with the latest build
Reply With Quote
  #5  
Old 07-08-2009, 05:05 PM
Zeice
Sarnak
 
Join Date: Oct 2008
Location: USA
Posts: 92
Default

Quotes from Trevius:

Quote:
I am sure those will be added in eventually. But, adding in Heroic stats is my first priority. Once I know how to add one, the others should be cake. For spelldmg and healamt, each of those would have to be coded in separate places, so it would be different than coding in Heroic stuff, which is why I am not doing them all at the same time. After Heroic stats, I will probably try to see about doing backstabdmg next, because that is a pretty cool stat IMO, considering I played a rogue on live for years. I like the idea of being able to have hard hitting weapons that devs don't have to nerf down just because they don't want insane backstabs from Rogues. I looked through the PEQ items table and it looks like many/most of the piercers already have the backstabdmg setting set. I will still put up a simple MySQL query when I add it for databases that can't update to PEQ so Backstab will still work perfect for them. Basically, I think this would work well:
Quote:
Well, I wasn't able to get to actually having the server make use of any of the new stats tonight, but I was able to get them all working to show up on items in game when using SoF.

I still plan to start the server side calculations by adding in Heroic stats first, but I am still not sure what exactly needs to be done to do it. From testing, I did verify that not only do Heroic stats increase the cap by the value set, but they also add that many of that particular stat for the value set. So, if you are capped at 300 STR and your items actually total 300 STR, and then you get an item that has 10 Heroic STR on it, you will then have 310 STR showing.

I will mess with it more tomorrow night and see if I can figure out how to handle the code for that stuff.

I also added in the field for normal (non-heroic) SV Corruption, since it wasn't coded yet. The Corruption and stuff will be the hardest stuff to add since it isn't anywhere in the source yet. At least the other stats are already everywhere they need to be and to code in Heroic stats should just mean making it add the extra values and increase the caps.
Fields are just for looks atm. They don't do anything, yet.
Reply With Quote
  #6  
Old 07-08-2009, 05:12 PM
ChaosSlayerZ's Avatar
ChaosSlayerZ
Demi-God
 
Join Date: Mar 2009
Location: Umm
Posts: 1,492
Default

roger that
Reply With Quote
  #7  
Old 07-08-2009, 05:18 PM
trevius's Avatar
trevius
Developer
 
Join Date: Aug 2006
Location: USA
Posts: 5,946
Default

Yeah, the new backstabdmg field in the items table will work for all clients once it is added to actually be factored into the source code. I don't see much of a reason for a rule for this since the new field should make it easy enough to fully customize all bs damage for all items, or even just for specific weapons as needed. If no one else gets the new stats added soon, hopefully I will be able to get to them sometime soon. I tried looking into getting them added already, but there are a few things I wasn't understanding. Usually a second look after taking a break from it will help me to understand it better. If anyone has coding suggestions to implement the new stats, I am all ears.

The rule isn't a bad temporary option if servers wanted to add it to thier source manually for now, but I don't personally think it should be added to the SVN just to be removed shortly after when the new item stat code goes in.
__________________
Trevazar/Trevius Owner of: Storm Haven
Everquest Emulator FAQ (Frequently Asked Questions) - Read It!
Reply With Quote
  #8  
Old 07-08-2009, 05:26 PM
Zeice
Sarnak
 
Join Date: Oct 2008
Location: USA
Posts: 92
Default

Yeah, I figured it would only be temporary either way. Maybe this was the wrong forum, but just posted it incase anybody wanted to use it for now.
Reply With Quote
  #9  
Old 07-08-2009, 06:14 PM
gaeorn
Developer
 
Join Date: Apr 2009
Location: USA
Posts: 478
Default

Although, it might be nice to have a rule to adjust the BS damage across the board so if a server wanted to increase all BS damage by 10%, they wouldn't have to go edit every item in the DB that has BS damage.
Reply With Quote
  #10  
Old 07-08-2009, 06:19 PM
Zeice
Sarnak
 
Join Date: Oct 2008
Location: USA
Posts: 92
Default

Yeah, I was thinking about that, too. Although it only takes a small query to do that for items.
Reply With Quote
  #11  
Old 07-08-2009, 07:12 PM
gaeorn
Developer
 
Join Date: Apr 2009
Location: USA
Posts: 478
Default

But it has the advantage of leaving the items in a pristine state.
Reply With Quote
  #12  
Old 07-08-2009, 08:06 PM
trevius's Avatar
trevius
Developer
 
Join Date: Aug 2006
Location: USA
Posts: 5,946
Default

I am not completely apposed to a rule for it, but I think we need to pick and chose what is really worth adding rules for. If we add a special rule for rogue BS damage, then why not add rules for every class damage, or spell effectiveness etc etc until it was overwhelming and bogging down the code? The main reason for adding a rule for monks is because it was added for stuff that items can't necessarily effect directly like their kick attacks. The archery rules are a bit of a special case as well.

For this particular case, it wouldn't exactly be a bad thing to have a rule, but it would be extremely easy to run 1 query on the items table to make the exact same adjustments you would make by changing that rule. And if you are worried about being able to get items to their original settings, just save the query and alter it slightly to run it in reverse. When I make changes to all items in the items table with queries, I always note them on my forums so I can easily undo them if ever needed.

I am sure that if KLS or the other devs like the idea of this rule, that it will be added. I just personally wouldn't add it myself for the reasons stated.
__________________
Trevazar/Trevius Owner of: Storm Haven
Everquest Emulator FAQ (Frequently Asked Questions) - Read It!
Reply With Quote
  #13  
Old 07-08-2009, 08:22 PM
Zeice
Sarnak
 
Join Date: Oct 2008
Location: USA
Posts: 92
Default

Looks like KLS just added the formula to draw from the backstab damage field in items on the SVN an hour ago, so this isn't needed now. =p
Reply With Quote
  #14  
Old 07-08-2009, 08:24 PM
gaeorn
Developer
 
Join Date: Apr 2009
Location: USA
Posts: 478
Default

Actually, I was thinking that eventually allowing the tweaking of character balance through rules for every class would be a great thing. If implemented properly it shouldn't bog down the code significantly. But in any case, I'm willing to go with whatever everyone prefers.
Reply With Quote
  #15  
Old 07-08-2009, 09:05 PM
ChaosSlayerZ's Avatar
ChaosSlayerZ
Demi-God
 
Join Date: Mar 2009
Location: Umm
Posts: 1,492
Default

Quote:
Originally Posted by trevius View Post
I am not completely apposed to a rule for it, but I think we need to pick and chose what is really worth adding rules for. If we add a special rule for rogue BS damage, then why not add rules for every class damage, or spell effectiveness etc etc until it was overwhelming and bogging down the code? The main reason for adding a rule for monks is because it was added for stuff that items can't necessarily effect directly like their kick attacks. The archery rules are a bit of a special case as well.

For this particular case, it wouldn't exactly be a bad thing to have a rule, but it would be extremely easy to run 1 query on the items table to make the exact same adjustments you would make by changing that rule. And if you are worried about being able to get items to their original settings, just save the query and alter it slightly to run it in reverse. When I make changes to all items in the items table with queries, I always note them on my forums so I can easily undo them if ever needed.

I am sure that if KLS or the other devs like the idea of this rule, that it will be added. I just personally wouldn't add it myself for the reasons stated.
Well yeah it depends on specific thing in question.
Spells I can easily modifiy in spell file. BS property for items - once it goes live, but few things stil remain out of reach. Such as - things like Harm Touch and Lay Hands are partialy hard coded in the source despite having a nice entries in spell file. (you cannot alter their refresh time for example). Would be nice to get back control over those things. (by simply allowing their properties to be read from spell data)
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 01:51 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