Lone Wolf Development Forums  

Go Back   Lone Wolf Development Forums > Hero Lab Forums > HL - Mutants & Masterminds

Notices

Reply
 
Thread Tools Display Modes
Woodclaw
Senior Member
 
Join Date: Aug 2009
Posts: 127

Old March 7th, 2012, 11:37 PM
Hi people, I'm sorely in need of some help on coding.
In one of the last updates Sneak attack was modified so it counts against PLcaps, which is a great thing, but caused me some problems.
See, in my games Perception Range attacks and General Area attacks doesn't benefit from the Sneak Attack bonus. RIght now I'm trying to modify the code to reflect this, but I had no luck so far.

Can anybody help me on this?

Thanks.
Woodclaw is offline   #1 Reply With Quote
Duggan
Senior Member
Volunteer Data File Contributor
 
Join Date: Nov 2009
Posts: 1,502

Old March 8th, 2012, 03:06 PM
Hmm... Perception can be checked via the range increment of the attack, but probably the more elegant way is to check if it is a power and then checking if it has the extra.

On a side note, the current Sneak Attack implementation does not work with tradeoffs at the moment. A player with Blast 10, Ranged attack bonus +8, and Sneak Attack 1 is said to be over his limits.
Duggan is offline   #2 Reply With Quote
Woodclaw
Senior Member
 
Join Date: Aug 2009
Posts: 127

Old March 8th, 2012, 10:46 PM
Quote:
Originally Posted by Duggan View Post
Hmm... Perception can be checked via the range increment of the attack, but probably the more elegant way is to check if it is a power and then checking if it has the extra.

On a side note, the current Sneak Attack implementation does not work with tradeoffs at the moment. A player with Blast 10, Ranged attack bonus +8, and Sneak Attack 1 is said to be over his limits.
Thanks for the info, I never noticed the problem with trade-off, since I rarely use Sneak Attack on damage shifted characters.
Woodclaw is offline   #3 Reply With Quote
Duggan
Senior Member
Volunteer Data File Contributor
 
Join Date: Nov 2009
Posts: 1,502

Old March 9th, 2012, 06:51 AM
{nods} It's the same error that happened with Deflect. Colen is trying to use a datafield that indicates the available tradeoff, but it doesn't actually modify that value until you actually are in a tradeoff situation. I'll poke at it tonight. There's probably a way to get at it by looking at effective attack bonus.
Duggan is offline   #4 Reply With Quote
Duggan
Senior Member
Volunteer Data File Contributor
 
Join Date: Nov 2009
Posts: 1,502

Old April 2nd, 2012, 06:32 PM
Bumping this. I've made some attempts to fix it, but it's hampered in that the only way we have to know how the attack matches up against PL is via atkDiffAtk or atkDiffDC, both of which won't show a value if it's greater than 0, or atkPLReq, which has an integer granularity.

Also noting that Favored Environment has code which is being bypassed which would modify attack and defense when Favored Environment is on. The catch is that there's no way to turn Favored Environment on and off and it depends on ftOption when it doesn't have the text for that checkbox.

Ideally, Favored Environment should allow one to toggle it on and off, and adjust how many points go to each area. I know... if wishes were fishes. I may implement it as a power for now.
Duggan is offline   #5 Reply With Quote
Woodclaw
Senior Member
 
Join Date: Aug 2009
Posts: 127

Old April 3rd, 2012, 12:37 AM
Quote:
Originally Posted by Duggan View Post
Bumping this. I've made some attempts to fix it, but it's hampered in that the only way we have to know how the attack matches up against PL is via atkDiffAtk or atkDiffDC, both of which won't show a value if it's greater than 0, or atkPLReq, which has an integer granularity.

Also noting that Favored Environment has code which is being bypassed which would modify attack and defense when Favored Environment is on. The catch is that there's no way to turn Favored Environment on and off and it depends on ftOption when it doesn't have the text for that checkbox.

Ideally, Favored Environment should allow one to toggle it on and off, and adjust how many points go to each area. I know... if wishes were fishes. I may implement it as a power for now.
I've given some thoughts about the problem too. About Favored Environment I suggested a long time ago to add a check box to Feast too, but it resulted too complicated to implement.
About Sneak Attack a way to circumvent my original problem might be to add a condition that disable the feat bonus for a specific attack if such attack lack a to-hit roll (being Perception Range or a General Area effect).
Woodclaw is offline   #6 Reply With Quote
Colen
Senior Member
Lone Wolf Staff
 
Join Date: Dec 2008
Posts: 4,690

Old April 3rd, 2012, 09:01 PM
The easiest way to do this is probably to customize Sneak Attack in the editor - you can either remove the PL requirement totally, or simply skip attacks that meet your criteria. For example, right now it's just checking all attacks like so:

Code:
foreach pick in hero where
 "Helper.IsAttack & Helper.ShowAttack & !Helper.AttackCont"
You could change it to omit Perception-range attacks, for example:

Code:
foreach pick in hero where
 "Helper.IsAttack & Helper.ShowAttack & !Helper.AttackCont & !pwRange.Perception"
Hope this helps!
Colen is offline   #7 Reply With Quote
Woodclaw
Senior Member
 
Join Date: Aug 2009
Posts: 127

Old April 4th, 2012, 12:08 AM
Quote:
Originally Posted by Colen View Post
The easiest way to do this is probably to customize Sneak Attack in the editor - you can either remove the PL requirement totally, or simply skip attacks that meet your criteria. For example, right now it's just checking all attacks like so:

Code:
foreach pick in hero where
 "Helper.IsAttack & Helper.ShowAttack & !Helper.AttackCont"
You could change it to omit Perception-range attacks, for example:

Code:
foreach pick in hero where
 "Helper.IsAttack & Helper.ShowAttack & !Helper.AttackCont & !pwRange.Perception"
Hope this helps!
Almost, now I just need to figure out how to apply the same effect to a General Area attack.
Woodclaw is offline   #8 Reply With Quote
Woodclaw
Senior Member
 
Join Date: Aug 2009
Posts: 127

Old April 4th, 2012, 02:10 AM
Ok I tweaked the line provided by Colen like this

Code:
foreach pick in hero where
 "Helper.IsAttack & Helper.ShowAttack & !Helper.AttackCont & !pxUPProAre & !pwRange.Perception"
And it seem to work fine. The only problem is that it doesn't distinguish between General Area and Targeted Area.
Woodclaw is offline   #9 Reply With Quote
Reply

Thread Tools
Display Modes

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 -8. The time now is 03:06 AM.


Powered by vBulletin® - Copyright ©2000 - 2024, vBulletin Solutions, Inc.
wolflair.com copyright ©1998-2016 Lone Wolf Development, Inc. View our Privacy Policy here.