• Please note: In an effort to ensure that all of our users feel welcome on our forums, we’ve updated our forum rules. You can review the updated rules here: http://forums.wolflair.com/showthread.php?t=5528.

    If a fellow Community member is not following the forum rules, please report the post by clicking the Report button (the red yield sign on the left) located on every post. This will notify the moderators directly. If you have any questions about these new rules, please contact support@wolflair.com.

    - The Lone Wolf Development Team

Still not getting the Make a Tab to work

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>
 
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.
 
I have all the menus in place its just making that palyer pick work i have a screen shot to help.
 

Attachments

  • scr.jpg
    scr.jpg
    105.9 KB · Views: 7
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.
 
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.
 
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)
 
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.
 
Back
Top