Lone Wolf Development Forums  

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

Notices

Reply
 
Thread Tools Display Modes
SAbel
Senior Member
 
Join Date: Jul 2007
Location: Walbridge, Ohio
Posts: 767

Old December 28th, 2009, 05:42 PM
Quote:
Originally Posted by rob View Post
The family chooser will be a little more complex. You need to limit the family to only those for the selected clan. To start with, though, keep it simple. Setup the chooser just like you did for the family. The only problem with this is that you'll be able to pick *any* family initially - not just the ones for the selected clan. That's fine for an initial start.

You'll also need to add a menu portal beneath the chooser. This menu will allow the user to pick the trait when the family allows choosing it. For the menu, the user will select one of the traits, so just allow the user to select any trait right now. As above, we'll add the restriction logic later.

The menu must be placed within a template, so you'll also need to add a template that contains the menu. You can have the layout assign the appropriate size to the template and then have the template dictate its size to the menu. Alternately, you can have the template determine the size and then have the layout use that size. The only thing to worry about is when you invoke the Render of the template relative to the sizing logic. The template should be associated with the "Actor" pick when defining the reference within the layout.

The menu will need to be hidden unless the family allows selection. This should be controlled via tags. If a family allows selection of the trait, it should be assigned tags that specify which traits are allowed.

For that, you'll need to define a new tag group called "AllowTrait" (or something similar). You'll need one of these tags for every trait, so you can define them all by hand or let HL do it for you. The latter is easier and accomplished by defining an "identity" tag group. All you need to do is assign an "identity" element to the Trait component and an "AllowTrait" tag is auto-defined for every trait.

Now back to the menu. The visibility of the menu depends on whether there are any traits that can be selected for the family. You can simply check for whether the character has any "AllowTrait" tags. If so, then the menu is visible. This is accomplished via the following line of code.
portal[menuid].visible = hero.tagis[AllowTrait.?]

NOTE! The above won't actually work yet! The problem is that the "AllowTrait" tags are *not* on the actor. They are only on the family. So we have to handle that next.
Hey Rob and everyone else,

I am attempting/failing in adding the ability to have the 3 schools and 3 families that let the player pick which trait to recieve a bonus to.

I have in right now that the family and school work but I can not make this chooser work. I am not sure were all I need to add and what all I need to add.
I believe that I need to be in the tab_clans.dat (Clans Tab) for the menu and that I have to add two areas one that is going to have the hidden menu for picking a Trait and that I have to add that menu in but I am lost to the hows and whats.

I have added the following for the purpose of making this work
Added in the traits.str line 97 <identity group="AllowTrait"/>

I am not sure were to add the
All we need to do is have each family that is selected copy its "AllowTrait" tags to the actor. This is achieved through a single line of script code. We want to do this early so that other mechanisms can base their logic on the presence of the tags. So we end up with the following Eval script.

<eval value="1" phase="Initialize" priority="4000"><![CDATA[
perform forward[AllowTrait.?]
]]></eval>
SAbel is offline   #61 Reply With Quote
SAbel
Senior Member
 
Join Date: Jul 2007
Location: Walbridge, Ohio
Posts: 767

Old December 28th, 2009, 05:44 PM
Oh we started this conversation back on page 5 of this thread to help out I have reread it and its got me running in circles.
SAbel is offline   #62 Reply With Quote
SAbel
Senior Member
 
Join Date: Jul 2007
Location: Walbridge, Ohio
Posts: 767

Old December 28th, 2009, 06:16 PM
I have all the menus in place its just making that palyer pick work i have a screen shot to help.
Attached Images
File Type: jpg scr.jpg (105.9 KB, 7 views)
SAbel is offline   #63 Reply With Quote
rob
Senior Member
Lone Wolf Staff
 
Join Date: May 2005
Posts: 8,232

Old January 4th, 2010, 11:35 PM
Page references aren't helpful. Each user can configure the number of posts per page, and mine is set to 20, so your post with this question appeared at the top of page 4 for me. Makes it kind of hard to find a reference on page 5, eh? :-)

Please cite the post number when referencing a specific post. You'll find it in the lower left corner of the post, beneath the details on the poster. For example, your new posts are #61 through #63, so this one of mine should be #64.
rob is offline   #64 Reply With Quote
rob
Senior Member
Lone Wolf Staff
 
Join Date: May 2005
Posts: 8,232

Old January 4th, 2010, 11:41 PM
Quote:
Originally Posted by SAbel View Post
I am not sure were to add the
All we need to do is have each family that is selected copy its "AllowTrait" tags to the actor. This is achieved through a single line of script code. We want to do this early so that other mechanisms can base their logic on the presence of the tags. So we end up with the following Eval script.

<eval value="1" phase="Initialize" priority="4000"><![CDATA[
perform forward[AllowTrait.?]
]]></eval>
Looking back at my original post containing the above quote, the sentence preceding what you quoted is critical. I'll repeat it below:

"So how do we get the tags from the family to the actor? We need to write a script that copies them. Since we want all families to do this automatically, we'll add an Eval script to the Family component."

I'm assuming you were following the sequence I had outlined. If so, you should have a component with the id "Family". This component contains the particulars of managing the various families for the clans, and the "Family" component set would incorporate this component. By defining the Eval script within the component, it means that every single thing based on the component automatically inherits the script. Consequently, every family you define as a thing (e.g. "Hida") will have the script. That means that every family will automatically forward all the "AllowTrait" tags that are assigned to it up to its container - i.e. the character.
rob is offline   #65 Reply With Quote
SAbel
Senior Member
 
Join Date: Jul 2007
Location: Walbridge, Ohio
Posts: 767

Old January 5th, 2010, 01:33 PM
Quote:
Originally Posted by rob View Post
Page references aren't helpful. Each user can configure the number of posts per page, and mine is set to 20, so your post with this question appeared at the top of page 4 for me. Makes it kind of hard to find a reference on page 5, eh? :-)

Please cite the post number when referencing a specific post. You'll find it in the lower left corner of the post, beneath the details on the poster. For example, your new posts are #61 through #63, so this one of mine should be #64.
Sorry Rob I forgot that the world does not revolve around me LOL I was looking at post 41 by me then you followed with two post (42 - 43)
SAbel is offline   #66 Reply With Quote
rob
Senior Member
Lone Wolf Staff
 
Join Date: May 2005
Posts: 8,232

Old January 5th, 2010, 02:06 PM
It appears I was looking at the wrong posts then. So now I'm not sure if I answered the correct question above. I hope so. If not, please point me to the specific question you want answered and I'll do my best to help.
rob is offline   #67 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 11:22 AM.


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