Lone Wolf Development Forums

Lone Wolf Development Forums (http://forums.wolflair.com/index.php)
-   HL - d20 System (http://forums.wolflair.com/forumdisplay.php?f=46)
-   -   Disable effects of any item in a script. (http://forums.wolflair.com/showthread.php?t=11919)

risner December 12th, 2010 11:13 AM

Disable effects of any item in a script.
 
I need to disable the effects of items suppressed by script:

I tried this:
foreach pick in hero from BaseEquip
if (each.field[gIsEquip].value <> 0) then
each.field[gIsEquip].value = 0
endif
nexteach

This didn't work because it said it was derived.

I also tried these:
perform each.assign[Helper.Suppress]
perform each.delete[thing.activated]
perform each.delete[Helper.ShowSpec]

None of these worked either. I think most of the scripts use gIsEquip to apply their effects, so I need a way to change the derived field gIsEquip on other items as long as the effect is activated from the template.

It works if I put "trustme" before, but when I remove the template there is nothing to re-equip the items that were unequipped.

1) Is there a better way to temporarily "unequip" an item until an effect causing the unequip event is removed?

2) Is there a way to run a script on the removal of a template?

Mathias December 12th, 2010 02:10 PM

Phase and Priority?

risner December 12th, 2010 03:42 PM

Quote:

Originally Posted by Mathias (Post 48935)
Phase and Priority?

Right now the template is operating at Pre-Levels/10000 and works at removing the equip check box.

What I can't figure out is how to add the check box again when I remove the template. I tried tagging them and using an adjustment to look for the tag, remove it, and re-equip it. But that doesn't work.

risner December 12th, 2010 04:17 PM

Can I do something to force a field to be added to all items in a script?

Right now the script adds User.HideItem to each item, then "trustme", changes gIsEquip = 0.
I then have an Adjustment look for items items with User.HideItem and if found will "trustme" and gIsEquip = 1.

But it doesn't work because when I remove the template, it removes the User.HideItem tag and the script in the adjustment never turns the item back on because it never notices the User.HideItem tag.

So I'm back to wondering if there is a way to run something in a script when you remove a template?

Mathias December 12th, 2010 05:17 PM

Suppress only works on the things that something bootstraps, not the thing itself, thing.activated is a Pathfinder-only mechanism, and Items aren't specials, so ShowSpec doesn't apply to them.

What unequips an item from the character - I don't know of anything that currently does this?

If you're using this to get access to on-off switches, and those aren't real items, use Specials with Activations instead.

risner December 12th, 2010 05:42 PM

Quote:

Originally Posted by Mathias (Post 48941)
What unequips an item from the character - I don't know of anything that currently does this?

I'm trying to code Wild Shape templates to make item that are not tagged as "kept in wild shape" (User.ActiveWS) deactivate their benefits.

This rule:
any item you carry melds into your form and becomes non-functional

I don't know how to implement this without reversing their behaviour by hand or unequipping them by script (better.)

The only problem with unequipping is there isn't any way to reequip.

It seems anything the script does to modify (the template) to list the items unequipped, gets erased when HL processes the removal of the template that built the list.

So the Adjustment I have that bootstrapped a special to hold the unequipped items find the list of unequipped items blank when the template is removed. So nothing to do ;-(

Mathias December 12th, 2010 06:51 PM

I'd recommend an Eval Rule that complains if things are left equipped, rather than altering the items themselves.


All times are GMT -8. The time now is 03:20 AM.

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