• 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

choosing weapon

Gomo

Well-known member
I need a drop-down menu for choosing weapons in Tactical Console.
So far I tried various approaches, but none works.
I tried to set-up menu_array several times in various places.
I would post some code but basically nothing works so there is nothing to post.
How should I set it up?
 
I tried sth like this:
Code:
			 <portal 
			 id="wpnchsr2" 
			 style="menuNormal">
  <menu_things 
  field="grStkName" 
  component="Gear" 
  maxvisible="20"
  usepicksfield="adjUsePick" 
  candidatefield="opCandid">
    <candidate>!Equipment.Natural</candidate>
    </menu_things>
  </portal>

with such errors:
Code:
Template 'tacPick' - Reference to portal 'wpnchsr2' using a field for a different component set
Portal 'wpnchsr2' - Reference to incompatible field type/style/behavior based on portal type
Portal 'wpnchsr2' - A candidate tag expression and a field-based candidate reference are mutually exclusive

I tried also some variation of above but always get confused with incompatibility and component issues.
 
Study the wiki page on how fields are defined - you need different settings to create a field that goes along with a menu_things than to create the field to go along with a menu_array.
 
Well I read them in some part but I can understand only parts that I used.
Right now I have problem with figuring out which field is bad:
field="grStkName" or candidatefield="opCandid".
When I changed "grStkName" to "name" or "livename" I've got one error less.
I tried this:
Code:
			 <portal 
			 id="wpnchsr2" 
			 style="menuNormal">
  <menu_things 
  field="name" 
  component="Gear" 
  maxvisible="20"
  usepicks="hero" 
  >
    <candidate>Equipped.?</candidate>
    </menu_things>
  </portal>

With errors:
Code:
Portal 'wpnchsr2' - Reference to incompatible field type/style/behavior based on portal type

so with my understanding of this is that for some reason I cant use field with the name.

I also tried:
to use field from Actor component like this:
Code:
	      <field
      id="wpnChoice"
      name="Selection Tag Expression"
      type="derived"
      maxlength="1000">
      ]]></eval>   -->
      </field>
And the same one with new component in Component.core:
Code:
		 <component
    id="WpnChoice"
    name="Choose Equipped Items">
		      <field
      id="wpnChoice"
      name="Selection Tag Expression"
      type="derived"
      maxlength="1000">
      </field>   
	  
	    </component>

In other samples such field works so I don't know what's wrong.
I know there were used eval script to determine what to choose, but I have problems with that too.
 
You don't want to re-use an existing field for this. You'll need to create a new field just for this.
 
I just moved
Code:
 <field
      id="wpnChoice"
      name="Selection Tag Expression"
      type="derived"
      maxlength="1000">
	        </field>
into Gear component, still have got those errors.
 
As I said - study what options you can assign to a field. The first thing you'll need to change is that this is a user-controlled menu - that means it can't be type="derived" - derived fields can only be changed by scripts, not by the user.
 
Back
Top