• 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

Disabling a gizmo edit form popup

Kairos

Well-known member
Having some trouble figuring this one out.

I'm doing a ruleset for Qin the Warring States. Weapon skills can have combat techniques associated with them, but they are not required.

So, I have an entity defined that I attach to weapon skills as gizmos, and the pick template in the skills tab has an edit action button associated with it. I also have a form which includes the Combat Technique compset. Everything is working as it should except for the fact that when the a skill is added to the skill tab, the form to choose a combat technique automatically pops up. If I cancel out of the form without picking a combat technique, the Skill pick is deleted after the combat technique form closes.

If I select a combat technique, everything works fine. My question is: can I change the behavior whereby the Combat Technique form appears automatically when the Skill pick (which has the gizmo) is picked? Ideally, I'd like to be able to add a Skill pick without the combat technique form coming up automatically.

Thanks in advance!


Code:
  <!-- Entity for weapon skills and combat techniques -->
   <entity
	  id="entWpnCT"
	  form="frmCT"
	  defaultthing="ctHelper">
	  <bootstrap thing="ctHelper"/>
	  <bootstrap thing="ctInfo"/>
	</entity>

Code:
<!-- Bangshu Skill  -->
	<thing
		id="skBangshu"
		name="Bangshu"
		compset="Skill"
		isunique="yes"
		description="This Skill enables a character to use a long or short stick as a weapon.">
		<fieldval field="trtAbbrev" value="Bsu"/>
		<fieldval field="sklAlias" value="stick"/>
		
		<!-- Tags -->
		<tag group="User" tag="WpnSkill"/>
		
		<!-- Specify the attribute to which this skill is linked -->
		<link linkage="attribute" thing="attrMetal"/>
		<child entity="entWpnCT"/>
    </thing>

Code:
  <portal
    id="ctCombTech"
    style="tblNormal">
    <table_dynamic
      component="CombTech"
      showtemplate="SimpleItem"
      choosetemplate="SimpleItem"
      showfixedlast="yes"
	  showsortset="CombTech"
      addpick="ctHelper"
	  headerpick="ctInfo">
      <candidate>!Hide.CombTech</candidate>
      <titlebar><![CDATA[
        @text = "Add a Combat Technique - " & hero.child[resAbility].field[resSummary].text
        ]]></titlebar>
      <description/>
      <headertitle><![CDATA[
        @text = "Combat Techniques: " & hero.child[resAbility].field[resSummary].text
        ]]></headertitle>
      <additem><![CDATA[
        ~if we're in advancement mode, we've been frozen, so display accordingly
        if (state.iscreate = 0) then
          @text = "{text clrgrey}Add Combat Techniques Via Advances Tab"
          done
          endif

        ~set the color based on whether the proper number of slots are allocated
        if (hero.child[resAbility].field[resLeft].value = 0) then
          @text = "{text clrgrey}"
        elseif (hero.child[resAbility].field[resLeft].value < 0) then
          @text = "{text clrwarning}"
          endif
        @text &= "Add New Combat Technique"
        ]]></additem>
      </table_dynamic>
    </portal>

  <layout
    id="ctLayout"
    marginvert="4">
    <portalref portal="ctCombTech" taborder="20"/>
    <position><![CDATA[

      ~position and size the table to span the full layout
      portal[ctCombTech].left = 0
      portal[ctCombTech].width = width
      
      ]]></position>
    </layout>

  <form
	id="ctForm"
	name="Combat Technique"
	marginhorz="10"
	marginvert="5"
	entity="entWpnCT">
	<layoutref layout="ctLayout"/>
	<position><![CDATA[
	  layout[ctLayout].width = 250
	  perform layout[ctLayout].render
	  width = layout[ctLayout].width
	  height = 200
	  ]]></position>
	</form>
 
I'm sorry, you've thrown so much information at me that I can't figure out what question you're trying to ask me. Please clarify.
 
I'm sorry, you've thrown so much information at me that I can't figure out what question you're trying to ask me. Please clarify.

Yeah, sorry about that. :o

When I add a Skill pick that has a gizmo in its Thing definition, the form associated with the entity pops up automatically. Is there any way to disable that form automatically popping up when the pick is made so that the user just has to use the edit button? I can't figure out why the gizmo form is appearing or how to make it stop.

Thanks!
 
That's the purpose of gizmos - to offer customization options to the user. If there are customization options available, wouldn't they want to start customizing it as soon as they add it?
 
That's the purpose of gizmos - to offer customization options to the user. If there are customization options available, wouldn't they want to start customizing it as soon as they add it?

Not in this case. Combat techniques cost resources, so it's conceivable that you might have a weapon skill pick without an associated combat technique. In other words, they're not required. Also, the combat techniques available to you depend on the score of the associated weapon skill, so it'd be nice to be able to set that BEFORE selecting any combat techniques.
 
The form doesn't already offer "Add" and "Customize" buttons?


Here's a screencast of what's happening:

http://www.screenr.com/Wto7

1. First, adding the skill triggers the popup. Canceling out of the popup without making a selection removes the skill pick. (All this is the behavior I'd like to change -- I'd like to be able to add a skill without necessarily adding a combat technique).

2. Next, I make a selection from the popup, then go an add another via the edit button. Revealing the form via the edit button only is the desired behavior.

Thanks again for your time and expertise! :)
 
Last edited:
Sorry, I had forgotten that showing both add and customize isn't the default setting. I've added a new post to the stickied thread about gizmos that outlines the available options for this (post #5).
 
Last edited:
Sorry, I had forgotten that showing both add and customize isn't the default setting. I've added a new post to the stickied thread about gizmos that outlines the available options for this (post #5).

Mathias,

Is there a way to enable/disable the customize button on the form? The Doctor Who game offers several pre-built example gadgets. If the user selects one of those I'd like to force the addbehavior="never" context, but for the basic, 'build your own' gadget things I'd like to force either the customize or default behavior.
 
Back
Top