Lone Wolf Development Forums  

Go Back   Lone Wolf Development Forums > Hero Lab Forums > HL - d20 System

Notices

Reply
 
Thread Tools Display Modes
risner
Senior Member
Volunteer Data File Contributor
 
Join Date: Jun 2010
Posts: 623

Old December 12th, 2010, 11:13 AM
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?

Last edited by risner; December 12th, 2010 at 11:38 AM.
risner is offline   #1 Reply With Quote
Mathias
Senior Member
Lone Wolf Staff
 
Join Date: May 2005
Posts: 13,207

Old December 12th, 2010, 02:10 PM
Phase and Priority?
Mathias is offline   #2 Reply With Quote
risner
Senior Member
Volunteer Data File Contributor
 
Join Date: Jun 2010
Posts: 623

Old December 12th, 2010, 03:42 PM
Quote:
Originally Posted by Mathias View Post
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 is offline   #3 Reply With Quote
risner
Senior Member
Volunteer Data File Contributor
 
Join Date: Jun 2010
Posts: 623

Old 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?
risner is offline   #4 Reply With Quote
Mathias
Senior Member
Lone Wolf Staff
 
Join Date: May 2005
Posts: 13,207

Old 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.
Mathias is offline   #5 Reply With Quote
risner
Senior Member
Volunteer Data File Contributor
 
Join Date: Jun 2010
Posts: 623

Old December 12th, 2010, 05:42 PM
Quote:
Originally Posted by Mathias View Post
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 ;-(
risner is offline   #6 Reply With Quote
Mathias
Senior Member
Lone Wolf Staff
 
Join Date: May 2005
Posts: 13,207

Old 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.
Mathias is offline   #7 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:50 AM.


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