I am trying to create a mod that changes a talent to be able to backstab. I've accomplished this much, but I also have it set up that the player gains a bonus to damage from stealth which was not applying to the skill. I literally toiled over this for over an hour reworking my code trying to get it to work. Then it finally occured to me that the problem might be with stealth itself. So, feeling like an idiot, I found the line that drops stealth when a skill is used and added an exception for the skill I wanted. Now I see the bonus from stealth as intended, but stealth does not drop after the skill is used. I can't seem to find any way to make the skill get the benefit from stealth, but still drop after using it. I know it must be possible since that is the way it works for regular attacks. Any ideas?
Stealth and skills
Débuté par
Anomaly-
, févr. 19 2010 10:36
#1
Posté 19 février 2010 - 10:36
#2
Posté 20 février 2010 - 08:58
during a attack you can simply check if the stealth talent is active.
#3
Posté 20 février 2010 - 10:49
CID-78 wrote...
during a attack you can simply check if the stealth talent is active.
Not too sure what you mean. I've already added the check for stealth to the skill script, if thats what you mean. It didn't matter, stealth would still drop as soon as the skill was used and recieve no bonus.
#4
Posté 20 février 2010 - 11:03
stealth drops because the combat/talent engine tells it to do so. but that is what you want. are you claiming that your stealth check fails all the time?
#5
Posté 20 février 2010 - 11:26
CID-78 wrote...
stealth drops because the combat/talent engine tells it to do so. but that is what you want. are you claiming that your stealth check fails all the time?
It doesn't fail, no. The problem is that I've only been able to find two options. Either have stealth drop when using the skill and recieve no bonus from it as per default, or have it remain up even after the skill is used and recieve the bonus. What I'd like is a third option where I recieve the bonus AND it drops.
#6
Posté 21 février 2010 - 07:37
int Combat_GetAttackResult(object oAttacker, object oTarget, object oWeapon, float fBonus = 0.0f, int nAbility = 0) is handling that part. found in combat_h.nss
and that happens after the you drop stealth. so something is wrong with your script logic.
and that happens after the you drop stealth. so something is wrong with your script logic.
#7
Posté 22 février 2010 - 09:27
Bleh, this is beyond me for the time being. Maybe I'll come back to it at a later time when I've learned more. Thanks for the assistance, anyway.





Retour en haut






