Lone Wolf Development Forums  

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

Notices

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
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   #26 Reply With Quote
 


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 07:10 AM.


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