Lone Wolf Development Forums  

Go Back   Lone Wolf Development Forums > Hero Lab Forums > HL - d20 System
Register FAQ Community Today's Posts Search

Notices

Reply
 
Thread Tools Display Modes
KarlM
Junior Member
 
Join Date: Jun 2011
Location: Canberra, Australia
Posts: 10

Old June 6th, 2011, 09:03 PM
Hi

I'm trying to write a feat, which has several options. Depending on which option is chosen, I want a different Special Ability to show on the Specials tab.

So far, I can offer the choice with a custom expression in the feat based on a user tag denoting the set of possible abilities.

I can write an eval script in the feat to set another user tag on the hero denoting which special ability to activate.

I can see (using the hero tags floating info window) that the second tag gets set on the hero.

How do I either activate the relevant ability with a script in the feat or with a script in the ability?

I tried an eval script in the ability along the lines of
Code:
if (hero.tagis[User.Abil01] <> 0) then
  perform assign[Helper.ShowSpec]
endif
But I'm not sure what to do to get that script to run, or if - when it is run - it will do what I want.

Should I instead set ShowSpec on the tag from the feat? How do I do that?

Is in fact setting ShowSpec the right thing to do?

Help?

Thanks
Karl

Last edited by KarlM; June 6th, 2011 at 09:05 PM. Reason: grammar!
KarlM is offline   #1 Reply With Quote
Lawful_g
Senior Member
Volunteer Data File Contributor
 
Join Date: Mar 2007
Posts: 1,245

Old June 6th, 2011, 09:15 PM
I think you have the right idea. What I would do is make one or more specials (with whatever eval scripts necessary on them) for the different feat choices, then bootstrap them to the feat.

From there 2 ways to go. Each could have a bootstrap condition searching for a certain tag on the hero before adding themselves. Or you could have an eval script on the specials searching for the certain tag and applying the Helper.ShowSpec tag to itself (and whatever other Evals check for the ShowSpec tag before proceeding).
Lawful_g is offline   #2 Reply With Quote
KarlM
Junior Member
 
Join Date: Jun 2011
Location: Canberra, Australia
Posts: 10

Old June 7th, 2011, 03:04 AM
Thanks. This is exactly the point I am at. I have several different specials bootstrapped to the feat. I'd figured out roughly that those are two different ways to tackle the problem, but I have minimal exposure to this environment, so I don't know how to implement them.

Can you give me more specific guidance?

I do not know how to do either of your two options!

The code I wrote is an attempt at your second option (as an eval script on a special). What phase and priority should I choose for it?
KarlM is offline   #3 Reply With Quote
Lawful_g
Senior Member
Volunteer Data File Contributor
 
Join Date: Mar 2007
Posts: 1,245

Old June 7th, 2011, 06:18 AM
Go with method 2 then.

Well I assume you wrote an eval script on the feat to assign the tag to the hero. As long as the eval scripts on your specials run at a later phase and priority than the script assigning the tag then they should be able to detect that tag and show themselves.
Lawful_g is offline   #4 Reply With Quote
KarlM
Junior Member
 
Join Date: Jun 2011
Location: Canberra, Australia
Posts: 10

Old June 7th, 2011, 02:37 PM
Quote:
Originally Posted by Lawful_g View Post
Well I assume you wrote an eval script on the feat to assign the tag to the hero. As long as the eval scripts on your specials run at a later phase and priority than the script assigning the tag then they should be able to detect that tag and show themselves.
Yes exactly. However I cannot get that to work.

I have a tag, User.PickAbil, assigned to two different specials, Abil01 and Abil02. In the feat, Custom Expression has the value User.PickAbil. That part works fine.

