UPDATE@1/23/15: PLEASE USE LATEST TRINITY VERSION 2.3.3 FOR A UP TO DATE DEMONHUNTER COMBAT ROUTINE FIXED BETTER THEN THIS. Way better working routine with clean code!
I have seen a lot of people asking about how to make X work with kridershot and how to get prep punishment to be used by the bot, Mostly I have been showing people how to do it by copy pasting snippets of code into their combat routine .cs file. I am by no means an expert on this, But it was simple enough to fix a few things. Anyone who can improve upon it please do(ie clean up the prep code to get rid of shadowpower junk in it that isn't used, just looks ugly but still functions 100% fine).
Here are a few things to know or understand if you are using m6 set with a kridershot in 2.1.2 and wondering why your bot wont fire CA and just spams elemental arrow. It is because in the DH combat routine, EA comes before CA. So to fix this, I simply put CA right above EA. To fix the bot to use prep punishment, I simply rewrote a few pieces of the shadow power code that no one uses so that instead of using Preperation for discipline(in 2.1.2 everyone uses Punishment rune, +75 hatred so the discipline doesn't matter) So basically I changed secondaryresource(disc) to primaryresource(hatred) and changed the value to use prep when you get to 40 hatred or lower. NOW I have it set to 40 because I have 125 hatred(+25 hatred via paragon pts) so if you DO NOT have any para points into hatred I suggest you manually edit this number to 25 or 30 for best use but it should not be too big of a difference at 40.
Onto the upload, simply open your bot folder and go to Plugins -> Trinity -> Combat -> Abilities folder, and replace this demonhuntercombat.cs file over your old one.
*For non-kridershot users, This should work just fine as bug works in reverse it seems. It detects if you have a kridershot equipped, and if you do it will only shoot EA nonstop instead of using CA. This fixes it so it uses CA as its primary spender and EA as a generator/backup shooter.
How to change the value if you wish to use prep - punishment at a lower hatred +75 hatred @ 40 remaining = total of 115 so you may occasionally waste 1-15 hatred if you leave it at 40 if you have no paragon points into this but primarily it is not a big issue because you will barely ever land exactly on 40 hatred while the bot is spamming attack spenders. But regardless, if you want to change it open up the DemonHunterCombat.cs file
Search for this line of code. Simply change 2 the number 40s, to 25. or copy paste this entire code over the existing one there.
// Spam Shadow Power - fixed for prep punishment
if (Settings.Combat.DemonHunter.SpamShadowPower && CanCast(SNOPower.DemonHunter_ShadowPower) && !Player.IsIncapacitated &&
(!GetHasBuff(SNOPower.DemonHunter_ShadowPower) || Player.CurrentHealthPct <= Trinity.PlayerEmergencyHealthPotionLimit) && // Uses Preparation when equal or less then 40 hatred
((!Runes.DemonHunter.Punishment.IsActive && Player.PrimaryResource <= 40) || (Runes.DemonHunter.Punishment.IsActive && Player.PrimaryResource <= 40)) &&
(Settings.Combat.DemonHunter.SpamShadowPower && Player.SecondaryResource <= 25))
{
return new TrinityPower(SNOPower.DemonHunter_ShadowPower);
}
If anyone more experienced can think of or make any more improvements would certainly be nice. Sentries work pretty good atm, but with custom engineering the bot still drops them pretty constantly, usually if its a long fight or a multiple high hp elite/unique packs. the bot will recast a sentry again that has been u p for maybe 20 seconds and doesn't expire for ~40 more. I don't know if changing this to detect custom eng would be better or leaving it alone would though. For when its not stuck on high hp grift targets where it can drop 5 sentries in one spot, in a normal t6 rift for instance it is VERY efficient in the method it works.
questions? opinions? any feedback, criticism is welcome!
I have seen a lot of people asking about how to make X work with kridershot and how to get prep punishment to be used by the bot, Mostly I have been showing people how to do it by copy pasting snippets of code into their combat routine .cs file. I am by no means an expert on this, But it was simple enough to fix a few things. Anyone who can improve upon it please do(ie clean up the prep code to get rid of shadowpower junk in it that isn't used, just looks ugly but still functions 100% fine).
Here are a few things to know or understand if you are using m6 set with a kridershot in 2.1.2 and wondering why your bot wont fire CA and just spams elemental arrow. It is because in the DH combat routine, EA comes before CA. So to fix this, I simply put CA right above EA. To fix the bot to use prep punishment, I simply rewrote a few pieces of the shadow power code that no one uses so that instead of using Preperation for discipline(in 2.1.2 everyone uses Punishment rune, +75 hatred so the discipline doesn't matter) So basically I changed secondaryresource(disc) to primaryresource(hatred) and changed the value to use prep when you get to 40 hatred or lower. NOW I have it set to 40 because I have 125 hatred(+25 hatred via paragon pts) so if you DO NOT have any para points into hatred I suggest you manually edit this number to 25 or 30 for best use but it should not be too big of a difference at 40.
Onto the upload, simply open your bot folder and go to Plugins -> Trinity -> Combat -> Abilities folder, and replace this demonhuntercombat.cs file over your old one.
*For non-kridershot users, This should work just fine as bug works in reverse it seems. It detects if you have a kridershot equipped, and if you do it will only shoot EA nonstop instead of using CA. This fixes it so it uses CA as its primary spender and EA as a generator/backup shooter.
How to change the value if you wish to use prep - punishment at a lower hatred +75 hatred @ 40 remaining = total of 115 so you may occasionally waste 1-15 hatred if you leave it at 40 if you have no paragon points into this but primarily it is not a big issue because you will barely ever land exactly on 40 hatred while the bot is spamming attack spenders. But regardless, if you want to change it open up the DemonHunterCombat.cs file
Search for this line of code. Simply change 2 the number 40s, to 25. or copy paste this entire code over the existing one there.
// Spam Shadow Power - fixed for prep punishment
if (Settings.Combat.DemonHunter.SpamShadowPower && CanCast(SNOPower.DemonHunter_ShadowPower) && !Player.IsIncapacitated &&
(!GetHasBuff(SNOPower.DemonHunter_ShadowPower) || Player.CurrentHealthPct <= Trinity.PlayerEmergencyHealthPotionLimit) && // Uses Preparation when equal or less then 40 hatred
((!Runes.DemonHunter.Punishment.IsActive && Player.PrimaryResource <= 40) || (Runes.DemonHunter.Punishment.IsActive && Player.PrimaryResource <= 40)) &&
(Settings.Combat.DemonHunter.SpamShadowPower && Player.SecondaryResource <= 25))
{
return new TrinityPower(SNOPower.DemonHunter_ShadowPower);
}
If anyone more experienced can think of or make any more improvements would certainly be nice. Sentries work pretty good atm, but with custom engineering the bot still drops them pretty constantly, usually if its a long fight or a multiple high hp elite/unique packs. the bot will recast a sentry again that has been u p for maybe 20 seconds and doesn't expire for ~40 more. I don't know if changing this to detect custom eng would be better or leaving it alone would though. For when its not stuck on high hp grift targets where it can drop 5 sentries in one spot, in a normal t6 rift for instance it is VERY efficient in the method it works.
questions? opinions? any feedback, criticism is welcome!
Attachments
Last edited: