Chooser Table (menu_things?) that dictates the values of two selections in form
I'm still wrapping my head around a lot of things. In Planet Mercenary, each player has three fireteam members, basically a squad that follows him and takes orders. Each fireteam member has a role, something like "Specialist" or "Officer-in-Training" and five skills, Combat, Physical, Mental, Social, and Damage. The role is partly cosmetic and partly determines which skills can be chosen for that fireteam member (for example, a Specialist gets +1 Mental and +1 to another skill that isn't Damage). The skills chose can be doubled up, so a Specialist might have +2 Mental, or an Officer-in-Training might have +2 Social.
Currently, each fireteam member has fields that contain the values for those five skills, and a field for their name. I would like to be able to edit those Fireteam members to set a role, and then the two skills that they can pick based on that role (although I'm currently ignoring the role and working toward letting the user select two skills. I figure I can then refine it to the role setup), and then be able to edit additional details for players who want more info on their Fireteam members (race, biography, etc). First off, I'm finding myself going back and forth on how to handle the skill bonuses. Since they're user-selected, I'm considering setting each member up with a Gizmo, creating a component/compset for the skills, and then "things" for each of the five skills, and letting a Chooser Table add them to the Fireteam member, either on the Fireteam Tab (which would show the aggregate value of adding up the skill values for each of the team members, then have individual entries below) or using a separate Form (so that the user would use the name and skill values in a table, then could click on a Configure button to actually set details). Right now, my approach is to set up an FTSkill component/autocompset, and then have "thing" entries for the five skills which have an "eval" to increment the relevant fields on their parent, if present. I'm still trying to set that up, so I don't have code. But that seems kind of ugly and hacky for something working on a set list of skills, which also exist as fields on another thing. I also find myself trying to think through how to set things up so that a particular role has two sets of choices that can be set up. *wry grin* And, I guess, after that, the user interface for it? Long story short, my brain is just not twisting the direction I need on this. Does it make sense to just add instances onto that Fireteam member representing the Skill Bonus and then total them up instead of storing a Field? Or should the field do that count maybe? Under assumptions that I feel are safe:
Anyhow, I'm going to keep plugging away, and I'll provide what code I have as I refine my idea, but I want to put it out here. Code:
<component Code:
<!-- Fireteam --> Code:
<!-- Fireteam Thing --> |
OK... I think I understand this a little better. I made my Fireteam thing a UserSelect to get the two menus (I'll figure out the Role later) and added some FTSkill things to pull the list from.
Code:
<thing Code:
if (field[usrChosen1].chosen.field[name].text = "Physical") then |
I'm actually wondering if it would make more sense to be using tags here instead of field values... if I can get the menus to set the relevant tags, then I could assign them to the fireteam members, propagate them to the hero, and then do the counts on each.
|
Right. And it's the "compare" function to compare strings. Setting up the if/elseif. :)
|
Quote:
|
What's the best way to set the tag from the menu_thing?
|
Quote:
For example if field[usrChosen1].chosen. was a list of attributes and you had tags of Attr.Physical or Attr.Mental you could have then: Code:
if (field[usrChosen1].chosen.tagis[Attr.Physical] = 1) then |
You're absolutely right. I was overthinking it. Thank you.
|
I'm learning more and more about how to make this all work... among other things, I finally understand how to roll my own menuthings instead of hamfisting UserSelect into everything.
I'm trying to get the Fireteam roles working for proscribing what skills can be picked. It seemed like the easiest way to do that would be to set tags on them for what skills can be picked, and it seems to be working. The part which I'm still a bit hazy on is how to make it so that changing the Role also changes the chosen skills in the menus. Ideally, I'd like to make it so that, if there's just one choice, it sets it. If there are more, it keeps the current value if it's valid, and sets it to either the first valid choice or not defined if the new role doesn't support that skill. Code:
<thing Code:
<eval index="1" phase="PreTraits" priority="4500"> |
Quote:
Some examples. Assume these scripts are running on a thing called 'Shadow1'. :) In addition Shadow1 has been set with a tag of Helper.Food. Code:
~ Copy tag UseAttr.aDEX from aDEX Pick to ourself Code:
~ Copy any Helper tags from our self to the Hero container Hope that helps. :) |
All times are GMT -8. The time now is 07:37 AM. |
Powered by vBulletin® - Copyright ©2000 - 2024, vBulletin Solutions, Inc.
wolflair.com copyright ©1998-2016 Lone Wolf Development, Inc. View our Privacy Policy here.