tedgoat
2006-09-10 10:00:48 UTC
#39764
Seems that I have read about this here before, but I cannot find it now, so... Is there a way to search the forums?
Druid Trackless step and Nature Sense don't appear to work in the lake area (in at least 2 areas). Are these areas not considered wilderness?
MadCaddies
2006-09-10 10:31:19 UTC
#39766
tedgoat
2006-09-10 13:55:46 UTC
#39787
I'm a first-time scripter, but how about using this area event info:
http://nwn.bioware.com/builders/sctutorial16.html
to trigger this on a target PC each time one enters the area:
void main()
{
if (GetHasFeat(FEAT_TRACKLESS_STEP))
{
eHideBonus = EffectSkillIncrease(SKILL_HIDE,2);
eMoveSilentlyBonus = EffectSkillIncrease(SKILL_MOVE_SILENTLY,2);
ApplyEffectToObject(DURATION_TYPE_PERMANENT, eHideBonus, oTarget);
ApplyEffectToObject(DURATION_TYPE_PERMANENT, eMovSilentlyBonus, oTarget);
if (GetHasFeat(FEAT_NATURE_SENSE))
{
eAttackBonus = EffectAttackIncrease(2, ATTACK_BONUS_MISC);
ApplyEffectToObject(DURATION_TYPE_PERMANENT, eAttackBonus, oTarget);
}
The effect should be cancelled when the area is left - again using http://nwn.bioware.com/builders/sctutorial16.html.
I'm sure I left something out or typed something that doesn't make sense above. Does this seem doable?
Arkov
2006-09-10 17:31:50 UTC
#39805
It would need a little bit of work (to group the effects together so they're properly removed and nothing else is removed) and there might be other slight complications for general use, but aside from that it should work.
tedgoat
2006-09-10 22:45:28 UTC
#39863
That would be beautiful. :)
I suppose the effects would pop-up near the character portraits as other effects do? That would be a handy reference in itself...
tedgoat
2006-09-17 17:16:56 UTC
#41123
How about adding this to the OnEnter Script for each "Wilderness" area:
object oEntering = GetEnteringObject();
if (GetHasFeat(FEAT_TRACKLESS_STEP, oEntering))
{
effect eHideBonus = EffectSkillIncrease(SKILL_HIDE,2);
effect eMoveSilentlyBonus = EffectSkillIncrease(SKILL_MOVE_SILENTLY,2);
//Prevents dispel magic, rest, etc... from removing effect
eHideBonus = SupernaturalEffect(eHideBonus);
eMoveSilentlyBonus = SupernaturalEffect(eMoveSilentlyBonus);
ApplyEffectToObject(DURATION_TYPE_PERMANENT, eHideBonus, oEntering);
ApplyEffectToObject(DURATION_TYPE_PERMANENT, eMoveSilentlyBonus, oEntering);
}
if (GetHasFeat(FEAT_NATURE_SENSE, oEntering))
{
effect eAttackBonus = EffectAttackIncrease(2, ATTACK_BONUS_MISC);
//Prevents dispel magic, rest, etc... from removing effect
eAttackBonus = SupernaturalEffect(eAttackBonus);
ApplyEffectToObject(DURATION_TYPE_PERMANENT, eAttackBonus, oEntering);
}
And adding this to the OnExit Script for each "Wilderness" area:
object oExiting = GetExitingObject();
effect eEffect = GetFirstEffect(oExiting);
while (GetIsEffectValid(eEffect))
{
if ((GetEffectCreator(eEffect) == GetArea(OBJECT_SELF)) && GetEffectSubType(eEffect) == SUBTYPE_SUPERNATURAL)
RemoveEffect(oExiting, eEffect);
eEffect=GetNextEffect(oExiting);
}
This seems to work well in preliminary tests I've done. At least for attack bonuses - they stack with other attack bonuses, and leaving the area removes only the bonus that the area itself applied to the PC - leaving other bonuses (if any) intact.
Arkov
2006-09-18 11:22:03 UTC
#41290
Expect this (well, a similar system) in as of v736.