I have this script on the feat (wrapper stuff copy/pasted from other people's work, including yours! thanks so much btw!)
Code:
Pre-Levels, 4500, 1

~ If we're disabled, do nothing
doneif (tagis[Helper.FtDisable] <> 0)
 
~ If we haven't chosen anything, get out now
if (field[fChosen].ischosen = 0) then
  done
endif

~ Assign an appropriate tag to ourselves depending on choice
if (field[fChosen].chosen.tagis[User.Abil01] <> 0) then
  perform hero.assign[User.Abil01]
elseif (field[fChosen].chosen.tagis[User.Abil02] <> 0) then
  perform hero.assign[User.Abil02]
endif
 
~don't show us when printed
if (state.isoutput <> 0) then
  perform assign[Helper.FtHide]
endif
I can bring up the hero tags window, with no choice made, and neither tag is assigned. I can choose Abil01 or Abil02, and see the appropriate tag assigned to the hero. I can swap between the two choices and see the tag change. So that part works ok as well.

This next part doesn't work. In the special called Abil01, I have this eval script:
Code:
Pre-Attributes, 5000, 1

if (hero.tagis[User.Abil01] <> 0) then
  perform assign[Helper.ShowSpec]
endif
perform hero.assign[User.Abils]
I'm assigning the User.Abils tag on the hero, in order to demonstrate to myself that the script has in fact run: this tag never appears.

So I'm thinking I must be missing something. Probably something obvious?
KarlM is offline   #5 Reply With Quote
Lawful_g
Senior Member
Volunteer Data File Contributor
 
Join Date: Mar 2007
Posts: 1,245

Old June 7th, 2011, 02:56 PM
That seems like it should work. Can you send me a copy so I can fiddle with it? PM for e-mail address.
Lawful_g is offline   #6 Reply With Quote
Lawful_g
Senior Member
Volunteer Data File Contributor
 
Join Date: Mar 2007
Posts: 1,245

Old June 7th, 2011, 06:34 PM
Alright, I see your problems now, the specials you made are not being added to the hero when you add the feat. Since they aren't present they can't detect the tag and perform any actions.

You need to link your specials to the feat by bootstrapping them so that they are added together. Click on the Bootstrap button on the feat and enter unique IDs for each of the specials you want to select from.

Second, the specials for the various starsigns have their "Show in Specials List" and "Show in Charges List" checked. This means they will already show by default when the feat is added. Unclick those so they are invisible by default.

Third, the only special with the Eval script is "The Rose", so copy and modify that to the other specials. That way when the special detects the correct tag, they will apply the appropriate Helper to show themselves.

Aaaand, I think it will work out then. If you have any more problems please post.
Lawful_g is offline   #7 Reply With Quote
KarlM
Junior Member
 
Join Date: Jun 2011
Location: Canberra, Australia
Posts: 10

Old June 7th, 2011, 08:20 PM
awesome, thanks for checking that out. I really appreciate it. It makes sense, I'll check it out when I get home.

What's the difference between using the bootstrap button and the specials button to link a special to a feat?
KarlM is offline   #8 Reply With Quote
Lawful_g
Senior Member
Volunteer Data File Contributor
 
Join Date: Mar 2007
Posts: 1,245

Old June 7th, 2011, 08:43 PM
I need to clarify some terminology, please do not take offense.

In the editor there are many types of things that can be created, like spells/races/feats etc. These are listed near the top in a series of tabs. These are purely to organize similar things together, and I think you meant the special tab when you said the special button. If not then tell me what you meant by "specials button" because I am aware of no such thing.

Specials can be linked to many things (classes, items, feats, etc) so bootstraps are the way to go.
Lawful_g is offline   #9 Reply With Quote
KarlM
Junior Member
 
Join Date: Jun 2011
Location: Canberra, Australia
Posts: 10

Old June 7th, 2011, 10:58 PM
No offense taken, clarification welcome, especially with extreme newbies like me around

I understand what you mean by the specials tab. what I was referring too, is within the configuration for a feat. you hit the feat tab, select a feat, in the center window scroll down a ways. one of the many things to configure is a button marked specals, which will give you a list of things defined using the specials tab
KarlM is offline   #10 Reply With Quote
Reply


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 04:01 PM.


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