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
Mathias
Senior Member
Lone Wolf Staff
 
Join Date: May 2005
Posts: 13,213

Old May 11th, 2012, 07:39 AM
if (field[fChosen].chosen.tagis[Helper.NatPrimary] <> 0) then
Mathias is offline   #21 Reply With Quote
Sendric
Senior Member
 
Join Date: Jul 2010
Posts: 3,147

Old May 11th, 2012, 09:04 AM
Quote:
Originally Posted by Mathias View Post
if (field[fChosen].chosen.tagis[Helper.NatPrimary] <> 0) then
Unfortunately, that is one of the methods I tried. It also doesn't seem to be working.
Sendric is online now   #22 Reply With Quote
Mathias
Senior Member
Lone Wolf Staff
 
Join Date: May 2005
Posts: 13,213

Old May 11th, 2012, 09:34 AM
Sorry, didn't even look at the first line.

foreach and field[fChosen].chosen are two different ways of finding things - only use one or the other - you can't just merge them.
Mathias is offline   #23 Reply With Quote
Mathias
Senior Member
Lone Wolf Staff
 
Join Date: May 2005
Posts: 13,213

Old May 11th, 2012, 09:37 AM
I'm surprised that code didn't give you any error messages.

(If it did give you error messages, then right-clicking them, copying them, and pasting them into your post when you said it wasn't working would have sped up figuring out what was wrong).
Mathias is offline   #24 Reply With Quote
Kendall-DM
Spy
 
Join Date: Jan 2011
Location: Van Nuys, California
Posts: 1,220

Old May 11th, 2012, 10:06 AM
Quote:
Originally Posted by Sendric View Post
For some reason (probably cause I'm dumb), I'm having a hard time determining if the Helper.NatPrimary tag exists on something. Here's the code I'm trying and failing with:

Code:
 foreach bootstrap in field[fChosen].chosen where "component.BaseNatWep & thingid.wBite"
  if (tagis[Helper.NatPrimary] <> 0) then
   blah blah blah
  endif
 nexteach
Am I taking the completely wrong approach or is my if statement just not right?
The reason that it can't pick it up is because the hero that the natural attack is one, that is has the Helper.NatPrimary tag, isn't live yet. The tag is assigned to an attack when the hero becomes live, but is not assigned when it is not live. This is because these tags are being assigned dynamically. Now, if the actual weapon, wBite for example, had the Helper.NatPrimary tag added to it in the Editor, it would always be assigned (statically) which means it would always be available. However, not every creature has that as its primary attack. Anything that is assigned to the Race itself, in the Editor, is available. Anything that is assigned to a Thing that is on the Race is not. That's why I can access the rSTR, rDEX, etc. fields, they are statically assigned. So is wBite, it is assigned to the Race. The Helper.NatPrimary is assigned to the wBite, but only when the creature is live.

That is why I attempted to do the "foreach actor in portfolio" because I thought all the actors (heroes) in a portfolio were live. Turns out, only the active hero is live. The other heroes are only live long enough to produce their output, but seem to go non-live when they are not active (which strangely doesn't change their output to the screen). So, unless there is a way to make all things live outside of the current hero you are working with, none of the relevant tags and fields that are set up for the things on a Race will be available until it is live. That's what I meant when I said that was as far as I was willing to go.

Now you could do the custom tags, but you would have to statically custom tag each race just to get the results you want. Editing each race to do that would be a monumental task, just to add a lot of custom tags to each one that worked with your Alternate Form, Change Shape, Wild Shape, etc.
Kendall-DM is offline   #25 Reply With Quote
Sendric
Senior Member
 
Join Date: Jul 2010
Posts: 3,147

Old May 11th, 2012, 10:07 AM
Quote:
Originally Posted by Mathias View Post
I'm surprised that code didn't give you any error messages.

(If it did give you error messages, then right-clicking them, copying them, and pasting them into your post when you said it wasn't working would have sped up figuring out what was wrong).
There was no error when I tried combining them as such:

Code:
 foreach bootstrap in field[fChosen].chosen where "component.BaseNatWep & thingid.wBite"
  if (field[fChosen].chosen.tagis[Helper.NatPrimary] <> 0) then
   perform hero.child[wBite].assign[Helper.NatPrimary]
  endif
 nexteach
I would have posted it otherwise (assuming I hadn't figured out why there was an error).

I don't think this will work without the foreach because the thing being chosen is a race. So, the goal here is to figure out if something bootstrapped to the chosen object has the Helper.NatPrimary tag associated with it.
Sendric is online now   #26 Reply With Quote
Sendric
Senior Member
 
Join Date: Jul 2010
Posts: 3,147

Old May 11th, 2012, 10:10 AM
Quote:
Originally Posted by Kendall-DM View Post
The reason that it can't pick it up is because the hero that the natural attack is one, that is has the Helper.NatPrimary tag, isn't live yet. The tag is assigned to an attack when the hero becomes live, but is not assigned when it is not live. This is because these tags are being assigned dynamically. Now, if the actual weapon, wBite for example, had the Helper.NatPrimary tag added to it in the Editor, it would always be assigned (statically) which means it would always be available. However, not every creature has that as its primary attack. Anything that is assigned to the Race itself, in the Editor, is available. Anything that is assigned to a Thing that is on the Race is not. That's why I can access the rSTR, rDEX, etc. fields, they are statically assigned. So is wBite, it is assigned to the Race. The Helper.NatPrimary is assigned to the wBite, but only when the creature is live.

That is why I attempted to do the "foreach actor in portfolio" because I thought all the actors (heroes) in a portfolio were live. Turns out, only the active hero is live. The other heroes are only live long enough to produce their output, but seem to go non-live when they are not active (which strangely doesn't change their output to the screen). So, unless there is a way to make all things live outside of the current hero you are working with, none of the relevant tags and fields that are set up for the things on a Race will be available until it is live. That's what I meant when I said that was as far as I was willing to go.

Now you could do the custom tags, but you would have to statically custom tag each race just to get the results you want. Editing each race to do that would be a monumental task, just to add a lot of custom tags to each one that worked with your Alternate Form, Change Shape, Wild Shape, etc.

Ahh...that certainly explains it. Sorry. I guess I wasn't fully understanding the initial problem.
Sendric is online now   #27 Reply With Quote
Kendall-DM
Spy
 
Join Date: Jan 2011
Location: Van Nuys, California
Posts: 1,220

Old May 11th, 2012, 10:12 AM
Quote:
Originally Posted by Mathias View Post
Sorry, didn't even look at the first line.

foreach and field[fChosen].chosen are two different ways of finding things - only use one or the other - you can't just merge them.
This actually does work Mathias. I scoured the Wiki to find it, but it says it will work, and it does in HL, you can use both.

For example, it does find the bootstraps on the race just fine, it can't find the things that are bootstrapped to that bootstrap found though, since that bootstrap isn't live to allow the tags to be assigned. I keep finding all kinds of things that can be done in the Wiki, amazing resource.

Gotten to understand it so well, thinking of designing my game in it from scratch, for my personal use of course.

Last edited by Kendall-DM; May 11th, 2012 at 10:19 AM.
Kendall-DM is offline   #28 Reply With Quote
Kendall-DM
Spy
 
Join Date: Jan 2011
Location: Van Nuys, California
Posts: 1,220

Old May 11th, 2012, 10:16 AM
Quote:
Originally Posted by Sendric View Post
I don't think this will work without the foreach because the thing being chosen is a race. So, the goal here is to figure out if something bootstrapped to the chosen object has the Helper.NatPrimary tag associated with it.
Oh yeah, right, didn't notice that. You wouldn't be able to find the Helper.NatPrimary on the Race, good catch. That's what I get for not paying attention.
Kendall-DM is offline   #29 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 06:09 AM.


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