• 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

Buy/Sell with gizmos?

TCArknight

Well-known member
Howdy!

I think I'm missing something dealing with the transactions with gizmo components.

1) The Gear component has the grCost field and the xactsetup, etc. scripts
2) I have a BaseWeapon component that includes Gear and has a gizmo called LoadDetail
3) If I purchase a weapon, everything on the Buy/Sell looks good and works as expected.
4) It I edit the gizmo, intending to purchase an "Attachment" (Attachment Component(also including the Gear and grCost) and AttachmentHelper as well), then in the description the cost of the attachment is properly displayed, but for Buy/Sell purposes costs are all 0.

Is there an example available of how I need to set things up for this kind of thing? Or am I missing something simple in the <xactsetup> bit?

Thanks!
TC
 
What are the settings on the table where you're making the purchase? Do they look similar to other tables, where you're buying gear, with all the same buy/sell information?
 
They look alike for the most part, One difference I see is that the table to choose an attachment (gmAttachment) ass the addpick="GearHelper" because it's using a gizmo.
Would, because of this, I need to pull the cost from the attachment to the helper?

<code>
<portal
id="arWeapon"
style="tblNormal">
<table_dynamic
component="Gear"
showtemplate="arWpnPick"
showsortset="WeaponRange"
choosetemplate="arWpnThing"
headertemplate="arWpnPick"
buytemplate="BuyCash"
selltemplate="SellCash">
<list>component.WeaponBase</list>
<candidate inheritlist="yes">!Equipment.Natural</candidate>
<titlebar><![CDATA[
@text = "Select Weapon(s) to Purchase from the List Below"
]]></titlebar>
<additem><![CDATA[
@text = "Add New Weapon(s)"
]]></additem>
</table_dynamic>
</portal>

<portal
id="gmAttachment"
style="tblNormal">
<table_dynamic
component="Attachment"
showtemplate="AttachmentPick"
choosetemplate="AttachmentPick"
addpick="GearHelper"
headerpick="GearHelper"
candidatepick="GearHelper"
candidatefield="ghGearAttachExpr"
buytemplate="BuyCash"
selltemplate="SellCash">
<titlebar><![CDATA[
@text = "Add an Attachment "
]]></titlebar>
<description/>
<headertitle><![CDATA[
@text = "Attachments"
]]></headertitle>
<additem><![CDATA[
@text &= "Add New Attachment"
]]></additem>
</table_dynamic>
</portal>

</code>
 
Switch the component="" on the attachment table to a component that has your <xactsetup>, <xactbuy>, etc. elements on it - that's Gear, normally. That'll mean you'll need to add a list expression (and a candidate with inheritlist) to keep it so that this table only shows attachments, the same way the weapon table is based on Gear, but then uses a list and candidate to only show weapons. The component="" is used to tell the table where to look to see what buy/sell mechanics to use for this item.
 
Back
Top