Lone Wolf Development Forums

Lone Wolf Development Forums (http://forums.wolflair.com/index.php)
-   HL - Savage Worlds (http://forums.wolflair.com/forumdisplay.php?f=59)
-   -   Racial Ability, affects ALL checks (http://forums.wolflair.com/showthread.php?t=60480)

Tilphor April 4th, 2018 02:23 PM

Racial Ability, affects ALL checks
 
Greetings,

I'm a new user of Hero labs, and I love it. I'm Savaging the old Kingdoms of Kalamar setting from D&D 3.0, and it's working out great. I have created new races and weapons and other basic Things.

I am currently attempting to Savage the Sahuagin from D&D 3.0, and I've discovered a challenge above my pay grade: Freshwater Sensitivity.

Essentially it is a Racial "Ability" that causes a -2 (my number) to ALL checks, trait, skill, attack, if the creature is submerged in freshwater and fails a Vigor roll.

what would be the most efficient way of tackling this?

Thanks!

CapedCrusader April 8th, 2018 05:50 PM

Well, to make sure it stacks with Wounds, you probably want to do a foreach loop on component.Trait and alter the field[trtFinal].value somewhere around Traits 7000.

zarlor April 9th, 2018 07:48 AM

CC, I think a new user is going to need more help than that. First it's a situational modifier so you'll need to put the code in for a check for if it's been activated. Those lines look like:
Code:

if (field[abilActive].value <> 0) then
  your-code-here
endif

That should make sure you see it on the In-Play tab as something you can check on or off if it's in effect for that character.

The bigger part would then be affecting every Trait roll (in SW parlance a Trait roll encompasses all Skill and Attribute rolls), which is effectively the same thing as what having 2 Wounds does. I had to dig a bit in the source files, but if I'm reading them right (and I could be WAY off base with this) I THINK the thing you would modify here would be "acNetPenal". Presumably this needs to stack with the normal max Wound penalty of -3, so CC's statement above applies for trying to get the timing for this right so it will properly stack AFTER the Wound Penalties are applied. So I think maybe something like the below set to Traits:7000 will ensure it happens after Net Penalties is calculated (which appears to be at Traits:5000) might do it, and you may want to add a Before:Derived trtFinal to it:

Code:

if (field[abilActive].value <> 0) then
  herofield[acNetPenal].value +=2
endif

I think that should work, but I'm not positive without doing some testing on it.

CapedCrusader April 9th, 2018 09:46 AM

Well, Z, I try not to assume someone's level of knowledge. But yes, you do have a point.

And you're right about putting the conditional on it. So it will also need the User.Activation flag applied to it so it shows up on the In Play tab.

The reasons I didn't mention acNetPenal is that it's where I put the limit of -3. Using that field will not allow greater than the -3 that applies to Wounds.

zarlor April 10th, 2018 03:58 AM

Sorry, CC, I guess my making that same assumption is largely predicated on spending almost my entire career in IT where you start with accepting that folks have almost no knowledge and ramping up the complexity if they seem to know what they are doing. I didn't mean to imply anything derogatory about your approach. In any case I thought if it was done at Traits:7000 that would be after the -3 limit was set, so even I'm clueless (although that's not saying much!) about where it should have gone. So what field should that be set to?

CapedCrusader April 11th, 2018 02:08 AM

No, I can understand that approach as well. I had just gotten back from a 4-day game convention and gave just a brief answer as a result. It'd be eachpick.field[trtFinal].value for each Trait the loop hits.

zarlor April 11th, 2018 04:20 AM

Oh, so you'd have to loop through every trait on the sheet? So I would need multiple loops, then? SOmething like:
Code:

if (field[abilActive].value <> 0) then
  foreach pick in hero from Skill
    eachpick.field[trtRoll].value -= 2
  nexteach
  foreach pick in hero from Attribute
    eachpick.field[trtRoll].value -= 2
  nexteach
endif


CapedCrusader April 11th, 2018 11:51 AM

That's why you use Trait, it does it in one. If he didn't want it to affect Derived Traits, just throw in an if statement to skip the mod if the component.Derived tag is present.


All times are GMT -8. The time now is 11:40 PM.

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